‎2011 Mar 08 9:57 AM
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
‎2011 Mar 08 10:02 AM
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
‎2011 Mar 08 10:13 AM
@Sachin,
Code is already placed accordingly and it is updating the NAST table. Only thing processing log is not getting displayed.
‎2011 Mar 08 10:02 AM
‎2011 Mar 08 10:10 AM
Sorry... it Seems there is some problem with my net connection.. post is getting posted multiple times...
‎2011 Mar 08 10:02 AM
‎2011 Mar 08 10:02 AM
‎2011 Mar 08 10:02 AM
‎2016 Jun 01 1:27 PM
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,