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: 

data in List box of table control

Former Member
0 Kudos

Hello Experts,

I have created one entry screen, In my screen whenever user gives material number its bom explosion occurs and there are four or five rows are coming in table control, and against every row there is a one column named by number which user needs to fill, i have given listbox option on that column and i want whenever user click on particular row number according to that row should display in listbox which i am picking from data base table, but i am unable to pick data for particular row ...........

Please guide me how i can pick number for a particular row which i am selecting.............

2 REPLIES 2

Former Member
0 Kudos

Hi Shelly,

Kindly G through this:

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.

Regards Mansi

0 Kudos

Dear Mansi,

What i exact want is As there are four rows are displaying,

data is matnr, menge, maktx, uom and then challan number like this these are four rows are displaying, I want when user click on any challan number of any row, number of challan number against that particular material number comes in listbox, I was not getting exact cursor position,

Now i have got and the exact code for thatt is:

data: l_row type i.

data: l_field type char30.

get cursor line l_row.

get cursor field l_field.

read table gt_tabsi index l_row into gs_tabsi.

thanks.........