<?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: Module pool program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-program/m-p/5763716#M1305303</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;To make your fields mandatory go to Layout of the Screen -&amp;gt; Go to the Screen Attributes of the field you want make mandatory -&amp;gt; Go to Program Tab -&amp;gt; Make it required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to display your calculative fields, you can have them Output only fields -&amp;gt; In the Screen Attributes -&amp;gt; Program Tab -&amp;gt; Uncheck Input field. The field will be greyed out for input purposes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To save your data,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the screen elements are ELE1, ELE2, ELE3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then declare a workarea or an internal table (depends on your requirement)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;        field1(10) type c,&lt;/P&gt;&lt;P&gt;        field2(10) type c,&lt;/P&gt;&lt;P&gt;        field3(10) type c,&lt;/P&gt;&lt;P&gt;        end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_itab like line of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your PAI of the screen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put all your user entered data into the work area from the screen elements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_itab-field1 = ele1.&lt;/P&gt;&lt;P&gt;wa_itab-field2 = ele2.&lt;/P&gt;&lt;P&gt;wa_itab-field3 = ele3.&lt;/P&gt;&lt;P&gt;append wa_itab to itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_itab.&lt;/P&gt;&lt;P&gt;"This inserts data into the database table from the internal table.&lt;/P&gt;&lt;P&gt;insert dbtable from itab.  "Data is saved in the database&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jun 2009 09:06:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-17T09:06:29Z</dc:date>
    <item>
      <title>Module pool program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-program/m-p/5763714#M1305301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Requirement is to display a list of fields in module pool screen, some of the textboxes allow me to enter the value. when i hit save or enter button after entering the values on the module pool screen, it will update the other relative fields as well.&lt;/P&gt;&lt;P&gt;How to mark the field as MANDATORY, optional, display?&lt;/P&gt;&lt;P&gt;how to display calculative fields in screen?&lt;/P&gt;&lt;P&gt;Could you please give sample example to save all the entry in Module pool screen?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;BABA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 07:43:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-program/m-p/5763714#M1305301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T07:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-program/m-p/5763715#M1305302</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 order to make the fields as mandatory, double click on the field in screen painter and select 'required' in the input option.&lt;/P&gt;&lt;P&gt;For optional you need to do nothing.&lt;/P&gt;&lt;P&gt;For making them display only check the 'output only' check box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To display calculated value in the module pool, you make a field as output only. If you want to add values of two fields and store them in the third one then in flow logic of the screen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;field3&amp;gt; = &amp;lt;field1&amp;gt; + &amp;lt;field2&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it's helpful to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 08:44:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-program/m-p/5763715#M1305302</guid>
      <dc:creator>sridhar_meesala</dc:creator>
      <dc:date>2009-06-17T08:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-program/m-p/5763716#M1305303</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;To make your fields mandatory go to Layout of the Screen -&amp;gt; Go to the Screen Attributes of the field you want make mandatory -&amp;gt; Go to Program Tab -&amp;gt; Make it required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to display your calculative fields, you can have them Output only fields -&amp;gt; In the Screen Attributes -&amp;gt; Program Tab -&amp;gt; Uncheck Input field. The field will be greyed out for input purposes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To save your data,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the screen elements are ELE1, ELE2, ELE3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then declare a workarea or an internal table (depends on your requirement)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;        field1(10) type c,&lt;/P&gt;&lt;P&gt;        field2(10) type c,&lt;/P&gt;&lt;P&gt;        field3(10) type c,&lt;/P&gt;&lt;P&gt;        end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_itab like line of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your PAI of the screen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put all your user entered data into the work area from the screen elements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_itab-field1 = ele1.&lt;/P&gt;&lt;P&gt;wa_itab-field2 = ele2.&lt;/P&gt;&lt;P&gt;wa_itab-field3 = ele3.&lt;/P&gt;&lt;P&gt;append wa_itab to itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_itab.&lt;/P&gt;&lt;P&gt;"This inserts data into the database table from the internal table.&lt;/P&gt;&lt;P&gt;insert dbtable from itab.  "Data is saved in the database&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 09:06:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-program/m-p/5763716#M1305303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T09:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-program/m-p/5763717#M1305304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sri &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thq Sri for quick response !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the requirement is to display a list of fields in module pool screen, some of the textboxes allow me to enter the value. when i hit save or enter button after entering the values on the module pool screen, it will update the other relative fields as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you give sample example for this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thxand regds,&lt;/P&gt;&lt;P&gt;BABA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 09:30:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-program/m-p/5763717#M1305304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T09:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-program/m-p/5763718#M1305305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you please elaborate a little in detail. Do you expect some new fields to appear once you enter some value to a field and press enter...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 09:36:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-program/m-p/5763718#M1305305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T09:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-program/m-p/5763719#M1305306</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;Suppose if there are 5 fields in in your screen like emp no, name, dept., date of joining, date of birth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now emp no is input field and the rest are output only fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so when you enter emp no it should display the results in the remaining fields.&lt;/P&gt;&lt;P&gt;If the requirement is like this then you can write like this in PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE sy-ucomm.&lt;/P&gt;&lt;P&gt; WHEN 'F_SHOW'.    " function code for the button&lt;/P&gt;&lt;P&gt;  SELECT SINGLE empno&lt;/P&gt;&lt;P&gt;  FROM &amp;lt;ztable&amp;gt;&lt;/P&gt;&lt;P&gt;  INTO &amp;lt;local variable&amp;gt;&lt;/P&gt;&lt;P&gt;  WHERE empno = ztable-empno.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  ztable-name = name.&lt;/P&gt;&lt;P&gt;  ztable-dept = dept.&lt;/P&gt;&lt;P&gt;  ztable-doj = doj.&lt;/P&gt;&lt;P&gt;  ztable-dob = dob.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt; MESSAGE 'enter the correct empno' TYPE 'E'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;revert incase of any issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 09:52:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-program/m-p/5763719#M1305306</guid>
      <dc:creator>sridhar_meesala</dc:creator>
      <dc:date>2009-06-17T09:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-program/m-p/5763720#M1305307</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;This serves your purpose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To code the sy-ucomm for Enter, one method is&lt;/P&gt;&lt;P&gt;Create a GUI Status -&amp;gt; In the Function Keys -&amp;gt; In any of the icons displayed, give a name (Function Code) like 'ENTER' -&amp;gt; double click on that -&amp;gt; asks for the Function Text and the Function Code is activated. Do not forget to activate your GUI Status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two screen elements MARA-MATNR and MAKT-MAKTX. On giving Material No, an Enter would fetch the Description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

module STATUS_0100 output.
  SET PF-STATUS 'STATUS'.
endmodule.                 " STATUS_0100  OUTPUT




module USER_COMMAND_0100 input.

GV_MATNR = MARA-MATNR.

  IF OK_CODE EQ 'ENTER'.
    SELECT SINGLE MAKTX FROM MAKT INTO GV_DESC WHERE MATNR EQ GV_MATNR.
      IF SY-SUBRC EQ 0.
        MAKT-MAKTX = GV_DESC.
      ENDIF.
  ENDIF.

endmodule.                 " USER_COMMAND_0100  INPUT


"TOP Include
TABLES: MARA,
        MAKT.

DATA: BEGIN OF T_MATNR OCCURS 0,
      MATNR TYPE MARA-MATNR,
      END OF T_MATNR.

DATA: GV_DESC TYPE MAKT-MAKTX,
      GV_MATNR TYPE MARA-MATNR,
      OK_CODE TYPE SY-UCOMM.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 11:24:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-program/m-p/5763720#M1305307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T11:24:09Z</dc:date>
    </item>
  </channel>
</rss>

