‎2007 May 17 11:59 AM
Hi friends,
Could u please tell me how to create a module pool program to charge the content of a a field of database table in a Dropdown list boxes . Please provide me step by step Process or link of file.
thinks .
‎2007 May 17 12:01 PM
Hi,
" List Boxes on Selection Screens
"Here is a short example of using list boxes on selection screens:
PROGRAM ztest.
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id, list TYPE vrm_values, value LIKE LINE OF list.
PARAMETERS: ps_parm(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
name = 'PS_PARM'.
value-key = '1'. value-text = 'Line 1'. APPEND value TO list.
value-key = '2'. value-text = 'Line 2'. APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES' EXPORTING id = name values = list.
START-OF-SELECTION.
WRITE: / 'Parameter:', ps_parm.
Jogdand M B
‎2007 May 17 12:01 PM
Hi,
" List Boxes on Selection Screens
"Here is a short example of using list boxes on selection screens:
PROGRAM ztest.
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id, list TYPE vrm_values, value LIKE LINE OF list.
PARAMETERS: ps_parm(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
name = 'PS_PARM'.
value-key = '1'. value-text = 'Line 1'. APPEND value TO list.
value-key = '2'. value-text = 'Line 2'. APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES' EXPORTING id = name values = list.
START-OF-SELECTION.
WRITE: / 'Parameter:', ps_parm.
Jogdand M B
‎2007 May 17 12:02 PM
‎2007 May 17 12:17 PM
hi ranjita
but where can i find DEMO_DYNPRO_DROPDOWN_LISTBOX.
thinks
‎2007 May 17 12:32 PM
there are two ways karim ,
go to se38 and write this program name DEMO_DYNPRO_DROPDOWN_LISTBOX.
or
open transaction ABAPDOCU -- > user dialogs -- >screens --> processing screens --> drop down boxes on screen1 / drop down boxes on screen2.
the program name under (drop down boxes on screen1 ) is DEMO_DYNPRO_DROPDOWN_LISTBOX . got it .
Karim , ABAPDOCU is the transaction code where you can get many sample programs ...this is FYI .
regards,
Ranjita
‎2007 May 17 6:30 PM
hi ranjita
i didn't understand how to exploit(DEMO_DYNPRO_DROPDOWN_LISTBOX)
what i want is a simple screen which contains a dropdownlist charged with a field's content of a table.
thainks.
‎2007 May 18 5:08 AM
Hi Karim,
see the below programs to fill the field with a valid listbox value, for example, in this program, I am building the listbox in the program and just assign P_FIELD a valid value from internal table'ivrm_values' . Create screen 100 and create a field call P_FIELD, make sure to select "ListBox" from the DropDown Field.
report zpavan_0001.
type-pools: vrm.
data: p_field(20) type c.
data: ivrm_values type vrm_values.
data: xvrm_values like line of ivrm_values.
data: name type vrm_id.
start-of-selection.
Set default value, before calling the screen
p_field = 'DEF'.
call screen 100.
&----
*& Module STATUS_0100 OUTPUT
&----
text
----
module status_0100 output.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
name = 'P_FIELD'.
xvrm_values-key = 'ABC'.
xvrm_values-text = 'ABC'.
append xvrm_values to ivrm_values.
xvrm_values-key = 'DEF'.
xvrm_values-text = 'DEF'.
append xvrm_values to ivrm_values.
xvrm_values-key = 'GHI'.
xvrm_values-text = 'GHI'.
append xvrm_values to ivrm_values.
call function 'VRM_SET_VALUES'
exporting
id = name
values = ivrm_values.
endmodule. " STATUS_0100 OUTPUT
&----
*& Module USER_COMMAND_0100 INPUT
&----
text
----
module user_command_0100 input.
endmodule. " USER_COMMAND_0100 INPUT
Thanks and Regards,
Pavankumar
‎2007 May 18 5:54 AM
hi Karim ,
this is possible by using the Function module VRM_SET_VALUES .
pass the screen field name in this and the internal table filled with the drop down values ( wt you want ) . you will be able to solve your problem .
Regards,
Ranjita
‎2007 May 17 12:04 PM
Hi Karim,
Have a look at demo program DEMO_DYNPRO_DROPDOWN_LISTBOX
Hope this helps
Thanks
Lakshman
‎2007 May 17 1:11 PM
please go through the above program
they are self expalinatory and contain all the relevent information you are looking for.
DEMO_DYNPRO_DROPDOWN_LISTBOX
DEMO_DROPDOWN_LIST_BOX
regards,
Sudeep Kumar Goswami
‎2007 May 18 6:02 AM
Hi Karim,
Following are two standard SAP report programs for the study of dropdown list boxes.
<i><b>Report: RSDEMO_DROPDOWN_LISTBOX
Report: DEMO_DYNPRO_DROPDOWN_LISTBOX</b></i>
<i><b>1. Goto transaction <i><b>SE38</b></i>
2. Give the program name.
3. Execute and observe the result.
4. Put debugging point at the start of program and now see carefully by pressing F5 or F6 or F7 keys, how the logic flows.</b></i>
=> For Module Pool, to use the dropdowns find the following sample SAP standard module programs for the study.
<i><b>SAPM00BC_TAW12_CS_BOOKINGS
SAPM01BC_TAW12_CS_BOOKINGS
SAPM02BC_TAW12_CS_BOOKINGS
SAPM03BC_TAW12_CS_BOOKINGS
SAPM04BC_TAW12_CS_BOOKINGS
SAPM05BC_TAW12_CS_BOOKINGS
SAPM06BC_TAW12_CS_BOOKINGS
SAPM07BC_TAW12_CS_BOOKINGS
SAPM08BC_TAW12_CS_BOOKINGS
SAPM09BC_TAW12_CS_BOOKINGS</b></i>
Hope this helps you.
PS If the answer solves your query, plz close the thread by marking it Solved & rewarding each reply.
Regards