<?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: How to Pass Variables using Submit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742140#M2021165</link>
    <description>&lt;P&gt;We don't know Z_REP so it's impossible to help, you don't give enough information.&lt;/P&gt;&lt;P&gt;Also we don't know whether GV_VALUE1 and GV_VALUE2 are PARAMETERS or not. WITH works only with selection screen fields, not global variables.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Aug 2023 12:41:06 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2023-08-16T12:41:06Z</dc:date>
    <item>
      <title>How to Pass Variables using Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742137#M2021162</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;I am facing an issue to pass variables using submit, below is my code.&lt;/P&gt;
  &lt;P&gt;THE gv_value1 and gv_value2 is always blank. &lt;/P&gt;
  &lt;P&gt;I also tried using cl_salv_bs_runtime_info, &lt;STRONG&gt;But it did not work.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;My variables are always blank.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Any solution to pass gv_value1 as 'X' and gv_value2 as X ?&lt;/STRONG&gt; &lt;/P&gt;
  &lt;P&gt;Thank You.&lt;/P&gt;
  &lt;BR /&gt;
  &lt;PRE&gt;&lt;CODE&gt;     IF gv_rep EQ abap_true
             AND gv_fun EQ abap_true.
        SUBMIT z_rep
                  WITH gv_value1 = abap_true&lt;BR /&gt;                  WITH gv_value2 = abap_true&lt;BR /&gt;                 WITH p_bill = zhdr-zzmonth
                 WITH p_fund = gs_reports-geber

AND RETURN.
ENDIF.


&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Aug 2023 12:30:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742137#M2021162</guid>
      <dc:creator>alex_dsouza</dc:creator>
      <dc:date>2023-08-16T12:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables using Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742138#M2021163</link>
      <description>&lt;P&gt;did you try to specify USING SELECTION-SCREEN '1000'  ? &lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 12:36:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742138#M2021163</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2023-08-16T12:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables using Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742139#M2021164</link>
      <description>&lt;P&gt;Have you declared gv_value1 and gv_value2 as parameters of the Z_REP report?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 12:41:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742139#M2021164</guid>
      <dc:creator>Dominik_Tylczynski</dc:creator>
      <dc:date>2023-08-16T12:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables using Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742140#M2021165</link>
      <description>&lt;P&gt;We don't know Z_REP so it's impossible to help, you don't give enough information.&lt;/P&gt;&lt;P&gt;Also we don't know whether GV_VALUE1 and GV_VALUE2 are PARAMETERS or not. WITH works only with selection screen fields, not global variables.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 12:41:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742140#M2021165</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-08-16T12:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables using Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742141#M2021166</link>
      <description>&lt;P&gt;You can use &lt;A href="https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsubmit_interface.htm#!ABAP_ADDITION_2@2@" target="_blank"&gt;VIA SELECTION-SCREEN&lt;/A&gt; addition to the SUBMIT statement. This way the selection screen with the values passed is displayed before the report is executed. That makes it easy to verify the value passed to the report.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 12:42:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742141#M2021166</guid>
      <dc:creator>Dominik_Tylczynski</dc:creator>
      <dc:date>2023-08-16T12:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables using Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742142#M2021167</link>
      <description>&lt;P&gt;i have declared the values of gv_value1 and gv _value2 in my zrep. &lt;BR /&gt;&lt;/P&gt;&lt;P&gt;gv_value1 and gv_value2 are not any parameters. &lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 12:45:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742142#M2021167</guid>
      <dc:creator>alex_dsouza</dc:creator>
      <dc:date>2023-08-16T12:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables using Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742143#M2021168</link>
      <description>&lt;P&gt;ok  &lt;SPAN class="mention-scrubbed"&gt;3a9e4ce873a94034b33dc62b0ce600ee&lt;/SPAN&gt; i will try it via selection screen&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 12:46:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742143#M2021168</guid>
      <dc:creator>alex_dsouza</dc:creator>
      <dc:date>2023-08-16T12:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables using Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742144#M2021169</link>
      <description>&lt;P&gt;Are your parameters really called gv_value1 or gv_value2?&lt;BR /&gt;This sounds more like global values to me which can't be changed via SUBMIT.&lt;BR /&gt;&lt;BR /&gt;You can only pass parameters or select options...&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 12:54:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742144#M2021169</guid>
      <dc:creator>thkolz</dc:creator>
      <dc:date>2023-08-16T12:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables using Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742145#M2021170</link>
      <description>&lt;P&gt;You wrote &lt;/P&gt;&lt;P&gt;&lt;EM&gt;'i have declared the values of gv_value1 and gv _value2 in my zrep.&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;gv_value1 and gv_value2 are not any parameters.'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;So don't expect to pass those values with the WITH option of SUBMIT statement.&lt;/P&gt;&lt;P&gt;(Try to define those fields as NO-DISPLAY parameters or pass those walues with some EXPORT/IMPORT or SET/GET parameters)&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 12:55:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742145#M2021170</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2023-08-16T12:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables using Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742146#M2021171</link>
      <description>&lt;P&gt;If GV_VALUE1 and GV_VALUE2 are global variable in Z_REP, you can't pass them on via SUBMIT.&lt;BR /&gt;You first need to add parameters for them (they can also be hidden).&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT z_rep.
...
PARAMETERS:
  p_value1 TYPE char01 NO-DISPLAY,
  p_value2 TYPE char01 NO-DISPLAY.

...

START-OF-SELECTION.
* Set global variables
  gv_value1 = p_value1.
  gv_value2 = p_value1.

...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you can pass the values from the calling program:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA(lt_sel_par) = VALUE rsparams_tt( kind  = 'P'  sign  = 'I'  option = 'EQ'  
                                    ( selname = 'P_VALUE1' low = 'X' )  
                                    ( selname = 'P_VALUE2' low = 'X' )  
                                    ( selname = 'P_BILL'  low = zhdr-zzmonth ) 
                                    ( selname = 'P_FUND' low = gs_reports-geber )  ).              

SUBMIT z_rep WITH SELECTION-TABLE lt_seltab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Second option (although not the preferred one):&lt;BR /&gt;Use EXPORT TO MEMORY in calling program (e.g. EXPORT abap_true TO MEMORY ID 'Z_REP_VALUE1') and IMPORT FROM MEMORY in Z_REP (IMPORT gv_value1 FROM MEMORY ID 'Z_REP_VALUE1').&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 12:56:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742146#M2021171</guid>
      <dc:creator>thkolz</dc:creator>
      <dc:date>2023-08-16T12:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables using Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742147#M2021172</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;spartans007&lt;/SPAN&gt; as "gv_value1 and gv_value2 are not any parameters" than you can't pass values to them with SUBMIT.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 13:04:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742147#M2021172</guid>
      <dc:creator>Dominik_Tylczynski</dc:creator>
      <dc:date>2023-08-16T13:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables using Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742148#M2021173</link>
      <description>&lt;P&gt;Using Memory ID worked for me thank you&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 13:50:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742148#M2021173</guid>
      <dc:creator>alex_dsouza</dc:creator>
      <dc:date>2023-08-16T13:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables using Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742149#M2021174</link>
      <description>&lt;P&gt;Thank you Everyone for your support.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 13:51:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-pass-variables-using-submit/m-p/12742149#M2021174</guid>
      <dc:creator>alex_dsouza</dc:creator>
      <dc:date>2023-08-16T13:51:05Z</dc:date>
    </item>
  </channel>
</rss>

