<?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 fill empty parameter (selection-option) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-empty-parameter-selection-option/m-p/3603286#M867855</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;To fill the second when the first one is selected you can use the event &lt;STRONG&gt;AT SELECTION-SCREEN ON &amp;lt;field&amp;gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this, extracted from SAP BC-ABA material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT EVENT_DEMO.
  NODES SPFLI.
  AT SELECTION-SCREEN ON CITY_FR.
  IF CARRID-LOW EQ 'AA' AND CITY_FR NE 'NEW YORK'. 
    MESSAGE E010(HB).
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some helpfull samples in transaction &lt;STRONG&gt;ABAPDOCU&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Apr 2008 12:25:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-02T12:25:22Z</dc:date>
    <item>
      <title>how to fill empty parameter (selection-option)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-empty-parameter-selection-option/m-p/3603285#M867854</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;On selection screen I have two parameters (s_egrid and s_empid). If user enter something in first (but not in second) one, second one should be filled from database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that I don't know how to fill the empty parameter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say that i have an internal table i_zemployee with list of all necessary employee Id's (stored in field empid)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I Ioop like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at i_zemployee into wa_zemployee.
    insert wa_zemployee-empid into s_empid.
  endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... I did something stupid &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; but i hope that you understand what i need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;s_emipd[1] = 'u1'.
s_emipd[2] = 'u7'.
s_emipd[3] = 'u9'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... like array of user id's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this s_empid I need in my next SELECT statement like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM ...
    ....
    WHERE empid in s_empid.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if someone knows the solution thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2008 11:30:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-empty-parameter-selection-option/m-p/3603285#M867854</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-02T11:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to fill empty parameter (selection-option)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-empty-parameter-selection-option/m-p/3603286#M867855</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;To fill the second when the first one is selected you can use the event &lt;STRONG&gt;AT SELECTION-SCREEN ON &amp;lt;field&amp;gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this, extracted from SAP BC-ABA material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT EVENT_DEMO.
  NODES SPFLI.
  AT SELECTION-SCREEN ON CITY_FR.
  IF CARRID-LOW EQ 'AA' AND CITY_FR NE 'NEW YORK'. 
    MESSAGE E010(HB).
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some helpfull samples in transaction &lt;STRONG&gt;ABAPDOCU&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2008 12:25:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-empty-parameter-selection-option/m-p/3603286#M867855</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-02T12:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to fill empty parameter (selection-option)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-empty-parameter-selection-option/m-p/3603287#M867856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All the select-options, e.g. s_empid, are range tables so to fill any of them, I'd suggest something like (not syntax checked):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
start-of-selection.
  perform fill_gaps.

form fill_gaps.
*" Provide defaults if empty default
  if s_empid[] is initial. "not filled
    loop at i_zemployee into wa_zemployee.
      clear: s_empid.  "clear header line each loop
      s_empid-option = 'EQ'.  "equals
      s_empid-sign   = 'I'.   "include
      s_empid-low    = wa_zemployee-empid. "set a value
      s_empid-high   = space.  "only used for between-type options
      append s_empid.
    endloop.
  endif.

endform.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2008 20:55:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-empty-parameter-selection-option/m-p/3603287#M867856</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-02T20:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to fill empty parameter (selection-option)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-empty-parameter-selection-option/m-p/3603288#M867857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI try something like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: mara, makt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;data : begin of btab occurs 0,&lt;/P&gt;&lt;P&gt;maktx like makt-maktx,&lt;/P&gt;&lt;P&gt;end of btab.&lt;/P&gt;&lt;P&gt;ata mak like makt-maktx.&lt;/P&gt;&lt;P&gt;DATA : return like ddshretval occurs 0 with header line.&lt;/P&gt;&lt;P&gt;  data: begin of dynpfields occurs 3.&lt;/P&gt;&lt;P&gt;          include structure dynpread.&lt;/P&gt;&lt;P&gt;  data: end of dynpfields.&lt;/P&gt;&lt;P&gt;select-options: p_matnr for mara-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr from mara into table itab where matnr IN p_matnr.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;write: / itab-matnr.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;Initialization.&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.&lt;/P&gt;&lt;P&gt;REFRESH ITAB.&lt;/P&gt;&lt;P&gt;SELECT matnr FROM mara INTO TABLE ITAB.&lt;/P&gt;&lt;P&gt;call function 'F4IF_INT_TABLE_VALUE_REQUEST'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;retfield = 'MATNR '&lt;/P&gt;&lt;P&gt;dynprofield = 'P_MATNR '&lt;/P&gt;&lt;P&gt;dynpprog = sy-REPID&lt;/P&gt;&lt;P&gt;dynpnr = sy-dynnr&lt;/P&gt;&lt;P&gt;value_org = 'S'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;value_tab = ITAB&lt;/P&gt;&lt;P&gt;return_tab = return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single maktx from makt into  mak where matnr = return-fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_matnr = return-fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh return.&lt;/P&gt;&lt;P&gt;clear return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move 'P_MAKTX' to dynpfields-fieldname.&lt;/P&gt;&lt;P&gt;move mak to dynpfields-fieldvalue.&lt;/P&gt;&lt;P&gt;append dynpfields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DYNP_VALUES_UPDATE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    dyname                     = 'SY-REPID'&lt;/P&gt;&lt;P&gt;    dynumb                     = '1000'&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    dynpfields                 = dynpfields&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;refresh return.&lt;/P&gt;&lt;P&gt;clear return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;validate according to ur requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Syed A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2008 21:21:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-empty-parameter-selection-option/m-p/3603288#M867857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-02T21:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to fill empty parameter (selection-option)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-empty-parameter-selection-option/m-p/3603289#M867858</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;First you have to observe here is, if you want to fill second parameter&lt;/P&gt;&lt;P&gt;by entering first one it is not possible,because when you enter some value in first one some event has to trigger ,under that event we can write code.Simply enter the values,will not trigger.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2008 02:50:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-empty-parameter-selection-option/m-p/3603289#M867858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-03T02:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to fill empty parameter (selection-option)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-empty-parameter-selection-option/m-p/3603290#M867859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jonathan provided me a correct answer! Problem solved 100% &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; Thanks man! Your reward: 10 points &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2008 08:34:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-empty-parameter-selection-option/m-p/3603290#M867859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-03T08:34:31Z</dc:date>
    </item>
  </channel>
</rss>

