‎2006 Sep 18 5:24 PM
Hello,
Can anybody please suggest how the BDC data needs to be uploaded if a particular Header item has multiple Line items attached to it? Its only sometimes we get the data wherein 1 header has 1 line item.
Regards
Innova
‎2006 Sep 18 5:50 PM
Hi,
When you have enter multiple line in BDC for a table control use call transaction tcode using i_bdcdata options from opt message into i_messages.
Check the below example.
data: lws_cnt type char2,
lws_field type char15.
LOOP AT i_invoicing_plan INTO wa_invoicing_plan.
lws_cnt = sy-tabix.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lws_cnt
IMPORTING
output = lws_cnt .
CONCATENATE 'FPLT-AFDAT(' lws_cnt ')' INTO lws_field.
CONCATENATE wa_invoicing_plan-date+6(2)
wa_invoicing_plan-date+4(2)
wa_invoicing_plan-date+0(4) INTO lws_date
SEPARATED BY '.'.
PERFORM bdc_field USING lws_field lws_date.
CONCATENATE 'FPLT-FPROZ(' lws_cnt ')' INTO lws_field.
lws_perct = wa_invoicing_plan-percentage.
CONDENSE lws_perct.
PERFORM bdc_field USING lws_field lws_perct.
ENDLOOP.
While calling the transaction give like this:
DATA: opt TYPE ctu_params.
opt-dismode = 'N'.
opt-updmode = 'A'.
opt-defsize = 'X'.
CALL TRANSACTION tcode
USING i_bdcdata OPTIONS FROM opt MESSAGES INTO i_messages.
LOOP AT i_messages.
ENDLOOP.
Regards,
Prakash.
‎2006 Sep 18 5:53 PM
HI,
See the below link for sample codes....
http://www.sap-basis-abap.com/abap/handling-table-control-in-bdc.htm
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
mark all the helpful answers
Regards
Sudheer