SAP PCA_DOCUMENT_TYPE_CHECK Function Module for
PCA_DOCUMENT_TYPE_CHECK is a standard pca document type check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 pca document type check FM, simply by entering the name PCA_DOCUMENT_TYPE_CHECK into the relevant SAP transaction such as SE37 or SE38.
Function Group: PCPO
Program Name: SAPLPCPO
Main Program: SAPLPCPO
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function PCA_DOCUMENT_TYPE_CHECK 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 'PCA_DOCUMENT_TYPE_CHECK'".
EXPORTING
I_DOCTY = "
I_PLACT = "
* I_RBUKRS = ' ' "
* I_RYEAR = ' ' "
* I_DOCNR = ' ' "
* I_TEXTFLAG = ' ' "
* I_LANGU = SY-LANGU "
IMPORTING
E_T889 = "
E_T889A = "
E_NRIV = "
E_BLTXT = "
EXCEPTIONS
DOCTY_NOT_VALID = 1 WRONG_PLACT = 2 OBJECT_NOT_VALID = 3 NO_RANGE_FOUND = 4 DOCNR_ALREADY_EXIST = 5 INTERNAL_NUMBER_RANGE = 6 MISSING_DOCNR = 7 EXTERNAL_NUMBER_NOT_ALLOWED = 8 WRONG_PARAMETER = 9
IMPORTING Parameters details for PCA_DOCUMENT_TYPE_CHECK
I_DOCTY -
Data type: T889-DOCTYOptional: No
Call by Reference: No ( called with pass by value option)
I_PLACT -
Data type: T889-PLACTOptional: No
Call by Reference: No ( called with pass by value option)
I_RBUKRS -
Data type: GLPCT-RBUKRSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_RYEAR -
Data type: GLPCT-RYEARDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_DOCNR -
Data type: GLPCA-DOCNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_TEXTFLAG -
Data type: SY-DATARDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_LANGU -
Data type: SY-LANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for PCA_DOCUMENT_TYPE_CHECK
E_T889 -
Data type: T889Optional: No
Call by Reference: No ( called with pass by value option)
E_T889A -
Data type: T889AOptional: No
Call by Reference: No ( called with pass by value option)
E_NRIV -
Data type: NRIVOptional: No
Call by Reference: No ( called with pass by value option)
E_BLTXT -
Data type: T889TE-TXTOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
DOCTY_NOT_VALID -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_PLACT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_NOT_VALID -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_RANGE_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DOCNR_ALREADY_EXIST -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERNAL_NUMBER_RANGE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MISSING_DOCNR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXTERNAL_NUMBER_NOT_ALLOWED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_PARAMETER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for PCA_DOCUMENT_TYPE_CHECK 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_e_t889 | TYPE T889, " | |||
| lv_i_docty | TYPE T889-DOCTY, " | |||
| lv_docty_not_valid | TYPE T889, " | |||
| lv_e_t889a | TYPE T889A, " | |||
| lv_i_plact | TYPE T889-PLACT, " | |||
| lv_wrong_plact | TYPE T889, " | |||
| lv_e_nriv | TYPE NRIV, " | |||
| lv_i_rbukrs | TYPE GLPCT-RBUKRS, " SPACE | |||
| lv_object_not_valid | TYPE GLPCT, " | |||
| lv_e_bltxt | TYPE T889TE-TXT, " | |||
| lv_i_ryear | TYPE GLPCT-RYEAR, " SPACE | |||
| lv_no_range_found | TYPE GLPCT, " | |||
| lv_i_docnr | TYPE GLPCA-DOCNR, " SPACE | |||
| lv_docnr_already_exist | TYPE GLPCA, " | |||
| lv_i_textflag | TYPE SY-DATAR, " SPACE | |||
| lv_internal_number_range | TYPE SY, " | |||
| lv_i_langu | TYPE SY-LANGU, " SY-LANGU | |||
| lv_missing_docnr | TYPE SY, " | |||
| lv_external_number_not_allowed | TYPE SY, " | |||
| lv_wrong_parameter | TYPE SY. " |
|   CALL FUNCTION 'PCA_DOCUMENT_TYPE_CHECK' " |
| EXPORTING | ||
| I_DOCTY | = lv_i_docty | |
| I_PLACT | = lv_i_plact | |
| I_RBUKRS | = lv_i_rbukrs | |
| I_RYEAR | = lv_i_ryear | |
| I_DOCNR | = lv_i_docnr | |
| I_TEXTFLAG | = lv_i_textflag | |
| I_LANGU | = lv_i_langu | |
| IMPORTING | ||
| E_T889 | = lv_e_t889 | |
| E_T889A | = lv_e_t889a | |
| E_NRIV | = lv_e_nriv | |
| E_BLTXT | = lv_e_bltxt | |
| EXCEPTIONS | ||
| DOCTY_NOT_VALID = 1 | ||
| WRONG_PLACT = 2 | ||
| OBJECT_NOT_VALID = 3 | ||
| NO_RANGE_FOUND = 4 | ||
| DOCNR_ALREADY_EXIST = 5 | ||
| INTERNAL_NUMBER_RANGE = 6 | ||
| MISSING_DOCNR = 7 | ||
| EXTERNAL_NUMBER_NOT_ALLOWED = 8 | ||
| WRONG_PARAMETER = 9 | ||
| . " PCA_DOCUMENT_TYPE_CHECK | ||
ABAP code using 7.40 inline data declarations to call FM PCA_DOCUMENT_TYPE_CHECK
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 DOCTY FROM T889 INTO @DATA(ld_i_docty). | ||||
| "SELECT single PLACT FROM T889 INTO @DATA(ld_i_plact). | ||||
| "SELECT single RBUKRS FROM GLPCT INTO @DATA(ld_i_rbukrs). | ||||
| DATA(ld_i_rbukrs) | = ' '. | |||
| "SELECT single TXT FROM T889TE INTO @DATA(ld_e_bltxt). | ||||
| "SELECT single RYEAR FROM GLPCT INTO @DATA(ld_i_ryear). | ||||
| DATA(ld_i_ryear) | = ' '. | |||
| "SELECT single DOCNR FROM GLPCA INTO @DATA(ld_i_docnr). | ||||
| DATA(ld_i_docnr) | = ' '. | |||
| "SELECT single DATAR FROM SY INTO @DATA(ld_i_textflag). | ||||
| DATA(ld_i_textflag) | = ' '. | |||
| "SELECT single LANGU FROM SY INTO @DATA(ld_i_langu). | ||||
| DATA(ld_i_langu) | = SY-LANGU. | |||
Search for further information about these or an SAP related objects