SAP ERPSLS_OBJSTAT_DOC Function Module for NOTRANSL: Vertriebsbelege: Selektion über Objektstatus
ERPSLS_OBJSTAT_DOC is a standard erpsls objstat doc 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: Vertriebsbelege: Selektion über Objektstatus 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 erpsls objstat doc FM, simply by entering the name ERPSLS_OBJSTAT_DOC into the relevant SAP transaction such as SE37 or SE38.
Function Group: ERP_SLS_DOC01
Program Name: SAPLERP_SLS_DOC01
Main Program: SAPLERP_SLS_DOC01
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ERPSLS_OBJSTAT_DOC 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 'ERPSLS_OBJSTAT_DOC'"NOTRANSL: Vertriebsbelege: Selektion über Objektstatus.
EXPORTING
* IT_RG_VKORG = "Range Table: CHAR4
* IT_RG_AUDAT = "Range Table: Date
* IT_RG_ERNAM = "Range Table: CHAR12
* IT_RG_ERDAT = "Range Table: Date
* IV_ZPAVW = "Partner function of the person responsible for the transact.
* IT_RG_ZPERS = "Range Table for Data Element PERNR_D
* IT_RG_AUART = "Range Table for Data Element AUART
* IV_DATAB = "Quotation or contract valid from
* IV_DATBI = "Quotation or Contract Valid to
* IS_OBJSTATUS = "Sales Document: Parameters for Object Status
* IT_RG_VTWEG = "Range Table: CHAR2
* IT_RG_SPART = "Range Table: CHAR2
* IT_RG_VKBUR = "Range Table: CHAR4
* IT_RG_VKGRP = "Range Table: CHAR3
* IT_RG_KUNAG = "Range Table for Data Element KUNAG
* IT_RG_BSTKD = "Range Table for Data Element BSTKD
* IT_RG_VBELN = "Range Table: CHAR10
* IT_RG_TRVOG = "Range Table: CHAR1
IMPORTING
ET_OBJSTAT_DOC = "Table Type for Structure TDS_OBJSTAT_DOC
ET_OBJSTAT_DETAIL = "Table Type for Structure TDS_OBJSTAT_DETAIL
EXCEPTIONS
INVALID_OBJSTAT = 1 NO_DATA = 2
IMPORTING Parameters details for ERPSLS_OBJSTAT_DOC
IT_RG_VKORG - Range Table: CHAR4
Data type: TRG_CHAR4Optional: Yes
Call by Reference: Yes
IT_RG_AUDAT - Range Table: Date
Data type: TRG_DATEOptional: Yes
Call by Reference: Yes
IT_RG_ERNAM - Range Table: CHAR12
Data type: TRG_CHAR12Optional: Yes
Call by Reference: Yes
IT_RG_ERDAT - Range Table: Date
Data type: TRG_DATEOptional: Yes
Call by Reference: Yes
IV_ZPAVW - Partner function of the person responsible for the transact.
Data type: DZUPAROptional: Yes
Call by Reference: Yes
IT_RG_ZPERS - Range Table for Data Element PERNR_D
Data type: TDT_RG_PERNROptional: Yes
Call by Reference: Yes
IT_RG_AUART - Range Table for Data Element AUART
Data type: TDT_RG_AUARTOptional: Yes
Call by Reference: Yes
IV_DATAB - Quotation or contract valid from
Data type: DATAB_VIOptional: Yes
Call by Reference: Yes
IV_DATBI - Quotation or Contract Valid to
Data type: DATBI_VIOptional: Yes
Call by Reference: Yes
IS_OBJSTATUS - Sales Document: Parameters for Object Status
Data type: SLS_PAR_OBJSTATUSOptional: Yes
Call by Reference: Yes
IT_RG_VTWEG - Range Table: CHAR2
Data type: TRG_CHAR2Optional: Yes
Call by Reference: Yes
IT_RG_SPART - Range Table: CHAR2
Data type: TRG_CHAR2Optional: Yes
Call by Reference: Yes
IT_RG_VKBUR - Range Table: CHAR4
Data type: TRG_CHAR4Optional: Yes
Call by Reference: Yes
IT_RG_VKGRP - Range Table: CHAR3
Data type: TRG_CHAR3Optional: Yes
Call by Reference: Yes
IT_RG_KUNAG - Range Table for Data Element KUNAG
Data type: TDT_RG_KUNAGOptional: Yes
Call by Reference: Yes
IT_RG_BSTKD - Range Table for Data Element BSTKD
Data type: TDT_RG_BSTKDOptional: Yes
Call by Reference: Yes
IT_RG_VBELN - Range Table: CHAR10
Data type: TRG_CHAR10Optional: Yes
Call by Reference: Yes
IT_RG_TRVOG - Range Table: CHAR1
Data type: TRG_CHAR1Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for ERPSLS_OBJSTAT_DOC
ET_OBJSTAT_DOC - Table Type for Structure TDS_OBJSTAT_DOC
Data type: TDT_OBJSTAT_DOCOptional: No
Call by Reference: Yes
ET_OBJSTAT_DETAIL - Table Type for Structure TDS_OBJSTAT_DETAIL
Data type: TDT_OBJSTAT_DETAILOptional: No
Call by Reference: Yes
EXCEPTIONS details
INVALID_OBJSTAT -
Data type:Optional: No
Call by Reference: Yes
NO_DATA - No data selected
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for ERPSLS_OBJSTAT_DOC 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_it_rg_vkorg | TYPE TRG_CHAR4, " | |||
| lv_et_objstat_doc | TYPE TDT_OBJSTAT_DOC, " | |||
| lv_invalid_objstat | TYPE TDT_OBJSTAT_DOC, " | |||
| lv_it_rg_audat | TYPE TRG_DATE, " | |||
| lv_it_rg_ernam | TYPE TRG_CHAR12, " | |||
| lv_it_rg_erdat | TYPE TRG_DATE, " | |||
| lv_iv_zpavw | TYPE DZUPAR, " | |||
| lv_it_rg_zpers | TYPE TDT_RG_PERNR, " | |||
| lv_it_rg_auart | TYPE TDT_RG_AUART, " | |||
| lv_iv_datab | TYPE DATAB_VI, " | |||
| lv_iv_datbi | TYPE DATBI_VI, " | |||
| lv_is_objstatus | TYPE SLS_PAR_OBJSTATUS, " | |||
| lv_no_data | TYPE SLS_PAR_OBJSTATUS, " | |||
| lv_it_rg_vtweg | TYPE TRG_CHAR2, " | |||
| lv_et_objstat_detail | TYPE TDT_OBJSTAT_DETAIL, " | |||
| lv_it_rg_spart | TYPE TRG_CHAR2, " | |||
| lv_it_rg_vkbur | TYPE TRG_CHAR4, " | |||
| lv_it_rg_vkgrp | TYPE TRG_CHAR3, " | |||
| lv_it_rg_kunag | TYPE TDT_RG_KUNAG, " | |||
| lv_it_rg_bstkd | TYPE TDT_RG_BSTKD, " | |||
| lv_it_rg_vbeln | TYPE TRG_CHAR10, " | |||
| lv_it_rg_trvog | TYPE TRG_CHAR1. " |
|   CALL FUNCTION 'ERPSLS_OBJSTAT_DOC' "NOTRANSL: Vertriebsbelege: Selektion über Objektstatus |
| EXPORTING | ||
| IT_RG_VKORG | = lv_it_rg_vkorg | |
| IT_RG_AUDAT | = lv_it_rg_audat | |
| IT_RG_ERNAM | = lv_it_rg_ernam | |
| IT_RG_ERDAT | = lv_it_rg_erdat | |
| IV_ZPAVW | = lv_iv_zpavw | |
| IT_RG_ZPERS | = lv_it_rg_zpers | |
| IT_RG_AUART | = lv_it_rg_auart | |
| IV_DATAB | = lv_iv_datab | |
| IV_DATBI | = lv_iv_datbi | |
| IS_OBJSTATUS | = lv_is_objstatus | |
| IT_RG_VTWEG | = lv_it_rg_vtweg | |
| IT_RG_SPART | = lv_it_rg_spart | |
| IT_RG_VKBUR | = lv_it_rg_vkbur | |
| IT_RG_VKGRP | = lv_it_rg_vkgrp | |
| IT_RG_KUNAG | = lv_it_rg_kunag | |
| IT_RG_BSTKD | = lv_it_rg_bstkd | |
| IT_RG_VBELN | = lv_it_rg_vbeln | |
| IT_RG_TRVOG | = lv_it_rg_trvog | |
| IMPORTING | ||
| ET_OBJSTAT_DOC | = lv_et_objstat_doc | |
| ET_OBJSTAT_DETAIL | = lv_et_objstat_detail | |
| EXCEPTIONS | ||
| INVALID_OBJSTAT = 1 | ||
| NO_DATA = 2 | ||
| . " ERPSLS_OBJSTAT_DOC | ||
ABAP code using 7.40 inline data declarations to call FM ERPSLS_OBJSTAT_DOC
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.Search for further information about these or an SAP related objects