SAP Function Modules

VB_CP_USER_DOC SAP Function module







VB_CP_USER_DOC 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 VB_CP_USER_DOC into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM VB_CP_USER_DOC - VB CP USER DOC





CALL FUNCTION 'VB_CP_USER_DOC' "
  EXPORTING
    i_vers =                    " vbcp8
*   i_activity = 'PRIOUT'       " vbcp_sel-activity
  IMPORTING
    e_filename =                " rlgrap-filename
    e_binfilesize =             " i
    es_sfpjoboutput =           " sfpjoboutput
* TABLES
*   e_tline =                   " tbl1024
  EXCEPTIONS
    ERROR_OPEN_FORM = 1         "
    ERROR_WRITE_FORM = 2        "
    ERROR_CLOSE_FORM = 3        "
    DOCTYPE_NOT_FOUND = 4       "
    CANCELLED = 5               "
    ERROR_NO_LIST = 6           "
    PARAM_ERROR = 7             "
    .  "  VB_CP_USER_DOC

ABAP code example for Function Module VB_CP_USER_DOC





The ABAP code below is a full code listing to execute function module VB_CP_USER_DOC 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:
ld_e_filename  TYPE RLGRAP-FILENAME ,
ld_e_binfilesize  TYPE I ,
ld_es_sfpjoboutput  TYPE SFPJOBOUTPUT ,
it_e_tline  TYPE STANDARD TABLE OF TBL1024,"TABLES PARAM
wa_e_tline  LIKE LINE OF it_e_tline .

DATA(ld_i_vers) = 'Check type of data required'.

DATA(ld_i_activity) = some text here

"populate fields of struture and append to itab
append wa_e_tline to it_e_tline. . CALL FUNCTION 'VB_CP_USER_DOC' EXPORTING i_vers = ld_i_vers * i_activity = ld_i_activity IMPORTING e_filename = ld_e_filename e_binfilesize = ld_e_binfilesize es_sfpjoboutput = ld_es_sfpjoboutput * TABLES * e_tline = it_e_tline EXCEPTIONS ERROR_OPEN_FORM = 1 ERROR_WRITE_FORM = 2 ERROR_CLOSE_FORM = 3 DOCTYPE_NOT_FOUND = 4 CANCELLED = 5 ERROR_NO_LIST = 6 PARAM_ERROR = 7 . " VB_CP_USER_DOC
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 ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "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_e_filename  TYPE RLGRAP-FILENAME ,
ld_i_vers  TYPE VBCP8 ,
it_e_tline  TYPE STANDARD TABLE OF TBL1024 ,
wa_e_tline  LIKE LINE OF it_e_tline,
ld_e_binfilesize  TYPE I ,
ld_i_activity  TYPE VBCP_SEL-ACTIVITY ,
ld_es_sfpjoboutput  TYPE SFPJOBOUTPUT .

ld_i_vers = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_tline to it_e_tline.

ld_i_activity = 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 VB_CP_USER_DOC or its description.