Application Development and Automation 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: 
Read only

Set Default Value In list box

Former Member
0 Likes
1,065

Dear All,

I am using the F4IF_INT_TABLE_VALUE_REQUEST this FM for filling the list box .Now i want to set default value in the list box

Example-

Supose i have 2 List box A & B and in list box i have to set default value in A list box X value and in B list box Y value .

X and Y value is coming in the list box from the master table .

Thanks & Regards

3 REPLIES 3
Read only

Former Member
0 Likes
634

Hi,

Read the default value to internal table after the function module and assign it to the list box parameter.

Regards,

Kranthi

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
634

Hello,

You need to set the default values in the in the PBO event in case of normal screens. For selection-screen program use either the INITIALIZATION or AT SELECTION-SCREEN OUTPUT event.

BR,

Suhas

Read only

Former Member
0 Likes
634

Code Snippet for your referance:

*F4 Help for Output Type
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_KSCHL
DATA: l_repid TYPE syrepid,
        l_dynnr TYPE sydynnr.

  MOVE: sy-repid TO l_repid,
        sy-dynnr TO l_dynnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'KSCHL'
      dynpprog        = l_repid
      dynpnr          = l_dynnr
      dynprofield     = 'P_KSCHL'
      window_title    = text-001
      value_org       = 'S'
    TABLES
      value_tab       = it_value_tab
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3