2010 Jul 08 9:07 AM
Hi,
I need to display a dropdown list for LFA1-LIFNR in my module pool program.
In the screen painter I have added an Input/Output field with name LFA1-LIFNR and corresponding to the Dropdown option I have selected Listbox. When I execute the program empty dropdown list is coming. It is not taking the values of LIFNR from the table LFA1. Please let me know the solution for this.
Thanks,
Neethu.
2010 Jul 08 9:33 AM
see demo programs in ABAPDOCU transaction. For example, use DEMO_DROPDOWN_LIST_BOX program.
2012 Feb 27 7:18 AM
HI,
CLICK AN THE FIELD ATTRIBUTES AND CLICK THE FROM DICTIONARY CHECK BOX IN DICTIONAR TAB OF THE FIELD AND TRY.
2012 Feb 27 9:06 AM
Hi,
use this FM in PBO F4IF_INT_TABLE_VALUE_REQUEST and give internal table name in which you select the values you want to display in dropdown list from the database table. Give the fieldname and value org as 'S'.
Thanks.
Aswath.
2012 Feb 27 10:06 AM
Hi,
If you need to display standard f4 help, you have to add the field from the dictionary table.
2012 Feb 27 10:31 AM
Hi,
Use FM - vrm_set_values for populating listbox values.
Regards,
Harsh Bansal
2012 Feb 27 11:12 AM
Hi,
You have to use function module F4IF_INT_TABLE_VALUE_REQUEST and pass the return field,value return(value_org as 'S') and table interface parameters.
2012 Mar 01 6:24 AM
2012 Mar 01 7:16 AM
Use TYPE-POOLS : vrm to set the values for the DropDown list in PBOModule..
2012 Mar 01 7:27 AM
Hi everyone,
please see the posting date of the question before posting.
thanks.
2012 Mar 05 6:43 AM
Hi All,
is it possible to add the default value into drop down box?
i mean when user executed the program, value will display in the first line of the drop down box.
We don't need to press the button to list out the value in the drop down box.
Regards,
Luke
2012 Mar 05 8:42 AM
Hi,
In PBO, simply assign default value to the dropdown variable.
Let's say variable name is lb_value.
Then do this -
lb_value = 'Australia'.
Remember, values in Listbox are case-sensitive. So assign exactly same value as in table displaying drop down values.
Only then it will be reflected in the output.
Regards,
Harsh Bansal
2012 Mar 06 1:51 PM
Hello Abaper,
You have very well designed the drop-down box that is to be reflected in your program. The next thing for you to do is use any 1 method for populating the values i.e. using the function module F4IF_INT_TABLE_VALUE_REQUEST or VRM values. I prefer to use the the F4IF_INT_TABLE_VALUE_REQUEST as it is easy to use and understand. If you use the following function module then you need to call in a module under the flow logic of the screen i.e. PROCESS ON VALUE REQUEST.
Let me just illustrate you with the syntax -
Module Pool Code
.........
.........
*internal table declaration
TYPES : BEGIN OF ty_lifnr,
lifnr TYPE lfa1-lifnr,
END OF ty_lifnr.
DATA : itab_lifnr TYPE STANDARD TABLE OF ty_lifnr.
.........
.........
*Dialog Modules for PBO
.............
*Dialog Module for PAI
MODULE cancel INPUT.
LEAVE PROGRAM.
........
*Dialog Module Process on value reuest
MODULE create_dropdownbox INPUT.
SELECT lifnr
FROM LFA1
INTO CORRESPONDING FIELDS OF TABLE itab_lifnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'LIFNR'
value_org = 'S'
TABLES
value_tab = itab_lifnr
EXCEPTIONS
...........
...........
ENDMODULE.
Now for the Flow Logic -
PROCESS BEFORE OUTPUT.
.............
PROCESS AFTER INPUT.
MODULE cancel AT EXIT-COMMAND.
MODULE user_command_0100.
PROCESS ON VALUE REQUEST.
FIELD lfa1-lifnr MODULE create_dropdownbox.
Hope this helps ! Let me know if any other doubts arises.