Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

At Selection-Screen Requirement

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

Hello

Use this trick:


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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

answered

0 Kudos

Hello

And what solution ?