Skip to Content
author's profile photo Former Member
Former Member

At Selection-Screen Requirement

Hi,

I have Plant and Storage Location on the Selection-Screen. After User entering Plant and then on Storage Location When he clicks F4, all the Storage Locations belonging to this entered Plant only should appear. Please guide in meeting this requirement.

Regards

K Srinivas

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2009 at 08:30 AM

    Hello

    Use this trick:

    PARAMETERS: P_WERKS LIKE MSEG-WERKS.
    SELECT-OPTIONS S_LGORT FOR MSEG-LGORT.
    

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 18, 2009 at 08:30 AM

    hi

    write code like ..below

    if plant is not initial .

    select the all storage loacations from the table into internal table. pass the internal table to the for the below FM a

    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

    EXPORTING

    tabname = 'SFLIGHT'

    fieldname = 'CARRID'

    • SEARCHHELP = ' '

    • SHLPPARAM = ' '

    dynpprog = 'ZDANY_F4_OWN_CALL'

    dynpnr = '0100'

    dynprofield = 'SFLIGHT-CARRID'

    • STEPL = 0

    value = 'A*'

    • MULTIPLE_CHOICE = ' '

    • DISPLAY = ' '

    • SUPPRESS_RECORDLIST = ' '

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    • TABLES

    • RETURN_TAB =

    • EXCEPTIONS

    • FIELD_NOT_FOUND = 1

    • NO_HELP_FOR_FIELD = 2

    • INCONSISTENT_HELP = 3

    • NO_VALUES_FOUND = 4

    • OTHERS = 5

    .

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDMODULE. " F4_help_for_carrid

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2009 at 08:49 AM

    Hi,

    Check this code

    *&---------------------------------------------------------------------*
    *& Report  ZTEST_F4
    *&
    *&---------------------------------------------------------------------*
    *&
    *&
    *&---------------------------------------------------------------------*
    REPORT  ztest_f4.
    
    INITIALIZATION.
    ** Table declaration
      TABLES : t001l, t001w.
    ** Type declaration
      TYPES : BEGIN OF ty,
                lgort type t001l-lgort,
              END OF ty.
    
    ** Internal table declaration
      DATA : int_location TYPE STANDARD TABLE OF ty.
    ** Internal table memory clear
      REFRESH : int_location.
    
    ** Selection Screen Declaration
    ** Begin of block with frame name
      SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
    ** Select option declaration of pernr field
      SELECT-OPTIONS : s_plant FOR t001l-werks,
                       s_lgort for t001l-lgort.
    ** End of block
      SELECTION-SCREEN END OF BLOCK a1.
    
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_lgort-low.
      PERFORM f4help.
    
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_lgort-high.
      PERFORM f4help.
    
    *&---------------------------------------------------------------------*
    *&      Form  F4HELP
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    *  -->  p1        text
    *  <--  p2        text
    *----------------------------------------------------------------------*
    FORM f4help .
    
    
    
      select lgort
      from t001l
      into table int_location
      where werks in s_plant.
    
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'LGORT'
          dynpprog        = sy-repid    " Program name
          dynpnr          = sy-dynnr    " Screen number
          dynprofield     = 'S_LGORT'   " F4 help need field
          value_org       = 'S'
        TABLES
          value_tab       = int_location " F4 help values
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
    
    ENDFORM.
    
    

    regards,

    Bhavesh.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2009 at 08:54 AM

    Hi srinivas,

    Simple. Just delcare your parameters in this fashion, and system will automatically take care. I tried just now and it works.

    
    report abc.
    
    parameter: werks like t001l-werks.
    parameter: lgort like t001l-lgort.
    
    
    
    

    regards,

    amit m.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2010 at 09:27 AM

    answered

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.