2014 Feb 10 6:16 PM
Hi all,
I have added a sub-screen in XQQM function module for the scrap notification. Here the user inputs the data in table control and saves using QM01.Now in QM02 the screen shot is as follows
Now when user changes any value and performs any action other than save, i want to use FM POPUP_TO_CONFIRM. here my problem is how to know whether the value of a particular field is changed or not and the field may be part of the table control item or an individual field.Here my intension is if any thing is changed then i want to inform the user else i want to display message no changes done(if clicked on save).
Thanks in advance
Mallikarjun Reddy G
2014 Feb 10 6:20 PM
Check if SY-DATAR works for you it gets set if you change anything on screen. Please check
Check if SY-DATAR works for you it gets set if you change anything on screen. Please check
2014 Feb 10 6:20 PM
Check if SY-DATAR works for you it gets set if you change anything on screen. Please check
2014 Feb 10 6:30 PM
Thank you Nabheet,earlier i checked with that system field but could not find.Now again i checked its so far returning the value 'X'. Thanks for your reply
2014 Feb 11 6:00 PM
hi nabheet,
here sy-datar is not working in my screen. see the following code.
PROCESS AFTER INPUT.
MODULE CHECK_CHANGE INPUT.
IF SY-DATAR = 'X'.
CLEAR CHANGE_FLAG.
CHANGE_FLAG = SY-DATAR.
ENDIF.
ENDMODULE.
But the value for sy-datar is always 'X' even i am not changing any field either in table control or an individual field(Not part of table control). Here i am selecting the row in table control.whenever i am selecting the row its returning 'X'.can you please let me know.
Thanks in advance
Mallikarjun Reddy
2014 Feb 11 6:09 PM
Hi Mallikarjun
So it becomes X even if you select some row in table control...correct I think a better and safe solution will be to follow how SAP standard does in case of sales order etc...all header fields should be part of work area XWA/YWA(X signifies new/updated data Y means old) and all table control data in XTC[]/YTC[]. You can have initially same header data in XWA and YWA in PAI update XWA check if XWA ne YWA means something changed. Same goes for internal table.
A reliable way of checking
Nabheet
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |