Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

NAST_PROTOCOL_UPDATE - How to use?

Former Member

Hi,

What data should be sent to Function Module NAST_PROTOCOL_UPDATE?

CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
  EXPORTING
    msg_arbgb = sy-msgid
    msg_nr    = sy-msgno
    msg_ty    = sy-msgty
    msg_v1    = sy-msgv1
    msg_v2    = sy-msgv2
    msg_v3    = sy-msgv3
    msg_v4    = sy-msgv4
  EXCEPTIONS
    OTHERS    = 1.

I want to create a message in nast with the the success or not success status. What do I send?

Thanks,

John

5 REPLIES 5

amit_khare
Active Contributor

after executing the PRINT you may call this FM.

either pass the return values directly to this or build your own message to pass to this FM.

Best example is to look into report RSNAST00.

0 Kudos

Thanks.

So does this just display a message or does it update the Nast table?

0 Kudos

updates Nast

0 Kudos

I am sending data, but its not updating the NAST table

Example:

SY-MSGID = 'VN'.
  SY-MSGNO = '73'.
  SY-MSGTY = 'I'.

* NAST error message
  CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
    EXPORTING
  MSG_ARBGB                    = sy-msgid
  MSG_NR                       = sy-msgno
  MSG_TY                       = sy-msgty

Former Member

Hi,

You should do the following..to update the messages ..

1. Initialize

CALL FUNCTION 'NAST_PROTOCOL_INITIALIZE'.

2.

* Update the messages.
      CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
           EXPORTING
                MSG_ARBGB = SY-MSGID
                MSG_NR    = SY-MSGNO
                MSG_TY    = SY-MSGTY
                MSG_V1    = SY-MSGV1
                MSG_V2    = SY-MSGV2
           EXCEPTIONS
                OTHERS    = 0.

3.

* Update the messages to the database.
   CALL FUNCTION 'NAST_PROTOCOL_STORE'
        IMPORTING
             MSG_CMFPNR         = NAST-CMFPNR
        EXCEPTIONS
             NO_PROTOCOL_UPDATE = 01.

4. Update the CMFPNR field with the value got from the function module in Step 3 in the table NAST-CMFPNR. This can be achieved using the function module RV_MESSAGE_UPDATE, which will update the NAST table..

Thanks

Naren