2007 Jul 12 2:50 PM
Dear Experts,
Is it possible to populate different values for each row in a listbox inside a table control ?
Example,
Row 1 in the the table contains A, B & C
Row 2 in the same table contains C, D & E
If yes, How?
yes i am using
call function 'VRM_SET_VALUES'
exporting
id = i_name
values = i_list.
Thank you .
Message was edited by:
Kokwei Wong
Message was edited by:
Kokwei Wong
2007 Jul 12 2:53 PM
Hi,
Try to use fm
call function 'VRM_SET_VALUES'
exporting
id = i_name
values = i_list.
aRs
2010 Jan 29 5:17 AM
Hi all,
I too have the same requirement.
i tried like this but the values are not getting populated in text box. please give your ideas.
loop at itab.
select vbeln from ZSD_PS_BLAWB into ZSD_PS_BLAWB-vbeln
where BLAWBNO = itab-BLAWBNO and
BLAWBDT = itab-BLAWBDT and
CTRNO = itab-CTRNO.
if sy-subrc = 0.
index = 1.
list3-key = index.
list3-text = ZSD_PS_BLAWB-vbeln.
append list3 to list2.
index = index + 1.
endif.
endselect.
clear index.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'ITAB-VBELN'
VALUES = 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.
modify itab.
endloop.
Thanks in advance.
2010 Jan 29 5:26 AM
Hi Wong,
this is code example for listbox
TYPE-POOLS vrm .
DATA: lt_vrm_values TYPE TABLE OF vrm_value.
DATA: wa_vrm_values TYPE vrm_value.
PARAMETER p_list AS LISTBOX VISIBLE LENGTH 10.
INITIALIZATION.
wa_vrm_values-key = 'Key1'.
wa_vrm_values-text = 'Value1'.
APPEND wa_vrm_values TO lt_vrm_values.
wa_vrm_values-key = 'Key2'.
wa_vrm_values-text = 'Value2'.
APPEND wa_vrm_values TO lt_vrm_values.
wa_vrm_values-key = 'Key3'.
wa_vrm_values-text = 'Value3'.
APPEND wa_vrm_values TO lt_vrm_values.
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_LIST'
values = lt_vrm_values
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.
To fill it with data from DB, just do select in INITIALIZATION and put that values with same alghoritmus.
Manas M.
P.S.: This is very easy question, you should use search ...