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: 

How to Identify a sales order is in Change mode without looking at T-code

Former Member
0 Kudos

Hi Gurus,

I have a requirement we have the code in place to behave differently when it is in VA01 and VA02 in an user exit_save_document.

we are having trouble to trigger the code when the sales order is modified or created by a BAPI.

The check in the user exit is dependent on the T-code but when the BAPI runs it will be either the report T-code or se38 so how we can figure out without looking at T-Code in which mode the Sales order is opened i.,e Create or Change

3 REPLIES 3

Former Member
0 Kudos

Hi,

You can check the structure T180-TRTYP = 'V' for change and 'H' for create..

Thanks

Naren

0 Kudos

Hi thanks For the response

But the t180 structure is visible when we use the T-code but when we try to use the BAPI it is not behaving in the same fashion so there is no way to check that.

Former Member
0 Kudos

HI,

You don't have to select the data from T180...

Just use the field T180-TRTYP in the sales order user exit...The value will already be populated by SAP..

Thanks

Naren