Determining SAP Sales Order Processing Mode

When adding custom fields or performing field validations in SAP sales orders it is important to know if the transaction was launched in Display, Create, or Change Mode.  This can be done by hard coding a check for transaction codes, however this leaves a gap if a custom transaction, mass update process, BAPI, RFC, etc. is used to perform changes.

The field XVBAK_UPDKZ is populed with a the letter I during Create Mode ( VA01 ), the letter U during change mode ( VA02 ) and is blank during display mode.

This method works well for Sales Order processing but does not work for quotations, as XVBAK_UPDKZ is never populated with values when performing transaction VA21, VA22, and VA23.  A technique that SAP frequently uses is to check table T180 to determine if the transaction code is display related ( T180-TRTYP = ‘A’ ).  This method can work for both Sales Orders and Quotations.

Leave a Reply