‎2006 Jan 13 4:24 PM
Hi,
In Include RV45PFZA, there is a user exit USEREXIT_SET_STATUS_VBUK. I want to enter code there that that will only be hit for Transaction VA01. This user exit is also hit for Transaction VKM3. Syst-tcode will work, but I was warned off it as when creating a new sales order through a BAPI, the transaction code will not be VA01. Is there any check that can be put in here to limit the code to only creating a new sales order.
Thanks,
Finbarr
‎2006 Jan 13 4:29 PM
HI,
You can write your code in
IF VBAK-VBTYP = 'C'. "This is for order only.
....
ENDIF.
‎2006 Jan 13 4:37 PM
No Good,
When I run va02 it contains C
When I run vkm3 it contains C
regards,
Finbarr
‎2006 Jan 13 4:46 PM
‎2006 Jan 13 4:50 PM
Hi ,
Can you check T180-TRTYP value in this user exit.
IF T180-TRTYP = 'H' means creation of Order then you can exclude it.
IF not you can export a parameter from VA01 and Import the parameter in this user exit and check either "SY-TCODE" or T180-TRTYP.
Lanka
‎2006 Jan 13 4:55 PM
Your solution is to combine Phani's and Lanka's conditions into one condition and use.
IF VBAK-VBTYP = 'C' AND T180-TRTYP = 'H'.
*-- only then do this
ENDIF.
‎2006 Jan 13 4:57 PM
I dont have access to T180 in my user exit.
An alternative that I am going to use is check is the order status is equal to A and only run the code if it is.
Thanks for your replies.
Regards,
Finbarr
‎2006 Jan 13 4:58 PM
Hi,
Srini's solution is Good . You can't set a condition on document type (AUART) bacuse you may have one or more documents types.
So check with Table T180 and document catge. (VBTYP).
Lanka