Skip to Content
0
Feb 16, 2009 at 05:26 AM

Drop Down Box on the SUBSCREEN

189 Views

Hi,

I am creating screen containing multiple TABS. Now for each TAB I assigned one subscreen. Now in this subscreen (eg. subscreen 9811 and main screen is 9800) I need to add DROP DOWN List BOX.

For this I added following code in the PBO of subscreen 9811.

IF GT_VALUES IS INITIAL.

  WA_VALUE-KEY = 1.
  WA_VALUE-TEXT = 'temp1'.
  APPEND WA_VALUE TO GT_VALUES.

  WA_VALUE-KEY = 2.
  WA_VALUE-TEXT = 'temp2'.
  APPEND WA_VALUE TO GT_VALUES.

  WA_VALUE-KEY  = 3.
  WA_VALUE-TEXT = 'temp3'.
  APPEND WA_VALUE TO GT_VALUES.



  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      ID              = 'LV_IP_ADDRTYPE '
      VALUES          = GT_VALUES
    EXCEPTIONS
      ID_ILLEGAL_NAME = 1
      OTHERS          = 2.

  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.

But problem with this approach is

I failed to catch user input for the same DROP DOWN List. Means if user selects SECOND (temp2) option on DROP DOWN List, it automatically triggers PAI (PAI of main screen); but Function Code for the same is BLANK.

I have provide SUBMIT Button on the screen. Hence if user presses SUBMIT button, I should get selected value of DROP DOWN List.

Could you please provide me solution for the same? or any other approach will be really helpful.

Edited by: Nikhil Jathar on Feb 15, 2009 11:36 PM