SAP Function Modules

PS_CALL_PSJ SAP Function module







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

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


Pattern for FM PS_CALL_PSJ - PS CALL PSJ





CALL FUNCTION 'PS_CALL_PSJ' "
* EXPORTING
*   i_variant =                 " sy-slset      Report Variant
*   i_handle =                  " i
*   it_trange =                 " rsds_trange
*   i_fill_buffer_cjpn =        " c
*   i_call_with_submit =        " c
*   i_caller =                  " sy-repid
  TABLES
    it_selections =             " rsparams      Database Selections
*   et_rsthie_m =               " rsthie_m      Hierarchy
*   et_rpsco_m =                " rpsco_m
*   et_rpsqt_m =                " rpsqt_m
*   et_proj =                   " proj_cjdb_rep  Project Definition
*   et_prps_r =                 " prps_cjdb_rep  WBS Elements
*   et_elm_ps =                 " elm_ps
*   et_vskopf =                 " vskopf        Project Versions
*   et_aufk =                   " aufk_cjdb_rep
*   et_act01 =                  " act01_cjdb_rep
*   et_resb01 =                 " resb01_cjdb_rep  Reservation/Dependent Requirement for LDB-01
* CHANGING
*   ch_tcndb =                  " tcndb
*   ch_tcnds =                  " tcnds
  EXCEPTIONS
    NO_COSTS_FOUND = 1          "
    NO_OBJECTS_FOUND = 2        "
    .  "  PS_CALL_PSJ

ABAP code example for Function Module PS_CALL_PSJ





The ABAP code below is a full code listing to execute function module PS_CALL_PSJ 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_it_selections  TYPE STANDARD TABLE OF RSPARAMS,"TABLES PARAM
wa_it_selections  LIKE LINE OF it_it_selections ,
it_et_rsthie_m  TYPE STANDARD TABLE OF RSTHIE_M,"TABLES PARAM
wa_et_rsthie_m  LIKE LINE OF it_et_rsthie_m ,
it_et_rpsco_m  TYPE STANDARD TABLE OF RPSCO_M,"TABLES PARAM
wa_et_rpsco_m  LIKE LINE OF it_et_rpsco_m ,
it_et_rpsqt_m  TYPE STANDARD TABLE OF RPSQT_M,"TABLES PARAM
wa_et_rpsqt_m  LIKE LINE OF it_et_rpsqt_m ,
it_et_proj  TYPE STANDARD TABLE OF PROJ_CJDB_REP,"TABLES PARAM
wa_et_proj  LIKE LINE OF it_et_proj ,
it_et_prps_r  TYPE STANDARD TABLE OF PRPS_CJDB_REP,"TABLES PARAM
wa_et_prps_r  LIKE LINE OF it_et_prps_r ,
it_et_elm_ps  TYPE STANDARD TABLE OF ELM_PS,"TABLES PARAM
wa_et_elm_ps  LIKE LINE OF it_et_elm_ps ,
it_et_vskopf  TYPE STANDARD TABLE OF VSKOPF,"TABLES PARAM
wa_et_vskopf  LIKE LINE OF it_et_vskopf ,
it_et_aufk  TYPE STANDARD TABLE OF AUFK_CJDB_REP,"TABLES PARAM
wa_et_aufk  LIKE LINE OF it_et_aufk ,
it_et_act01  TYPE STANDARD TABLE OF ACT01_CJDB_REP,"TABLES PARAM
wa_et_act01  LIKE LINE OF it_et_act01 ,
it_et_resb01  TYPE STANDARD TABLE OF RESB01_CJDB_REP,"TABLES PARAM
wa_et_resb01  LIKE LINE OF it_et_resb01 .

DATA(ld_ch_tcndb) = 'Check type of data required'.
DATA(ld_ch_tcnds) = 'Check type of data required'.
DATA(ld_i_variant) = '123 '.
DATA(ld_i_handle) = '123 '.
DATA(ld_it_trange) = '123 '.
DATA(ld_i_fill_buffer_cjpn) = '123 '.
DATA(ld_i_call_with_submit) = '123 '.
DATA(ld_i_caller) = '123 '.

"populate fields of struture and append to itab
append wa_it_selections to it_it_selections.

"populate fields of struture and append to itab
append wa_et_rsthie_m to it_et_rsthie_m.

"populate fields of struture and append to itab
append wa_et_rpsco_m to it_et_rpsco_m.

"populate fields of struture and append to itab
append wa_et_rpsqt_m to it_et_rpsqt_m.

"populate fields of struture and append to itab
append wa_et_proj to it_et_proj.

"populate fields of struture and append to itab
append wa_et_prps_r to it_et_prps_r.

"populate fields of struture and append to itab
append wa_et_elm_ps to it_et_elm_ps.

"populate fields of struture and append to itab
append wa_et_vskopf to it_et_vskopf.

"populate fields of struture and append to itab
append wa_et_aufk to it_et_aufk.

"populate fields of struture and append to itab
append wa_et_act01 to it_et_act01.

"populate fields of struture and append to itab
append wa_et_resb01 to it_et_resb01. . CALL FUNCTION 'PS_CALL_PSJ' * EXPORTING * i_variant = ld_i_variant * i_handle = ld_i_handle * it_trange = ld_it_trange * i_fill_buffer_cjpn = ld_i_fill_buffer_cjpn * i_call_with_submit = ld_i_call_with_submit * i_caller = ld_i_caller TABLES it_selections = it_it_selections * et_rsthie_m = it_et_rsthie_m * et_rpsco_m = it_et_rpsco_m * et_rpsqt_m = it_et_rpsqt_m * et_proj = it_et_proj * et_prps_r = it_et_prps_r * et_elm_ps = it_et_elm_ps * et_vskopf = it_et_vskopf * et_aufk = it_et_aufk * et_act01 = it_et_act01 * et_resb01 = it_et_resb01 * CHANGING * ch_tcndb = ld_ch_tcndb * ch_tcnds = ld_ch_tcnds EXCEPTIONS NO_COSTS_FOUND = 1 NO_OBJECTS_FOUND = 2 . " PS_CALL_PSJ
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 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_ch_tcndb  TYPE TCNDB ,
ld_i_variant  TYPE SY-SLSET ,
it_it_selections  TYPE STANDARD TABLE OF RSPARAMS ,
wa_it_selections  LIKE LINE OF it_it_selections,
ld_ch_tcnds  TYPE TCNDS ,
ld_i_handle  TYPE I ,
it_et_rsthie_m  TYPE STANDARD TABLE OF RSTHIE_M ,
wa_et_rsthie_m  LIKE LINE OF it_et_rsthie_m,
ld_it_trange  TYPE RSDS_TRANGE ,
it_et_rpsco_m  TYPE STANDARD TABLE OF RPSCO_M ,
wa_et_rpsco_m  LIKE LINE OF it_et_rpsco_m,
ld_i_fill_buffer_cjpn  TYPE C ,
it_et_rpsqt_m  TYPE STANDARD TABLE OF RPSQT_M ,
wa_et_rpsqt_m  LIKE LINE OF it_et_rpsqt_m,
ld_i_call_with_submit  TYPE C ,
it_et_proj  TYPE STANDARD TABLE OF PROJ_CJDB_REP ,
wa_et_proj  LIKE LINE OF it_et_proj,
ld_i_caller  TYPE SY-REPID ,
it_et_prps_r  TYPE STANDARD TABLE OF PRPS_CJDB_REP ,
wa_et_prps_r  LIKE LINE OF it_et_prps_r,
it_et_elm_ps  TYPE STANDARD TABLE OF ELM_PS ,
wa_et_elm_ps  LIKE LINE OF it_et_elm_ps,
it_et_vskopf  TYPE STANDARD TABLE OF VSKOPF ,
wa_et_vskopf  LIKE LINE OF it_et_vskopf,
it_et_aufk  TYPE STANDARD TABLE OF AUFK_CJDB_REP ,
wa_et_aufk  LIKE LINE OF it_et_aufk,
it_et_act01  TYPE STANDARD TABLE OF ACT01_CJDB_REP ,
wa_et_act01  LIKE LINE OF it_et_act01,
it_et_resb01  TYPE STANDARD TABLE OF RESB01_CJDB_REP ,
wa_et_resb01  LIKE LINE OF it_et_resb01.

ld_ch_tcndb = 'some text here'.
ld_i_variant = '123 '.

"populate fields of struture and append to itab
append wa_it_selections to it_it_selections.
ld_ch_tcnds = '123 '.
ld_i_handle = '123 '.

"populate fields of struture and append to itab
append wa_et_rsthie_m to it_et_rsthie_m.
ld_it_trange = '123 '.

"populate fields of struture and append to itab
append wa_et_rpsco_m to it_et_rpsco_m.
ld_i_fill_buffer_cjpn = '123 '.

"populate fields of struture and append to itab
append wa_et_rpsqt_m to it_et_rpsqt_m.
ld_i_call_with_submit = '123 '.

"populate fields of struture and append to itab
append wa_et_proj to it_et_proj.
ld_i_caller = '123 '.

"populate fields of struture and append to itab
append wa_et_prps_r to it_et_prps_r.

"populate fields of struture and append to itab
append wa_et_elm_ps to it_et_elm_ps.

"populate fields of struture and append to itab
append wa_et_vskopf to it_et_vskopf.

"populate fields of struture and append to itab
append wa_et_aufk to it_et_aufk.

"populate fields of struture and append to itab
append wa_et_act01 to it_et_act01.

"populate fields of struture and append to itab
append wa_et_resb01 to it_et_resb01.

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