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

Drop Down Box on the SUBSCREEN

former_member221838
Participant
0 Likes
713

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

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

1 REPLY 1
Read only

former_member221838
Participant
0 Likes
524

Problem Resolved. Table name declared for the field. FM 'VRM_SET_VALUES' used.

Edited by: Nikhil Jathar on Feb 16, 2009 4:37 AM