<?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: Table controls in BDC's in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-controls-in-bdc-s/m-p/1948855#M390919</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;Table controls are used to Update multiple Item records for a Single record. Both in case of Pur order and Sales order we use the table controls.&lt;/P&gt;&lt;P&gt;For example one entry of EKKO table if there are 20 entries(items) in EKPO table then they have to be updated using the Table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to use seperate internal table Looping for Items within the  LOOP of Header record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example program mailed to your id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Feb 2007 09:08:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-26T09:08:38Z</dc:date>
    <item>
      <title>Table controls in BDC's</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-controls-in-bdc-s/m-p/1948853#M390917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi iam Aslam ... and   u tell me  where  does Table control used in BDC ;s ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is  Purchase Order and Sales Order.... does Both of it   requires  Tablecontrol in BDcs    u tell me   when and where does   Table controls are  used in Bdc's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply to   itsshaikaslam@gmail.com&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;urs 'shaik Aslam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 08:59:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-controls-in-bdc-s/m-p/1948853#M390917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-26T08:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Table controls in BDC's</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-controls-in-bdc-s/m-p/1948854#M390918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THis is example to upload the Bank details of the Vendor which has the TC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT zprataptable2
       NO STANDARD PAGE HEADING LINE-SIZE 255.
DATA : BEGIN OF itab OCCURS 0,
        i1 TYPE i,
        lifnr LIKE   rf02k-lifnr,
        bukrs LIKE   rf02k-bukrs,
        ekorg LIKE   rf02k-ekorg,
        ktokk LIKE   rf02k-ktokk,
        anred LIKE lfa1-anred,
        name1 LIKE lfa1-name1,
        sortl LIKE lfa1-sortl,
        land1 LIKE lfa1-land1,
        akont LIKE lfb1-akont,
        fdgrv LIKE lfb1-fdgrv,
         waers LIKE lfm1-waers,
        END OF itab.

DATA : BEGIN OF jtab OCCURS 0,
        j1 TYPE i,
        banks LIKE lfbk-banks,
        bankl LIKE lfbk-bankl,
        bankn LIKE lfbk-bankn,
         END OF jtab.

DATA : cnt(4) TYPE n.
DATA : fdt(20) TYPE c.

DATA : c TYPE i.



INCLUDE bdcrecx1.

START-OF-SELECTION.

  CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
      filename = 'C:first1.txt'
      filetype = 'DAT'
    TABLES
      data_tab = itab.

  CALL FUNCTION 'WS_UPLOAD'
   EXPORTING
     filename                      = 'C:second.txt'
     filetype                      = 'DAT'
    TABLES
      data_tab                      = jtab.



  LOOP AT itab.


    PERFORM bdc_dynpro      USING 'SAPMF02K' '0100'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'RF02K-KTOKK'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_field       USING 'RF02K-LIFNR'
                                  itab-lifnr.
    PERFORM bdc_field       USING 'RF02K-BUKRS'
                                  itab-bukrs.
    PERFORM bdc_field       USING 'RF02K-EKORG'
                                   itab-ekorg.
    PERFORM bdc_field       USING 'RF02K-KTOKK'
                                   itab-ktokk.
    PERFORM bdc_dynpro      USING 'SAPMF02K' '0110'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'LFA1-LAND1'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_field       USING 'LFA1-ANRED'
                                  itab-anred.
    PERFORM bdc_field       USING 'LFA1-NAME1'
                                  itab-name1.
    PERFORM bdc_field       USING 'LFA1-SORTL'
                                  itab-sortl.
    PERFORM bdc_field       USING 'LFA1-LAND1'
                                  itab-land1.
    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-BANKN(01)'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=ENTR'.
    cnt = 0.
    LOOP AT jtab WHERE j1 = itab-i1.
      cnt = cnt + 1.
      CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
      PERFORM bdc_field  USING fdt jtab-banks.

      CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
      PERFORM bdc_field USING fdt jtab-bankl.

      CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
      PERFORM bdc_field   USING fdt jtab-bankn.
      IF cnt = 5.
        cnt = 0.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFBK-BANKS(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=P+'.


        PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFBK-BANKN(02)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
      ENDIF.
    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'
                                  itab-akont.
    PERFORM bdc_field       USING 'LFB1-FDGRV'
                                  itab-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'
                                  itab-waers.
    PERFORM bdc_dynpro      USING 'SAPMF02K' '0320'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'RF02K-LIFNR'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=ENTR'.
    PERFORM bdc_dynpro      USING 'SAPLSPO1' '0300'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=YES'.
    PERFORM bdc_transaction USING 'XK01'.
  ENDLOOP.
  PERFORM close_group.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;1	63190 	0001	0001	0001	mr	bal188	b	in	31000	a1	inr
2	63191 	0001	0001	0001	mr	bal189	b	in	31000	a1	inr

TC file:

1	in	sb	11000
1	in	sb	12000
1	in	sb	13000
1	in	sb	14000
1	in	sb	15000
1	in	sb	16000
1	in	sb	17000
1	in	sb	18000
1	in	sb	19000
1	in	sb	20000
1	in	sb	21000
1	in	sb	22000
2	in	sb	21000
2	in	sb	22000&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&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;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 09:07:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-controls-in-bdc-s/m-p/1948854#M390918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-26T09:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: Table controls in BDC's</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-controls-in-bdc-s/m-p/1948855#M390919</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;Table controls are used to Update multiple Item records for a Single record. Both in case of Pur order and Sales order we use the table controls.&lt;/P&gt;&lt;P&gt;For example one entry of EKKO table if there are 20 entries(items) in EKPO table then they have to be updated using the Table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to use seperate internal table Looping for Items within the  LOOP of Header record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example program mailed to your id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 09:08:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-controls-in-bdc-s/m-p/1948855#M390919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-26T09:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Table controls in BDC's</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-controls-in-bdc-s/m-p/1948856#M390920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;can you just mail me the same ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Ramakrishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Oct 2007 15:07:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-controls-in-bdc-s/m-p/1948856#M390920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-07T15:07:08Z</dc:date>
    </item>
  </channel>
</rss>

