Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

bdc program for bom creation

Former Member
0 Likes
599

Hi gurus,

pls help me over creating bdc for data upload through excel for BOM creation and if code be given as i have not worked on table controls earlier in bdc how to do that.

3 REPLIES 3
Read only

Former Member
0 Likes
541

Hi,

search in SCN with TABLE CONTROL BDC u will get number of threads, Lookinto wiki also.

regards,

pravin

Read only

Former Member
0 Likes
541

Hi Ved,

Table Control is not much difficult task in BDC.

Just go ahead with recording and add as many items as you can so that page down code could be captured.

After that you have to write the repeated code within the loop only with help of table control.

Its better to do your self.

Little help you can get it from SDN as i am helping by giving you ssample code of table control.

For table control you have to declare extra variables say

DATA: CNT(3),

FLDNAME(25),

CHK(3).

Lator on use these within the loop as given below:

LOOP AT RECORD WHERE MATNR = MATNR.

CNT = CNT + 1.

CONDENSE CNT.

CLEAR FLDNAME.

CONCATENATE 'RC29P-IDNRK(' CNT ')' INTO FLDNAME.

PERFORM BDC_FIELD USING FLDNAME RECORD-MATDETL.

CLEAR FLDNAME.

CONCATENATE 'RC29P-MENGE(' CNT ')' INTO FLDNAME.

PERFORM BDC_FIELD USING FLDNAME RECORD-MENGE.

CLEAR FLDNAME.

CONCATENATE 'RC29P-POSTP(' CNT ')' INTO FLDNAME.

PERFORM BDC_FIELD USING FLDNAME RECORD-POSTP.

IF CNT > 10.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=FCNP'.

IF CHK <> 0.

CNT = CNT - 1.

ENDIF.

DO CNT TIMES.

PERFORM BDC_DYNPRO USING 'SAPLCSDI' '0130'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' 'RC29P-POSNR'.

PERFORM BDC_DYNPRO USING 'SAPLCSDI' '0131'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' 'RC29P-POTX1'.

CHK = 1.

ENDDO.

Hope you can understand bit....

Regds,

Anil

Edited by: Anil Katoch on Aug 12, 2009 2:53 PM

Read only

Former Member
0 Likes
541

Hi,

Please search in SCN before posting. Here is one of the example for using table conrol in BDC.

[http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm]

Regards,

Vik