<?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: how to create different blocks at same screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-how-to-create-different-blocks-at-same-screen/m-p/4315430#M1028595</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can do that...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have create subscreen areas in the screen painter and call the selection screen on those areas..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just see the stpes..and follow the sample code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ztest_mod.
 
DATA: kunnr TYPE kunnr.
 "if you want to create blocks same like selection screen the
 "you have to create them as subscreen,
"place them in subscreen area.
* Custom Selection Screen a
SELECTION-SCREEN BEGIN OF SCREEN 0200 AS SUBSCREEN.
SELECT-OPTIONS: s_kunnr FOR  kunnr.
SELECTION-SCREEN END OF SCREEN 0200.
 

 
START-OF-SELECTION.
  "in this screen i have a button with function code 'SEARCH'
  " and a subscreen area with name sub
  CALL SCREEN 100.
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  STATUS_0100  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'STATUS'.
ENDMODULE.                    "status_0100 OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  USER_COMMAND_0100  INPUT
*&amp;amp;---------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
"for reading the selection screen fields
  DATA:
      i_dyn_fields LIKE TABLE
                     OF dynpread
                   WITH HEADER LINE.
  MOVE:
    'S_KUNNR-LOW' TO i_dyn_fields-fieldname.
  APPEND i_dyn_fields.
  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      dyname               = sy-repid
      dynumb               = '0200'
    TABLES
      dynpfields           = i_dyn_fields
    EXCEPTIONS
      invalid_abapworkarea = 1
      invalid_dynprofield  = 2
      invalid_dynproname   = 3
      invalid_dynpronummer = 4
      invalid_request      = 5
      no_fielddescription  = 6
      invalid_parameter    = 7
      undefind_error       = 8
      double_conversion    = 9
      stepl_not_found      = 10
      OTHERS               = 11.
  IF sy-subrc eq 0. 
   read table i_dyn_fields index 1.
    s_kunnr-low = i_dynp_fields-VALUE
    s_kunnr-sign = 'I'.
    s_kunnr-option = 'EQ'.
    append s_kunnr.
  ENDIF.
 
  DATA: it_kunnr TYPE TABLE OF kna1.
  CASE sy-ucomm.
    WHEN 'SEARCH'.
      SELECT * FROM kna1
      INTO TABLE it_kunnr
      WHERE kunnr IN s_kunnr.
    WHEN 'BACK'.
      LEAVE TO SCREEN 0.
  ENDCASE.
ENDMODULE.                    "user_command_0100 INPUT&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;Flow Logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.
*
  MODULE status_0100.
*
  CALL SUBSCREEN sub INCLUDING sy-repid '0200'.
*
PROCESS AFTER INPUT.
*
  MODULE user_command_0100.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vijay Babu Dudla&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jul 2008 18:27:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-29T18:27:48Z</dc:date>
    <item>
      <title>module-pool: how to create different blocks at same screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-how-to-create-different-blocks-at-same-screen/m-p/4315429#M1028594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;can i create different blocks at same selection-screen in module-pool? if yes,how?and can i use 'loop at screen' in dat case?&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2008 18:09:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-how-to-create-different-blocks-at-same-screen/m-p/4315429#M1028594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-29T18:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: module-pool: how to create different blocks at same screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-how-to-create-different-blocks-at-same-screen/m-p/4315430#M1028595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can do that...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have create subscreen areas in the screen painter and call the selection screen on those areas..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just see the stpes..and follow the sample code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ztest_mod.
 
DATA: kunnr TYPE kunnr.
 "if you want to create blocks same like selection screen the
 "you have to create them as subscreen,
"place them in subscreen area.
* Custom Selection Screen a
SELECTION-SCREEN BEGIN OF SCREEN 0200 AS SUBSCREEN.
SELECT-OPTIONS: s_kunnr FOR  kunnr.
SELECTION-SCREEN END OF SCREEN 0200.
 

 
START-OF-SELECTION.
  "in this screen i have a button with function code 'SEARCH'
  " and a subscreen area with name sub
  CALL SCREEN 100.
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  STATUS_0100  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'STATUS'.
ENDMODULE.                    "status_0100 OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  USER_COMMAND_0100  INPUT
*&amp;amp;---------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
"for reading the selection screen fields
  DATA:
      i_dyn_fields LIKE TABLE
                     OF dynpread
                   WITH HEADER LINE.
  MOVE:
    'S_KUNNR-LOW' TO i_dyn_fields-fieldname.
  APPEND i_dyn_fields.
  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      dyname               = sy-repid
      dynumb               = '0200'
    TABLES
      dynpfields           = i_dyn_fields
    EXCEPTIONS
      invalid_abapworkarea = 1
      invalid_dynprofield  = 2
      invalid_dynproname   = 3
      invalid_dynpronummer = 4
      invalid_request      = 5
      no_fielddescription  = 6
      invalid_parameter    = 7
      undefind_error       = 8
      double_conversion    = 9
      stepl_not_found      = 10
      OTHERS               = 11.
  IF sy-subrc eq 0. 
   read table i_dyn_fields index 1.
    s_kunnr-low = i_dynp_fields-VALUE
    s_kunnr-sign = 'I'.
    s_kunnr-option = 'EQ'.
    append s_kunnr.
  ENDIF.
 
  DATA: it_kunnr TYPE TABLE OF kna1.
  CASE sy-ucomm.
    WHEN 'SEARCH'.
      SELECT * FROM kna1
      INTO TABLE it_kunnr
      WHERE kunnr IN s_kunnr.
    WHEN 'BACK'.
      LEAVE TO SCREEN 0.
  ENDCASE.
ENDMODULE.                    "user_command_0100 INPUT&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;Flow Logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.
*
  MODULE status_0100.
*
  CALL SUBSCREEN sub INCLUDING sy-repid '0200'.
*
PROCESS AFTER INPUT.
*
  MODULE user_command_0100.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vijay Babu Dudla&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2008 18:27:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-how-to-create-different-blocks-at-same-screen/m-p/4315430#M1028595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-29T18:27:48Z</dc:date>
    </item>
  </channel>
</rss>

