‎2005 Dec 17 8:59 PM
Hi,
I am trying to define and use a dropdown listbox on screen created with screen painter. I have no previous experience with the screen painter so it's have been difficult for me to do it. I have been reading previous post in this forum on that topic and try to use some of the examples given, but none of them seems to work.
I also tried to use the example of the program DEMO_DROPDOWN_LIST_BOX but the listbox remains empty. It seems to me that all of the examples given assumes that there is something else that I should know but in this case (believe me) I don't have an idea of what it is.
I tried to use the example using the function 'F4IF_INT_TABLE_VALUE_REQUEST' and the program gives no error but the listbox doesn't work.
Where does I get the values of the listbox?
How I can fill the listbox with them?
I just need a generic example.
Any help will be appreciated.
Thanks,
Orlando.
‎2005 Dec 19 7:13 AM
Hi O. Rivera,
1. I assume that you have created the
field on the screen (and assigned as LISTBOX)
Suppose the field name is MYLIST.
(We will take an example
to show BUKRS from T001.
)
2. Goto PAI of the screen.
3. After PAI, write this code :
PROCESS ON VALUE-REQUEST.
FIELD mylist MODULE abc.
4. Double click on abc
and create a new module abc.
like this code :
MODULE abc INPUT.
DATA : BEGIN OF itab OCCURS 0,
bukrs LIKE t001-bukrs,
END OF itab.
SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BUKRS'
value_org = 'S'
TABLES
value_tab = itab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
ENDMODULE. " abc INPUT
5. Activate Everything and execute.
6. I just now tried this at my end
and it works perfectly fine.
7. Just go thru the code
and u will understand the workings behind it.
I hope it helps.
Regards,
Amit M.
‎2005 Dec 17 9:09 PM
hi,
You initially have to convert the field to list box in the Screen Painter. You can do it by changing the attributes of the field(check attributes box, by double clickin on the field in SE51). Now in the POV (Process on Value event) populate the records for the Field. Now you run the program to view the list box with values.
Regards,
Vara
‎2005 Dec 17 9:50 PM
Thanks Vara,
I did convert the field to a listbox but the example I found it uses a <b>'Process on Value-Request'</b> not <b>'Process on Value Event'</b> as you told me. What's the difference beetwen them?
Now that I have created that process, What do I do next? Exactly how I get the values in the listbox? Is necesary to call a particular function to do that? If so wich one?
Does I have to create an external table and fill the values prior to do that?
As you can see I have too many questions and fewer answers.
Anyway I really appreciate your help.
Thanks very much!!!
Orlando
‎2009 Jan 15 6:06 PM
Hi Vara,
Other day i had SAP2007A B1 certification exam and i found tonne's of question related to Screen Painter as am a QA tester no knowledge on this topic so am just wondering from where should i get detail explanation what is Screen Painter...How it works and why we implement and all...Any help would certainly be appreciated.
Thanks,
Akhtar
‎2005 Dec 19 7:13 AM
Hi O. Rivera,
1. I assume that you have created the
field on the screen (and assigned as LISTBOX)
Suppose the field name is MYLIST.
(We will take an example
to show BUKRS from T001.
)
2. Goto PAI of the screen.
3. After PAI, write this code :
PROCESS ON VALUE-REQUEST.
FIELD mylist MODULE abc.
4. Double click on abc
and create a new module abc.
like this code :
MODULE abc INPUT.
DATA : BEGIN OF itab OCCURS 0,
bukrs LIKE t001-bukrs,
END OF itab.
SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BUKRS'
value_org = 'S'
TABLES
value_tab = itab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
ENDMODULE. " abc INPUT
5. Activate Everything and execute.
6. I just now tried this at my end
and it works perfectly fine.
7. Just go thru the code
and u will understand the workings behind it.
I hope it helps.
Regards,
Amit M.
‎2014 Mar 13 11:51 AM
hi amit,
Thanks a lot for posting it. It has worked for me.
Regards,
sheetal
‎2005 Dec 19 7:23 AM
check this Demo <b>RSDEMO_DROPDOWN_LISTBOX</b>
and
using VRM_SET_VALUES you can do that ..
****dropdown list data
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
VALUE-KEY = '1'.
VALUE-TEXT = 'List'.
APPEND VALUE TO LIST.
VALUE-KEY = '2'.
VALUE-TEXT = 'Sell'.
APPEND VALUE TO LIST.
VALUE-KEY = '3'.
VALUE-TEXT = 'List w/ Sell'.
APPEND VALUE TO LIST.
VALUE-KEY = '4'.
VALUE-TEXT = 'Sell w/ List'.
APPEND VALUE TO LIST.
CLEAR VALUE.
NAME = 'IT_TC-ITEM'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = NAME
VALUES = LIST.
‎2009 Jun 05 1:38 PM
I tried dudlas code snippet..
I only see one value in my drop down lust...
i don't know why..
‎2005 Dec 19 10:32 AM
Hi,
Pls reward points if any answers
have been helpful.
Regards,
Amit M.
‎2005 Dec 19 10:48 AM
Hi,
Try with FM VRM_SET_VALUES.
Thanks
Eswar