Any help will be appreciated. Thanks.
Requires Free Membership to View
When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.
Hannah Smalltree, Editorial DirectorSee this nice little function below, that fills the IDOC_STATUS table appropriately from values that are compatible with the SY-MSGV1 …..
function Z_LOGOS_IDOC_STATUS_FILL.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(DOCNUM) TYPE EDIDC-DOCNUM OPTIONAL
*" VALUE(STATUS) OPTIONAL
*" VALUE(STATUS_ERROR) OPTIONAL
*" VALUE(MSGID) OPTIONAL
*" VALUE(MSGTY) OPTIONAL
*" VALUE(MSGNO) OPTIONAL
*" VALUE(MSGV1) OPTIONAL
*" VALUE(MSGV2) OPTIONAL
*" VALUE(MSGV3) OPTIONAL
*" VALUE(MSGV4) OPTIONAL
*" VALUE(APPL_LOG) TYPE BALOGNR OPTIONAL
*" TABLES
*" IDOC_STATUS STRUCTURE BDIDOCSTAT OPTIONAL
*"----------------------------------------------------------------------
*
clear IDOC_STATUS.
IDOC_STATUS-DOCNUM = DOCNUM.
IDOC_STATUS-STATUS = STATUS.
IDOC_STATUS-MSGTY = MSGTY.
if MSGTY ca 'EAX' and not STATUS_ERROR is initial.
IDOC_STATUS-STATUS = STATUS_ERROR.
endif.
IDOC_STATUS-MSGID = MSGID.
IDOC_STATUS-MSGNO = MSGNO.
IDOC_STATUS-MSGV1 = MSGV1.
IDOC_STATUS-MSGV2 = MSGV2.
IDOC_STATUS-MSGV3 = MSGV3.
IDOC_STATUS-MSGV4 = MSGV4.
IDOC_STATUS-APPL_LOG = APPL_LOG.
append IDOC_STATUS.
*
endfunction.This was first published in July 2006