We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

Re: [sap-dev] BAPI_CTRACDOCUMENT_CREATE example

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Reply from USER_2500361 on Mar 14 at 3:55 AM
Hi,

Please check the parameters in below FM
CALL FUNCTION 'BAPI_CTRACDOCUMENT_CREATE'
EXPORTING
testrun = l_testrun
documentheader = l_wa_docuheader
completedocument = 'X'
IMPORTING
documentnumber = l_new_doc
return = l_wa_return
TABLES
partnerpositions = li_bapidfkkop.

Fill the above parameters accordingly.

For L_WA_DOCUHEADER
l_wa_docuheader-fikey = l_postkey.
l_wa_docuheader-appl_area = g_wa_dfkkko-applk.
l_wa_docuheader-doc_type = g_wa_dfkkko-blart.
l_wa_docuheader-doc_date = sy-datum.
l_wa_docuheader-post_date = sy-datum.
l_wa_docuheader-currency = g_wa_dfkkko-waers.
l_wa_docuheader-doc_source_key = g_wa_dfkkko-herkf. .

For li_bapidfkkop,


l_wa_bapidfkkop-rep_item = g_wa_dfkkop-opupw.
l_wa_bapidfkkop-item = g_wa_dfkkop-opupk.
l_wa_bapidfkkop-sub_item = g_wa_dfkkop-opupz.
l_wa_bapidfkkop-comp_code = g_wa_dfkkop-bukrs.
l_wa_bapidfkkop-buspartner = g_wa_dfkkop-gpart.
l_wa_bapidfkkop-contract = g_wa_dfkkop-vtref.
l_wa_bapidfkkop-cont_acct = g_wa_dfkkop-vkont.
l_wa_bapidfkkop-appl_area = g_wa_dfkkko-applk.
l_wa_bapidfkkop-main_trans = g_wa_dfkkop-hvorg.
l_wa_bapidfkkop-sub_trans = g_wa_dfkkop-tvorg.
l_wa_bapidfkkop-actdeterid = g_wa_dfkkop-kofiz.
l_wa_bapidfkkop-division = g_wa_dfkkop-spart.
l_wa_bapidfkkop-g_l_acct = g_wa_dfkkop-hkont.
l_wa_bapidfkkop-tax_code = g_wa_dfkkop-mwskz.
l_wa_bapidfkkop-doc_date = sy-datum.
l_wa_bapidfkkop-post_date = sy-datum.
l_wa_bapidfkkop-net_date = sy-datum.
l_wa_bapidfkkop-text = g_wa_dfkkop-opbel.
l_wa_bapidfkkop-currency = g_wa_dfkkop-waers.
l_wa_bapidfkkop-amount = g_wa_dfkkop-betrw.
APPEND l_wa_bapidfkkop TO li_bapidfkkop.

---------------Original Message---------------
From: Wonder
Sent: Wednesday, March 13, 2013 4:43 AM
Subject: BAPI_CTRACDOCUMENT_CREATE example

Does anyone have a working example of BAPI_CTRACDOCUMENT_CREATE where only the document header and partner positions have been entered and complete document is set to X. I keep on getting the error message G/L Account cannot be posted to, please correct your entry. So I would like to know which fields need to be filled in the two structures.

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2013 Ziff Davis, Inc. and message author.
Ziff Davis, Inc. 28 E 28th Street New York, NY 10016
USER_2500361  
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Earn Recognition for Your Contributions at Toolbox for IT. Gain Points for Community Achievements

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language