Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
Showing results for 
Search instead for 
Did you mean: 
Former Member

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,

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

Approach :

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

Code Snippet is,


TABLES : nast.

FORM entry_pdf  USING    return_code


  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.



            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


            message_type_not_valid = 01

            no_sy_message          = 02.

        return_code = 4.




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'.

1 Comment
Labels in this area