SAP POS_SA_GET_DOCUMENT_STATUS Function Module for NOTRANSL: Status eines POS-Upload-Belegs ermitteln









POS_SA_GET_DOCUMENT_STATUS is a standard pos sa get document status SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Status eines POS-Upload-Belegs ermitteln processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for pos sa get document status FM, simply by entering the name POS_SA_GET_DOCUMENT_STATUS into the relevant SAP transaction such as SE37 or SE38.

Function Group: WPSA
Program Name: SAPLWPSA
Main Program:
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function POS_SA_GET_DOCUMENT_STATUS pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'POS_SA_GET_DOCUMENT_STATUS'"NOTRANSL: Status eines POS-Upload-Belegs ermitteln
EXPORTING
DOCNUM = "IDoc number
* SEGNUM = "First segment in document
* SEGNUM_END = "Last segment (only filled in case of error status)
MESTYP = "
* HISTORY_FLAG = "If set ('X'), read all versions
* INBOUND = "
* SNDPRN = "

IMPORTING
STATUS = "Status of POS inbound document
STATUS_DISP = "Status of POS inbound document for display
VERARBEND = "Last processed segment in IDoc
VERBUCHUNG = "
POSTED = "

TABLES
* DOC_STATUS = "Status of all documents in IDoc, output
* T_FOLDOC = "Follow-on documents of external documents, output
* DOC_HISTORY = "Change history of ext. doc., output
* DOC_REASON = "Document change reasons, output
* DOC_CHANGES = "Change history, output
* T_EDIDS = "EDI status records, output
* T_WPTST = "Parser ranges, output
* T_WPLST = "POS error messages, output
* T_EXTDOC = "External documents in IDoc, output
* T_UPLDOC = "Inbound documents for IDoc, output

EXCEPTIONS
IDOC_NOT_EXIST = 1 FOREIGN_LOCK = 2 UNKNOWN_EXCEPTION = 3 RANGE_NOT_EXIST = 4
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLWPSA_001 Change the Control for Document Links and POS Monitoring

IMPORTING Parameters details for POS_SA_GET_DOCUMENT_STATUS

DOCNUM - IDoc number

Data type: EDIDC-DOCNUM
Optional: No
Call by Reference: No ( called with pass by value option)

SEGNUM - First segment in document

Data type: EDIDD-SEGNUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

SEGNUM_END - Last segment (only filled in case of error status)

Data type: EDIDD-SEGNUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

MESTYP -

Data type: EDIDC-MESTYP
Optional: No
Call by Reference: No ( called with pass by value option)

HISTORY_FLAG - If set ('X'), read all versions

Data type: C
Optional: Yes
Call by Reference: No ( called with pass by value option)

INBOUND -

Data type: C
Optional: Yes
Call by Reference: No ( called with pass by value option)

SNDPRN -

Data type: EDIDC-SNDPRN
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for POS_SA_GET_DOCUMENT_STATUS

STATUS - Status of POS inbound document

Data type: POSWPSA-STATUS
Optional: No
Call by Reference: No ( called with pass by value option)

STATUS_DISP - Status of POS inbound document for display

Data type: POSWPSA-STATUS
Optional: No
Call by Reference: No ( called with pass by value option)

VERARBEND - Last processed segment in IDoc

Data type: WPTST-VERARBEND
Optional: No
Call by Reference: No ( called with pass by value option)

VERBUCHUNG -

Data type: WPTST-VERBUCHUNG
Optional: No
Call by Reference: No ( called with pass by value option)

POSTED -

Data type: POSWPSA-POSTED
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for POS_SA_GET_DOCUMENT_STATUS

DOC_STATUS - Status of all documents in IDoc, output

Data type: WPUSA_T_DOC_STATUS
Optional: Yes
Call by Reference: No ( called with pass by value option)

T_FOLDOC - Follow-on documents of external documents, output

Data type: WPUSA_T_FOLDOC
Optional: Yes
Call by Reference: No ( called with pass by value option)

DOC_HISTORY - Change history of ext. doc., output

Data type: WPUSA_T_DOC_HISTORY
Optional: Yes
Call by Reference: No ( called with pass by value option)

DOC_REASON - Document change reasons, output

Data type: WPUSA_T_DOC_REASON
Optional: Yes
Call by Reference: No ( called with pass by value option)

DOC_CHANGES - Change history, output

Data type: WPUSA_T_DOC_CHANGES
Optional: Yes
Call by Reference: No ( called with pass by value option)

T_EDIDS - EDI status records, output

Data type: WPUSA_T_EDIDS
Optional: Yes
Call by Reference: No ( called with pass by value option)

T_WPTST - Parser ranges, output

Data type: WPUSA_T_WPTST
Optional: Yes
Call by Reference: No ( called with pass by value option)

T_WPLST - POS error messages, output

Data type: WPUSA_T_WPLST
Optional: Yes
Call by Reference: No ( called with pass by value option)

T_EXTDOC - External documents in IDoc, output

Data type: WPUSA_T_EXTDOC
Optional: Yes
Call by Reference: No ( called with pass by value option)

T_UPLDOC - Inbound documents for IDoc, output

Data type: WPUSA_T_UPLDOC
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

IDOC_NOT_EXIST -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FOREIGN_LOCK -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

UNKNOWN_EXCEPTION -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

RANGE_NOT_EXIST -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for POS_SA_GET_DOCUMENT_STATUS Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_docnum  TYPE EDIDC-DOCNUM, "   
lv_status  TYPE POSWPSA-STATUS, "   
lt_doc_status  TYPE STANDARD TABLE OF WPUSA_T_DOC_STATUS, "   
lv_idoc_not_exist  TYPE WPUSA_T_DOC_STATUS, "   
lt_t_foldoc  TYPE STANDARD TABLE OF WPUSA_T_FOLDOC, "   
lv_segnum  TYPE EDIDD-SEGNUM, "   
lt_doc_history  TYPE STANDARD TABLE OF WPUSA_T_DOC_HISTORY, "   
lv_status_disp  TYPE POSWPSA-STATUS, "   
lv_foreign_lock  TYPE POSWPSA, "   
lv_verarbend  TYPE WPTST-VERARBEND, "   
lt_doc_reason  TYPE STANDARD TABLE OF WPUSA_T_DOC_REASON, "   
lv_segnum_end  TYPE EDIDD-SEGNUM, "   
lv_unknown_exception  TYPE EDIDD, "   
lv_mestyp  TYPE EDIDC-MESTYP, "   
lv_verbuchung  TYPE WPTST-VERBUCHUNG, "   
lt_doc_changes  TYPE STANDARD TABLE OF WPUSA_T_DOC_CHANGES, "   
lv_range_not_exist  TYPE WPUSA_T_DOC_CHANGES, "   
lv_posted  TYPE POSWPSA-POSTED, "   
lt_t_edids  TYPE STANDARD TABLE OF WPUSA_T_EDIDS, "   
lv_history_flag  TYPE C, "   
lv_inbound  TYPE C, "   
lt_t_wptst  TYPE STANDARD TABLE OF WPUSA_T_WPTST, "   
lv_sndprn  TYPE EDIDC-SNDPRN, "   
lt_t_wplst  TYPE STANDARD TABLE OF WPUSA_T_WPLST, "   
lt_t_extdoc  TYPE STANDARD TABLE OF WPUSA_T_EXTDOC, "   
lt_t_upldoc  TYPE STANDARD TABLE OF WPUSA_T_UPLDOC. "   

  CALL FUNCTION 'POS_SA_GET_DOCUMENT_STATUS'  "NOTRANSL: Status eines POS-Upload-Belegs ermitteln
    EXPORTING
         DOCNUM = lv_docnum
         SEGNUM = lv_segnum
         SEGNUM_END = lv_segnum_end
         MESTYP = lv_mestyp
         HISTORY_FLAG = lv_history_flag
         INBOUND = lv_inbound
         SNDPRN = lv_sndprn
    IMPORTING
         STATUS = lv_status
         STATUS_DISP = lv_status_disp
         VERARBEND = lv_verarbend
         VERBUCHUNG = lv_verbuchung
         POSTED = lv_posted
    TABLES
         DOC_STATUS = lt_doc_status
         T_FOLDOC = lt_t_foldoc
         DOC_HISTORY = lt_doc_history
         DOC_REASON = lt_doc_reason
         DOC_CHANGES = lt_doc_changes
         T_EDIDS = lt_t_edids
         T_WPTST = lt_t_wptst
         T_WPLST = lt_t_wplst
         T_EXTDOC = lt_t_extdoc
         T_UPLDOC = lt_t_upldoc
    EXCEPTIONS
        IDOC_NOT_EXIST = 1
        FOREIGN_LOCK = 2
        UNKNOWN_EXCEPTION = 3
        RANGE_NOT_EXIST = 4
. " POS_SA_GET_DOCUMENT_STATUS




ABAP code using 7.40 inline data declarations to call FM POS_SA_GET_DOCUMENT_STATUS

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single DOCNUM FROM EDIDC INTO @DATA(ld_docnum).
 
"SELECT single STATUS FROM POSWPSA INTO @DATA(ld_status).
 
 
 
 
"SELECT single SEGNUM FROM EDIDD INTO @DATA(ld_segnum).
 
 
"SELECT single STATUS FROM POSWPSA INTO @DATA(ld_status_disp).
 
 
"SELECT single VERARBEND FROM WPTST INTO @DATA(ld_verarbend).
 
 
"SELECT single SEGNUM FROM EDIDD INTO @DATA(ld_segnum_end).
 
 
"SELECT single MESTYP FROM EDIDC INTO @DATA(ld_mestyp).
 
"SELECT single VERBUCHUNG FROM WPTST INTO @DATA(ld_verbuchung).
 
 
 
"SELECT single POSTED FROM POSWPSA INTO @DATA(ld_posted).
 
 
 
 
 
"SELECT single SNDPRN FROM EDIDC INTO @DATA(ld_sndprn).
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!