‎2010 Aug 25 11:17 AM
Hi Frds,
I have one requirement to post Customer Invoice (FB70) through PI Interface . My field values are :
BUSCS ACCNT BLDAT BUDAT XBLNR WRBTR WAERS SGTXT
Invoice 330000002 25.08.2010 25.08.2010 100 5500 INR 12345/1/123343
HKONT(01) WRBTR(01) ZUONR HKONT(02) WRBTR(02) ZUONR (02)
20001 5000 12365-00 10198 500 33456-00
with these values INVOICE is creating in FB70. But not in BAPI.
t_docheader-obj_type = 'FKKSU'.
t_docheader-obj_KEY = '$'.
t_docheader-obj_SYS = 'DEVCLNT210'.
t_docheader-BUS_ACT = 'RFBU'.
t_docheader-USERNAME = sy-uname.
t_docheader-HEADER_TXT = '1234556789'.
t_docheader-REF_DOC_NO = '100'.
t_docheader-COMP_CODE = 'SGI'.
t_docheader-DOC_DATE = sy-datum.
t_docheader-PSTNG_DATE = sy-datum.
t_docheader-username = sy-uname.
APPEND T_DOCHEADER.
t_accountgl-itemno_acc = '1'.
t_accountgl-gl_account = '0000020001'.
t_accountgl-comp_code = 'SGI'.
t_accountgl-pstng_date = sy-datum.
append t_accountgl to tt_accountgl.
clear t_accountgl.
t_accountgl-itemno_acc = '2'.
t_accountgl-gl_account = '0000010198'.
t_accountgl-comp_code = 'SGI'.
t_accountgl-pstng_date = sy-datum.
t_accrec-ITEMNO_ACC = '1' .
t_accrec-customer = '0330000002'.
append t_accrec to tt_accrec.
t_curr_amt-ITEMNO_ACC = '1'.
t_curr_amt-CURRENCY = 'INR'.
t_curr_amt-amt_doccur = '2000'.
APPEND T_CURR_AMT to tt_curr_amt.
CLEAR T_CURR_AMT.
t_curr_amt-ITEMNO_ACC = '2'.
t_curr_amt-CURRENCY = 'INR'.
t_curr_amt-amt_doccur = '2000-'.
APPEND T_CURR_AMT to tt_curr_amt.
CLEAR T_CURR_AMT.
But how to fill Currency amount for 2 amounts means whether i have to maintain 4 line items(+ & -). I have searched many forums......didnt get the answer. Actually i am getting an error " FI/CO interface: Line items Repeated".
and where to give the header WRBTR (amount) in BAPI.
‎2010 Aug 26 3:22 PM
The first thing is dont pass values for below 3 fileds , it will automatically populate
t_docheader-obj_type = 'FKKSU'.
t_docheader-obj_KEY = '$'.
t_docheader-obj_SYS = 'DEVCLNT210'.
and then pass the item level tables as below ( item number not repeat in accountgl and recible) you can pass below code as it is
t_accountgl-itemno_acc = '1'.
t_accountgl-gl_account = '0000020001'.
t_accountgl-comp_code = 'SGI'.
t_accountgl-pstng_date = sy-datum.
append t_accountgl to tt_accountgl.
clear t_accountgl.
t_accountgl-itemno_acc = '2'.
t_accountgl-gl_account = '0000010198'.
t_accountgl-comp_code = 'SGI'.
t_accountgl-pstng_date = sy-datum.
t_accrec-ITEMNO_ACC = '3' .
t_accrec-customer = '0330000002'.
append t_accrec to tt_accrec.
t_accrec-ITEMNO_ACC = '4' .
t_accrec-customer = '0330000002'.
append t_accrec to tt_accrec.
t_curr_amt-ITEMNO_ACC = '1'.
t_curr_amt-CURRENCY = 'INR'.
t_curr_amt-amt_doccur = '2000'.
APPEND T_CURR_AMT to tt_curr_amt.
CLEAR T_CURR_AMT.
t_curr_amt-ITEMNO_ACC = '2'.
t_curr_amt-CURRENCY = 'INR'.
t_curr_amt-amt_doccur = '2000-'.
APPEND T_CURR_AMT to tt_curr_amt.
CLEAR T_CURR_AMT.
t_curr_amt-ITEMNO_ACC = '3'.
t_curr_amt-CURRENCY = 'INR'.
t_curr_amt-amt_doccur = '2000-'.
APPEND T_CURR_AMT to tt_curr_amt.
CLEAR T_CURR_AMT.
t_curr_amt-ITEMNO_ACC = '4'.
t_curr_amt-CURRENCY = 'INR'.
t_curr_amt-amt_doccur = '2000-'.
APPEND T_CURR_AMT to tt_curr_amt.
CLEAR T_CURR_AMT.
‎2010 Aug 25 11:56 AM
‎2010 Aug 25 3:10 PM
I have already seen that thread...nobody answered his Q....even for me also not useful...any other ways frd.....
‎2010 Aug 26 3:22 PM
The first thing is dont pass values for below 3 fileds , it will automatically populate
t_docheader-obj_type = 'FKKSU'.
t_docheader-obj_KEY = '$'.
t_docheader-obj_SYS = 'DEVCLNT210'.
and then pass the item level tables as below ( item number not repeat in accountgl and recible) you can pass below code as it is
t_accountgl-itemno_acc = '1'.
t_accountgl-gl_account = '0000020001'.
t_accountgl-comp_code = 'SGI'.
t_accountgl-pstng_date = sy-datum.
append t_accountgl to tt_accountgl.
clear t_accountgl.
t_accountgl-itemno_acc = '2'.
t_accountgl-gl_account = '0000010198'.
t_accountgl-comp_code = 'SGI'.
t_accountgl-pstng_date = sy-datum.
t_accrec-ITEMNO_ACC = '3' .
t_accrec-customer = '0330000002'.
append t_accrec to tt_accrec.
t_accrec-ITEMNO_ACC = '4' .
t_accrec-customer = '0330000002'.
append t_accrec to tt_accrec.
t_curr_amt-ITEMNO_ACC = '1'.
t_curr_amt-CURRENCY = 'INR'.
t_curr_amt-amt_doccur = '2000'.
APPEND T_CURR_AMT to tt_curr_amt.
CLEAR T_CURR_AMT.
t_curr_amt-ITEMNO_ACC = '2'.
t_curr_amt-CURRENCY = 'INR'.
t_curr_amt-amt_doccur = '2000-'.
APPEND T_CURR_AMT to tt_curr_amt.
CLEAR T_CURR_AMT.
t_curr_amt-ITEMNO_ACC = '3'.
t_curr_amt-CURRENCY = 'INR'.
t_curr_amt-amt_doccur = '2000-'.
APPEND T_CURR_AMT to tt_curr_amt.
CLEAR T_CURR_AMT.
t_curr_amt-ITEMNO_ACC = '4'.
t_curr_amt-CURRENCY = 'INR'.
t_curr_amt-amt_doccur = '2000-'.
APPEND T_CURR_AMT to tt_curr_amt.
CLEAR T_CURR_AMT.
‎2010 Aug 27 7:26 PM
Chenna Kesava Reddy.......Really U had done a great help to me.....I searched so many forums for this code from last one month. I found nothing. I dont know that Line item numbers has to pass like that with out duplicates...also currency amounts as 4 line items. No body said to me this one. Truly......Frankly.......Great help u had done....and So many dont know this one.......this forum definitely will help them .......Thank you very much .....Thanks a lot.