<?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: Dynamic Possible Values for Parameter Fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-possible-values-for-parameter-fields/m-p/1435141#M207562</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Jul 2006 06:26:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-20T06:26:59Z</dc:date>
    <item>
      <title>Dynamic Possible Values for Parameter Fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-possible-values-for-parameter-fields/m-p/1435135#M207556</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;Can anyone throw some idea on how to implement Dynamic possible value list for parameter field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have three parameter fields with F4 option. First Company Code; if the user selects a company code from the list only valid personnel areas of that company code should be available for second field (Personnel area).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the third field Personnel Sub Area should display only valid entries for selected Personnel Area in the second field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Ram Sanjeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2006 12:31:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-possible-values-for-parameter-fields/m-p/1435135#M207556</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-19T12:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Possible Values for Parameter Fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-possible-values-for-parameter-fields/m-p/1435136#M207557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the user takes the F4 help on the 2nd field you need to read the value entered in the company code field using the function DYNP_VALUES_READ and show the entries relating to the entered company code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similar logic has to be implemented for the F4 help on the 3rd field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DYNP_VALUES_READ function is the key...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2006 12:34:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-possible-values-for-parameter-fields/m-p/1435136#M207557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-19T12:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Possible Values for Parameter Fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-possible-values-for-parameter-fields/m-p/1435137#M207558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ram,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the below example. You could use same technique, or a search helf if exists , or the F4* function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Thomas.&lt;/P&gt;&lt;P&gt;Please mark points if helpful.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZTEST .

PARAMETERS: P_CARR_1 TYPE MARA-MATNR,
            P_CARR_2 TYPE SPFLI-CARRID.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_CARR_2.
  CALL SCREEN 100 STARTING AT 2 5
                  ENDING   AT 80 50.

MODULE VALUE_LIST OUTPUT.
  SUPPRESS DIALOG.
  LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
  SET PF-STATUS SPACE.
  NEW-PAGE NO-TITLE.
  WRITE 'Star Alliance' COLOR COL_HEADING.
  ULINE.
  P_CARR_2 = 'AC '.
  WRITE: / P_CARR_2 COLOR COL_KEY, 'Air Canada '.
  HIDE P_CARR_2.
  P_CARR_2 = 'LH '.
  WRITE: / P_CARR_2 COLOR COL_KEY, 'Lufthansa'.
  HIDE P_CARR_2.
  P_CARR_2 = 'SAS'.
  WRITE: / P_CARR_2 COLOR COL_KEY, 'SAS'.
  HIDE P_CARR_2.
  P_CARR_2 = 'THA'.
  WRITE: / P_CARR_2 COLOR COL_KEY, 'Thai International'.
  HIDE P_CARR_2.
  P_CARR_2 = 'UA '.
  WRITE: / P_CARR_2 COLOR COL_KEY, 'United Airlines'.
  HIDE P_CARR_2.
  CLEAR P_CARR_2.
  SKIP 10 .
  WRITE: /30 'Applied Materials Confidential' COLOR 5.
ENDMODULE.

AT LINE-SELECTION.
  CHECK NOT P_CARR_2 IS INITIAL.
  LEAVE TO SCREEN 0.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2006 12:35:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-possible-values-for-parameter-fields/m-p/1435137#M207558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-19T12:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Possible Values for Parameter Fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-possible-values-for-parameter-fields/m-p/1435138#M207559</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;U can do it through the FM F4IF_INT_TABLE_VALUE_REQUEST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the User Gave the companz code in the first field,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then select the personal area of that company code and pass it to the FM F4IF_INT_TABLE_VALUE_REQUEST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO the same for the third field also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before selecting check the BUKRS field is initial or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useeful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2006 12:37:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-possible-values-for-parameter-fields/m-p/1435138#M207559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-19T12:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Possible Values for Parameter Fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-possible-values-for-parameter-fields/m-p/1435139#M207560</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;Check the sample code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ZTEST_F4HELP                              .

*---Report with selection screen and to display the list of
* possible entries for field 'B' as per the value in field 'A'.


parameters: p_vbeln type vbak-vbeln,
            p_posnr type vbap-posnr.

at selection-screen on value-request for p_posnr.


  data: begin of help_item occurs 0,
          posnr type vbap-posnr,
          matnr type vbap-matnr,
          arktx type vbap-arktx,
        end of help_item.

  data: dynfields type table of dynpread with header line.


  dynfields-fieldname = 'P_VBELN'.
  append dynfields.

  call function 'DYNP_VALUES_READ'
       exporting
            dyname               = sy-cprog
            dynumb               = sy-dynnr
            translate_to_upper   = 'X'
       tables
            dynpfields           = dynfields
       exceptions
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            invalid_parameter    = 7
            undefind_error       = 8
            double_conversion    = 9
            stepl_not_found      = 10
            others               = 11.


  read table dynfields with key fieldname = 'P_VBELN'.

  p_vbeln = dynfields-fieldvalue.


  call function 'CONVERSION_EXIT_ALPHA_INPUT'
       exporting
            input  = p_vbeln
       importing
            output = p_vbeln.

  select posnr matnr arktx into table help_item
                 from vbap
                      where vbeln = p_vbeln.



  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield    = 'POSNR'
            dynprofield = 'P_POSNR'
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
       tables
            value_tab   = help_item.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2006 12:39:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-possible-values-for-parameter-fields/m-p/1435139#M207560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-19T12:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Possible Values for Parameter Fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-possible-values-for-parameter-fields/m-p/1435140#M207561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,  sample code is ::&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT Z_TEST.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: S_CARRID FOR SFLIGHT-CARRID,&lt;/P&gt;&lt;P&gt;S_CONNID FOR SFLIGHT-CONNID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF HELP_ITEM OCCURS 0,&lt;/P&gt;&lt;P&gt;CONNID TYPE SFLIGHT-CONNID,&lt;/P&gt;&lt;P&gt;END OF HELP_ITEM.&lt;/P&gt;&lt;P&gt;DATA: DYNFIELDS TYPE TABLE OF DYNPREAD WITH HEADER LINE. &lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CONNID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DYNFIELDS-FIELDNAME = 'S_CARRID'.&lt;/P&gt;&lt;P&gt;APPEND DYNFIELDS.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DYNP_VALUES_READ'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;DYNAME = SY-CPROG&lt;/P&gt;&lt;P&gt;DYNUMB = SY-DYNNR&lt;/P&gt;&lt;P&gt;TRANSLATE_TO_UPPER = 'X'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DYNPFIELDS = DYNFIELDS&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;INVALID_ABAPWORKAREA = 1&lt;/P&gt;&lt;P&gt;INVALID_DYNPROFIELD = 2&lt;/P&gt;&lt;P&gt;INVALID_DYNPRONAME = 3&lt;/P&gt;&lt;P&gt;INVALID_DYNPRONUMMER = 4&lt;/P&gt;&lt;P&gt;INVALID_REQUEST = 5&lt;/P&gt;&lt;P&gt;NO_FIELDDESCRIPTION = 6&lt;/P&gt;&lt;P&gt;INVALID_PARAMETER = 7&lt;/P&gt;&lt;P&gt;UNDEFIND_ERROR = 8&lt;/P&gt;&lt;P&gt;DOUBLE_CONVERSION = 9&lt;/P&gt;&lt;P&gt;STEPL_NOT_FOUND = 10&lt;/P&gt;&lt;P&gt;OTHERS = 11.&lt;/P&gt;&lt;P&gt;READ TABLE DYNFIELDS WITH KEY FIELDNAME = 'S_CARRID'.&lt;/P&gt;&lt;P&gt;S_CARRID = DYNFIELDS-FIELDVALUE.&lt;/P&gt;&lt;P&gt;SELECT S_CONNID INTO TABLE HELP_ITEM FROM SFLIGHT WHERE CARRID IN S_CARRID .&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 = 'CONNID'&lt;/P&gt;&lt;P&gt;DYNPROFIELD = 'S_CONNID'&lt;/P&gt;&lt;P&gt;DYNPPROG = SY-CPROG&lt;/P&gt;&lt;P&gt;DYNPNR = SY-DYNNR&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;VALUE_TAB = HELP_ITEM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2006 14:04:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-possible-values-for-parameter-fields/m-p/1435140#M207561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-19T14:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Possible Values for Parameter Fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-possible-values-for-parameter-fields/m-p/1435141#M207562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 06:26:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-possible-values-for-parameter-fields/m-p/1435141#M207562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T06:26:59Z</dc:date>
    </item>
  </channel>
</rss>

