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

Reg : Listbox in table control

Former Member
0 Likes
712

Hello All,

Am having a field with list box inside a table control, i can able to append the values in the list box using vrm_id function module.

my problem was after am selecting the value from the list box it doesn't come to internal table or work area since am declaring my fields in the table control as work area-field name.

say for example

X_ASSIGNMENT-employee_id this is my field name i have declared for employee column in table control when i select the value

from the list box the field X_ASSIGNMENT-employee_id contains blank how to get the value here.

could you please explain why its not coming. and also could you explain how to bring the list box values based on another list box inside a table control?

Hello All,

Am having a field with list box inside a table control, i can able to append the values in the list box using vrm_id function module.

my problem was after am selecting the value from the list box it doesn't come to internal table or work area since am declaring my fields in the table control as work area-field name.

say for example

X_ASSIGNMENT-employee_id this is my field name i have declared for employee column in table control when i select the value

from the list box the field X_ASSIGNMENT-employee_id contains blank how to get the value here.

could you please explain why its not coming. and also could you explain how to bring the list box values based on another list box inside a table control?

4 REPLIES 4
Read only

sivasatyaprasad_yerra
Product and Topic Expert
Product and Topic Expert
0 Likes
682

Hi,

Just check whether you are copying the values from UI structure to the internal table which is bound to the table control in PAI. Put the break-point in PAI of table control module and check the value which is stored in UI structure. If the UI structure is updated then update the internal table. If it doesn't work then attach the code of PAI module for table control.

Regards,

Siva.

Read only

0 Likes
682

Hi Siva,

I have Checked the UI Structure which i have bounded but it doesn't pass the value to my strucuture it doesn't work .could you please send a sample code regarding this issue.

Read only

0 Likes
682

Hi,

Could you please attach the module code which will be invoked on changing the list box.

Regards,

Siva.

Read only

0 Likes
682

Hi Siva,

module FILL_EMPLOYEE input.

DATA : V_LFA1 LIKE LFA1-LIFNR.

DATA : CNT2 TYPE I.

*refresh : l_list2.

IF L_LIST2 IS INITIAL.

L_NAME2 = 'X_ASSIGNMENT-EMPLOYEE_ID'.

SELECT LIFNR FROM LFA1

INTO V_LFA1.

CHECK : V_LFA1 CN '0123456789'.

CNT2 = CNT2 + 1.

L_VALUE2-KEY = CNT2.

l_value2-text = v_LFA1.

APPEND L_VALUE2 TO L_LIST2.

endselect.

CLEAR : cnt2,

l_value2,

v_LFA1.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = l_name2

values = l_list2

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.

IF NOT X_ASSIGNMENT-EMPLOYEE_ID IS INITIAL.

READ TABLE l_list2 WITH KEY text = X_ASSIGNMENT-EMPLOYEE_ID

INTO l_value2.

IF sy-subrc = 0.

X_ASSIGNMENT-EMPLOYEE_ID = l_value2-key.

ENDIF.

ENDIF.

endif.

this is the piece of code i have written the to get all the employee details it is inside the table control am getting all the details in the employee listbox.

the problem is when i select any value from the listbox the value is not getting in X_ASSIGNMENT-EMPLOYEE_ID am getting this in process on value-request in pai module.

could you check and say where am wrong.