<?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: Selection screen parameters in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-parameters/m-p/3686126#M887634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi Kiran,

The following sample program is suitable for ur requirement. You have to use function module &lt;STRONG&gt;DYNP_VALUES_UPDATE&lt;/STRONG&gt; to update automatically.

Execute and check the program once.


 &lt;PRE&gt;&lt;CODE&gt;REPORT zvenkat_head MESSAGE-ID zmsg .
*&amp;amp;---------------------------------------------------------------------*
" Declaration part
*&amp;amp;---------------------------------------------------------------------*
TYPES:
   BEGIN OF t_t001w,
     werks       TYPE t001w-werks,
     name1       TYPE t001w-name1,
   END OF t_t001w,
   t_return_tab  TYPE ddshretval.
DATA:
    w_t001w      TYPE t_t001w,
    w_return_tab TYPE t_return_tab.
DATA:
    i_t001w      TYPE STANDARD TABLE OF t_t001w,
    i_return_tab TYPE STANDARD TABLE OF t_return_tab.
*&amp;amp;---------------------------------------------------------------------*
"SELECTION-SCREEN
*&amp;amp;---------------------------------------------------------------------*

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS :p_werks TYPE t001w-werks,
            p_name1 TYPE t001w-name1.
SELECTION-SCREEN END OF BLOCK b1.

*&amp;amp;---------------------------------------------------------------------*
" AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks
*&amp;amp;---------------------------------------------------------------------*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks.
  PERFORM f4_help_for_palant.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  f4_help_for_palant
*&amp;amp;---------------------------------------------------------------------*
FORM f4_help_for_palant.

  DATA:
      w_dynpfields TYPE dynpread,
      i_dynpfields LIKE STANDARD TABLE OF dynpread.

  IF i_t001w[] IS INITIAL.
    SELECT werks name1
    FROM t001w
    INTO TABLE i_t001w.
  ENDIF.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
*   DDIC_STRUCTURE         = ' '
    retfield               = 'WERKS'
*   PVALKEY                = ' '
    dynpprog               = sy-repid
    dynpnr                 = sy-dynnr
    dynprofield            = 'P_WERKS'
*   STEPL                  = 0
*   WINDOW_TITLE           =
*   VALUE                  = ' '
   value_org              = 'S'
*   MULTIPLE_CHOICE        = ' '
*   DISPLAY                = ' '
*   CALLBACK_PROGRAM       = ' '
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
* IMPORTING
*   USER_RESET             =
    TABLES
      value_tab              = i_t001w
*   FIELD_TAB              =
    return_tab             = i_return_tab
*   DYNPFLD_MAPPING        =
* EXCEPTIONS
*   PARAMETER_ERROR        = 1
*   NO_VALUES_FOUND        = 2
*   OTHERS                 = 3
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  READ TABLE i_return_tab INTO w_return_tab INDEX 1.
  p_werks = w_return_tab-fieldval.
  READ TABLE i_t001w INTO w_t001w WITH KEY werks = p_werks.
  IF sy-subrc = 0.

    w_dynpfields-fieldname    = 'P_NAME1'.
    w_dynpfields-fieldvalue   = w_t001w-name1.
    APPEND w_dynpfields TO i_dynpfields.
    CLEAR w_dynpfields.

    CALL FUNCTION 'DYNP_VALUES_UPDATE'
      EXPORTING
        dyname               = sy-repid
        dynumb               = sy-dynnr
      TABLES
        dynpfields           = i_dynpfields
      EXCEPTIONS
        invalid_abapworkarea = 1
        invalid_dynprofield  = 2
        invalid_dynproname   = 3
        invalid_dynpronummer = 4
        invalid_request      = 5
        no_fielddescription  = 6
        undefind_error       = 7
        OTHERS               = 8.
    IF sy-subrc = 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.


  ENDIF.


ENDFORM.                    " f4_help_for_palant&lt;/CODE&gt;&lt;/PRE&gt; 

I hope that it solves ur problem.

Regards,
Venkat.O
&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Apr 2008 13:00:05 GMT</pubDate>
    <dc:creator>venkat_o</dc:creator>
    <dc:date>2008-04-08T13:00:05Z</dc:date>
    <item>
      <title>Selection screen parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-parameters/m-p/3686122#M887630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need some code for the the following issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 1 selection screen which has 2 parameters vkorg and vtweg.So whenever I provide some input to  vkorg the input value for vtweg should automatically be displayed on the selection screen(based on vkorg). &lt;/P&gt;&lt;P&gt;for example: For vkorg 300009 if vtweg is 10 then whenever u select 300009 in vkorg,10 should be displayed in vtweg field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2008 12:41:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-parameters/m-p/3686122#M887630</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-08T12:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-parameters/m-p/3686123#M887631</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;Your requirements could be programmed within the "AT SELECTION SCREEN" event, if theres only 1 VTWEG for each VKORG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But there could be mugh more VTWEG for each VKORG, so I think it could not be solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2008 12:50:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-parameters/m-p/3686123#M887631</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-08T12:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-parameters/m-p/3686124#M887632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;For that u have to write code in event&lt;/P&gt;&lt;P&gt;At selection Screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like if p_vkorg is not initial.&lt;/P&gt;&lt;P&gt;fetch vtweg from table into a variable based on VKORG and assign that value to the parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sandipan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2008 12:54:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-parameters/m-p/3686124#M887632</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-08T12:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-parameters/m-p/3686125#M887633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Coding wont be possible but I can suggest you some logic.&lt;/P&gt;&lt;P&gt;You need to use the event AT-SELECTION-SCREEN-OUTUT.&lt;/P&gt;&lt;P&gt;There you need to make use of FM DYNP_VALUES_READ to capture values and then you can display them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer some thread &lt;/P&gt;&lt;P&gt;[&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="414583"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="426796"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Sourabhh verma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2008 12:57:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-parameters/m-p/3686125#M887633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-08T12:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-parameters/m-p/3686126#M887634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi Kiran,

The following sample program is suitable for ur requirement. You have to use function module &lt;STRONG&gt;DYNP_VALUES_UPDATE&lt;/STRONG&gt; to update automatically.

Execute and check the program once.


 &lt;PRE&gt;&lt;CODE&gt;REPORT zvenkat_head MESSAGE-ID zmsg .
*&amp;amp;---------------------------------------------------------------------*
" Declaration part
*&amp;amp;---------------------------------------------------------------------*
TYPES:
   BEGIN OF t_t001w,
     werks       TYPE t001w-werks,
     name1       TYPE t001w-name1,
   END OF t_t001w,
   t_return_tab  TYPE ddshretval.
DATA:
    w_t001w      TYPE t_t001w,
    w_return_tab TYPE t_return_tab.
DATA:
    i_t001w      TYPE STANDARD TABLE OF t_t001w,
    i_return_tab TYPE STANDARD TABLE OF t_return_tab.
*&amp;amp;---------------------------------------------------------------------*
"SELECTION-SCREEN
*&amp;amp;---------------------------------------------------------------------*

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS :p_werks TYPE t001w-werks,
            p_name1 TYPE t001w-name1.
SELECTION-SCREEN END OF BLOCK b1.

*&amp;amp;---------------------------------------------------------------------*
" AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks
*&amp;amp;---------------------------------------------------------------------*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks.
  PERFORM f4_help_for_palant.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  f4_help_for_palant
*&amp;amp;---------------------------------------------------------------------*
FORM f4_help_for_palant.

  DATA:
      w_dynpfields TYPE dynpread,
      i_dynpfields LIKE STANDARD TABLE OF dynpread.

  IF i_t001w[] IS INITIAL.
    SELECT werks name1
    FROM t001w
    INTO TABLE i_t001w.
  ENDIF.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
*   DDIC_STRUCTURE         = ' '
    retfield               = 'WERKS'
*   PVALKEY                = ' '
    dynpprog               = sy-repid
    dynpnr                 = sy-dynnr
    dynprofield            = 'P_WERKS'
*   STEPL                  = 0
*   WINDOW_TITLE           =
*   VALUE                  = ' '
   value_org              = 'S'
*   MULTIPLE_CHOICE        = ' '
*   DISPLAY                = ' '
*   CALLBACK_PROGRAM       = ' '
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
* IMPORTING
*   USER_RESET             =
    TABLES
      value_tab              = i_t001w
*   FIELD_TAB              =
    return_tab             = i_return_tab
*   DYNPFLD_MAPPING        =
* EXCEPTIONS
*   PARAMETER_ERROR        = 1
*   NO_VALUES_FOUND        = 2
*   OTHERS                 = 3
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  READ TABLE i_return_tab INTO w_return_tab INDEX 1.
  p_werks = w_return_tab-fieldval.
  READ TABLE i_t001w INTO w_t001w WITH KEY werks = p_werks.
  IF sy-subrc = 0.

    w_dynpfields-fieldname    = 'P_NAME1'.
    w_dynpfields-fieldvalue   = w_t001w-name1.
    APPEND w_dynpfields TO i_dynpfields.
    CLEAR w_dynpfields.

    CALL FUNCTION 'DYNP_VALUES_UPDATE'
      EXPORTING
        dyname               = sy-repid
        dynumb               = sy-dynnr
      TABLES
        dynpfields           = i_dynpfields
      EXCEPTIONS
        invalid_abapworkarea = 1
        invalid_dynprofield  = 2
        invalid_dynproname   = 3
        invalid_dynpronummer = 4
        invalid_request      = 5
        no_fielddescription  = 6
        undefind_error       = 7
        OTHERS               = 8.
    IF sy-subrc = 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.


  ENDIF.


ENDFORM.                    " f4_help_for_palant&lt;/CODE&gt;&lt;/PRE&gt; 

I hope that it solves ur problem.

Regards,
Venkat.O
&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2008 13:00:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-parameters/m-p/3686126#M887634</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2008-04-08T13:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-parameters/m-p/3686127#M887635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai u can fallow this way &lt;/P&gt;&lt;P&gt; it may be help full to u .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF not vkorg = ' '.&lt;/P&gt;&lt;P&gt;    LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF SCREEN-NAME = 'vtweg'.&lt;/P&gt;&lt;P&gt;        SCREEN-INPUT = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SCREEN-ACTIVE = 1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SCREEN-OUTPUT = 0.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      select single ..........................&lt;/P&gt;&lt;P&gt;for that field&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;      IF SCREEN-NAME = 'S_BUDAT'.&lt;/P&gt;&lt;P&gt;        SCREEN-INPUT = 1.&lt;/P&gt;&lt;P&gt;        SCREEN-ACTIVE = 1.&lt;/P&gt;&lt;P&gt;        SCREEN-OUTPUT = 1.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this i think it may be help full to u .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2008 13:25:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-parameters/m-p/3686127#M887635</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-08T13:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-parameters/m-p/3686128#M887636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks All for your valuable inputs....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2008 05:50:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-parameters/m-p/3686128#M887636</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-09T05:50:42Z</dc:date>
    </item>
  </channel>
</rss>

