<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: BDC With table control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582609#M862505</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to these links:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-basis-abap.com/abap/handling-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-basis-abap.com/abap/handling-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac9f35c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac9f35c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Handling of table control in BDC check these links:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-basis-abap.com/abap/handling-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-basis-abap.com/abap/handling-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://arthur_ong.tripod.com/xab023.htm" target="test_blank"&gt;http://arthur_ong.tripod.com/xab023.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC Example: Using Table Control in BDC &lt;/P&gt;&lt;P&gt;Among beginners, using table control in BDC is always a puzzle. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is a sample code of handling table control in BDC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT Y730_BDC5 .&lt;/P&gt;&lt;P&gt;*HANDLING TABLE CONTROL IN BDC&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_DUMMY OCCURS 0,&lt;/P&gt;&lt;P&gt;DUMMY(100) TYPE C,&lt;/P&gt;&lt;P&gt;END OF IT_DUMMY.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_XK01 OCCURS 0,&lt;/P&gt;&lt;P&gt;LIFNR(10) TYPE C,&lt;/P&gt;&lt;P&gt;BUKRS(4) TYPE C,&lt;/P&gt;&lt;P&gt;EKORG(4) TYPE C,&lt;/P&gt;&lt;P&gt;KTOKK(4) TYPE C,&lt;/P&gt;&lt;P&gt;NAME1(30) TYPE C,&lt;/P&gt;&lt;P&gt;SORTL(10) TYPE C,&lt;/P&gt;&lt;P&gt;LAND1(3) TYPE C,&lt;/P&gt;&lt;P&gt;SPRAS(2) TYPE C,&lt;/P&gt;&lt;P&gt;AKONT(6) TYPE C,&lt;/P&gt;&lt;P&gt;FDGRV(2) TYPE C,&lt;/P&gt;&lt;P&gt;WAERS(3) TYPE C,&lt;/P&gt;&lt;P&gt;END OF IT_XK01,&lt;/P&gt;&lt;P&gt;BEGIN OF IT_BANK OCCURS 0,&lt;/P&gt;&lt;P&gt;BANKS(3) TYPE C,&lt;/P&gt;&lt;P&gt;BANKL(10) TYPE C,&lt;/P&gt;&lt;P&gt;BANKN(10) TYPE C,&lt;/P&gt;&lt;P&gt;KOINH(30) TYPE C,&lt;/P&gt;&lt;P&gt;LIFNR(10) TYPE C,&lt;/P&gt;&lt;P&gt;END OF IT_BANK.&lt;/P&gt;&lt;P&gt;DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = 'C:\VENDOR.TXT'&lt;/P&gt;&lt;P&gt;FILETYPE = 'ASC'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = IT_DUMMY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_DUMMY.&lt;/P&gt;&lt;P&gt;IF IT_DUMMY-DUMMY+0(2) = '11'.&lt;/P&gt;&lt;P&gt;IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).&lt;/P&gt;&lt;P&gt;IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).&lt;/P&gt;&lt;P&gt;IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).&lt;/P&gt;&lt;P&gt;IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).&lt;/P&gt;&lt;P&gt;IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).&lt;/P&gt;&lt;P&gt;IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).&lt;/P&gt;&lt;P&gt;IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).&lt;/P&gt;&lt;P&gt;IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).&lt;/P&gt;&lt;P&gt;IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).&lt;/P&gt;&lt;P&gt;IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).&lt;/P&gt;&lt;P&gt;IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).&lt;/P&gt;&lt;P&gt;APPEND IT_XK01.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).&lt;/P&gt;&lt;P&gt;IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).&lt;/P&gt;&lt;P&gt;IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).&lt;/P&gt;&lt;P&gt;IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).&lt;/P&gt;&lt;P&gt;IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).&lt;/P&gt;&lt;P&gt;APPEND IT_BANK.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_XK01.&lt;/P&gt;&lt;P&gt;REFRESH IT_BDCDATA.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'RF02K-REF_LIFNR'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02K-LIFNR'&lt;/P&gt;&lt;P&gt;IT_XK01-LIFNR.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02K-BUKRS'&lt;/P&gt;&lt;P&gt;IT_XK01-BUKRS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02K-EKORG'&lt;/P&gt;&lt;P&gt;IT_XK01-EKORG.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02K-KTOKK'&lt;/P&gt;&lt;P&gt;IT_XK01-KTOKK.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFA1-TELX1'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-NAME1'&lt;/P&gt;&lt;P&gt;IT_XK01-NAME1.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-SORTL'&lt;/P&gt;&lt;P&gt;IT_XK01-SORTL.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-LAND1'&lt;/P&gt;&lt;P&gt;IT_XK01-LAND1.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-SPRAS'&lt;/P&gt;&lt;P&gt;IT_XK01-SPRAS.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0120'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFA1-KUNNR'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0130'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFBK-KOINH(02)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=ENTR'.&lt;/P&gt;&lt;P&gt;DATA : FNAM(20) TYPE C,&lt;/P&gt;&lt;P&gt;IDX TYPE C.&lt;/P&gt;&lt;P&gt;MOVE 1 TO IDX.&lt;/P&gt;&lt;P&gt;LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.&lt;/P&gt;&lt;P&gt;CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;perform bdc_field using FNAM&lt;/P&gt;&lt;P&gt;IT_BANK-BANKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;perform bdc_field using FNAM&lt;/P&gt;&lt;P&gt;IT_BANK-BANKL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;perform bdc_field using FNAM&lt;/P&gt;&lt;P&gt;IT_BANK-BANKN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;perform bdc_field using FNAM&lt;/P&gt;&lt;P&gt;IT_BANK-KOINH.&lt;/P&gt;&lt;P&gt;IDX = IDX + 1.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0130'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFBK-BANKS(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0210'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFB1-FDGRV'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFB1-AKONT'&lt;/P&gt;&lt;P&gt;IT_XK01-AKONT.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFB1-FDGRV'&lt;/P&gt;&lt;P&gt;IT_XK01-FDGRV.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0215'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFB1-ZTERM'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0220'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFB5-MAHNA'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0310'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFM1-WAERS'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFM1-WAERS'&lt;/P&gt;&lt;P&gt;IT_XK01-WAERS.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0320'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'WYT3-PARVW(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLSPO1' '0300'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=YES'.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'XK01' USING IT_BDCDATA&lt;/P&gt;&lt;P&gt;MODE 'A'&lt;/P&gt;&lt;P&gt;UPDATE 'S'&lt;/P&gt;&lt;P&gt;MESSAGES INTO IT_BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM BDC_DYNPRO USING PROG SCR.&lt;/P&gt;&lt;P&gt;CLEAR IT_BDCDATA.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-PROGRAM = PROG.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-DYNPRO = SCR.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-DYNBEGIN = 'X'.&lt;/P&gt;&lt;P&gt;APPEND IT_BDCDATA.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM BDC_FIELD USING FNAM FVAL.&lt;/P&gt;&lt;P&gt;CLEAR IT_BDCDATA.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-FNAM = FNAM.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-FVAL = FVAL.&lt;/P&gt;&lt;P&gt;APPEND IT_BDCDATA.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;Hope that would clear the matters for freshers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer the link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The concept is easy: it has to indicate the index of the table control in the field name, so if you have to populate the first record of table control:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC-FIELDNAME = &amp;lt;FIELDNAME&amp;gt;(01).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you fill the second row:&lt;/P&gt;&lt;P&gt;BDC-FIELDNAME = &amp;lt;FIELDNAME&amp;gt;(02).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and so....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the problem is usually on how many records you have to load, because u can fill only the rows of table control available in the screen, If you have more records than it can be displayed yuo have to simulate the command to go next page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The number of recod can be displayed can depend on pc resolution and many program haven't command to go to next page (in this case it could be impossible create a BDC program9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A way to create a bdc program resolution indipendent is to work on the first and second row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Place the first hit in the first row of bdc; &lt;/P&gt;&lt;P&gt;Place the second insert in the second row of bdc; &lt;/P&gt;&lt;P&gt;Place the last hit to the top of table control; &lt;/P&gt;&lt;P&gt;Place the next hit in the second row; &lt;/P&gt;&lt;P&gt;Place the last hit to the top of table control; &lt;/P&gt;&lt;P&gt;Place the next hit in the second row; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward Points if found helpfull..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cheers,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Chandra Sekhar.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Mar 2008 08:17:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-26T08:17:46Z</dc:date>
    <item>
      <title>BDC With table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582603#M862499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Can you Provide steps in bdc with table control&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;venkateswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 08:03:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582603#M862499</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T08:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: BDC With table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582604#M862500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to deal with table control / step loop in BDC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steploop and table contol is inevitable in certain transactions. When we run BDC for such transactions, we will face the situation: how many visible lines of steploop/tablecontrol are on the screen? Although we can always find certain method to deal with it, such as function code 'NP', 'POPO', considering some extreme situation: there is only one line visible one the screen, our BDC program should display an error message. (See transaction 'ME21', we you resize your screen to let only one row visible, you can not enter mutiple lines on this screen even you use 'NP')&lt;/P&gt;&lt;P&gt;Now with the help of Poonam on sapfans.com developement forum, I find a method with which we can determine the number of visible lines on Transaction Screen from our Calling BDC program. Maybe it is useless to you, but I think it will give your some idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Demo ABAP code has two purposes:&lt;/P&gt;&lt;P&gt;1. how to determine number of visible lines and how to calculte page number;&lt;/P&gt;&lt;P&gt;(the 'calpage' routine has been modify to meet general purpose usage)&lt;/P&gt;&lt;P&gt;2. using field symbol in BDC program, please pay special attention to the difference in Static ASSIGN and Dynamic ASSIGN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I begin to describe the step to implement my method:&lt;/P&gt;&lt;P&gt;(I use transaction 'ME21', screen 121 for sample,&lt;/P&gt;&lt;P&gt;the method using is Call Transation Using..)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step1: go to screen painter to display the screen 121, then we can count the fixed line on this screen, there is 7 lines above the steploop and 2 lines below the steploop, so there are total 9 fixed lines on this screen. This means except these 9 lines, all the other line is for step loop. Then have a look at steploop itselp, one entry of it will occupy two lines.&lt;/P&gt;&lt;P&gt;(Be careful, for table control, the head and the bottom scroll bar will possess another two fixed lines, and there is a maximum number for table line)&lt;/P&gt;&lt;P&gt;Now we have : FixedLine = 9&lt;/P&gt;&lt;P&gt;LoopLine = 2(for table control, LoopLine is always equal to 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step2: go to transaction itself(ME21) to see how it roll page, in ME21, the first line of new page is always occupied by the last line of last page, so it begin with index '02', but in some other case, fisrt line is empty and ready for input.&lt;/P&gt;&lt;P&gt;Now we have: FirstLine = 0&lt;/P&gt;&lt;P&gt;or FirstLine = 1 ( in our case, FirstLine is 1 because the first line of new page is fulfilled)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step3: write a subroutine calcalculating number of pages&lt;/P&gt;&lt;P&gt;(here, the name of actual parameter is the same as formal parameter)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;global data: FixedLine type i, " number of fixed line on a certain screen&lt;/P&gt;&lt;P&gt;LoopLine type i, " the number of lines occupied by one steploop item&lt;/P&gt;&lt;P&gt;FirstLine type i, " possbile value 0 or 1, 0 stand for the first line of new " scrolling screen is empty, otherwise is 1&lt;/P&gt;&lt;P&gt;Dataline type i, " number of items you will use in BDC, using DESCRIBE to get&lt;/P&gt;&lt;P&gt;pageno type i, " you need to scroll screen how many times.&lt;/P&gt;&lt;P&gt;line type i, " number of lines appears on the screen.&lt;/P&gt;&lt;P&gt;index(2) type N, " the screen index for certain item&lt;/P&gt;&lt;P&gt;begin type i, " from parameter of loop&lt;/P&gt;&lt;P&gt;end type i. " to parameter of loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*in code sample, the DataTable-linindex stands for the table index number of this line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form calpage using FixedLine type i (see step 1)&lt;/P&gt;&lt;P&gt;LoopLine type i (see step 1)&lt;/P&gt;&lt;P&gt;FirstLine type i (see step 2)&lt;/P&gt;&lt;P&gt;DataLine type i ( this is the item number you will enter in transaction)&lt;/P&gt;&lt;P&gt;changing pageno type i (return the number of page, depends on run-time visible line in table control/ Step Loop)&lt;/P&gt;&lt;P&gt;changing line type i.(visible lines one the screen)&lt;/P&gt;&lt;P&gt;data: midd type i,&lt;/P&gt;&lt;P&gt;vline type i, "visible lines&lt;/P&gt;&lt;P&gt;if DataLine eq 0.&lt;/P&gt;&lt;P&gt;Message eXXX.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vline = ( sy-srows - FixedLine ) div LoopLine.&lt;/P&gt;&lt;P&gt;*for table control, you should compare vline with maximum line of&lt;/P&gt;&lt;P&gt;*table control, then take the small one that is min(vline, maximum)&lt;/P&gt;&lt;P&gt;*here only illustrate step loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if FirstLine eq 0.&lt;/P&gt;&lt;P&gt;pageno = DataLine div vline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if pageno eq 0.&lt;/P&gt;&lt;P&gt;pageno = pageno + 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;elseif FirstLine eq 1.&lt;/P&gt;&lt;P&gt;pageno = ( DataLine - 1 ) div ( vline - 1 ) + 1.&lt;/P&gt;&lt;P&gt;midd = ( DataLine - 1 ) mod ( vline - 1).&lt;/P&gt;&lt;P&gt;if midd = 0 and DataLine gt 1.&lt;/P&gt;&lt;P&gt;pageno = pageno - 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;line = vline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step4 write a subroutine to calculate the line index for each item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form calindex using Line type i (visible lines on the screen)&lt;/P&gt;&lt;P&gt;FirstLine type i(see step 2)&lt;/P&gt;&lt;P&gt;LineIndex type i(item index)&lt;/P&gt;&lt;P&gt;changing Index type n. (index on the screen)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if FirstLine = 0.&lt;/P&gt;&lt;P&gt;index = LineIndex mod Line.&lt;/P&gt;&lt;P&gt;if index = '00'.&lt;/P&gt;&lt;P&gt;index = Line.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;elseif FirstLine = 1.&lt;/P&gt;&lt;P&gt;index = LineIndex mod ( Line - 1 ).&lt;/P&gt;&lt;P&gt;if ( index between 1 and 0 ) and LineIndex gt 1.&lt;/P&gt;&lt;P&gt;index = index + Line - 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;if Line = 2.&lt;/P&gt;&lt;P&gt;index = index + Line - 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step5 write a subroutine to calculate the loop range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form calrange using Line type i ( visible lines on the screen)&lt;/P&gt;&lt;P&gt;DataLine type i&lt;/P&gt;&lt;P&gt;FirstLine type i&lt;/P&gt;&lt;P&gt;loopindex like sy-index&lt;/P&gt;&lt;P&gt;changing begin type i&lt;/P&gt;&lt;P&gt;end type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If FirstLine = 0.&lt;/P&gt;&lt;P&gt;if loopindex = 1.&lt;/P&gt;&lt;P&gt;begin = 1.&lt;/P&gt;&lt;P&gt;if DataLine &amp;lt;= Line.&lt;/P&gt;&lt;P&gt;end = DataLine.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;end = Line.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;elseif loopindex gt 1.&lt;/P&gt;&lt;P&gt;begin = Line * ( loopindex - 1 ) + 1.&lt;/P&gt;&lt;P&gt;end = Line * loopindex.&lt;/P&gt;&lt;P&gt;if end gt DataLine.&lt;/P&gt;&lt;P&gt;end = DataLine.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;elseif FirstLine = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if loopindex = 1.&lt;/P&gt;&lt;P&gt;begin = 1.&lt;/P&gt;&lt;P&gt;if DataLine &amp;lt;= Line.&lt;/P&gt;&lt;P&gt;end = DataLine.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;end = Line.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;elseif loop index gt 1.&lt;/P&gt;&lt;P&gt;begin = ( Line - 1 ) * ( loopindex - 1 ) + 2.&lt;/P&gt;&lt;P&gt;end = ( Line - 1 ) * ( loopindex - 1 ) + Line.&lt;/P&gt;&lt;P&gt;if end gt DataLine.&lt;/P&gt;&lt;P&gt;end = DataLine.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step6 using field sysbol in your BDC, for example: in ME21, but you should calculate each item will correponding to which index in steploop/Table Control&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form creat_bdc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-symbols: &amp;lt;material&amp;gt;, &amp;lt;quan&amp;gt;, &amp;lt;indicator&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: name1(14) value 'EKPO-EMATN(XX)',&lt;/P&gt;&lt;P&gt;name2(14) value 'EKPO-MENGE(XX)',&lt;/P&gt;&lt;P&gt;name3(15) value 'RM06E-SELKZ(XX)'.&lt;/P&gt;&lt;P&gt;assign: name1 to &amp;lt;material&amp;gt;,&lt;/P&gt;&lt;P&gt;name2 to &amp;lt;quan&amp;gt;,&lt;/P&gt;&lt;P&gt;name3 to &amp;lt;indicator&amp;gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;do pageno times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-index gt 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*insert scroll page ok_code"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;perform calrange using Line DataLine FirstLine sy-index&lt;/P&gt;&lt;P&gt;changing begin end.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;loop at DataTable from begin to end.&lt;/P&gt;&lt;P&gt;perform calindex using Line FirstLine DataTable-LineIndex changing Index.&lt;/P&gt;&lt;P&gt;name1+11(2) = Index.&lt;/P&gt;&lt;P&gt;name2+11(2) = Index.&lt;/P&gt;&lt;P&gt;name3+12(2) = Index.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;perform bdcfield using &amp;lt;material&amp;gt; DataTable-matnr.&lt;/P&gt;&lt;P&gt;perform bdcfield using &amp;lt;quan&amp;gt; DataTable-menge.&lt;/P&gt;&lt;P&gt;perform bdcfield using &amp;lt;indicator&amp;gt; DataTable-indicator.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;sowjanya.b&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 08:10:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582604#M862500</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T08:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: BDC With table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582605#M862501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Go to the transaction SHDB.&lt;/P&gt;&lt;P&gt;2. Steps are same as other infotypes upto the table control screen&lt;/P&gt;&lt;P&gt;3. Once the table control screen comes, u need to enter the record by pressing the insert button available on top of the table control instead of directly entering the data in table control.&lt;/P&gt;&lt;P&gt;4. For other operations also, use the insert and delete buttons.&lt;/P&gt;&lt;P&gt;5. Save and generate the program with the recording.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it is helpful and reward points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 08:11:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582605#M862501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T08:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: BDC With table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582606#M862502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT YBDC369 .&lt;/P&gt;&lt;P&gt;*HANDLING TABLE CONTROL IN BDC&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_DUMMY OCCURS 0,&lt;/P&gt;&lt;P&gt;       DUMMY(100) TYPE C,&lt;/P&gt;&lt;P&gt;       END OF IT_DUMMY.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_XK01 OCCURS 0,&lt;/P&gt;&lt;P&gt;       LIFNR(10) TYPE C,&lt;/P&gt;&lt;P&gt;       BUKRS(4)  TYPE C,&lt;/P&gt;&lt;P&gt;       EKORG(4)  TYPE C,&lt;/P&gt;&lt;P&gt;       KTOKK(4)  TYPE C,&lt;/P&gt;&lt;P&gt;       NAME1(30) TYPE C,&lt;/P&gt;&lt;P&gt;       SORTL(10) TYPE C,&lt;/P&gt;&lt;P&gt;       LAND1(3)  TYPE C,&lt;/P&gt;&lt;P&gt;       SPRAS(2)  TYPE C,&lt;/P&gt;&lt;P&gt;       AKONT(6)  TYPE C,&lt;/P&gt;&lt;P&gt;       FDGRV(2)  TYPE C,&lt;/P&gt;&lt;P&gt;       WAERS(3)  TYPE C,&lt;/P&gt;&lt;P&gt;       END OF IT_XK01,&lt;/P&gt;&lt;P&gt;       BEGIN OF IT_BANK OCCURS 0,&lt;/P&gt;&lt;P&gt;       BANKS(3)  TYPE C,&lt;/P&gt;&lt;P&gt;       BANKL(10) TYPE C,&lt;/P&gt;&lt;P&gt;       BANKN(10) TYPE C,&lt;/P&gt;&lt;P&gt;       KOINH(30) TYPE C,&lt;/P&gt;&lt;P&gt;       LIFNR(10) TYPE C,&lt;/P&gt;&lt;P&gt;       END OF IT_BANK.&lt;/P&gt;&lt;P&gt;DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   FILENAME                      = 'C:\VENDOR.TXT'&lt;/P&gt;&lt;P&gt;   FILETYPE                      = 'ASC'&lt;/P&gt;&lt;P&gt; TABLES&lt;/P&gt;&lt;P&gt;   DATA_TAB                      = IT_DUMMY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_DUMMY.&lt;/P&gt;&lt;P&gt;  IF IT_DUMMY-DUMMY+0(2) = '11'.&lt;/P&gt;&lt;P&gt;    IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).&lt;/P&gt;&lt;P&gt;    IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).&lt;/P&gt;&lt;P&gt;    IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).&lt;/P&gt;&lt;P&gt;    IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).&lt;/P&gt;&lt;P&gt;    IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).&lt;/P&gt;&lt;P&gt;    IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).&lt;/P&gt;&lt;P&gt;    IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).&lt;/P&gt;&lt;P&gt;    IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).&lt;/P&gt;&lt;P&gt;    IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).&lt;/P&gt;&lt;P&gt;    IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).&lt;/P&gt;&lt;P&gt;    IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).&lt;/P&gt;&lt;P&gt;    APPEND IT_XK01.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).&lt;/P&gt;&lt;P&gt;    IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).&lt;/P&gt;&lt;P&gt;    IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).&lt;/P&gt;&lt;P&gt;    IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).&lt;/P&gt;&lt;P&gt;    IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).&lt;/P&gt;&lt;P&gt;    APPEND IT_BANK.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_XK01.&lt;/P&gt;&lt;P&gt;REFRESH IT_BDCDATA.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMF02K' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'RF02K-REF_LIFNR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RF02K-LIFNR'&lt;/P&gt;&lt;P&gt;                              IT_XK01-LIFNR.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RF02K-BUKRS'&lt;/P&gt;&lt;P&gt;                              IT_XK01-BUKRS.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RF02K-EKORG'&lt;/P&gt;&lt;P&gt;                              IT_XK01-EKORG.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RF02K-KTOKK'&lt;/P&gt;&lt;P&gt;                              IT_XK01-KTOKK.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMF02K' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'LFA1-TELX1'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'LFA1-NAME1'&lt;/P&gt;&lt;P&gt;                              IT_XK01-NAME1.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'LFA1-SORTL'&lt;/P&gt;&lt;P&gt;                              IT_XK01-SORTL.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'LFA1-LAND1'&lt;/P&gt;&lt;P&gt;                              IT_XK01-LAND1.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'LFA1-SPRAS'&lt;/P&gt;&lt;P&gt;                              IT_XK01-SPRAS.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMF02K' '0120'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'LFA1-KUNNR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMF02K' '0130'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'LFBK-KOINH(02)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=ENTR'.&lt;/P&gt;&lt;P&gt;DATA : FNAM(20) TYPE C,&lt;/P&gt;&lt;P&gt;       IDX      TYPE C.&lt;/P&gt;&lt;P&gt;  MOVE 1 TO IDX.&lt;/P&gt;&lt;P&gt;LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.&lt;/P&gt;&lt;P&gt;  CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;  perform bdc_field       using FNAM&lt;/P&gt;&lt;P&gt;                                IT_BANK-BANKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;  perform bdc_field       using FNAM&lt;/P&gt;&lt;P&gt;                                IT_BANK-BANKL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;  perform bdc_field       using FNAM&lt;/P&gt;&lt;P&gt;                                IT_BANK-BANKN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;  perform bdc_field       using FNAM&lt;/P&gt;&lt;P&gt;                                IT_BANK-KOINH.&lt;/P&gt;&lt;P&gt;  IDX = IDX + 1.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMF02K' '0130'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'LFBK-BANKS(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMF02K' '0210'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'LFB1-FDGRV'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'LFB1-AKONT'&lt;/P&gt;&lt;P&gt;                              IT_XK01-AKONT.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'LFB1-FDGRV'&lt;/P&gt;&lt;P&gt;                              IT_XK01-FDGRV.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMF02K' '0215'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'LFB1-ZTERM'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMF02K' '0220'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'LFB5-MAHNA'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMF02K' '0310'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'LFM1-WAERS'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'LFM1-WAERS'&lt;/P&gt;&lt;P&gt;                              IT_XK01-WAERS.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMF02K' '0320'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'WYT3-PARVW(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLSPO1' '0300'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=YES'.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'XK01' USING IT_BDCDATA&lt;/P&gt;&lt;P&gt;                        MODE  'A'&lt;/P&gt;&lt;P&gt;                       UPDATE 'S'&lt;/P&gt;&lt;P&gt;                     MESSAGES INTO IT_BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM BDC_DYNPRO USING PROG SCR.&lt;/P&gt;&lt;P&gt;  CLEAR IT_BDCDATA.&lt;/P&gt;&lt;P&gt;  IT_BDCDATA-PROGRAM = PROG.&lt;/P&gt;&lt;P&gt;  IT_BDCDATA-DYNPRO  = SCR.&lt;/P&gt;&lt;P&gt;  IT_BDCDATA-DYNBEGIN = 'X'.&lt;/P&gt;&lt;P&gt;  APPEND IT_BDCDATA.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM BDC_FIELD USING FNAM FVAL.&lt;/P&gt;&lt;P&gt;  CLEAR IT_BDCDATA.&lt;/P&gt;&lt;P&gt;  IT_BDCDATA-FNAM = FNAM.&lt;/P&gt;&lt;P&gt;  IT_BDCDATA-FVAL  = FVAL.&lt;/P&gt;&lt;P&gt;  APPEND IT_BDCDATA.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 08:11:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582606#M862502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T08:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: BDC With table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582607#M862503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For table control in bdc declare two variable as integer.&lt;/P&gt;&lt;P&gt;set the variable value as 0.In the program before the line &lt;/P&gt;&lt;P&gt;item perform statement set the counter value as 1.&lt;/P&gt;&lt;P&gt;count=count+1.then u hv to use the concantenate &lt;/P&gt;&lt;P&gt;statementfor the line items for example&lt;/P&gt;&lt;P&gt;    concantenate '(lfa1-banks('count'))' into cval&lt;/P&gt;&lt;P&gt;    perform bdc using cval. &lt;/P&gt;&lt;P&gt;during recording for the line  items we hv record for the &lt;/P&gt;&lt;P&gt;next page also for the line item.goto standard tool bar u &lt;/P&gt;&lt;P&gt;hv to press the next page button.&lt;/P&gt;&lt;P&gt;  if count=5.&lt;/P&gt;&lt;P&gt;perform bdc using p+    -&amp;gt;this for next page&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;clear count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;See example program.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;[TABLE CONTROL|http://www.sap-img.com/abap/bdc-example-&lt;/P&gt;&lt;P&gt;using-table-control-in-bdc.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ballack.&lt;/P&gt;&lt;P&gt;Reward Points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 08:11:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582607#M862503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T08:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: BDC With table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582608#M862504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT Y730_BDC5 .
*HANDLING TABLE CONTROL IN BDC
DATA : BEGIN OF IT_DUMMY OCCURS 0,
       DUMMY(100) TYPE C,
       END OF IT_DUMMY.
DATA : BEGIN OF IT_XK01 OCCURS 0,
       LIFNR(10) TYPE C,
       BUKRS(4)  TYPE C,
       EKORG(4)  TYPE C,
       KTOKK(4)  TYPE C,
       NAME1(30) TYPE C,
       SORTL(10) TYPE C,
       LAND1(3)  TYPE C,
       SPRAS(2)  TYPE C,
       AKONT(6)  TYPE C,
       FDGRV(2)  TYPE C,
       WAERS(3)  TYPE C,
       END OF IT_XK01,
       BEGIN OF IT_BANK OCCURS 0,
       BANKS(3)  TYPE C,
       BANKL(10) TYPE C,
       BANKN(10) TYPE C,
       KOINH(30) TYPE C,
       LIFNR(10) TYPE C,
       END OF IT_BANK.
DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
       IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'WS_UPLOAD'
 EXPORTING
   FILENAME                      = 'C:\VENDOR.TXT'
   FILETYPE                      = 'ASC'
 TABLES
   DATA_TAB                      = IT_DUMMY.

LOOP AT IT_DUMMY.
  IF IT_DUMMY-DUMMY+0(2) = '11'.
    IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).
    IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).
    IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).
    IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).
    IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).
    IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).
    IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).
    IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).
    IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).
    IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).
    IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).
    APPEND IT_XK01.
  ELSE.
    IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).
    IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).
    IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).
    IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).
    IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).
    APPEND IT_BANK.
  ENDIF.
ENDLOOP.

LOOP AT IT_XK01.
REFRESH IT_BDCDATA.
perform bdc_dynpro      using 'SAPMF02K' '0100'.
perform bdc_field       using 'BDC_CURSOR'
                              'RF02K-REF_LIFNR'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'RF02K-LIFNR'
                              IT_XK01-LIFNR.
perform bdc_field       using 'RF02K-BUKRS'
                              IT_XK01-BUKRS.
perform bdc_field       using 'RF02K-EKORG'
                              IT_XK01-EKORG.
perform bdc_field       using 'RF02K-KTOKK'
                              IT_XK01-KTOKK.
perform bdc_dynpro      using 'SAPMF02K' '0110'.
perform bdc_field       using 'BDC_CURSOR'
                              'LFA1-TELX1'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'LFA1-NAME1'
                              IT_XK01-NAME1.
perform bdc_field       using 'LFA1-SORTL'
                              IT_XK01-SORTL.
perform bdc_field       using 'LFA1-LAND1'
                              IT_XK01-LAND1.
perform bdc_field       using 'LFA1-SPRAS'
                              IT_XK01-SPRAS.
perform bdc_dynpro      using 'SAPMF02K' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              'LFA1-KUNNR'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_dynpro      using 'SAPMF02K' '0130'.
perform bdc_field       using 'BDC_CURSOR'
                              'LFBK-KOINH(02)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
DATA : FNAM(20) TYPE C,
       IDX      TYPE C.
  MOVE 1 TO IDX.
LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.
  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'
                              IT_XK01-AKONT.
perform bdc_field       using 'LFB1-FDGRV'
                              IT_XK01-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'
                              IT_XK01-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 IT_BDCDATA
                        MODE  'A'
                       UPDATE 'S'
                     MESSAGES INTO IT_BDCMSGCOLL.
ENDLOOP.

FORM BDC_DYNPRO USING PROG SCR.
  CLEAR IT_BDCDATA.
  IT_BDCDATA-PROGRAM = PROG.
  IT_BDCDATA-DYNPRO  = SCR.
  IT_BDCDATA-DYNBEGIN = 'X'.
  APPEND IT_BDCDATA.
ENDFORM.

FORM BDC_FIELD USING FNAM FVAL.
  CLEAR IT_BDCDATA.
  IT_BDCDATA-FNAM = FNAM.
  IT_BDCDATA-FVAL  = FVAL.
  APPEND IT_BDCDATA.
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 08:13:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582608#M862504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T08:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: BDC With table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582609#M862505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to these links:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-basis-abap.com/abap/handling-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-basis-abap.com/abap/handling-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac9f35c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac9f35c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Handling of table control in BDC check these links:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-basis-abap.com/abap/handling-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-basis-abap.com/abap/handling-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://arthur_ong.tripod.com/xab023.htm" target="test_blank"&gt;http://arthur_ong.tripod.com/xab023.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC Example: Using Table Control in BDC &lt;/P&gt;&lt;P&gt;Among beginners, using table control in BDC is always a puzzle. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is a sample code of handling table control in BDC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT Y730_BDC5 .&lt;/P&gt;&lt;P&gt;*HANDLING TABLE CONTROL IN BDC&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_DUMMY OCCURS 0,&lt;/P&gt;&lt;P&gt;DUMMY(100) TYPE C,&lt;/P&gt;&lt;P&gt;END OF IT_DUMMY.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_XK01 OCCURS 0,&lt;/P&gt;&lt;P&gt;LIFNR(10) TYPE C,&lt;/P&gt;&lt;P&gt;BUKRS(4) TYPE C,&lt;/P&gt;&lt;P&gt;EKORG(4) TYPE C,&lt;/P&gt;&lt;P&gt;KTOKK(4) TYPE C,&lt;/P&gt;&lt;P&gt;NAME1(30) TYPE C,&lt;/P&gt;&lt;P&gt;SORTL(10) TYPE C,&lt;/P&gt;&lt;P&gt;LAND1(3) TYPE C,&lt;/P&gt;&lt;P&gt;SPRAS(2) TYPE C,&lt;/P&gt;&lt;P&gt;AKONT(6) TYPE C,&lt;/P&gt;&lt;P&gt;FDGRV(2) TYPE C,&lt;/P&gt;&lt;P&gt;WAERS(3) TYPE C,&lt;/P&gt;&lt;P&gt;END OF IT_XK01,&lt;/P&gt;&lt;P&gt;BEGIN OF IT_BANK OCCURS 0,&lt;/P&gt;&lt;P&gt;BANKS(3) TYPE C,&lt;/P&gt;&lt;P&gt;BANKL(10) TYPE C,&lt;/P&gt;&lt;P&gt;BANKN(10) TYPE C,&lt;/P&gt;&lt;P&gt;KOINH(30) TYPE C,&lt;/P&gt;&lt;P&gt;LIFNR(10) TYPE C,&lt;/P&gt;&lt;P&gt;END OF IT_BANK.&lt;/P&gt;&lt;P&gt;DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = 'C:\VENDOR.TXT'&lt;/P&gt;&lt;P&gt;FILETYPE = 'ASC'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = IT_DUMMY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_DUMMY.&lt;/P&gt;&lt;P&gt;IF IT_DUMMY-DUMMY+0(2) = '11'.&lt;/P&gt;&lt;P&gt;IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).&lt;/P&gt;&lt;P&gt;IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).&lt;/P&gt;&lt;P&gt;IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).&lt;/P&gt;&lt;P&gt;IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).&lt;/P&gt;&lt;P&gt;IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).&lt;/P&gt;&lt;P&gt;IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).&lt;/P&gt;&lt;P&gt;IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).&lt;/P&gt;&lt;P&gt;IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).&lt;/P&gt;&lt;P&gt;IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).&lt;/P&gt;&lt;P&gt;IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).&lt;/P&gt;&lt;P&gt;IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).&lt;/P&gt;&lt;P&gt;APPEND IT_XK01.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).&lt;/P&gt;&lt;P&gt;IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).&lt;/P&gt;&lt;P&gt;IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).&lt;/P&gt;&lt;P&gt;IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).&lt;/P&gt;&lt;P&gt;IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).&lt;/P&gt;&lt;P&gt;APPEND IT_BANK.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_XK01.&lt;/P&gt;&lt;P&gt;REFRESH IT_BDCDATA.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'RF02K-REF_LIFNR'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02K-LIFNR'&lt;/P&gt;&lt;P&gt;IT_XK01-LIFNR.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02K-BUKRS'&lt;/P&gt;&lt;P&gt;IT_XK01-BUKRS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02K-EKORG'&lt;/P&gt;&lt;P&gt;IT_XK01-EKORG.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02K-KTOKK'&lt;/P&gt;&lt;P&gt;IT_XK01-KTOKK.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFA1-TELX1'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-NAME1'&lt;/P&gt;&lt;P&gt;IT_XK01-NAME1.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-SORTL'&lt;/P&gt;&lt;P&gt;IT_XK01-SORTL.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-LAND1'&lt;/P&gt;&lt;P&gt;IT_XK01-LAND1.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-SPRAS'&lt;/P&gt;&lt;P&gt;IT_XK01-SPRAS.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0120'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFA1-KUNNR'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0130'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFBK-KOINH(02)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=ENTR'.&lt;/P&gt;&lt;P&gt;DATA : FNAM(20) TYPE C,&lt;/P&gt;&lt;P&gt;IDX TYPE C.&lt;/P&gt;&lt;P&gt;MOVE 1 TO IDX.&lt;/P&gt;&lt;P&gt;LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.&lt;/P&gt;&lt;P&gt;CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;perform bdc_field using FNAM&lt;/P&gt;&lt;P&gt;IT_BANK-BANKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;perform bdc_field using FNAM&lt;/P&gt;&lt;P&gt;IT_BANK-BANKL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;perform bdc_field using FNAM&lt;/P&gt;&lt;P&gt;IT_BANK-BANKN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;perform bdc_field using FNAM&lt;/P&gt;&lt;P&gt;IT_BANK-KOINH.&lt;/P&gt;&lt;P&gt;IDX = IDX + 1.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0130'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFBK-BANKS(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0210'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFB1-FDGRV'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFB1-AKONT'&lt;/P&gt;&lt;P&gt;IT_XK01-AKONT.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFB1-FDGRV'&lt;/P&gt;&lt;P&gt;IT_XK01-FDGRV.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0215'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFB1-ZTERM'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0220'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFB5-MAHNA'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0310'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFM1-WAERS'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFM1-WAERS'&lt;/P&gt;&lt;P&gt;IT_XK01-WAERS.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0320'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'WYT3-PARVW(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLSPO1' '0300'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=YES'.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'XK01' USING IT_BDCDATA&lt;/P&gt;&lt;P&gt;MODE 'A'&lt;/P&gt;&lt;P&gt;UPDATE 'S'&lt;/P&gt;&lt;P&gt;MESSAGES INTO IT_BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM BDC_DYNPRO USING PROG SCR.&lt;/P&gt;&lt;P&gt;CLEAR IT_BDCDATA.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-PROGRAM = PROG.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-DYNPRO = SCR.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-DYNBEGIN = 'X'.&lt;/P&gt;&lt;P&gt;APPEND IT_BDCDATA.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM BDC_FIELD USING FNAM FVAL.&lt;/P&gt;&lt;P&gt;CLEAR IT_BDCDATA.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-FNAM = FNAM.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-FVAL = FVAL.&lt;/P&gt;&lt;P&gt;APPEND IT_BDCDATA.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;Hope that would clear the matters for freshers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer the link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The concept is easy: it has to indicate the index of the table control in the field name, so if you have to populate the first record of table control:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC-FIELDNAME = &amp;lt;FIELDNAME&amp;gt;(01).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you fill the second row:&lt;/P&gt;&lt;P&gt;BDC-FIELDNAME = &amp;lt;FIELDNAME&amp;gt;(02).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and so....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the problem is usually on how many records you have to load, because u can fill only the rows of table control available in the screen, If you have more records than it can be displayed yuo have to simulate the command to go next page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The number of recod can be displayed can depend on pc resolution and many program haven't command to go to next page (in this case it could be impossible create a BDC program9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A way to create a bdc program resolution indipendent is to work on the first and second row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Place the first hit in the first row of bdc; &lt;/P&gt;&lt;P&gt;Place the second insert in the second row of bdc; &lt;/P&gt;&lt;P&gt;Place the last hit to the top of table control; &lt;/P&gt;&lt;P&gt;Place the next hit in the second row; &lt;/P&gt;&lt;P&gt;Place the last hit to the top of table control; &lt;/P&gt;&lt;P&gt;Place the next hit in the second row; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward Points if found helpfull..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cheers,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Chandra Sekhar.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 08:17:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582609#M862505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T08:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: BDC With table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582610#M862506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Source : SAP-IMG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is a sample code of handling table control in BDC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT Y730_BDC5 .&lt;/P&gt;&lt;P&gt;*HANDLING TABLE CONTROL IN BDC&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_DUMMY OCCURS 0,&lt;/P&gt;&lt;P&gt;DUMMY(100) TYPE C,&lt;/P&gt;&lt;P&gt;END OF IT_DUMMY.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_XK01 OCCURS 0,&lt;/P&gt;&lt;P&gt;LIFNR(10) TYPE C,&lt;/P&gt;&lt;P&gt;BUKRS(4) TYPE C,&lt;/P&gt;&lt;P&gt;EKORG(4) TYPE C,&lt;/P&gt;&lt;P&gt;KTOKK(4) TYPE C,&lt;/P&gt;&lt;P&gt;NAME1(30) TYPE C,&lt;/P&gt;&lt;P&gt;SORTL(10) TYPE C,&lt;/P&gt;&lt;P&gt;LAND1(3) TYPE C,&lt;/P&gt;&lt;P&gt;SPRAS(2) TYPE C,&lt;/P&gt;&lt;P&gt;AKONT(6) TYPE C,&lt;/P&gt;&lt;P&gt;FDGRV(2) TYPE C,&lt;/P&gt;&lt;P&gt;WAERS(3) TYPE C,&lt;/P&gt;&lt;P&gt;END OF IT_XK01,&lt;/P&gt;&lt;P&gt;BEGIN OF IT_BANK OCCURS 0,&lt;/P&gt;&lt;P&gt;BANKS(3) TYPE C,&lt;/P&gt;&lt;P&gt;BANKL(10) TYPE C,&lt;/P&gt;&lt;P&gt;BANKN(10) TYPE C,&lt;/P&gt;&lt;P&gt;KOINH(30) TYPE C,&lt;/P&gt;&lt;P&gt;LIFNR(10) TYPE C,&lt;/P&gt;&lt;P&gt;END OF IT_BANK.&lt;/P&gt;&lt;P&gt;DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = 'C:\VENDOR.TXT'&lt;/P&gt;&lt;P&gt;FILETYPE = 'ASC'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = IT_DUMMY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_DUMMY.&lt;/P&gt;&lt;P&gt;IF IT_DUMMY-DUMMY+0(2) = '11'.&lt;/P&gt;&lt;P&gt;IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).&lt;/P&gt;&lt;P&gt;IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).&lt;/P&gt;&lt;P&gt;IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).&lt;/P&gt;&lt;P&gt;IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).&lt;/P&gt;&lt;P&gt;IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).&lt;/P&gt;&lt;P&gt;IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).&lt;/P&gt;&lt;P&gt;IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).&lt;/P&gt;&lt;P&gt;IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).&lt;/P&gt;&lt;P&gt;IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).&lt;/P&gt;&lt;P&gt;IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).&lt;/P&gt;&lt;P&gt;IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).&lt;/P&gt;&lt;P&gt;APPEND IT_XK01.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).&lt;/P&gt;&lt;P&gt;IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).&lt;/P&gt;&lt;P&gt;IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).&lt;/P&gt;&lt;P&gt;IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).&lt;/P&gt;&lt;P&gt;IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).&lt;/P&gt;&lt;P&gt;APPEND IT_BANK.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_XK01.&lt;/P&gt;&lt;P&gt;REFRESH IT_BDCDATA.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'RF02K-REF_LIFNR'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02K-LIFNR'&lt;/P&gt;&lt;P&gt;IT_XK01-LIFNR.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02K-BUKRS'&lt;/P&gt;&lt;P&gt;IT_XK01-BUKRS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02K-EKORG'&lt;/P&gt;&lt;P&gt;IT_XK01-EKORG.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02K-KTOKK'&lt;/P&gt;&lt;P&gt;IT_XK01-KTOKK.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFA1-TELX1'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-NAME1'&lt;/P&gt;&lt;P&gt;IT_XK01-NAME1.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-SORTL'&lt;/P&gt;&lt;P&gt;IT_XK01-SORTL.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-LAND1'&lt;/P&gt;&lt;P&gt;IT_XK01-LAND1.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-SPRAS'&lt;/P&gt;&lt;P&gt;IT_XK01-SPRAS.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0120'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFA1-KUNNR'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0130'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFBK-KOINH(02)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=ENTR'.&lt;/P&gt;&lt;P&gt;DATA : FNAM(20) TYPE C,&lt;/P&gt;&lt;P&gt;IDX TYPE C.&lt;/P&gt;&lt;P&gt;MOVE 1 TO IDX.&lt;/P&gt;&lt;P&gt;LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.&lt;/P&gt;&lt;P&gt;CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;perform bdc_field using FNAM&lt;/P&gt;&lt;P&gt;IT_BANK-BANKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;perform bdc_field using FNAM&lt;/P&gt;&lt;P&gt;IT_BANK-BANKL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;perform bdc_field using FNAM&lt;/P&gt;&lt;P&gt;IT_BANK-BANKN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.&lt;/P&gt;&lt;P&gt;perform bdc_field using FNAM&lt;/P&gt;&lt;P&gt;IT_BANK-KOINH.&lt;/P&gt;&lt;P&gt;IDX = IDX + 1.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0130'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFBK-BANKS(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0210'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFB1-FDGRV'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFB1-AKONT'&lt;/P&gt;&lt;P&gt;IT_XK01-AKONT.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFB1-FDGRV'&lt;/P&gt;&lt;P&gt;IT_XK01-FDGRV.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0215'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFB1-ZTERM'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0220'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFB5-MAHNA'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0310'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFM1-WAERS'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFM1-WAERS'&lt;/P&gt;&lt;P&gt;IT_XK01-WAERS.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0320'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'WYT3-PARVW(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLSPO1' '0300'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=YES'.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'XK01' USING IT_BDCDATA&lt;/P&gt;&lt;P&gt;MODE 'A'&lt;/P&gt;&lt;P&gt;UPDATE 'S'&lt;/P&gt;&lt;P&gt;MESSAGES INTO IT_BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM BDC_DYNPRO USING PROG SCR.&lt;/P&gt;&lt;P&gt;CLEAR IT_BDCDATA.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-PROGRAM = PROG.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-DYNPRO = SCR.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-DYNBEGIN = 'X'.&lt;/P&gt;&lt;P&gt;APPEND IT_BDCDATA.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM BDC_FIELD USING FNAM FVAL.&lt;/P&gt;&lt;P&gt;CLEAR IT_BDCDATA.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-FNAM = FNAM.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-FVAL = FVAL.&lt;/P&gt;&lt;P&gt;APPEND IT_BDCDATA.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Kindly Reward Points If You Found The Reply Helpfull&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chaitanya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 08:18:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-with-table-control/m-p/3582610#M862506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T08:18:28Z</dc:date>
    </item>
  </channel>
</rss>

