Skip to Content
Author's profile photo Former Member

Error Message in Processing Log when Output Generation Fails for Delivery Item.

We always have some requirement to display custom forms for custom output types in case of deliveries. In case the Output is not generated we need a way to log the same. The shown code achieves the same using ‘NAST_PROTOCOL_UPDATE’ FM.

Result :

When an output type fails to issue output the entry is seen in red as,

Ped_1.png

The cause can be seen in Processing Log on selecting the entry as,

Ped_2.png

Approach :

Above functionality can be achieved by using standard FM ‘NAST_PROTOCOL_UPDATE’ appropriately.

Code Snippet is,

REPORT  Z_NAST_PROTOCOL_DEMO..

TABLES : nast.

FORM entry_pdf  USING    return_code

                     us_screen.

  CLEAR return_code.

*– Check for the Condition for which the output should not be issued

IF  <above condition > EQ 1.

CLEAR: syst-msgid, syst-msgno, syst-msgty, syst-msgv1,

                       syst-msgv2, syst-msgv3, syst-msgv4.

        syst-msgid = ‘ZXX’  ” Pass the SE91 Message Class’s Name

        syst-msgty = ‘E’     ” Pass as ‘E’ for Error

        syst-msgno = 001. ” Pass the Message Number in the SE91 Class.

        CALL FUNCTION ‘NAST_PROTOCOL_UPDATE’

          EXPORTING

            msg_arbgb            = syst-msgid

            msg_nr                 = syst-msgno

            msg_ty                 = syst-msgty

            msg_v1                 = syst-msgv1

            msg_v2                 = syst-msgv2

            msg_v3                 = syst-msgv3

            msg_v4                 = syst-msgv4

          EXCEPTIONS

            message_type_not_valid = 01

            no_sy_message          = 02.

        return_code = 4.

        EXIT.

ENDIF.

ENDFORM.

Configuration :

In the sample shown, following configuration was done,

* Creation of custom output type ‘ZPED’ and attaching it to delivery item using transaction ‘NACE’ for application ‘V2’.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Ravi Ranjan kumar
      Ravi Ranjan kumar

      i wants to update my processing log for my purchase order .