<?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: Set the default value in the parameter on selection-screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479029#M1254436</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this piece of code. I hope it will work&lt;/P&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;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;  DATA defaultvalue(100).&lt;/P&gt;&lt;P&gt;  PARAMETERS: p_appdi2(100).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;  CONCATENATE '/' sy-sysid '/Interfaces/FlatFiles/new_sales_history.txt' INTO defaultvalue.&lt;/P&gt;&lt;P&gt;  p_appdi2(100) = defaultvalue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Apr 2009 08:06:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-14T08:06:30Z</dc:date>
    <item>
      <title>Set the default value in the parameter on selection-screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479023#M1254430</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;PARAMETERS: p_appdi2 LIKE rlgrap-filename DEFAULT '/DR1/Interfaces/FlatFiles/new_sales_history.txt'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will display the Path by default '/DR1/Interfaces/FlatFiles/new_sales_history.txt' in the selection-screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Requirement is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If this is exercuted in the QR1 then it should display in the selection screen as '/QR1/Interfaces/FlatFiles/new_sales_history.txt'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If this is exercuted in the FR1 then it should display in the selection screen as '/FR1/Interfaces/FlatFiles/new_sales_history.txt'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that we can do this by using the sys variable sy-sysid but how can i set the dafault path names depending upon the system it gets executed...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions will be appreciated! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kittu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2009 07:30:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479023#M1254430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-14T07:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set the default value in the parameter on selection-screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479024#M1254431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At initilization.&lt;/P&gt;&lt;P&gt;Set the path here according to the system id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate sy-sysid ''/DR1/Interfaces/FlatFiles/new_sales_history.txt'' into lv_path and use this .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2009 07:33:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479024#M1254431</guid>
      <dc:creator>Sandeep_Panghal</dc:creator>
      <dc:date>2009-04-14T07:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set the default value in the parameter on selection-screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479025#M1254432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use &lt;/P&gt;&lt;P&gt;at selection-screen output&lt;/P&gt;&lt;P&gt;inside that based on client or server u can write conditon.&lt;/P&gt;&lt;P&gt;example.&lt;/P&gt;&lt;P&gt;if QR1.&lt;/P&gt;&lt;P&gt;p_appdi2  = QR1/Interfaces/FlatFiles/new_sales_history.txt'&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aswin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: aswin on Apr 14, 2009 9:34 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: aswin on Apr 14, 2009 9:35 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2009 07:34:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479025#M1254432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-14T07:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Set the default value in the parameter on selection-screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479026#M1254433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; PARAMETERS: p_appdi2 LIKE rlgrap-filename DEFAULT '/DR1/Interfaces/FlatFiles/new_sales_history.txt'&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; This will display the Path by default '/DR1/Interfaces/FlatFiles/new_sales_history.txt' in the selection-screen. &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; My Requirement is: &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt;  If this is exercuted in the QR1 then it should display in the selection screen as '/QR1/Interfaces/FlatFiles/new_sales_history.txt'&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt;  If this is exercuted in the FR1 then it should display in the selection screen as '/FR1/Interfaces/FlatFiles/new_sales_history.txt'&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; I know that we can do this by using the sys variable sy-sysid but how can i set the dafault path names depending upon the system it gets executed...&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Any suggestions will be appreciated! &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Regards,&lt;/P&gt;&lt;P&gt;&amp;gt; Kittu&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;parameter : p_appdi2 like rlgrap-filename.

intialization

case sy-sysid.

when 'QR1'.

p_appdi2 = '/QR1/Interfaces/FlatFiles/new_sales_history.txt'

when 'FR1'.

p_appdi2 = ''/FR1/Interfaces/FlatFiles/new_sales_history.txt'.

endcase.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: mohammed  abdul hai on Apr 14, 2009 9:49 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2009 07:35:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479026#M1254433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-14T07:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set the default value in the parameter on selection-screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479027#M1254434</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;Refer:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PARAMETERS: p_appdi2 LIKE rlgrap-filename DEFAULT '/DR1/Interfaces/FlatFiles/new_sales_history.txt'

AT SELECTION-SCREEN OUTPUT.
  IF sy-sysid = 'QR1.
    CLEAR p_appdi2.
    p_appdi2 = '/QR1/Interfaces/FlatFiles/new_sales_history.txt'.
  ELSEIF sy-sysid = 'FR1'.
    CLEAR p_appdi2.
    p_appdi2 = '/FR1/Interfaces/FlatFiles/new_sales_history.txt'.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2009 07:37:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479027#M1254434</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-04-14T07:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set the default value in the parameter on selection-screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479028#M1254435</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 write like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

ELECTION-SCREEN BEGIN OF BLOCK b0  WITH FRAME TITLE text-002.
PARAMETERS: p_file TYPE rlgrap-filename 
DEFAULT '/DR1/Interfaces/FlatFiles/new_sales_history.txt' OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b0.

Then you can check the value sy-sysid value in if else,that is

if sy-sysid = 'ABC'.
P_FILE = '/QR1/Interfaces/FlatFiles/new_sales_history.txt'
.
ELSEIF SY-SYSID = 'DEF'.

P_FILE = '/FR1/Interfaces/FlatFiles/new_sales_history.txt'.

ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mansi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2009 07:44:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479028#M1254435</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-14T07:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set the default value in the parameter on selection-screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479029#M1254436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this piece of code. I hope it will work&lt;/P&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;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;  DATA defaultvalue(100).&lt;/P&gt;&lt;P&gt;  PARAMETERS: p_appdi2(100).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;  CONCATENATE '/' sy-sysid '/Interfaces/FlatFiles/new_sales_history.txt' INTO defaultvalue.&lt;/P&gt;&lt;P&gt;  p_appdi2(100) = defaultvalue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2009 08:06:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479029#M1254436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-14T08:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set the default value in the parameter on selection-screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479030#M1254437</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;Suggestions were really helpful and thank you for your quicj response! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kittu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2009 08:33:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-the-default-value-in-the-parameter-on-selection-screen/m-p/5479030#M1254437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-14T08:33:01Z</dc:date>
    </item>
  </channel>
</rss>

