cancel
Showing results for 
Search instead for 
Did you mean: 

table control Drop down list

Former Member
0 Kudos

Hi all,

I want to have a drop down list in within table control on one field. Can anybody help me out in this

Thankx in adv

Accepted Solutions (0)

Answers (6)

Answers (6)

former_member404244
Active Contributor
0 Kudos

You can have dropdown list box in Table control.

Select any field in table control. Go to attributes of that field there is an option for dropdownlist.

check it. U will get a dropdownlist for the field.

Regards,

Nagaraj

Former Member
0 Kudos

hi,

i have the same problem, i need DIFFERENT values for the listbox for each line, depending on a coloum of the table.

no i get only the same values for the listbox for each line.

kind regards

christian

venkat_o
Active Contributor
0 Kudos

Hi Sanjay,

To get Drop Drown Box on screen .

Follow these steps.

<b>1</b>.

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

<b>2</b>.

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

<b>3</b>.

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

<b>4</b>.

Save and Activate ur screen .

<b>5</b>.

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.

<b>6</b>.

Observe the above code and change as for ur requirement.

I think it helps a lot.

Let me know ,if u have any problem creating Dropdownbox.

<b>Thanks,

Venkat.O</b>

Former Member
0 Kudos

if i want to have the dropdown list to be diffrent from line to line in the table how can i do this? i tryied by calling function 'VRM_SET_VALUES' with diffrent values between the table loop, endloop but am getting the same values each time.

Former Member
0 Kudos

Hi Sanjay,

You can have dropdown list box in Table control.

Select any one cell in table control.In attributes dialog box, there is an option for <b>dropdown</b>.

Just select <b>listbox</b>...

This will result in listbox being included for the field.

Hope your query is solved.

Regards,

SP.

former_member188685
Active Contributor
0 Kudos

hi,

check this demo <b>RSDEMO_TABLE_CONTROL</b>

Regards

vijay

Former Member
0 Kudos

hi Sanjay,

Check this Link http://www.allsaplinks.com/files/using_table_in_screen.pdf

Regards,

Santosh