Application Development 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: 

Table control in bdc

Former Member
0 Kudos

Hi,

Could anybody explain me about table control in bdc? i am facing problem while uploading vendor master data.

Thnks in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Table control is used to enter multiple line items in bdc. Pls go thru this link i hope this would solve ur issue.

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

Regards.

5 REPLIES 5

raymond_giuseppi
Active Contributor
0 Kudos

Did you perform some search in this forum with keywords like [Table control in bdc|https://forums.sdn.sap.com/search.jspa?threadID=&q=Tablecontrolin+bdc&objID=c42&dateRange=all&numResults=15&rankBy=10001] ?

This question appears in the forum repeatedly.

Regards,

Raymond

Former Member
0 Kudos

Hi,

Table control is used to enter multiple line items in bdc. Pls go thru this link i hope this would solve ur issue.

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

Regards.

Former Member
0 Kudos

Hi,

Check this code for table control to update multiple bank details in vendor masterupload


    DATA : fnam(20) TYPE c,
  idx TYPE c.
  MOVE 1 TO idx.
  LOOP AT it_bank  WHERE lifnr = p_lifnr-low.
    CONCATENATE 'LFBK-BANKS(' idx ')' INTO fnam.
    PERFORM bdc_field USING fnam
    it_bank-banks.

    CONCATENATE 'LFBK-BANKL(' idx ')' INTO fnam.
    PERFORM bdc_field USING fnam
    it_bank-bankl.

    CONCATENATE 'LFBK-BANKN(' idx ')' INTO fnam.
    PERFORM bdc_field USING fnam
    it_bank-bankn.

    CONCATENATE 'LFBK-KOINH(' idx ')' INTO fnam.
    PERFORM bdc_field USING fnam
    it_bank-koinh.
    idx = idx + 1.
  ENDLOOP.

  PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
  PERFORM bdc_field USING 'BDC_CURSOR'
  'LFBK-BANKS(01)'.
  PERFORM bdc_field USING 'BDC_OKCODE'
  '=ENTR'.
  PERFORM bdc_dynpro USING 'SAPMF02K' '0210'.
  PERFORM bdc_field USING 'BDC_CURSOR'
  'LFB1-FDGRV'.
  PERFORM bdc_field USING 'BDC_OKCODE'
  '/00'.
  PERFORM bdc_field USING 'LFB1-AKONT'
  p_akont .
  PERFORM bdc_field USING 'LFB1-FDGRV'
  p_fdgrv .
  PERFORM bdc_dynpro USING 'SAPMF02K' '0215'.
  PERFORM bdc_field USING 'BDC_CURSOR'
  'LFB1-ZTERM'.
  PERFORM bdc_field USING 'BDC_OKCODE'
  '/00'.
  PERFORM bdc_dynpro USING 'SAPMF02K' '0220'.
  PERFORM bdc_field USING 'BDC_CURSOR'
  'LFB5-MAHNA'.
  PERFORM bdc_field USING 'BDC_OKCODE'
  '/00'.
  PERFORM bdc_dynpro USING 'SAPMF02K' '0310'.
  PERFORM bdc_field USING 'BDC_CURSOR'
  'LFM1-WAERS'.
  PERFORM bdc_field USING 'BDC_OKCODE'
  '/00'.
  PERFORM bdc_field USING 'LFM1-WAERS'
  p_waers .
  PERFORM bdc_dynpro USING 'SAPMF02K' '0320'.
  PERFORM bdc_field USING 'BDC_CURSOR'
  'WYT3-PARVW(01)'.
  PERFORM bdc_field USING 'BDC_OKCODE'
  '=ENTR'.
  PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
  PERFORM bdc_field USING 'BDC_OKCODE'
  '=YES'.
*CALL TRANSACTION 'XK01' USING t_bdcdata
*MODE 'A'
*UPDATE 'S'
*MESSAGES INTO t_bdcmsgcoll.


  CALL TRANSACTION 'XK01' USING t_bdcdata MODE   c_mode
                                          UPDATE c_update
                                          MESSAGES  INTO   t_errtrans.

  WRITE t_errtrans TO i_message.


ENDFUNCTION.

Regards,

Vik

Former Member
0 Kudos

BDC table control is an area on the screen in which you can display data in tabular form. You process it using a loop. Table controls are comparable to step loop tables. While a table control consists of a single definition row, step loop blocks may extend over more than one row. Table controls are more flexible than step loops, and are intended to replace them

This is the diff betn Table controls and step loops .

In Table Controls

Data is displayed in the form of table.

Table control gives user the feeling of an actual table.

You can scroll through the table vertically as well as horizontally.

You can select rows and columns.

You can resize the with of columns.

You can have separator lines between rows and columns.

Automatic resizing of the table when the user resizes the window.

You can update information in the table control and it can be updated inthe database table by writing code for it.

In Step Loops ,

Step loops are type of screen tables.

Step loops are nothing but repeated blocks of fields in a screen.

Each block contains one or more fields.

Step loops don't give you feeling of actual table.

You can scroll vertically but not horizontally.

why & when we should go for table control in bdc

we use the table control in bdc when we have a multiple record in a single transaction.

like : In pp module we have multiple line items(SFG, RW etc.) to upload a BOM of FG Item.

if u need some bdc for table control, pls revert back...i will send u bdc for bom uploading..

which will be helpful to understand u better..

Former Member
0 Kudos

Hi Rajareddy,

Go through these links which provides every step regarding TABLE CONTROLL IN BDC.

1)Handling table controll in bdc

[http://www.sap-basis-abap.com/abap/handling-table-control-in-bdc.htm]

2)SDN WIKI about table control in BDC

[https://wiki.sdn.sap.com/wiki/display/Snippets/Sample%20BDC%20for%20Table%20Control]

3) SDN thread about table controll in BDC

[;

Hope this gives complete information you needed

Thank you,

Pavan.