SAP Function Modules

STPA4_PRTYPE_CREATE SAP Function module







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

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


Pattern for FM STPA4_PRTYPE_CREATE - STPA4 PRTYPE CREATE





CALL FUNCTION 'STPA4_PRTYPE_CREATE' "
  EXPORTING
    serv_dest =                 " rfcdest
    prtype =                    " c
    relobj_type =               " c
    pxtype1 =                   " c
    otype1 =                    " c
    card1_min =                 " c
    card1_max =                 " c
    pxtype2 =                   " c
    otype2 =                    " c
    card2_min =                 " c
    card2_max =                 " c
    clchk =                     " c
  IMPORTING
    error_flag =                " castp_error_flag
    .  "  STPA4_PRTYPE_CREATE

ABAP code example for Function Module STPA4_PRTYPE_CREATE





The ABAP code below is a full code listing to execute function module STPA4_PRTYPE_CREATE 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_error_flag  TYPE CASTP_ERROR_FLAG .

DATA(ld_serv_dest) = 'Check type of data required'.
DATA(ld_prtype) = 'Check type of data required'.
DATA(ld_relobj_type) = 'Check type of data required'.
DATA(ld_pxtype1) = 'Check type of data required'.
DATA(ld_otype1) = 'Check type of data required'.
DATA(ld_card1_min) = 'Check type of data required'.
DATA(ld_card1_max) = 'Check type of data required'.
DATA(ld_pxtype2) = 'Check type of data required'.
DATA(ld_otype2) = 'Check type of data required'.
DATA(ld_card2_min) = 'Check type of data required'.
DATA(ld_card2_max) = 'Check type of data required'.
DATA(ld_clchk) = 'Check type of data required'. . CALL FUNCTION 'STPA4_PRTYPE_CREATE' EXPORTING serv_dest = ld_serv_dest prtype = ld_prtype relobj_type = ld_relobj_type pxtype1 = ld_pxtype1 otype1 = ld_otype1 card1_min = ld_card1_min card1_max = ld_card1_max pxtype2 = ld_pxtype2 otype2 = ld_otype2 card2_min = ld_card2_min card2_max = ld_card2_max clchk = ld_clchk IMPORTING error_flag = ld_error_flag . " STPA4_PRTYPE_CREATE
IF SY-SUBRC EQ 0. "All OK 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_error_flag  TYPE CASTP_ERROR_FLAG ,
ld_serv_dest  TYPE RFCDEST ,
ld_prtype  TYPE C ,
ld_relobj_type  TYPE C ,
ld_pxtype1  TYPE C ,
ld_otype1  TYPE C ,
ld_card1_min  TYPE C ,
ld_card1_max  TYPE C ,
ld_pxtype2  TYPE C ,
ld_otype2  TYPE C ,
ld_card2_min  TYPE C ,
ld_card2_max  TYPE C ,
ld_clchk  TYPE C .

ld_serv_dest = 'Check type of data required'.
ld_prtype = 'Check type of data required'.
ld_relobj_type = 'Check type of data required'.
ld_pxtype1 = 'Check type of data required'.
ld_otype1 = 'Check type of data required'.
ld_card1_min = 'Check type of data required'.
ld_card1_max = 'Check type of data required'.
ld_pxtype2 = 'Check type of data required'.
ld_otype2 = 'Check type of data required'.
ld_card2_min = 'Check type of data required'.
ld_card2_max = 'Check type of data required'.
ld_clchk = 'Check type of data required'.

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 STPA4_PRTYPE_CREATE or its description.