Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

VA02 - Sale Order Change Flag ?

Former Member
0 Kudos

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.

4 REPLIES 4

former_member181962
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

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.

0 Kudos

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