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

code for drop down list box

Former Member
0 Likes
838

hi experts,

i have drop down list box on table control screen on particular field . i have displayed data on table control screen.i need to have possible entries in that list box.

this list box i will use when i need to change data on table control screen for that particular record and that particularfields.

note : drop down list box on table control screen not on selection-screen.

give me some examples.

5 REPLIES 5
Read only

Former Member
0 Likes
786

hi,

U can use F4 on that field.

For that u can add ON VALUE-REQUEST.

Read only

Former Member
0 Likes
786

Hi,

Look at the example Program <b>DEMO_DYNPRO_DROPDOWN_LISTBOX</b>

The same thing you can do it in the Table control also, first put the field as List box(from the Attributes), then in the PBO event of that screen, fill the values in that field.

Regards

Sudheer

Read only

Former Member
0 Likes
786

Hi Sanjay,

To get Drop Drown Box on screen .

Follow these steps.

1.

Go to T.Code SE51 and Select Laypout for the Screen.

2.

Double click on the field for which u want Dropdown box.

3.

Then U will see Name ,Text ,DROPDOWN.Click on that and select List Box or ListBox with key . Better to to select first one.

4.

Save and Activate ur screen .

5.

Enter the following peice of code in the PBO of the screen.(Change for ur requirement).


TYPE-POOLS :vrm.
DATA:i_natio TYPE vrm_values,
w_natio LIKE LINE OF i_natio.

DATA: BEGIN OF i_t005t OCCURS 0,
land1 TYPE t005t-land1,
natio TYPE t005t-natio,
END OF i_t005t.


IF i_t005t[] IS INITIAL.
SELECT land1 natio
FROM t005t
INTO TABLE i_t005t
WHERE spras = sy-langu.
IF sy-subrc = 0.
LOOP AT i_t005t .
w_natio-key = i_t005t-land1.
w_natio-text = i_t005t-natio.
APPEND w_natio TO i_natio.
CLEAR w_natio.
ENDLOOP.
ENDIF.
ENDIF.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'I_IT0002-NATIO'
values = i_natio
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.

6.
Observe the above code and change as for ur requirement.

I think it helps a lot.

regards

ravish

<b>plz dont forget to reward points if useful</b>

Read only

Former Member
0 Likes
786

Hi,

Please check this example 'RSDEMO_TABLE_CONTROL' it is very helpful

to you.

reward points if useful

regards

suman

Read only

Former Member
0 Likes
786

std report RSDEMO_TABLE_CONTROL can solve ur problem..

have a look at this report...

Reward if useful

Regards

Prax