2015 May 07 8:27 AM
Hello
I created a dynpro with some input-fields for my application.
I want to run a method each time the users hits the "ENTER"-Button and this runs fine,
but in relation to the input-field which the user has "selected" (the text-field which is focused) a different method should be called.
I don't know how I can check IF a field is focused and WHICH is focused?
Thank you for your answers.
2015 May 07 9:19 AM
Hi Robin,
in the flow logic of your module pool screen you can use
FIELD ... MODULE ON INPUT
and
FIELD ... MODULE ON REQUEST
in PAI for your issue. Maybe also a CHAIN ... ENDCHAIN will be useful.
Regards,
Klaus
2015 May 07 9:19 AM
Hi Robin,
in the flow logic of your module pool screen you can use
FIELD ... MODULE ON INPUT
and
FIELD ... MODULE ON REQUEST
in PAI for your issue. Maybe also a CHAIN ... ENDCHAIN will be useful.
Regards,
Klaus
2015 May 07 10:03 AM
Thank you for your anwer. This is very close to the solution of my problem.
The problem of MODULE ON INPUT/OUTPUT is, that if an other field is selected by the user the code is executed anyway.
I want the to execute the code only if the input-field is "selected" like you can see in the picture for the field "Serialn."
2015 May 07 10:21 AM
Hi,
you can use ABAP keyword GET CURSOR in an ABAP module or PERFORM to get the "selected" field.
If you are using
MODULE ON INPUT
in flow logic, first check in the module the right field. Or in a CHAIN:
PROCESS AFTER INPUT.
CHAIN.
MODULE GET_CURSOR.
FIELD A MODULE DO_A ON INPUT.
FIELD B MODULE DO_B ON INPUT.
ENDCHAIN.
So you can find the "selected" field in module GET_CURSOR and check for it in modules DO_A and DO_B at the beginning.
Regards,
Klaus
2015 May 07 11:02 AM
Hi Klaus
Thank your for the answer, it works fine now!
Regards,
Robin