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

list box display on selection screen

Former Member
0 Likes
1,316

Hi ,

I have to declare a field as list box on selection screen and the values in the list box should be picked/loaded/shipped .based on the selected value in the list box , i have to fetch the data from vbuk-kostk(pick), vbuk-wbstk(gods issue).plaese help me in this regard.

thanks ,

padma.

Hi ,

I have to declare a field as list box on selection screen and the values in the list box should be picked/loaded/shipped .based on the selected value in the list box , i have to fetch the data from vbuk-kostk(pick), vbuk-wbstk(gods issue).plaese help me in this regard.

thanks ,

padma.

3 REPLIES 3
Read only

Former Member
0 Likes
505

hi,

check the below example you will get idea of how to place it in the screen and how to use it.

&----


*& Report ZSW_DROP_DOWN_LIST

*&

&----


*&

*&

&----


REPORT ZSW_DROP_DOWN_LIST.

TABLES: LFA1.

TYPE-POOLS: VRM.

DATA: NAME TYPE VRM_ID,

LIST TYPE VRM_VALUES,

VALUE LIKE LINE OF LIST.

PARAMETERS: P_LIFNR LIKE LFA1-LIFNR AS LISTBOX VISIBLE LENGTH 20.

DATA: BEGIN OF IT_ITAB OCCURS 0,

LIFNR LIKE LFA1-LIFNR,

LAND1 LIKE LFA1-LAND1,

NAME1 LIKE LFA1-NAME1,

END OF IT_ITAB.

initialization.

SELECT LIFNR LAND1 NAME1 FROM LFA1 INTO IT_ITAB .

VALUE-KEY = it_itab-LIFNR.

WRITE it_itab-LAND1 TO VALUE-TEXT .

CONCATENATE VALUE-KEY VALUE-TEXT

it_itab-NAME1

INTO VALUE-TEXT SEPARATED BY '~'.

APPEND VALUE TO LIST.

ENDSELECT.

NAME = 'P_LIFNR'.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

ID = NAME

VALUES = LIST.

start-of-selection.

write:/ p_lifnr.

Read only

Former Member
0 Likes
505

Hi,

use checkbox in parameter statement.

PARAMETERS:A AS CHECKBOX.

PARAMETERS:B AS CHECKBOX.

PARMETERS:C AS CHECKBOX

Give reward if helpful

Thanks

vana

Read only

Former Member
0 Likes
505

hi,

type-pools: vrm.

data:type_tab type VRM_values,

wa_line like line of type_tab.

parameters p_type(6) as listbox visible length 6 user-command fcode.

AT SELECTION-SCREEN OUTPUT.

*add values to type_tab

*add three values to htis table

call function 'VRM_SET_VALUES'

EXPORTING

id = 'P_TYPE'

values = type_tab.

P_TYPE = "PICKED' "set default

at user-command.

case sy-ucomm.

when fcode.

if P_TYPE = 'PICKED'.

.........

endcase.

......

hope that helps

regards,

sap fan