2011 Dec 22 10:54 AM
i have created a module pool program.
when user enter some value in text field..then after pressing enter pai triggeres and description corresponding to that value from ztable is shown in another output only field.
could it be possible that without pressing enter just after value entered...corresponding desc will be fetched in output only field.
if have also used fm.
F4IF_INT_TABLE_VALUE_REQUEST
on event process on value request.
can we define multiple return field in this function module?
2011 Dec 22 11:21 AM
Hi,
No it wont trigger automatically .
Instead you can use screen programming & handle CHAIN-END CHAIN in PAI of the screen. This will work.
Regards,
2011 Dec 22 11:27 AM
Instead you can use screen programming & handle CHAIN-END CHAIN in PAI of the screen. This will work.
I have used CHAIN ENDCHAIN STATEMENTS. but they wont trigger untill user press enter.
the big problem is this:
if user does not press enter--the description will not be fetched and smartform will be printed without descriptions.
what about multiple return fields in FM.???
2011 Dec 22 11:40 AM
What you can do is fetch description in smartform only if this is the case.
Nabheet
2011 Dec 22 12:10 PM
Hi,
Sorry for misleading... actually with the buttons it works.
Check in the user command (If you have any button (action ) for calling smartform) . here the values will be filled. you can fill the description also here
What exactly you mean by "what about multiple return fields in FM.???"
If you are expecting Multiple values from the return table. YES it returns Multiple values
Regards,
2011 Dec 22 12:30 PM
> What exactly you mean by "what about multiple return fields in FM.???"
Here is my COde:
data :begin of i_dept occurs 0,
kostl like cskt-kostl,
LTEXT like cskt-LTEXT,
end of i_dept.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = 'ZRETURN_GP '
RETFIELD = 'KOSTL'
* PVALKEY = ' '
DYNPPROG = 'SY-CPROG '
DYNPNR = '0009'
DYNPROFIELD = 'ZRETURN_GP-GOING_TO_DEPT'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
VALUE_ORG = 'S'
* MULTIPLE_CHOICE = 'X'
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
VALUE_TAB = I_DEPT
* FIELD_TAB =
* RETURN_TAB =
* DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
how to declare multiple return fields in this parameter of function module.????
DYNPFLD_MAPPING =
i have used POV on a textfield. amd i m calling this function module in POV.
what i want:
when user click on kostl of i_dept( in the help displayed)..then along with field KOSTL....LTEXT field also returns in
screen field ZRETURN_GP-GOING_TO_DEPT_DESC.
I Have read in the documentation of this function module that in parameter
DYNPFLD_MAPPING =
we can declare multiple return fields.
thats is what i want to know....how to declare multiple return fields.???
suggest some methods.
new concepts are also welcome.!
2011 Dec 22 12:31 PM
Hi,
could it be possible that without pressing enter just after value entered...corresponding desc will be fetched in output only field.
You cannot assign a function code to input text fields, therefore this is not possible...
In order to have your description updated in your smartform (or whatever), the module used to fetch the texts should be placed before your module dealing with user commands.
can we define multiple return field in this function module?
What you can do is, based on your returned fields, update some others with the FM DYNP_VALUES_UPDATE...
Kr,
Manu.
added: you could also use a callback routine, as described in this thread:
Edited by: Manu D'Haeyer on Dec 22, 2011 1:35 PM
2011 Dec 22 7:14 PM
been a while since I've tried this but consider adding this in your PAI.
FIELD fieldname MODULE modulename ON INPUT.
2011 Dec 23 1:12 AM
One thing we can do is, to press the enter key function explicitly by using this code..
CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'
EXPORTING
FUNCTIONCODE = '=ENT'
EXCEPTIONS
FUNCTION_NOT_SUPPORTED = 1
OTHERS = 2.
then PAI Can be Triggered...