<?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: Input help for VTWEG in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311178#M161882</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should use of fm 'DYNP_VALUES_READ' to read the values on selection screen in at selection screen of second field. Then you can check and restrict the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jun 2006 13:42:42 GMT</pubDate>
    <dc:creator>Manohar2u</dc:creator>
    <dc:date>2006-06-08T13:42:42Z</dc:date>
    <item>
      <title>Selection-screen: Input help for VTWEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311174#M161878</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;Can anybody help me with the following problem: &lt;/P&gt;&lt;P&gt;I have two select-options (VKORG and VTWEG) on my selection screen. Now there should be the possibility to restrict the values shown as input help for VTWEG after having selected a value for VKORG. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've already tried to do this by using a matchcode object but for VKORG and VTWEG I was not able to find suitable search helps. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my opinion this should be possible without using the "AT SELECTION-SCREEN ON VALUE-REQUEST FOR ...". If not, it would be interesting to getting to know your approaches to this task. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jun 2006 13:35:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311174#M161878</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-08T13:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Selection-screen: Input help for VTWEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311175#M161879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can refer to the following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and you can write the code in the same way as per your requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZRKTEST5                                                    *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                                                                     *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*

REPORT  ZRKTEST5                                .

DATA: PROGNAME TYPE SY-REPID,
      DYNNUM   TYPE SY-DYNNR,
      DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
      FIELD_VALUE LIKE LINE OF DYNPRO_VALUES.

DATA: BEGIN OF T_T001L OCCURS 0,
        WERKS TYPE WERKS_D,
        LGORT TYPE LGORT_D,
      END OF T_T001L.

DATA: V_WERKS TYPE WERKS_D,
      V_LGORT TYPE LGORT_D.


SELECTION-SCREEN BEGIN OF BLOCK B1.
  PARAMETERS: P_PLANT LIKE MSEG-WERKS,
              P_STOLOC LIKE MSEG-LGORT.
SELECTION-SCREEN END OF BLOCK B1.

INITIALIZATION.
  PROGNAME = SY-REPID.
  DYNNUM = SY-DYNNR.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_STOLOC.

  CLEAR: FIELD_VALUE, DYNPRO_VALUES. REFRESH DYNPRO_VALUES.
  FIELD_VALUE-FIELDNAME = 'P_PLANT'.
  APPEND FIELD_VALUE TO DYNPRO_VALUES.

  CALL FUNCTION 'DYNP_VALUES_READ'
       EXPORTING
            DYNAME             = PROGNAME
            DYNUMB             = DYNNUM
            TRANSLATE_TO_UPPER = 'X'
       TABLES
            DYNPFIELDS         = DYNPRO_VALUES.

  READ TABLE DYNPRO_VALUES INDEX 1 INTO FIELD_VALUE.

  SELECT WERKS LGORT INTO TABLE T_T001L FROM T001L WHERE WERKS = FIELD_Value-fieldvalue.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
            RETFIELD    = 'P_STOLOC'
            DYNPPROG    = PROGNAME
            DYNPNR      = DYNNUM
            DYNPROFIELD = 'P_STOLOC'
            VALUE_ORG   = 'S'
       TABLES
            VALUE_TAB   = T_T001L.

START-OF-SELECTION.
  WRITE:/ 'TEST F4 PROGRAM'.
END-OF-SELECTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpfull&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vikure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jun 2006 13:39:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311175#M161879</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-08T13:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Selection-screen: Input help for VTWEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311176#M161880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how did u ever know that VKORG was selected? VGWEG is dependent on VKORG based on the configuration data on that sitew, so, use parameer id's in assosiation with your paramerer id's.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jun 2006 13:40:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311176#M161880</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-08T13:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Selection-screen: Input help for VTWEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311177#M161881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, if you can't get it to work any other way,  you can try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0002 .

parameters: p_vkorg type vbak-vkorg,
            p_vtweg type vbak-vtweg.

at selection-screen on value-request for p_vtweg.


  data: begin of help_item occurs 0,
          vkorg type vbak-vkorg,
          vtweg type vbak-vtweg,
        end of help_item.

  data: dynfields type table of dynpread with header line.


  dynfields-fieldname = 'P_VKORG'.
  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_VKORG'.

  p_vkorg = dynfields-fieldvalue.

  clear help_item.  refresh help_item.
  select vkorg vtweg into table help_item
            from tvkov
                    where vkorg = p_vkorg.


  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield    = 'VTWEG'
            dynprofield = 'P_VTWEG'
            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;&lt;/P&gt;&lt;P&gt;Regarsds,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jun 2006 13:42:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311177#M161881</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-08T13:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Selection-screen: Input help for VTWEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311178#M161882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should use of fm 'DYNP_VALUES_READ' to read the values on selection screen in at selection screen of second field. Then you can check and restrict the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jun 2006 13:42:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311178#M161882</guid>
      <dc:creator>Manohar2u</dc:creator>
      <dc:date>2006-06-08T13:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Selection-screen: Input help for VTWEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311179#M161883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't have to do any special coding, I've seen this work in 4.6c and 5.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables vbak.&lt;/P&gt;&lt;P&gt;select-options: s_vkorg for vbak-vkorg,&lt;/P&gt;&lt;P&gt;                s_vtweg for vbak-vtweg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&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;Once you select a value for vkorg, vtweg match code automatically shows distribution channels for the selected sales org.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jun 2006 15:11:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311179#M161883</guid>
      <dc:creator>sridhar_k1</dc:creator>
      <dc:date>2006-06-08T15:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Selection-screen: Input help for VTWEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311180#M161884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting,  works for SELECT-OPTIONS, but not for PARAMETERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report zrich_0001 .

tables vbak.
select-options: s_vkorg for vbak-vkorg,
s_vtweg for vbak-vtweg.

parameters: p_vkorg type vbak-vkorg,
            p_vtweg type vbak-vtweg.


start-of-selection.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jun 2006 15:15:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311180#M161884</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-08T15:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Selection-screen: Input help for VTWEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311181#M161885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Sridhar, that solved the problem! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A further question regarding this topic: &lt;/P&gt;&lt;P&gt;I've selected a VKORG and a VTWEG. On the selection screen there is another input field to select one or more materials. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to restrict the selectable materials to only those, which are maintained for the selected VKORG and VTWEG? Perhaps as easy as the first solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 08:05:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311181#M161885</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T08:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Selection-screen: Input help for VTWEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311182#M161886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI empe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Is it possible to restrict the selectable materials to only those, which are maintained for the selected VKORG and VTWEG?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes its possible thru&lt;/P&gt;&lt;P&gt;search help (either standard or our own)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The search help should contain&lt;/P&gt;&lt;P&gt;   all these 3 fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  a) then we can use IMPORT checkbox&lt;/P&gt;&lt;P&gt;    (when we make search help)&lt;/P&gt;&lt;P&gt;    for the fields&lt;/P&gt;&lt;P&gt;    VKORG and VTWEG&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;   b) so that, when we press F4 for material,&lt;/P&gt;&lt;P&gt;    only those material will come&lt;/P&gt;&lt;P&gt;   which are related to the values entered &lt;/P&gt;&lt;P&gt;   in the fields&lt;/P&gt;&lt;P&gt;   VKORG and VTWEG&lt;/P&gt;&lt;P&gt;   (this is made done by making them IMPORT&lt;/P&gt;&lt;P&gt;    checkbox tick, while making search help,&lt;/P&gt;&lt;P&gt;    -- that is the main purpose of it)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 08:19:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311182#M161886</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T08:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Selection-screen: Input help for VTWEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311183#M161887</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 do it easly by a dictionary structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By SE11 create a structure ZMVKE like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD| DATA ELEMENT| CHECK TABLE| SEARCH HELP &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VKORG| VKORG       | TVKO       |&lt;/P&gt;&lt;P&gt;VTWEG| VTWEG       | TVKOV      |&lt;/P&gt;&lt;P&gt;MATNR| MATNR       | MVKE       | MAT1S &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So use this structure to define yuor select-options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 08:25:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-input-help-for-vtweg/m-p/1311183#M161887</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T08:25:50Z</dc:date>
    </item>
  </channel>
</rss>

