Application Development 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: 

Regarding list box

Former Member
0 Kudos

Hi all,

I have given List box on my screen and i Wrote all the code i am getting the Drop Down list but when i click on that i am facing a problem that i am not able to Capture the value which i have entered by selected the required one.

Can any one help me out.

Points will be rewarded.

Bye

Murthy

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Ramana,

Refer standard programs for the same. Sure you will get your answer..

BCALV_EDIT_06

BCALV_EDIT_07

Cheers

Manish

Message was edited by:

Manish Kumar

Message was edited by:

Manish Kumar

8 REPLIES 8

Former Member
0 Kudos

Hi

Post your code to manage the list box.

Max

0 Kudos

MODULE STATUS_0002 OUTPUT.

REFRESH : IT_STATUS,IT_VRM.

SELECT * FROM ZLEGAL_STATUS INTO TABLE IT_STATUS.

LOOP AT IT_STATUS INTO TY_STATUS.

wa_vrm-key = TY_STATUS-SERIAL_NUMBER.

WA_VRM-TEXT = TY_STATUS-STATUS.

APPEND WA_VRM TO IT_VRM.

CLEAR WA_VRM.

ENDLOOP.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

ID = 'ZLEGAL_ACT-STATUS'

VALUES = IT_VRM

  • 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.

0 Kudos

Hi

Your code seem to be right, check if the field (input/output) name is correct or try to put it in PROCESS ON VALUE-REQUEST instead of PBO.

Max

Former Member
0 Kudos

Hi Ramana,

Refer standard programs for the same. Sure you will get your answer..

BCALV_EDIT_06

BCALV_EDIT_07

Cheers

Manish

Message was edited by:

Manish Kumar

Message was edited by:

Manish Kumar

Former Member
0 Kudos

Hi Murthy. Are the values that you have tried to put in your drop down list actually showing up there? Is the problem that your values aren't appearing in the list, or is it that they are there but you can't seem to select them?

- April King

former_member283648
Participant
0 Kudos

Hi,

I think u are not handling the values in the PAI. you declare a variable in top include <listbox_name> type VRM_VALUE.

this work area will contain the selected value by the user. then u can read the table IT_VRM (the internal table which contain list box values). As the work area declared above has the same name as the screen field, no need to assign values separately. This step will ensure selected value is retained in the list box.

Hope this helps u.

anversha_s
Active Contributor
0 Kudos

hi,

look this scenario.

depends on country state and district will come.

on your intenal table for country in the PBO status u can use

where NAME is the name of your list box

set list box property Respond to double click on give the function code to it

DATA: NAME TYPE vrm_id,

OPT11 TYPE vrm_values,

VALUE LIKE LINE OF OPT11.

LOOP AT ITAB_MM_RR_VEN_NR.

value-key = ITAB_MM_RR_VEN_NR.

value-text = ITAB_MM_RR_VEN_NR.

APPEND value TO OPT11.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

ID = NAME

VALUES = OPT11

.

ENDLOOP.

In PAI

check the OK_CODE and load the data using the same concept used above to load the data of region and distict

Rgds

Anver

Former Member
0 Kudos

Ramana,

you append your required fields into field TEXT of VRM_VALUES.

-Anu.