SAPHub

Use of SY-TCODE in Delivery Processing User-Exits

According to SAP Note 209846, it is possible to switch between display mode and change mode of the delivery without leaving the screen currently edited.

However, the transaction code (SY-TCODE) set by the system does not change for switching between the display mode and the change mode. In the user exits of the delivery, if you have programmed source code depending on SY-TCODE, malfunctions can occur.

The SAP Note also specifies the possible below solution to switch the modes

In your user exits, use field T180-TRTYP instead of field SY-TCODE. This field has the following characteristics depending on the processing mode:

If a differentiation should be required whether the creation of the delivery is carried out online (Transaction VL01N) or is carried out in collective processing (Transaction VL10x), use the V50AGL-SAMMELGANG flag in addition:

The mentioned advice works for the new and the old delivery dialog and for inbound and outbound delivery in the same way.