02-01-2007 12:26 PM
Hi All,
Please help me with the following issue.
Whenever there is a change made to the Sales Order, during the save event is there any flag that indicates, whether there was a change in the order.
I mean before the order getting saved, i am having an exit, where in i want a flag which will tell me that some change was made to the Order.
Regards
Rakesh.
02-01-2007 12:31 PM
Hi Rakesh,
Just see as a part of standard behavior, if no change is done, it will not trigger the User exit(I saw in the PO Change transaction). If it is not the case, cintinue your quest to find such indicator.
REgards,
Ravi
02-01-2007 12:48 PM
Rakesh,
Check system parameter DATAR (sy-datar). Usually if there is any change in the screen values the var sy-datar becomes 'X' else it remains blank.
The other option is to write a select query in the exit just before saving it. In the save exit you have the current values in tables VBAK or VBAP. You can select the previous values in different local internal tables using select query for the same SO and then compare their values.
02-01-2007 1:07 PM
Hi Rahul,
That flag would have helped. But my req is little more specific.
Its like I am making a change in Item Quantity - Press Enter and then going to
EXTRAS-OUTPUT-HEADER-EDIT ... here is there my routine is getting triggered. That routine is nothing but one created from VOFM transaction, a routine for controlling output type.
Now here is where i want to know whether any changes in Sales Order is made.
The system flag you told me is blank here... T185F-DATALOSS this is another flag which can tell us whether any data change has happend or not. But this also is blank when it comes to this exit.
Please help me.
Regards
Rakesh.
02-01-2007 1:26 PM
check entry T180-TRTYP
If field T180-TRTYP containss 'H', the document will be
created, else it will be changed.
IF T180-TRTYP = 'V'. "indicates change mode
LOOP AT XVBAP.
PEROFRM LOGIC.
ENDLOOP.
ENDIF..
logic can be incorparated for the changes to the fields.
regards,
vijay