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 list-problem

Former Member
0 Likes
983

Hello Friends

i got a problem while fetching the value from the dropdown list.

ie the selected values is not retaining inside list or no values is showing up.

MODULE USER_COMMAND_0200 INPUT.

SAVECODE = OKCODE.

CLEAR OKCODE.

CASE SAVECODE.

WHEN 'BACK'.

LEAVE PROGRAM.

WHEN 'EXIT'.

LEAVE PROGRAM.

WHEN 'SELECTED'.

DATA : PROGID1 LIKE SY-REPID.

DATA : SCR1 LIKE SY-DYNNR.

DATA: DYNPRO_VALUES1 TYPE TABLE OF DYNPREAD,

FIELD_VALUE1 LIKE LINE OF DYNPRO_VALUES1.

PROGID1 = SY-REPID.

SCR1 = SY-DYNNR.

CLEAR: FIELD_VALUE, DYNPRO_VALUES.

FIELD_VALUE-FIELDNAME = 'ITAB1-POS1'.

APPEND FIELD_VALUE TO DYNPRO_VALUES1.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

DYNAME = PROGID1

DYNUMB = SCR1

TRANSLATE_TO_UPPER = 'X'

TABLES

DYNPFIELDS = DYNPRO_VALUES1.

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

READ TABLE DYNPRO_VALUES1 INDEX 1 INTO FIELD_VALUE1.

ITAB1-POS1 = FIELD_VALUE1-FIELDVALUE.

ENDCASE.

Itab-pos1 is not getting any selected values

8 REPLIES 8
Read only

Former Member
0 Likes
844

Hi,

Check this link...

http://www.saptechies.com/how-to-add-drop-down-option-for-the-filed-with-multiple-values-in-the-modu...

Hope this would help you.

Regards

Narin Nandivada

Read only

Former Member
0 Likes
844

Hi,

Check out this link-

http://sap.niraj.tripod.com/id38.html

Regards,

Sujit

Read only

Former Member
0 Likes
844

Check whether FIELD_VALUE1-FIELDVALUE is getting the correct value or not . If it is getting the correct value try to put

ITAB1-POS1 = FIELD_VALUE1-FIELDVALUE.

in PBO module of your screen.

Read only

0 Likes
844

Thanks mate for respond but i am not getting any value that is my problem

Read only

0 Likes
844

In dropdown list itself you are not getting the value or after choosing the value it is not updated in the field?

If you are not getting the value in dropdown list . Then try to use the fm VRM_SET_VALUES .

And if you are using any Z field refference for dropdown list . Then in domain of that field you can assign the values in Value Range tab and from there the drop down list will automatimatically generate for your screen . You need not to do any extra coding for that.

Read only

0 Likes
844

Mate..

Iam getting the values in my droplist but the moment i select one value from the list ,it not displaying the selected values..

My dropdown screen field refer as follows

itab1-pos1.

In a internal table itab1

POS1 LIKE ZEXP_PULLOUTINFO-POSNR.

Hope you my problem .

Read only

0 Likes
844

Do you want show the Drop down list box in your table control

RSDEMO_TABLE_CONTROL

What is your requirement exactly can you tell me..?

Read only

0 Likes
844

hello mate

My requirement is as follows

In dialog program , i have design the screen with screen element (DropDown control) .

PBO Event of that screen : I have filled the Values for DropDown control.There is no problem in that , ie i can see all the values of that list.

But IN my PAI EVENT of that screen I am selecting the value from that DropDown list of the screen but I am not able to fetch the a value . The event is getting triggered but not the values from the list . Hope u understand my problem

Note Function code is assigned for that control .