<?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: Call program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-program/m-p/2301472#M502970</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here submit command is used to call another program and import/export command is used to pass the parameters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic forms: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. SUBMIT rep. &lt;/P&gt;&lt;P&gt;2. SUBMIT (name). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extras: &lt;/P&gt;&lt;P&gt;1. ... LINE-SIZE col &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... LINE-COUNT line &lt;/P&gt;&lt;P&gt;3. ... TO SAP-SPOOL List output to the SAP spool database &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. ... USING SELECTION-SCREEN scr &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. ... VIA SELECTION-SCREEN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. ... AND RETURN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. ... EXPORTING LIST TO MEMORY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8. ... USER user VIA JOB job NUMBER n &lt;/P&gt;&lt;P&gt;9. ...Various additions for passing parameters to rep &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10. ... USING SELECTION-SETS OF PROGRAM prog &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Calls report rep. &lt;/P&gt;&lt;P&gt;The system leaves the active program and starts the new report rep. In basic form 2, you can specify the name of the report in the field name. You must specify the name in uppercase, otherwise a runtime error occurs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;You can only start programs with type '1' using SUBMIT. If the program has a different type, the system triggers a runtime error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please consult Data Area and Modularization Unit Organization documentation as well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1 &lt;/P&gt;&lt;P&gt;... LINE-SIZE col &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The list generated by the report has the line width col. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2 &lt;/P&gt;&lt;P&gt;... LINE-COUNT line &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The list generated by the report has line lines per page. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 4 &lt;/P&gt;&lt;P&gt;... USING SELECTION-SCREEN scr &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;When you execute the report, the system uses the selection screen number that you specify in the scr field. This must be a selection screen defined using the SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN statements.If you omit the addition, the system uses the standard selection screen 1000. &lt;/P&gt;&lt;P&gt;This addition allows you to start the same report in different situations, using a different selection screen each time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;The addition VIA SELECTION SCREEN determines whether the report is processed in the foreground or the background. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happens if the required screen does not exist or is not a selection screen? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen 1000: &lt;/P&gt;&lt;P&gt;If you want to use the standard selection screen (... USING SELECTION-SCREEN 1000 or do not specify a ... USING SELECTION-SCREEN) addition, the system does not process a selection screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other selection screens: &lt;/P&gt;&lt;P&gt;The system triggers a runtime error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 5 &lt;/P&gt;&lt;P&gt;... VIA SELECTION-SCREEN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The selection screen is displayed. In this case, the selection screen is displayed again after the report list has been displayed. The values entered by the user remain displayed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 6 &lt;/P&gt;&lt;P&gt;... AND RETURN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Returns to the calling transaction or program after the called program has been executed. SUBMIT ... AND RETURN creates a new internal session. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 7 &lt;/P&gt;&lt;P&gt;... EXPORTING LIST TO MEMORY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Does not display the output list of the called report, but saves it in ABAP memory and leaves the called report immediately. Since the calling program can read the list from memory and process it further, you need to use the addition ... AND RETURN . Also, since the called report cannot be requested for printing, the addition ... TO SAP-SPOOL is not allowed here. In addition, you must not assign a function code to the ENTER key in the current GUI status. The saved list is read from the SAP memory using the function module 'LIST_FROM_MEMORY' and can then be saved to the database using EXPORT, for example. You can process this list further with the function modules 'WRITE_LIST', 'DISPLAY_LIST' ... of the function group "SLST". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 8 &lt;/P&gt;&lt;P&gt;... USER user VIA JOB job NUMBER n &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Schedules the specified report in the job specified by the job name job and the job number n. The job runs under the user name user and you can omit the addition USER user. The assignment of the job number occurs via the function module JOB_OPEN (see also the documentation for the function modules JOB_CLOSE and JOB_SUBMIT). This addition can only be used with the addition ...AND RETURN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;When scheduling a report with the SUBMIT ... VIA JOB job NUMBER n statement, you should always use the addition ...TO SAP-SPOOL to pass print and/or archive parameters. Otherwise, default values are used to generate the list and this disturbs operations in a production environment. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0: &lt;/P&gt;&lt;P&gt;Job scheduled successfully &lt;/P&gt;&lt;P&gt;SY-SUBRC = 4: &lt;/P&gt;&lt;P&gt;Job scheduling terminated by user &lt;/P&gt;&lt;P&gt;SY-SUBRC = 8: &lt;/P&gt;&lt;P&gt;Error in job scheduling (JOB_SUBMIT) &lt;/P&gt;&lt;P&gt;SY-SUBRC = 12: &lt;/P&gt;&lt;P&gt;Error in internal number assignment &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 10 &lt;/P&gt;&lt;P&gt;... USING SELECTION-SETS OF PROGRAM prog &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Uses variants of the program prog when executing the program rep. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;Important &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The programs prog and rep must have the same SELECT-OPTIONS and PARAMETERs. Otherwise, variants of the program prog may be destroyed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;When using this addition, the specified variant vari of the program prog is taken in USING SELECTION-SET vari. On the other hand, all variant-related actions on the selection screen of rep (Get, Save as variant, Display, Delete) refer to the variants of prog. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;SUBMIT REPORT01 &lt;/P&gt;&lt;P&gt;       VIA SELECTION-SCREEN &lt;/P&gt;&lt;P&gt;       USING SELECTION-SET 'VARIANT1' &lt;/P&gt;&lt;P&gt;       USING SELECTION-SETS OF PROGRAM 'REPORT00' &lt;/P&gt;&lt;P&gt;       AND RETURN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Executes the program REPORT01 with the variant VARIANT1 of the program REPORT00.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 May 2007 05:40:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-28T05:40:51Z</dc:date>
    <item>
      <title>Call program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-program/m-p/2301467#M502965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to call another program in my present program plz send me the code for this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2007 05:35:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-program/m-p/2301467#M502965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-28T05:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Call program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-program/m-p/2301468#M502966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use submit Program name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use submit key word..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2007 05:37:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-program/m-p/2301468#M502966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-28T05:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Call program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-program/m-p/2301469#M502967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SUBMIT REPORT01 &lt;/P&gt;&lt;P&gt;       VIA SELECTION-SCREEN &lt;/P&gt;&lt;P&gt;       USING SELECTION-SET 'VARIANT1' &lt;/P&gt;&lt;P&gt;       USING SELECTION-SETS OF PROGRAM 'REPORT00' &lt;/P&gt;&lt;P&gt;       AND RETURN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or simply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT REPORT01 &lt;/P&gt;&lt;P&gt;              AND RETURN. &lt;/P&gt;&lt;P&gt;REPORT01 is the program name&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2007 05:37:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-program/m-p/2301469#M502967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-28T05:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Call program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-program/m-p/2301470#M502968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Feref the following programs: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report  z_82235_test1                           .

types: begin of tab1,
         a(1),
         b(1),
       end of tab1.

types: begin of tab2,
         c(1),
         d(1),
       end of tab2.

data: itab1 type table of tab1,
      wa1 like line of itab1,
      itab2 type table of tab2,
      wa2 like line of itab2.

wa1-a = '1'.
wa1-b = '2'.
append wa1 to itab1.
clear wa1.

wa1-a = '3'.
wa1-b = '4'.
append wa1 to itab1.
clear wa1.


export itab1 to memory id '001'.
export itab2 to memory id '002'.

submit z_82235_test2 and return exporting list to memory .


import itab1 from memory id '003'.
import itab2 from memory id '004'.

write:/ 'ITAB1'.
loop at itab1 into wa1.
write : / wa1-a, wa1-b.
clear: wa1.
endloop.

write:/ 'ITAB2'.
loop at itab2 into wa2.
write : / wa2-c, wa2-d.
clear: wa2.
endloop.

report  z_82235_test2                           .

types: begin of tab1,
         a(1),
         b(1),
       end of tab1.

types: begin of tab2,
         c(1),
         d(1),
       end of tab2.

data: itab1 type table of tab1,
      wa1 like line of itab1,
      itab2 type table of tab2,
      wa2 like line of itab2.

import itab1 from memory id '001'.
import itab2 from memory id '002'.

itab2[] = itab1[].

wa1-a = 'a'.
wa1-b = 'b'.
append wa1 to itab1.
clear wa1.


export itab1 to memory id '003'.
export itab2 to memory id '004'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2007 05:38:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-program/m-p/2301470#M502968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-28T05:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Call program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-program/m-p/2301471#M502969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2007 05:39:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-program/m-p/2301471#M502969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-28T05:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Call program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-program/m-p/2301472#M502970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here submit command is used to call another program and import/export command is used to pass the parameters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic forms: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. SUBMIT rep. &lt;/P&gt;&lt;P&gt;2. SUBMIT (name). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extras: &lt;/P&gt;&lt;P&gt;1. ... LINE-SIZE col &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... LINE-COUNT line &lt;/P&gt;&lt;P&gt;3. ... TO SAP-SPOOL List output to the SAP spool database &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. ... USING SELECTION-SCREEN scr &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. ... VIA SELECTION-SCREEN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. ... AND RETURN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. ... EXPORTING LIST TO MEMORY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8. ... USER user VIA JOB job NUMBER n &lt;/P&gt;&lt;P&gt;9. ...Various additions for passing parameters to rep &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10. ... USING SELECTION-SETS OF PROGRAM prog &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Calls report rep. &lt;/P&gt;&lt;P&gt;The system leaves the active program and starts the new report rep. In basic form 2, you can specify the name of the report in the field name. You must specify the name in uppercase, otherwise a runtime error occurs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;You can only start programs with type '1' using SUBMIT. If the program has a different type, the system triggers a runtime error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please consult Data Area and Modularization Unit Organization documentation as well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1 &lt;/P&gt;&lt;P&gt;... LINE-SIZE col &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The list generated by the report has the line width col. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2 &lt;/P&gt;&lt;P&gt;... LINE-COUNT line &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The list generated by the report has line lines per page. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 4 &lt;/P&gt;&lt;P&gt;... USING SELECTION-SCREEN scr &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;When you execute the report, the system uses the selection screen number that you specify in the scr field. This must be a selection screen defined using the SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN statements.If you omit the addition, the system uses the standard selection screen 1000. &lt;/P&gt;&lt;P&gt;This addition allows you to start the same report in different situations, using a different selection screen each time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;The addition VIA SELECTION SCREEN determines whether the report is processed in the foreground or the background. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happens if the required screen does not exist or is not a selection screen? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen 1000: &lt;/P&gt;&lt;P&gt;If you want to use the standard selection screen (... USING SELECTION-SCREEN 1000 or do not specify a ... USING SELECTION-SCREEN) addition, the system does not process a selection screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other selection screens: &lt;/P&gt;&lt;P&gt;The system triggers a runtime error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 5 &lt;/P&gt;&lt;P&gt;... VIA SELECTION-SCREEN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The selection screen is displayed. In this case, the selection screen is displayed again after the report list has been displayed. The values entered by the user remain displayed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 6 &lt;/P&gt;&lt;P&gt;... AND RETURN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Returns to the calling transaction or program after the called program has been executed. SUBMIT ... AND RETURN creates a new internal session. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 7 &lt;/P&gt;&lt;P&gt;... EXPORTING LIST TO MEMORY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Does not display the output list of the called report, but saves it in ABAP memory and leaves the called report immediately. Since the calling program can read the list from memory and process it further, you need to use the addition ... AND RETURN . Also, since the called report cannot be requested for printing, the addition ... TO SAP-SPOOL is not allowed here. In addition, you must not assign a function code to the ENTER key in the current GUI status. The saved list is read from the SAP memory using the function module 'LIST_FROM_MEMORY' and can then be saved to the database using EXPORT, for example. You can process this list further with the function modules 'WRITE_LIST', 'DISPLAY_LIST' ... of the function group "SLST". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 8 &lt;/P&gt;&lt;P&gt;... USER user VIA JOB job NUMBER n &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Schedules the specified report in the job specified by the job name job and the job number n. The job runs under the user name user and you can omit the addition USER user. The assignment of the job number occurs via the function module JOB_OPEN (see also the documentation for the function modules JOB_CLOSE and JOB_SUBMIT). This addition can only be used with the addition ...AND RETURN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;When scheduling a report with the SUBMIT ... VIA JOB job NUMBER n statement, you should always use the addition ...TO SAP-SPOOL to pass print and/or archive parameters. Otherwise, default values are used to generate the list and this disturbs operations in a production environment. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0: &lt;/P&gt;&lt;P&gt;Job scheduled successfully &lt;/P&gt;&lt;P&gt;SY-SUBRC = 4: &lt;/P&gt;&lt;P&gt;Job scheduling terminated by user &lt;/P&gt;&lt;P&gt;SY-SUBRC = 8: &lt;/P&gt;&lt;P&gt;Error in job scheduling (JOB_SUBMIT) &lt;/P&gt;&lt;P&gt;SY-SUBRC = 12: &lt;/P&gt;&lt;P&gt;Error in internal number assignment &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 10 &lt;/P&gt;&lt;P&gt;... USING SELECTION-SETS OF PROGRAM prog &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Uses variants of the program prog when executing the program rep. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;Important &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The programs prog and rep must have the same SELECT-OPTIONS and PARAMETERs. Otherwise, variants of the program prog may be destroyed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;When using this addition, the specified variant vari of the program prog is taken in USING SELECTION-SET vari. On the other hand, all variant-related actions on the selection screen of rep (Get, Save as variant, Display, Delete) refer to the variants of prog. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;SUBMIT REPORT01 &lt;/P&gt;&lt;P&gt;       VIA SELECTION-SCREEN &lt;/P&gt;&lt;P&gt;       USING SELECTION-SET 'VARIANT1' &lt;/P&gt;&lt;P&gt;       USING SELECTION-SETS OF PROGRAM 'REPORT00' &lt;/P&gt;&lt;P&gt;       AND RETURN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Executes the program REPORT01 with the variant VARIANT1 of the program REPORT00.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2007 05:40:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-program/m-p/2301472#M502970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-28T05:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Call program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-program/m-p/2301473#M502971</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;Use SUBMIT command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calls an executable program of type 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT &amp;lt;rep&amp;gt; [AND RETURN] [VIA SELECTION-SCREEN]&lt;/P&gt;&lt;P&gt;                          [USING SELECTION-SET &amp;lt;var&amp;gt;]&lt;/P&gt;&lt;P&gt;                          [WITH &amp;lt;sel&amp;gt; &amp;lt;criterion&amp;gt;]&lt;/P&gt;&lt;P&gt;                          [WITH FREE SELECTIONS &amp;lt;freesel&amp;gt;]&lt;/P&gt;&lt;P&gt;                          [WITH SELECTION-TABLE &amp;lt;rspar&amp;gt;]&lt;/P&gt;&lt;P&gt;                          [LINE-SIZE &amp;lt;width&amp;gt;]&lt;/P&gt;&lt;P&gt;                          [LINE-COUNT &amp;lt;length&amp;gt;].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calls the program &amp;lt;rep&amp;gt;. If you omit the AND RETURN addition, the current program is terminated. Otherwise, the data from the current program is retained, and processing returns to the calling program when &amp;lt;rep&amp;gt; has finished running. The other additions control the selection screen and set attributes of the default list in the called program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2007 11:37:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-program/m-p/2301473#M502971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-28T11:37:00Z</dc:date>
    </item>
  </channel>
</rss>

