<?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: Dynamic selection-screen in a method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954024#M65819</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mikola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not getting the prefect picture of your problem yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. where is the subroutine defined? in the generated program or in the calling program ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. where do you want to call the subroutine from ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. what are the elements you have on the selection-screen of the generated program?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. What are the parameters you want to pass to the subroutine when you call it ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;anand mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Jul 2005 12:30:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-07-21T12:30:13Z</dc:date>
    <item>
      <title>Dynamic selection-screen in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954016#M65811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;I need to generate selection-screen dynamically from a method of the class.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;There are can be select options and parameters on the selection-screen. &lt;/P&gt;&lt;P&gt;At runtime, it's needed to generate a program containing selection-screen and pass a table into the program in order to get results of the user selection (there should be a query to the database in the program). Notice, that dynamic program is called from a method of the class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2005 06:03:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954016#M65811</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-21T06:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection-screen in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954017#M65812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mikola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although a rare requirement, this is possible. I can give you a few pointers to how it can be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the F1 documentation for the following - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. INSERT REPORT&lt;/P&gt;&lt;P&gt;2. GENERATE DYNPRO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2005 06:07:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954017#M65812</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-21T06:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection-screen in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954018#M65813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using INSERT REPORT, I have no way to pass my table to get the selection results. &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2005 06:14:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954018#M65813</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-21T06:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection-screen in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954019#M65814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mikola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firstly, have a look at the following code to see how this can be implemented - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ZTEST.

perform test.


class test definition.
  public section.
    methods: create_screen.
endclass.

class test implementation.
  method create_screen.
    data:  report_line(72),
           report_source like table of report_line.

    data: err_message(240),
          err_line type i,
          err_word(100).

    report_line = 'REPORT TEST.'.
    append report_line to report_source.

    report_line = 'PARAMETERS: P_TEST TYPE I.'.
    append report_line to report_source.

    report_line = 'START-OF-SELECTION.'.
    append report_line to report_source.

    report_line = 'WRITE : P_TEST.'.
    append report_line to report_source.

    syntax-check for report_source message err_message
                                   line    err_line
                                   word    err_word.
    if err_message is initial.
      INSERT REPORT 'ZZZTESTZZZ' FROM REPORT_SOURCE.
      SUBMIT ZZZTESTZZZ VIA SELECTION-SCREEN AND RETURN.
    endif.
  endmethod.
endclass.

form test.
  data test type ref to test.
  CREATE OBJECT TEST.
  call method test-&amp;gt;create_screen.
endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see, the report is being written dynamically. Once the INSERT REPORT statement is executed, the program is available. you can you &amp;lt;i&amp;gt;external subroutine calls&amp;lt;/i&amp;gt; to pass the data between the programs now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2005 06:29:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954019#M65814</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-21T06:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection-screen in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954020#M65815</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;Just check this code sample.This is the sample I got in SDN some time back.May be this can help you.If so,reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;PERFORM DYNAMIC_CODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM DYNAMIC_CODE.&lt;/P&gt;&lt;P&gt;APPEND 'REPORT ZSEARCH NO STANDARD PAGE HEADING.' TO ITAB.&lt;/P&gt;&lt;P&gt;APPEND 'TABLES : DD03L,DD02L.' TO ITAB.&lt;/P&gt;&lt;P&gt;DATA TAB LIKE TEXTPOOL OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;APPEND 'SELECTION-SCREEN BEGIN OF BLOCK BLK' TO ITAB.&lt;/P&gt;&lt;P&gt;APPEND 'WITH FRAME TITLE TEXT-001.' TO ITAB.&lt;/P&gt;&lt;P&gt;DO P4 TIMES.&lt;/P&gt;&lt;P&gt;REC_CNT = SY-INDEX.&lt;/P&gt;&lt;P&gt;CONDENSE REC_CNT NO-GAPS.&lt;/P&gt;&lt;P&gt;IF P1 = 'X'.&lt;/P&gt;&lt;P&gt;CONCATENATE 'PARAMETERS:F' REC_CNT&lt;/P&gt;&lt;P&gt;' LIKE DD03L-FIELDNAME OBLIGATORY.'&lt;/P&gt;&lt;P&gt;INTO WA.&lt;/P&gt;&lt;P&gt;APPEND WA TO ITAB.&lt;/P&gt;&lt;P&gt;TAB-ID = 'S'.&lt;/P&gt;&lt;P&gt;CONCATENATE 'F' REC_CNT INTO WA.&lt;/P&gt;&lt;P&gt;TAB-KEY = WA.&lt;/P&gt;&lt;P&gt;CONCATENATE'$$$$$$$$' 'Field Name' REC_CNT INTO WA.&lt;/P&gt;&lt;P&gt;TAB-ENTRY = WA.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;IF P2 = 'X'.&lt;/P&gt;&lt;P&gt;CONCATENATE 'PARAMETERS:D' REC_CNT&lt;/P&gt;&lt;P&gt;' LIKE DD03L-ROLLNAME OBLIGATORY.'&lt;/P&gt;&lt;P&gt;INTO WA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND WA TO ITAB.&lt;/P&gt;&lt;P&gt;TAB-ID = 'S'.&lt;/P&gt;&lt;P&gt;CONCATENATE 'D' REC_CNT INTO WA.&lt;/P&gt;&lt;P&gt;TAB-KEY = WA.&lt;/P&gt;&lt;P&gt;CONCATENATE'$$$$$$$$' 'Data Element' REC_CNT INTO WA.&lt;/P&gt;&lt;P&gt;TAB-ENTRY = WA.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;IF P3 = 'X'.&lt;/P&gt;&lt;P&gt;APPEND 'SELECTION-SCREEN BEGIN OF LINE.' TO ITAB.&lt;/P&gt;&lt;P&gt;CONCATENATE 'SELECTION-SCREEN COMMENT (15) FOR FIELD DT'&lt;/P&gt;&lt;P&gt;REC_CNT '.' INTO WA.&lt;/P&gt;&lt;P&gt;APPEND WA TO ITAB.&lt;/P&gt;&lt;P&gt;CONCATENATE 'PARAMETERS:DT' REC_CNT&lt;/P&gt;&lt;P&gt;' LIKE DD03L-DATATYPE OBLIGATORY.'&lt;/P&gt;&lt;P&gt;INTO WA.&lt;/P&gt;&lt;P&gt;APPEND WA TO ITAB.&lt;/P&gt;&lt;P&gt;CONCATENATE 'SELECTION-SCREEN COMMENT (16) FOR FIELD SIZE'&lt;/P&gt;&lt;P&gt;REC_CNT '.' INTO WA.&lt;/P&gt;&lt;P&gt;APPEND WA TO ITAB.&lt;/P&gt;&lt;P&gt;CONCATENATE 'PARAMETERS:SIZE' REC_CNT&lt;/P&gt;&lt;P&gt;' LIKE DD03L-LENG OBLIGATORY.' INTO WA.&lt;/P&gt;&lt;P&gt;APPEND WA TO ITAB.&lt;/P&gt;&lt;P&gt;APPEND 'SELECTION-SCREEN END OF LINE.' TO ITAB.&lt;/P&gt;&lt;P&gt;TAB-ID = 'S'.&lt;/P&gt;&lt;P&gt;CONCATENATE 'DT' REC_CNT INTO WA.&lt;/P&gt;&lt;P&gt;TAB-KEY = WA.&lt;/P&gt;&lt;P&gt;CONCATENATE'$$$$$$$$' 'Data Type' REC_CNT INTO WA.&lt;/P&gt;&lt;P&gt;TAB-ENTRY = WA.&lt;/P&gt;&lt;P&gt;APPEND TAB.&lt;/P&gt;&lt;P&gt;TAB-ID = 'S'.&lt;/P&gt;&lt;P&gt;CONCATENATE 'SIZE' REC_CNT INTO WA.&lt;/P&gt;&lt;P&gt;TAB-KEY = WA.&lt;/P&gt;&lt;P&gt;CONCATENATE'$$$$$$$$' 'Len. of Field' REC_CNT INTO WA.&lt;/P&gt;&lt;P&gt;TAB-ENTRY = WA.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;APPEND TAB.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;APPEND 'SELECTION-SCREEN END OF BLOCK BLK.' TO ITAB.&lt;/P&gt;&lt;P&gt;ENDFORM. " DYNAMIC_CODE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2005 07:18:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954020#M65815</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-07-21T07:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection-screen in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954021#M65816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But... How can I get a table with results back from generated report?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2005 08:33:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954021#M65816</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-21T08:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection-screen in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954022#M65817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mikola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you call a subroutine (regardless of whether the subroutine is in the same program or another one), all the tables parameters will be passed by reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So at the end of the subroutine call, the tables parameter will contain the values that you desire.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2005 09:52:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954022#M65817</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-21T09:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection-screen in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954023#M65818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess it won't work because of unavailability to access select-option tables(which resides in the generated report memory context) from my program (where I perform a form from the generated report) .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2005 10:42:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954023#M65818</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-21T10:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection-screen in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954024#M65819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mikola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not getting the prefect picture of your problem yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. where is the subroutine defined? in the generated program or in the calling program ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. where do you want to call the subroutine from ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. what are the elements you have on the selection-screen of the generated program?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. What are the parameters you want to pass to the subroutine when you call it ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;anand mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2005 12:30:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954024#M65819</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-21T12:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection-screen in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954025#M65820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. The subroutine is defined in the generated program.&lt;/P&gt;&lt;P&gt;2. It is called from "static" program (from a method).&lt;/P&gt;&lt;P&gt;3. These elements are generated dynamically during runtime in the method (entire dynamic report is generated in the method).&lt;/P&gt;&lt;P&gt;4. There are select options and parameters in the generated report and I want a user to fill them. According to the user selection a query should be executed after END-OF-SELECTION event and the results of the query I want to get back from the generated report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have found appropriate function module to implement this task (FREE_SELECTIONS_INIT). So I think I can close the thread. &lt;/P&gt;&lt;P&gt;Thank you for the help.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2005 13:17:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen-in-a-method/m-p/954025#M65820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-21T13:17:13Z</dc:date>
    </item>
  </channel>
</rss>

