on 10-03-2005 7:21 PM
I have a developed a screen with the following fields:
Material:
Plant:
Sloc:
For the Sloc, I want a picklist to show up for all slocs for the Plant the user entered. Currently I can only get it to display all slocs using the parameter ID LAG.
How can I get this to work? If it involves code, can you please include an example and where I should put it? thx
Take a look at the function module
F4IF_INT_TABLE_VALUE_REQUEST
And go thru the function module documentation. You will get an idea.
Regards,
Naren
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In your screen flow logic, do something like this:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0300.
*
PROCESS AFTER INPUT.
FIELD Sloc module My_Sloc_Logic. "<-note the FIELD stmnt
MODULE USER_COMMAND_0300.
Module My_Sloc_Logic. <-referenced above
Your logic here... something like...
select * from t001w
into table MyTable where werks = Your_Plant_field.
" call a pop-up window or an ABAP list or whatever
" you like to display MyTable
EndModule.
Message was edited by: John Jakabcsin
Message was edited by: John Jakabcsin
Message was edited by: John Jakabcsin
Also - You will probably need to manage the user interaction (ie. keystrokes, etc).
So prior to the FIELD command, you will probably need something like this:
MODULE COMMON_EXIT AT EXIT-COMMAND.
The module COMMON_EXIT would contain all/some of your PAI logic to determine what button was pressed, specifically the BACK, EXIT, or CANCEL buttons, in this case.
I have gotten some of it working. The drop down list now appears. My problem now is that when the user makes a selection, it does not populate it back on the screen field. Can u help?
Here is my code:
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1200. "If user clicks save,back,etc
PROCESS ON VALUE-REQUEST.
FIELD DTAB-DES_LGORT module Sloc_Lookup.
MODULE Sloc_Lookup INPUT.
SELECT lgort lgobe
INTO CORRESPONDING FIELDS OF TABLE it001l
FROM t001l
WHERE werks = dtab-werks.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'lgort'
VALUE_ORG = 'S'
DYNPPROG = 'SAPMZQI_SIMP'
DYNPNR = '1200'
DYNPROFIELD = 'DTAB-DES_LGORT '
TABLES
VALUE_TAB = it001l
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
ENDMODULE.
User | Count |
---|---|
86 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.