<?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: different selection screen for different tcode, but using the same program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-selection-screen-for-different-tcode-but-using-the-same-program/m-p/1525155#M240645</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;If you would like to differentiate between the two transactions, you can better define two different selection screens and call them using different transacations. This`ll help you bcoz when calling one tcode, only one selection screen is generated and the processing of the same happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Aug 2006 07:56:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-24T07:56:46Z</dc:date>
    <item>
      <title>different selection screen for different tcode, but using the same program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-selection-screen-for-different-tcode-but-using-the-same-program/m-p/1525153#M240643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have written a program zreport, and created 2 tcode for it, zreport1 and zreport2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to have my selection screen differ when using different tcode to call the program.&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;when using zreport1 to call zreport&lt;/P&gt;&lt;P&gt;there are selection criteria A, B, C&lt;/P&gt;&lt;P&gt;while there are B, C, D, E when using zreport2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am now using a subroutine which loop through the screen and suppress unused fields by referencing sy-tcode during initization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any better method as I think I am using a very stupid method.... Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2006 07:52:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-selection-screen-for-different-tcode-but-using-the-same-program/m-p/1525153#M240643</guid>
      <dc:creator>former_member220801</dc:creator>
      <dc:date>2006-08-24T07:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: different selection screen for different tcode, but using the same program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-selection-screen-for-different-tcode-but-using-the-same-program/m-p/1525154#M240644</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;  You can suppress the screen fields by looping thro' the screen in AT SELECTION-SCREEN OUTPUT event,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2006 07:55:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-selection-screen-for-different-tcode-but-using-the-same-program/m-p/1525154#M240644</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-24T07:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: different selection screen for different tcode, but using the same program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-selection-screen-for-different-tcode-but-using-the-same-program/m-p/1525155#M240645</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;If you would like to differentiate between the two transactions, you can better define two different selection screens and call them using different transacations. This`ll help you bcoz when calling one tcode, only one selection screen is generated and the processing of the same happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2006 07:56:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-selection-screen-for-different-tcode-but-using-the-same-program/m-p/1525155#M240645</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-24T07:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: different selection screen for different tcode, but using the same program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-selection-screen-for-different-tcode-but-using-the-same-program/m-p/1525156#M240646</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;define two selection-screen and call one depending on tcode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT zwa_test2.
TABLES: spfli.

start-of-selection.


  If sy-tcode = 'ZREPORT1'.
    call selection-screen '123'.
  elseif sy-tcode = 'ZREPORT2'.
    call selection-screen '99'.
  endif.




  SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-456.
  SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1
                                      NO INTERVALS.
  SELECT-OPTIONS SEL1 FOR SY-SUBRC.
  PARAMETERS     PAR1 LIKE SPFLI-CARRID.
  SELECTION-SCREEN COMMENT /10(20) TEXT-COM.
  SELECTION-SCREEN END OF BLOCK BL1.
  SELECTION-SCREEN END OF SCREEN 123.





  SELECTION-SCREEN BEGIN OF SCREEN 99.
  SELECTION-SCREEN PUSHBUTTON 15(25) PUBU
                   USER-COMMAND US01.
  SELECT-OPTIONS SEL2 FOR SPFLI-CONNID.
  PARAMETERS     PAR2 TYPE I.
  SELECTION-SCREEN END OF SCREEN 99.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;lt;/b&amp;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;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2006 07:59:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-selection-screen-for-different-tcode-but-using-the-same-program/m-p/1525156#M240646</guid>
      <dc:creator>dani_mn</dc:creator>
      <dc:date>2006-08-24T07:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: different selection screen for different tcode, but using the same program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-selection-screen-for-different-tcode-but-using-the-same-program/m-p/1525157#M240647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i think, you have to define 2 selection screen say 1000 and 1001 and while create the transaction code for that program give them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;srikanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2006 08:00:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-selection-screen-for-different-tcode-but-using-the-same-program/m-p/1525157#M240647</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-24T08:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: different selection screen for different tcode, but using the same program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-selection-screen-for-different-tcode-but-using-the-same-program/m-p/1525158#M240648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gundam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. another option is of using&lt;/P&gt;&lt;P&gt;   SELECTION SCREENS&lt;/P&gt;&lt;P&gt;  (two different selection screens,&lt;/P&gt;&lt;P&gt;  in the same program,&lt;/P&gt;&lt;P&gt;  defined using &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 2000.&lt;/P&gt;&lt;P&gt;PARAMETERS : A(10) TYPE C.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF SCREEN 2000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 3000.&lt;/P&gt;&lt;P&gt;PARAMETERS : B(20) TYPE C.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF SCREEN 3000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. then in INITIALIZATION EVENT,&lt;/P&gt;&lt;P&gt;   we can detect the tcode,&lt;/P&gt;&lt;P&gt;   and CALL the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. just copy paste to get a taste of it.&lt;/P&gt;&lt;P&gt;   ( u may change the TCODE in the program code)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.&lt;/P&gt;&lt;P&gt;report abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------" /&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 2000.&lt;/P&gt;&lt;P&gt;PARAMETERS : A(10) TYPE C.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF SCREEN 2000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 3000.&lt;/P&gt;&lt;P&gt;PARAMETERS : B(20) TYPE C.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF SCREEN 3000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------" /&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;IF SY-TCODE = 'SE38' or sy-tcode = 'ZTR01'.&lt;/P&gt;&lt;P&gt;CALL SELECTION-SCREEN 2000.&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;IF SY-TCODE = 'ZTR02'.&lt;/P&gt;&lt;P&gt;CALL SELECTION-SCREEN 3000.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------" /&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'AMIT'.&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2006 08:06:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-selection-screen-for-different-tcode-but-using-the-same-program/m-p/1525158#M240648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-24T08:06:17Z</dc:date>
    </item>
  </channel>
</rss>

