SAP Function Modules

PCA_ACTUAL_DOCUMENT_SHOW SAP Function module







PCA_ACTUAL_DOCUMENT_SHOW is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name PCA_ACTUAL_DOCUMENT_SHOW into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: PCDS
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM PCA_ACTUAL_DOCUMENT_SHOW - PCA ACTUAL DOCUMENT SHOW





CALL FUNCTION 'PCA_ACTUAL_DOCUMENT_SHOW' "
  EXPORTING
    i_bukrs =                   " glpca-rbukrs
    i_year =                    " glpca-ryear
    i_docty =                   " glpca-docty
    i_docnr_from =              " glpca-docnr
*   i_docnr_to =                " glpca-docnr
*   i_activ =                   " glpca-activ
*   i_type = SPACE              " sy-datar
*   i_xusedb = 'X'              " dtinp-xusedb
*   i_xusear = SPACE            " dtinp-xusear
*   i_archobj =                 " admi_run-object
*   i_infosys = 'X'             " c
* TABLES
*   t_arch_sel =                " rng_archiv
  EXCEPTIONS
    NOT_FOUND = 1               "
    MISSING_PARAMETER = 2       "
    FORM_ERROR = 3              "
    .  "  PCA_ACTUAL_DOCUMENT_SHOW

ABAP code example for Function Module PCA_ACTUAL_DOCUMENT_SHOW





The ABAP code below is a full code listing to execute function module PCA_ACTUAL_DOCUMENT_SHOW including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_t_arch_sel  TYPE STANDARD TABLE OF RNG_ARCHIV,"TABLES PARAM
wa_t_arch_sel  LIKE LINE OF it_t_arch_sel .


SELECT single RBUKRS
FROM GLPCA
INTO @DATA(ld_i_bukrs).


SELECT single RYEAR
FROM GLPCA
INTO @DATA(ld_i_year).


SELECT single DOCTY
FROM GLPCA
INTO @DATA(ld_i_docty).


SELECT single DOCNR
FROM GLPCA
INTO @DATA(ld_i_docnr_from).


SELECT single DOCNR
FROM GLPCA
INTO @DATA(ld_i_docnr_to).


SELECT single ACTIV
FROM GLPCA
INTO @DATA(ld_i_activ).

DATA(ld_i_type) = 'some text here'.

SELECT single XUSEDB
FROM DTINP
INTO @DATA(ld_i_xusedb).


SELECT single XUSEAR
FROM DTINP
INTO @DATA(ld_i_xusear).


SELECT single OBJECT
FROM ADMI_RUN
INTO @DATA(ld_i_archobj).

DATA(ld_i_infosys) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_arch_sel to it_t_arch_sel. . CALL FUNCTION 'PCA_ACTUAL_DOCUMENT_SHOW' EXPORTING i_bukrs = ld_i_bukrs i_year = ld_i_year i_docty = ld_i_docty i_docnr_from = ld_i_docnr_from * i_docnr_to = ld_i_docnr_to * i_activ = ld_i_activ * i_type = ld_i_type * i_xusedb = ld_i_xusedb * i_xusear = ld_i_xusear * i_archobj = ld_i_archobj * i_infosys = ld_i_infosys * TABLES * t_arch_sel = it_t_arch_sel EXCEPTIONS NOT_FOUND = 1 MISSING_PARAMETER = 2 FORM_ERROR = 3 . " PCA_ACTUAL_DOCUMENT_SHOW
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_i_bukrs  TYPE GLPCA-RBUKRS ,
it_t_arch_sel  TYPE STANDARD TABLE OF RNG_ARCHIV ,
wa_t_arch_sel  LIKE LINE OF it_t_arch_sel,
ld_i_year  TYPE GLPCA-RYEAR ,
ld_i_docty  TYPE GLPCA-DOCTY ,
ld_i_docnr_from  TYPE GLPCA-DOCNR ,
ld_i_docnr_to  TYPE GLPCA-DOCNR ,
ld_i_activ  TYPE GLPCA-ACTIV ,
ld_i_type  TYPE SY-DATAR ,
ld_i_xusedb  TYPE DTINP-XUSEDB ,
ld_i_xusear  TYPE DTINP-XUSEAR ,
ld_i_archobj  TYPE ADMI_RUN-OBJECT ,
ld_i_infosys  TYPE C .


SELECT single RBUKRS
FROM GLPCA
INTO ld_i_bukrs.


"populate fields of struture and append to itab
append wa_t_arch_sel to it_t_arch_sel.

SELECT single RYEAR
FROM GLPCA
INTO ld_i_year.


SELECT single DOCTY
FROM GLPCA
INTO ld_i_docty.


SELECT single DOCNR
FROM GLPCA
INTO ld_i_docnr_from.


SELECT single DOCNR
FROM GLPCA
INTO ld_i_docnr_to.


SELECT single ACTIV
FROM GLPCA
INTO ld_i_activ.

ld_i_type = 'some text here'.

SELECT single XUSEDB
FROM DTINP
INTO ld_i_xusedb.


SELECT single XUSEAR
FROM DTINP
INTO ld_i_xusear.


SELECT single OBJECT
FROM ADMI_RUN
INTO ld_i_archobj.

ld_i_infosys = 'some text here'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name PCA_ACTUAL_DOCUMENT_SHOW or its description.