‎2009 Jun 12 6:18 PM
Hi Sap Forums!,
Looking for some help here:
<< Unformatable code removed >>
I am getting the errors:
"Error in document: BKPFF $ ECDCLNT200"
"FI / CO interface: Line Item Entered Several Times"
cheers!
Edited by: keith warnock on Jun 12, 2009 7:18 PM
Edited by: Rob Burbank on Jun 12, 2009 2:23 PM
‎2009 Jun 12 6:22 PM
‎2009 Jun 12 6:22 PM
‎2009 Jun 12 7:23 PM
Because you posted too much code. The limit is 2,500 characters. Please only post the relevant portions of your code.
Rob
‎2009 Jun 12 7:40 PM
Thanks Rob,
FORM F_FILL_LINE_ITEMS .
* *LOOP AT gt_pcard_post INTO pcard_post_rec.
STATICS: ls_posnr TYPE POSNR_ACC,
ls_amt TYPE zsxcram,
ls_assignment TYPE DZUONR.
CLEAR: ls_posnr,
ls_amt,
ls_assignment.
CLEAR: gt_doc_values,
gt_doc_item.
*Fill Lines of Document Item
CONCATENATE pcard_post_rec-zlgseg1 pcard_post_rec-zlgseg2 pcard_post_rec-zlgseg3
pcard_post_rec-zlgseg4 pcard_post_rec-zlgseg5
into ls_assignment.
IF pcard_post_rec-zlgdram is not INITIAL.
gt_doc_item-doc_type = 'D'.
ls_amt = pcard_post_rec-zlgdram.
ELSE.
gt_doc_item-doc_type = 'C'.
ls_amt = pcard_post_rec-zlgcram.
ENDIF.
ls_posnr = gv_cnt + 1.
gt_doc_item-comp_code = pcard_post_rec-zlsapco.
gt_doc_item-itemno_acc = ls_posnr.
gt_doc_item-GL_ACCOUNT = pcard_post_rec-zlsapac.
gt_doc_item-profit_ctr = pcard_post_rec-zlsappc.
if cb_test = 'X'.
gt_doc_item-pstng_date = sy-datum.
else.
gt_doc_item-pstng_date = pcard_post_rec-ZLGPSDT.
endif.
APPEND gt_doc_item.
* Fill Line of Document Value.
gt_doc_values-itemno_acc = ls_posnr.
gt_doc_values-currency = gv_comp_curr. " posting companies currency..
gt_doc_values-amt_doccur = ls_amt.
APPEND gt_doc_values.
ENDFORM. " F_FILL_LINE_ITEMS
CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'
EXPORTING
documentheader = gv_doc_header
IMPORTING
OBJ_TYPE = gv_doc_header-obj_type
OBJ_KEY = gv_doc_header-obj_key
OBJ_SYS = gv_doc_header-obj_sys
TABLES
accountgl = gt_doc_item
currencyamount = gt_doc_values
return = gt_return
EXTENSION1 = gt_EXTENSION1.Edited by: keith warnock on Jun 12, 2009 8:43 PM
It's good to add code tags as well and remove comments.
Edited by: Rob Burbank on Jun 12, 2009 2:47 PM
Edited by: Rob Burbank on Jun 12, 2009 2:48 PM
‎2009 Jun 12 8:06 PM
Make sure that in the item tables, each line item number is different from each other (including entries in the other tables).
Rob
‎2009 Jun 15 9:49 AM