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: 

Processing log is not getting updated 'NAST_PROTOCOL_UPDATE'

former_member705122
Active Contributor
0 Kudos

Hello,

We are updating the messages through NAST_PROTOCOL_UPDATE for certain output type (assume Z001).

I can see the entry is getting updated in NAST table but not able to see the processing log for the same.

Any inputs will be appreciated.

@aadil

8 REPLIES 8

Former Member
0 Kudos

I assume you want to update log with the error message if print output fails.

Then please put following code after FM call for smartform.

IF sy-subrc <> 0.

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

OTHERS = 1.

DATA: LT_ERRORTAB TYPE TSFERROR.

  • DATA: LF_MSGNR TYPE SY-MSGNO.

FIELD-SYMBOLS: <FS_ERRORTAB> TYPE LINE OF TSFERROR.

  • get smart form protocoll

CALL FUNCTION 'SSF_READ_ERRORS'

IMPORTING

ERRORTAB = LT_ERRORTAB.

  • add smartform protocoll to nast protocoll

LOOP AT LT_ERRORTAB ASSIGNING <FS_ERRORTAB>.

  • CLEAR LF_MSGNR.

  • LF_MSGNR = <FS_ERRORTAB>-ERRNUMBER.

CALL FUNCTION 'NAST_PROTOCOL_UPDATE'

EXPORTING

MSG_ARBGB = <FS_ERRORTAB

0 Kudos

@Sachin,

Code is already placed accordingly and it is updating the NAST table. Only thing processing log is not getting displayed.

Former Member
0 Kudos

I assume you want to update log

0 Kudos

Sorry... it Seems there is some problem with my net connection.. post is getting posted multiple times...

Former Member
0 Kudos

I assume you want to update log

Former Member
0 Kudos

I assume you want to update log

Former Member
0 Kudos

I assume you want to update log

cesarscheck
Participant
0 Kudos

Hi Syed,

Once you have updated the NAST table you can insert entries in the log on table CMFP.

Select the field CMFPNR from NAST table from your entry.

Then create an entry in table CMPF like this:

Data:

e_cmfp TYPE cmfp.

  "In my example the aplid is WFMC. You can discover what is yours using the CMFPNR from NAST

  "on a search in table CMFP.

   e_cmfp-aplid = 'WFMC'.

    e_cmfp-nr = e_nast-cmfpnr.

    e_cmfp-msgcnt = lv_max_msgcnt. "--> Try search for the max MSGCNT from CMFP

    e_cmfp-arbgb = sy-msgid.

    e_cmfp-msgty = sy-msgty.

    e_cmfp-msgnr = sy-msgno.

    e_cmfp-msgv1 = sy-msgv1.

    e_cmfp-msgv2 = sy-msgv2.

    e_cmfp-msgv3 = sy-msgv3.

    e_cmfp-msgv4 = sy-msgv4.

    INSERT cmfp FROM e_cmfp.

Better late than never.

Regards,