<?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 control in module pool in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-in-module-pool/m-p/2925308#M689100</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In case of dialog program concept&lt;/P&gt;&lt;P&gt;consists of....&lt;/P&gt;&lt;P&gt;-&amp;gt;top include&lt;/P&gt;&lt;P&gt;  declarations are done....&lt;/P&gt;&lt;P&gt;-&amp;gt;PBO module (process before output):&lt;/P&gt;&lt;P&gt;     can give PF-STATUS &lt;/P&gt;&lt;P&gt;     set-title&lt;/P&gt;&lt;P&gt;     reset values&lt;/P&gt;&lt;P&gt;-&amp;gt;PAI module (process after input)&lt;/P&gt;&lt;P&gt;    this is where the function codes are captured and respective operations are performed.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex: case ok-code                                 //declare data:ok-code like sy-ucomm.&lt;/P&gt;&lt;P&gt;       when 'ENTER'                             //ENTER is a function code&lt;/P&gt;&lt;P&gt;          //do as per required...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;reward points if useful.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Vinod Samuel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Oct 2007 10:16:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-24T10:16:14Z</dc:date>
    <item>
      <title>Table control in module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-in-module-pool/m-p/2925304#M689096</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;  I am doing my module pool programing. I am creating 3 screens. In the first screen i am displaying customer no. If i click the customer number it wil display second screen with sales order. If i click sales order header it will display sales order item details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I create all the screens and table controls in the module pool. My question is how to write the logic and wher exactly(PBO or PAI) write the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Srinu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2007 09:58:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-in-module-pool/m-p/2925304#M689096</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-24T09:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Table control in module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-in-module-pool/m-p/2925305#M689097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sree,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In first screen create a button whose text will be 'sales header'. In the PAI of the same screen check for the ok_code = function code of the button and call the second screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second screen, create a button 'Item details'.  In the PAI of the same screen check for the ok_code = function code of the button and call the third screen with item details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know in case of any concern.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Do award points if found useful as points are moral boosters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2007 10:04:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-in-module-pool/m-p/2925305#M689097</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-24T10:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Table control in module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-in-module-pool/m-p/2925306#M689098</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;in PBO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to this is the code for table control:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;  Include           MZ_TABLEO01                                 *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE status_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'MYSTATUS'.&lt;/P&gt;&lt;P&gt;  SET TITLEBAR 'TITLE-001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  POPULATE_IT  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE populate_it OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF ok_code NE 'ADD' AND&lt;/P&gt;&lt;P&gt;            ok_code NE 'DEL'.&lt;/P&gt;&lt;P&gt;    IF flag NE 'X'.&lt;/P&gt;&lt;P&gt;      SELECT * FROM ztest_so INTO TABLE it_populate.&lt;/P&gt;&lt;P&gt;      flag = 'X'.&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;ENDMODULE.                 " POPULATE_IT  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  set_lines  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE set_lines OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DESCRIBE TABLE it_populate LINES sy-tfill.&lt;/P&gt;&lt;P&gt;  so_tbl_ctrl-lines = sy-tfill.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " set_lines  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  move_values_to_tbl_ctrl  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE move_values_to_tbl_ctrl OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE :       it_populate-vbeln TO ztest_so-vbeln,&lt;/P&gt;&lt;P&gt;               it_populate-bukrs TO ztest_so-bukrs,&lt;/P&gt;&lt;P&gt;               it_populate-kunnr TO ztest_so-kunnr,&lt;/P&gt;&lt;P&gt;               it_populate-erdat TO ztest_so-erdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " move_values_to_tbl_ctrl  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  set_select_status  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE set_select_status OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE it_selected WITH KEY vbeln = it_populate-vbeln.&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;    line_sel_col = 'X'.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    line_sel_col = space.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " set_select_status  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  clear_okcode  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module clear_okcode output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR OK_CODE.&lt;/P&gt;&lt;P&gt;endmodule.                 " clear_okcode  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in PAI &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;  Include           MZ_TABLEI01                                 *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  USER_COMMAND_0100  INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module USER_COMMAND_0100 input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case ok_code.&lt;/P&gt;&lt;P&gt;     when 'BACK' or 'CANC' or 'EXIT'.&lt;/P&gt;&lt;P&gt;         leave to screen 0.&lt;/P&gt;&lt;P&gt;     when 'SELALL'.&lt;/P&gt;&lt;P&gt;         clear IT_selected.&lt;/P&gt;&lt;P&gt;         refresh IT_selected.&lt;/P&gt;&lt;P&gt;          loop at IT_POPULATE.&lt;/P&gt;&lt;P&gt;            move-corresponding IT_POPULATE to IT_selected.&lt;/P&gt;&lt;P&gt;            append IT_selected.&lt;/P&gt;&lt;P&gt;          endloop.&lt;/P&gt;&lt;P&gt;    when 'DESELALL'.&lt;/P&gt;&lt;P&gt;        clear IT_selected.&lt;/P&gt;&lt;P&gt;        refresh IT_selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    when 'SAVE'.&lt;/P&gt;&lt;P&gt;        LOOP AT IT_SELECTED.&lt;/P&gt;&lt;P&gt;             MODIFY ZTEST_SO FROM IT_SELECTED.&lt;/P&gt;&lt;P&gt;        ENDLOOP.&lt;/P&gt;&lt;P&gt;        LOOP AT IT_DELETED.&lt;/P&gt;&lt;P&gt;             DELETE FROM ZTEST_SO WHERE VBELN = IT_DELETED-VBELN.&lt;/P&gt;&lt;P&gt;        ENDLOOP.&lt;/P&gt;&lt;P&gt;        commit work.&lt;/P&gt;&lt;P&gt;    when 'DEL'.&lt;/P&gt;&lt;P&gt;        LOOP AT IT_SELECTED.&lt;/P&gt;&lt;P&gt;             MOVE-CORRESPONDING IT_SELECTED&lt;/P&gt;&lt;P&gt;                                TO&lt;/P&gt;&lt;P&gt;                                IT_DELETED.&lt;/P&gt;&lt;P&gt;             APPEND IT_DELETED.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           Also delete it from T_SO.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             DELETE IT_POPULATE WHERE VBELN = IT_SELECTED-VBELN.&lt;/P&gt;&lt;P&gt;        ENDLOOP.&lt;/P&gt;&lt;P&gt;        CLEAR IT_SELECTED.&lt;/P&gt;&lt;P&gt;        REFRESH IT_SELECTED.&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.                 " USER_COMMAND_0100  INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  get_selected_so  INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module get_selected_so input.&lt;/P&gt;&lt;P&gt;If ok_code ne 'SELALL'.&lt;/P&gt;&lt;P&gt;      IF line_sel_col EQ 'X'.&lt;/P&gt;&lt;P&gt;         Read table IT_selected with key vbeln = IT_POPULATE-vbeln.&lt;/P&gt;&lt;P&gt;         If sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;            MOVE-CORRESPONDING ztest_so TO IT_selected.&lt;/P&gt;&lt;P&gt;            Append IT_selected.&lt;/P&gt;&lt;P&gt;         Else.&lt;/P&gt;&lt;P&gt;            MOVE-CORRESPONDING ztest_so TO IT_selected.&lt;/P&gt;&lt;P&gt;            Modify IT_selected index sy-tabix.&lt;/P&gt;&lt;P&gt;         Endif.&lt;/P&gt;&lt;P&gt;      Else.&lt;/P&gt;&lt;P&gt;         Read table IT_selected with key vbeln = IT_POPULATE-VBELN.&lt;/P&gt;&lt;P&gt;         If sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;            Delete IT_selected where VBELN = IT_POPULATE-VBELN.&lt;/P&gt;&lt;P&gt;         Endif.&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;endmodule.                 " get_selected_so  INPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2007 10:04:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-in-module-pool/m-p/2925306#M689098</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-24T10:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Table control in module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-in-module-pool/m-p/2925307#M689099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sree,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check these links, it may be helpful to u.&lt;/P&gt;&lt;P&gt;this link contains information about :&lt;/P&gt;&lt;P&gt;1)Table Controls in ABAP Programs &lt;/P&gt;&lt;P&gt;2)Looping Through an Internal Table&lt;/P&gt;&lt;P&gt;3)Table Controls: Examples with Scrolling &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward me if useful.......&lt;/P&gt;&lt;P&gt;Harimanjesh AN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2007 10:08:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-in-module-pool/m-p/2925307#M689099</guid>
      <dc:creator>harimanjesh_an</dc:creator>
      <dc:date>2007-10-24T10:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Table control in module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-in-module-pool/m-p/2925308#M689100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In case of dialog program concept&lt;/P&gt;&lt;P&gt;consists of....&lt;/P&gt;&lt;P&gt;-&amp;gt;top include&lt;/P&gt;&lt;P&gt;  declarations are done....&lt;/P&gt;&lt;P&gt;-&amp;gt;PBO module (process before output):&lt;/P&gt;&lt;P&gt;     can give PF-STATUS &lt;/P&gt;&lt;P&gt;     set-title&lt;/P&gt;&lt;P&gt;     reset values&lt;/P&gt;&lt;P&gt;-&amp;gt;PAI module (process after input)&lt;/P&gt;&lt;P&gt;    this is where the function codes are captured and respective operations are performed.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex: case ok-code                                 //declare data:ok-code like sy-ucomm.&lt;/P&gt;&lt;P&gt;       when 'ENTER'                             //ENTER is a function code&lt;/P&gt;&lt;P&gt;          //do as per required...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;reward points if useful.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Vinod Samuel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2007 10:16:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-in-module-pool/m-p/2925308#M689100</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-24T10:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Table control in module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-in-module-pool/m-p/2925309#M689101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through this table control codes&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;A href="http://hometown.aol.com/skarkada/sap/table_control/table_control.htm" target="test_blank"&gt;http://hometown.aol.com/skarkada/sap/table_control/table_control.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward point if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2007 10:30:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-in-module-pool/m-p/2925309#M689101</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-24T10:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Table control in module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-in-module-pool/m-p/2925310#M689102</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;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


process before output.
*&amp;amp;spwizard: pbo flow logic for tablecontrol 'MY_TAB'
  module my_tab_change_tc_attr.
*&amp;amp;spwizard: module MY_TAB_change_col_attr.
  loop at   it_item
       into wa_item
       with control my_tab
       cursor my_tab-current_line.
    module my_tab_get_lines.
*&amp;amp;spwizard:   module MY_TAB_change_field_attr
  endloop.

  module status_0100.
  module set_curson.
  module get_date.
  module ok_code.

process after input.
*&amp;amp;spwizard: pai flow logic for tablecontrol 'MY_TAB'
  loop at it_item.
    chain.
      field wa_item-zeile.
      field wa_item-matnr.
      field wa_item-maktx.
      field wa_item-meins.
      field wa_item-menge.
      field wa_item-rflag.
      module my_tab_modify on chain-request.
    endchain.
  endloop.
  module my_tab_user_command.
*&amp;amp;spwizard: module MY_TAB_change_tc_attr.
*&amp;amp;spwizard: module MY_TAB_change_col_attr.
  module get_vendor_name.
  module user_command_0100.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For second screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.
*&amp;amp;spwizard: pbo flow logic for tablecontrol 'CON_TAB'
  module CON_TAB_change_tc_attr.
*&amp;amp;spwizard: module CON_TAB_change_col_attr.
  loop at   IT_DB_ITEM
       into WA_DB_ITEM
       with control CON_TAB
       cursor CON_TAB-current_line.
    module CON_TAB_get_lines.
*&amp;amp;spwizard:   module CON_TAB_change_field_attr
  endloop.

 MODULE STATUS_0110.
*
PROCESS AFTER INPUT.
*&amp;amp;spwizard: pai flow logic for tablecontrol 'CON_TAB'
  loop at IT_DB_ITEM.
    chain.
      field WA_DB_ITEM-ZEILE.
      field WA_DB_ITEM-MATNR.
      field WA_DB_ITEM-MAKTX.
      field WA_DB_ITEM-MEINS.
      field WA_DB_ITEM-MENGE.
      field WA_DB_ITEM-RFLAG.
    endchain.
  endloop.
  module CON_TAB_user_command.
*&amp;amp;spwizard: module CON_TAB_change_tc_attr.
*&amp;amp;spwizard: module CON_TAB_change_col_attr.

 MODULE USER_COMMAND_0110.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2007 10:34:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-in-module-pool/m-p/2925310#M689102</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-24T10:34:43Z</dc:date>
    </item>
  </channel>
</rss>

