‎2009 Jul 28 3:12 PM
Hi Forums!
I am progressing in my errors with this bapi but, I have run into this one:
612 No currency line exists for line item 0000000000
My Code, is populating the line items, I am not sure why this is occuring.
if not pcard_post_rec-zlsapac is initial.
gt_doc_item-itemno_acc = ls_posnr.
gt_gl_item-gl_account = pcard_post_rec-zlsapac.
gt_gl_item-comp_code = pcard_post_rec-zlsapco.
gt_gl_item-pstng_date = pcard_post_rec-zlgpsdt.
gt_gl_item-doc_type = doctype.
gt_gl_item-alloc_nmbr = ls_assignment.
IF pcard_post_rec-zlsapac < 500000.
gt_gl_item-item_text = ''.
ELSE.
gt_gl_item-item_text = pcard_post_rec-zlguser.
ENDIF.
gt_gl_item-costcenter = pcard_post_rec-zlsapcc.
gt_gl_item-orderid = LV_ORDNUM.
APPEND gt_gl_item.
‎2009 Jul 28 3:21 PM
HI
Maintain the field currency in the item structure bapiaccr09.
Regards,
Raghu
‎2009 Jul 28 3:25 PM
‎2009 Jul 28 3:28 PM
Hi,
You need to pass the currencyamount for every line item
Eg:-
For first line item..
itab_currencyamount-itemno_acc = '0000000001'.
itab_currencyamount-currency = 'USD'.
itab_currencyamount-amt_doccur = amount.
APPEND itab_currencyamount.
For second line item...
itab_currencyamount-itemno_acc = '0000000002'.
itab_currencyamount-currency = 'USD'.
itab_currencyamount-amt_doccur = amount.
APPEND itab_currencyamount.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = documentheader
TABLES
accountgl = itab_accountgl
currencyamount = itab_currencyamount
return = itab_return.
Regards,
Satish