2016 Aug 02 1:31 PM
Hi there,
this is my first question for the Community, so I hope this discussion pool is right and no one else asked this question before:
So here is my problem:
I have called a Dynpro and defined in PAI:
PROCESS AFTER INPUT.
MODULE DYNPRO_CANCEL AT EXIT-COMMAND.
and some field checks :
FIELD WA_VERARBEITUNG-KUNNR MODULE KUNNR_PRUEFEN.
In Module DYNPRO_CANCEL I process the CANCEL, BACK and EXIT Buttons with Functioncode 'E' !
Functioncode 'E' to override the Field checks.
Now I want to create a Message for this Cancel-Buttons like 'Data have change. Would you like to save?'.
For that I have to check the Dynpro values for changing.
So here is the Problem because at Functioncode 'E' the Dynpro gives only ok_code back and no values to check them against the original wa (workarea).
I have tried to work with CALL FUNCTION 'DYNP_VALUES_READ' to read all the data manually, but the return values are all Char255 and I can't convert all values back in original data. I can convert most of them but not for all 😞
So here is the question:
Are there any other option to realize such a scenario like reading Dynpro values after PAI and Buttons with Functioncode 'E' or comparing the Dynpro values with workarea at this time???
I hope I can explain this question correctly and you have an answer for this problem.
Thanks a lot for helping.
Oliver Schmidt
2016 Aug 02 3:48 PM
Hello Oliver,
Try to do this using at-datar or let me know if it doesn't work.SY-DATAR is to be used along with a flag.
In PAI set flag using SY-DATAR.
ie
if sy-datar is not initial.
flag = 1.
endif.
Now in
Module exit_command..
if sy-datar is initial and flag is initial.
...
else.
.....
endif
endmodule
hiran.
Wow, thanks a lot Hiran Kumar Pabba and D. Chia.
Sometimes you work in one direction and you forget the simple things.
That's it and it helps me a lot.
Thank you very much.
Oliver
2016 Aug 02 3:00 PM
there is a system variable available and populated to 'X' when any screen field value(s) is changed/manipulated.
SY-DATAR
2016 Aug 02 3:48 PM
Hello Oliver,
Try to do this using at-datar or let me know if it doesn't work.SY-DATAR is to be used along with a flag.
In PAI set flag using SY-DATAR.
ie
if sy-datar is not initial.
flag = 1.
endif.
Now in
Module exit_command..
if sy-datar is initial and flag is initial.
...
else.
.....
endif
endmodule
hiran.
2016 Aug 02 10:27 PM
2016 Aug 03 7:11 AM
Wow, thanks a lot Hiran Kumar Pabba and D. Chia.
Sometimes you work in one direction and you forget the simple things.
That's it and it helps me a lot.
Thank you very much.
Oliver
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |