<?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 Passing variant through submit statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395886#M1405501</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;I have a requirement where in i need to write a program with a select query and get the data into an internal table and pass this data into the selection screen of a standard report through Submit statement. Can someone give me some tips of how to go about achieving this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Balaji.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Dec 2009 07:08:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-03T07:08:03Z</dc:date>
    <item>
      <title>Passing variant through submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395886#M1405501</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;I have a requirement where in i need to write a program with a select query and get the data into an internal table and pass this data into the selection screen of a standard report through Submit statement. Can someone give me some tips of how to go about achieving this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Balaji.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 07:08:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395886#M1405501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-03T07:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Passing variant through submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395887#M1405502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;scroll down to see how many ways u can use submit statement: [Execute(Submit) ABAP Report|http://www.sapdev.co.uk/reporting/rep_submit.htm]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 07:10:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395887#M1405502</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-12-03T07:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Passing variant through submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395888#M1405503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
 
data:lt_params type table of RSPARAMS.
data:wa like line of lt_params.
 
parameters:pa1 type sy-datum.
select-options:so1 type sy-dtaum.
 
 
 
 
 
 
wa-SELNAME = 'PA2'.			"Seletion screen field name of ZPROG2
wa-KIND	= 'P'.				"P-Parameter,S-Select-options
wa-SIGN	= 'I'.				"I-in
wa-OPTION	= 'EQ'.			"EQ,BT,CP
wa-LOW	= pa1.				"Selection Option Low,Parameter value
append wa to lt_params.
 
loop at so1.
wa-SELNAME = 'SO2'.			"Seletion screen field name of ZPROG2
wa-KIND	= 'S'.				"P-Parameter,S-Select-options
wa-SIGN	= 'I'.				"I-in
wa-OPTION	= 'EQ'.			"EQ,BT,CP
wa-LOW	= so1-low.			"Selection Option Low,Parameter value
wa-HIGH	= so1-high.			"Selection Option Low,Parameter value
append wa to lt_params.
endloop.
 
 
 
CALL FUNCTION 'SUBMIT_REPORT'
  EXPORTING
    report                 = 'ZPROG2.'    "report name of ur tocde
    RET_VIA_LEAVE          = ''		  "IF 'X' returns to the called program after execution
    SKIP_SELSCREEN         = 'X'	  "If 'X' selection screen of called program is not displayed
 TABLES
   SELECTION_TABLE        = lt_params	  "Contains values to the selection screen
 EXCEPTIONS
  JUST_VIA_VARIANT       = 1
  NO_SUBMIT_AUTH         = 2
  OTHERS                 = 3
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 07:11:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395888#M1405503</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-12-03T07:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Passing variant through submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395889#M1405504</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;I tried out all the possible combinations of the submit statement but getting stuck up at a point. The following is the code i have used to submit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   SUBMIT RELEABL1 VIA SELECTION-SCREEN&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   USING SELECTION-SET 'PCVM_DOWN_TEST'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WITH ABLEINH IN GT_RANGES&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   AND RETURN.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where RELEABL1 is the program which i am calling and 'PCVM_DOWN_TEST' is the name of the variant in pgm RELEABL1 which i want to update. The variant 'PCVM_DOWN_TEST' exists in pgm RELEABL1 but on execution the variant is not getting updated with new values for the field ABLEINH. Is there any addition that i can use or is there any work around that i can do . Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Balaji.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 10:33:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395889#M1405504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-04T10:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Passing variant through submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395890#M1405505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Balaji,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to SUBMIT the report using data from the internal table why do you want to call the variant?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please elaborate your problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 10:40:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395890#M1405505</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-12-04T10:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Passing variant through submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395891#M1405506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is to optimize the performance of standard pgm RELEABL1 that takes a long time to complete when scheduled in background,and for that i have created a zpgm with some select queries that optimizes the selection screen inputs to the standard pgm RELEABL1 . The standard pgm RELEABL1 will be scheduled in background with a variant PCVM_DOWN_TEST , through my zpgm i want to pass the inputs to this standard pgm selection screen ( specifically to the variant in the std pgm as this std pgm will be scheduled in background for execution ). While scheduling the steps will be like this&lt;/P&gt;&lt;P&gt;Step 1 : My zpgm will be executed and on execution it will update the variant in the pgm RELEABL1 with new values .&lt;/P&gt;&lt;P&gt;Step 2 : Std pgm RELEABL1  will be executed with the updated variant values .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 10:52:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395891#M1405506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-04T10:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Passing variant through submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395892#M1405507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first thing to note is if you use VIA SELECTION-SCREEN, then the selection-screen will be displayed &amp;amp; i donot think this is a feasible thing to do in BG processing &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 11:01:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395892#M1405507</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-12-04T11:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Passing variant through submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395893#M1405508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Submit report using selection screen variant&lt;/P&gt;&lt;P&gt; SUBMIT yreport USING SELECTION-SET 'VARIANT1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Submit report and return to current program afterwards&lt;/P&gt;&lt;P&gt; SUBMIT yreport AND RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Submit report via its own selection screen&lt;/P&gt;&lt;P&gt; SUBMIT yreport VIA SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say we have two programs A and B. If we call program B in program A. We call A as Calling program and B as called program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this way to use SUBMIT statement.&lt;/P&gt;&lt;P&gt;REPORT zcalling_program.&lt;/P&gt;&lt;P&gt;DATA: it_rsparams TYPE STANDARD  TABLE OF rsparams,&lt;/P&gt;&lt;P&gt;      wa_rsparams LIKE LINE OF it_rsparams.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;wa_rsparams-selname = 'S_MATNR'. "Screen field name of called program&lt;/P&gt;&lt;P&gt;wa_rsparams-kind    = 'S'. "S=Select-options P=Parameters&lt;/P&gt;&lt;P&gt;wa_rsparams-sign    = 'I'.&lt;/P&gt;&lt;P&gt;wa_rsparams-option  = 'EQ'.&lt;/P&gt;&lt;P&gt;wa_rsparams-low     = '11010'.&lt;/P&gt;&lt;P&gt;wa_rsparams-high    = space.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SUBMIT zcalled_program VIA SELECTION-SCREEN WITH SELECTION-TABLE it_rsparams AND RETURN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 11:06:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395893#M1405508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-04T11:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Passing variant through submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395894#M1405509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to create the varaint for the scheduled program and pass that variant to FM JOB_SUBMIT in VARIANT parameter.&lt;/P&gt;&lt;P&gt;Use Fm RS_CREATE_VARIANT to create the variant from the report program.&lt;/P&gt;&lt;P&gt;Search the SCN for more help on this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U follow the given code. If u have taken varinat as parameter then ok. other wise u have to pass rs_create_varaint* function module in the program. DATA : v_jobhead LIKE tbtcjob. DATA : v_jobcount LIKE tbtcjob-jobcount. DATA : v_eventparm LIKE tbtcjob-eventparm. DATA : v_flg_released TYPE c. DATA: e_error. DATA: running LIKE tbtcv-run. TYPES: esp1_boolean LIKE boole-boole. CONSTANTS: esp1_false TYPE esp1_boolean VALUE ' ', esp1_true TYPE esp1_boolean VALUE 'X'. CONSTANTS: true TYPE boolean VALUE esp1_true, false TYPE boolean VALUE esp1_false. PARAMETERS: v_jobnam LIKE tbtcjob-jobname, v_report LIKE sy-repid, v_varian LIKE raldb-variant, v_uname LIKE sy-uname. START-OF-SELECTION. CALL FUNCTION 'JOB_OPEN' EXPORTING jobname = v_jobnam IMPORTING jobcount = v_jobcount EXCEPTIONS cant_create_job = 1 invalid_job_data = 2 jobname_missing = 3 OTHERS = 4. IF sy-subrc 0. e_error = true. ELSE. CALL FUNCTION 'JOB_SUBMIT' EXPORTING authcknam = v_uname jobcount = v_jobcount jobname = v_jobnam report = v_report variant = v_varian EXCEPTIONS bad_priparams = 1 bad_xpgflags = 2 invalid_jobdata = 3 jobname_missing = 4 job_notex = 5 job_submit_failed = 6 lock_failed = 7 program_missing = 8 prog_abap_and_extpg_set = 9 OTHERS = 10. IF sy-subrc 0. e_error = true. ELSE. CALL FUNCTION 'JOB_CLOSE' EXPORTING jobcount = v_jobcount jobname = v_jobnam strtimmed = 'X' IMPORTING job_was_released = v_flg_released EXCEPTIONS cant_start_immediate = 1 invalid_startdate = 2 jobname_missing = 3 job_close_failed = 4 job_nosteps = 5 job_notex = 6 lock_failed = 7 OTHERS = 8. IF sy-subrc 0. e_error = true. ELSE. DO. CALL FUNCTION 'SHOW_JOBSTATE' EXPORTING jobcount = v_jobcount jobname = v_jobnam EXCEPTIONS jobcount_missing = 1 jobname_missing = 2 job_notex = 3 OTHERS = 4. IF sy-subrc 0. e_error = true. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. IF running = space. exit. endif. enddo. endif. endif. endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope before you execute the report, you will be filling the selection-screen data using an existing Variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that's the case, you can pass the Variant name itself to the parameter 'variant' of FM 'JOB_SUBMIT'.&lt;/P&gt;&lt;P&gt;The Variant name with which the Report was executed can be obtained by system variable 'SY-SLSET'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 11:17:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variant-through-submit-statement/m-p/6395894#M1405509</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-04T11:17:03Z</dc:date>
    </item>
  </channel>
</rss>

