‎2006 Dec 13 9:29 AM
Hi,
I have one listbox in my module pool program..
for thgis list box i need to add values like quarter...Halfyear and year
how to add to this list box.
‎2006 Dec 13 9:34 AM
Hi Sumi
i understand u need to populate values in the listbox placed on the screen
of ur module pool program.
This can be achieved as below :
1. Please refer your listbox to an existing dataelement or a table field if possible.
2. in case it doesn't match any , then plz create a data element with the same name as ur field on screen , link the data element to a domain (plz create one
customized to ur requirement).
3. Populate the values in the domain .
4. Save and activate ur screen.
6. The domain values would reflect in the listbox on the screen.
i hope it wud help u.
Regards
Pankaj
‎2006 Dec 13 9:30 AM
Hello Sumi,
Add the values that you need in the fixed values of the corresponding domain.
Regards,
Manoj
‎2006 Dec 13 9:31 AM
Mark that as the list box in the attributes of that field and then use VRM_SET_VALUES in the PBO to load the values in the list.
Regards,
Ravi
Note - Please mark all the helpful answers
‎2006 Dec 13 9:34 AM
Hi Sumi
i understand u need to populate values in the listbox placed on the screen
of ur module pool program.
This can be achieved as below :
1. Please refer your listbox to an existing dataelement or a table field if possible.
2. in case it doesn't match any , then plz create a data element with the same name as ur field on screen , link the data element to a domain (plz create one
customized to ur requirement).
3. Populate the values in the domain .
4. Save and activate ur screen.
6. The domain values would reflect in the listbox on the screen.
i hope it wud help u.
Regards
Pankaj
‎2006 Dec 13 9:40 AM
You can check the demo program:
DEMO_DYNPRO_DROPDOWN_LISTBOX
Regards,
Ravi
‎2006 Dec 13 9:42 AM
hi,
You can populate values in list box by these ways
1. Using fm: VRM_SET_VALUES
2. Using fm: F4IF_INT_TABLE_VALUE_REQUEST in POV
3. Providing search elements in data element level
4. Providing value table at domain level
I hope 2 method is suitable for your requirement
‎2006 Dec 13 9:44 AM
Hi vsu,
you can check demo program in se38 <b>DEMO_DYNPRO_DROPDOWN_LISTBOX</b>.
I hope this will help you..
Reward if usefull..
‎2006 Dec 13 9:48 AM
hi,
U can use the function module VRM_SET_VALUES to add the values into list box. for that u have to use TYPE-POOOLS VRM in your prg..
here is the sample code for adding values into the listbox using VRM.
pls reward points if its useful for u.
&----
*& Report ZTEST1 *
*& *
&----
*& *
*& *
&----
REPORT ZTEST1 .
TABLES: ZEMP.
TYPE-POOLS VRM.
DATA SCR LIKE SY-DYNNR VALUE 9002.
DATA: OK_CODE LIKE SY-UCOMM,
save_ok TYPE sy-ucomm.
DATA: name TYPE vrm_id VALUE 'ZEMP-EMPNO',
list TYPE vrm_values,
value LIKE LINE OF list.
DATA: wa_EMP TYPE ZEMP.
DATA: name1 TYPE vrm_id VALUE 'ZEMP-EMPNAME',
list1 TYPE vrm_values,
value1 LIKE LINE OF list1.
DATA: wa_EMP1 TYPE ZEMP.
CALL SCREEN 9001.
&----
*& Module USER_COMMAND_9001 INPUT
&----
text
----
MODULE USER_COMMAND_9001 INPUT.
*OK_CODE = SY-UCOMM.
CASE SY-UCOMM.
*MODIFY ZSAMPLE1.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CLICK'.
SCR = 9000.
ENDCASE.
ENDMODULE. " USER_COMMAND_9001 INPUT
&----
*& Module USER_COMMAND_9000 INPUT
&----
text
----
MODULE USER_COMMAND_9000 INPUT.
SELECT * FROM ZEMP WHERE EMPNO = ZEMP-EMPNO.
ENDSELECT.
CASE SY-UCOMM.
WHEN 'SAVE'.
*ZEMP-EMPNO = ZEMP-EMPNO.
*ZEMP-EMPNAME = ZEMP-EMPNAME.
INSERT ZEMP.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
&----
*& Module VRM_VALUE OUTPUT
&----
text
----
MODULE VRM_VALUE OUTPUT.
BREAK-POINT.
SELECT EMPNO FROM ZEMP INTO CORRESPONDING FIELDS OF wa_EMP.
value-key = wa_EMP-EMPNO.
APPEND value TO list.
ENDSELECT.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
SELECT EMPNAME FROM ZEMP INTO CORRESPONDING FIELDS OF wa_EMP1.
VALUE1-KEY = wa_EMP1-EMPNAME.
APPEND value1 TO list1.
ENDSELECT.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name1
values = list1.
ENDMODULE. " VRM_VALUE OUTPUT