SAP Function Modules

PJP_FWS_REQUEST_CREATE SAP Function module - Request Create







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

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


Pattern for FM PJP_FWS_REQUEST_CREATE - PJP FWS REQUEST CREATE





CALL FUNCTION 'PJP_FWS_REQUEST_CREATE' "Request Create
  EXPORTING
*   im_request_id =             " tim_req_id    Document ID
    im_command =                " tim_req_xfer_event  ESS Command
    im_pernr =                  " p_pernr       Personnel Number
*   im_date =                   " begda         Start Date
*   im_vtart =                  " vtart         Substitution Type
*   im_tprog =                  " tprog         Daily Work Schedule
*   im_varia =                  " varia         Daily Work Schedule Variant
*   im_old_tprog =              " tprog         Old Daily Work Schedule
*   im_old_varia =              " varia         Old Daily Work Schedule Variant
*   im_pending =                " char1         ID of Request Item
*   im_notice =                 " tim_req_notice  Note for Request
*   im_sub_date =               " begda         Substitution Start Date
*   im_sub_tprog =              " tprog         Substitution Daily Work Schedule
*   im_sub_varia =              " varia         Substitution Daily Work Schedule Variant
*   im_old_sub_tprog =          " tprog         Old Substitution Daily Work Schedule
*   im_old_sub_varia =          " varia         Old Substitution Daily Work Schedule Variant
*   im_approver_pernr =         " p_pernr       Approver Personnel Number
  IMPORTING
    ex_request =                " pjp_fws_request  Flexible Work Schedule Request Structure
    ex_has_errors =             " boole_d       Data element for domain BOOLE: TRUE (='X') and FALSE (=' ')
* TABLES
*   ex_messages =               " ptreq_message_tab  Leave Request: Message Table
    .  "  PJP_FWS_REQUEST_CREATE

ABAP code example for Function Module PJP_FWS_REQUEST_CREATE





The ABAP code below is a full code listing to execute function module PJP_FWS_REQUEST_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_ex_request  TYPE PJP_FWS_REQUEST ,
ld_ex_has_errors  TYPE BOOLE_D ,
it_ex_messages  TYPE STANDARD TABLE OF PTREQ_MESSAGE_TAB,"TABLES PARAM
wa_ex_messages  LIKE LINE OF it_ex_messages .

DATA(ld_im_request_id) = 'Check type of data required'.
DATA(ld_im_command) = 'Check type of data required'.
DATA(ld_im_pernr) = 'Check type of data required'.
DATA(ld_im_date) = 'Check type of data required'.
DATA(ld_im_vtart) = 'Check type of data required'.
DATA(ld_im_tprog) = 'Check type of data required'.
DATA(ld_im_varia) = 'Check type of data required'.
DATA(ld_im_old_tprog) = 'Check type of data required'.
DATA(ld_im_old_varia) = 'Check type of data required'.
DATA(ld_im_pending) = 'Check type of data required'.
DATA(ld_im_notice) = 'Check type of data required'.
DATA(ld_im_sub_date) = 'Check type of data required'.
DATA(ld_im_sub_tprog) = 'Check type of data required'.
DATA(ld_im_sub_varia) = 'Check type of data required'.
DATA(ld_im_old_sub_tprog) = 'Check type of data required'.
DATA(ld_im_old_sub_varia) = 'Check type of data required'.
DATA(ld_im_approver_pernr) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ex_messages to it_ex_messages. . CALL FUNCTION 'PJP_FWS_REQUEST_CREATE' EXPORTING * im_request_id = ld_im_request_id im_command = ld_im_command im_pernr = ld_im_pernr * im_date = ld_im_date * im_vtart = ld_im_vtart * im_tprog = ld_im_tprog * im_varia = ld_im_varia * im_old_tprog = ld_im_old_tprog * im_old_varia = ld_im_old_varia * im_pending = ld_im_pending * im_notice = ld_im_notice * im_sub_date = ld_im_sub_date * im_sub_tprog = ld_im_sub_tprog * im_sub_varia = ld_im_sub_varia * im_old_sub_tprog = ld_im_old_sub_tprog * im_old_sub_varia = ld_im_old_sub_varia * im_approver_pernr = ld_im_approver_pernr IMPORTING ex_request = ld_ex_request ex_has_errors = ld_ex_has_errors * TABLES * ex_messages = it_ex_messages . " PJP_FWS_REQUEST_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_ex_request  TYPE PJP_FWS_REQUEST ,
ld_im_request_id  TYPE TIM_REQ_ID ,
it_ex_messages  TYPE STANDARD TABLE OF PTREQ_MESSAGE_TAB ,
wa_ex_messages  LIKE LINE OF it_ex_messages,
ld_ex_has_errors  TYPE BOOLE_D ,
ld_im_command  TYPE TIM_REQ_XFER_EVENT ,
ld_im_pernr  TYPE P_PERNR ,
ld_im_date  TYPE BEGDA ,
ld_im_vtart  TYPE VTART ,
ld_im_tprog  TYPE TPROG ,
ld_im_varia  TYPE VARIA ,
ld_im_old_tprog  TYPE TPROG ,
ld_im_old_varia  TYPE VARIA ,
ld_im_pending  TYPE CHAR1 ,
ld_im_notice  TYPE TIM_REQ_NOTICE ,
ld_im_sub_date  TYPE BEGDA ,
ld_im_sub_tprog  TYPE TPROG ,
ld_im_sub_varia  TYPE VARIA ,
ld_im_old_sub_tprog  TYPE TPROG ,
ld_im_old_sub_varia  TYPE VARIA ,
ld_im_approver_pernr  TYPE P_PERNR .

ld_im_request_id = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ex_messages to it_ex_messages.
ld_im_command = 'Check type of data required'.
ld_im_pernr = 'Check type of data required'.
ld_im_date = 'Check type of data required'.
ld_im_vtart = 'Check type of data required'.
ld_im_tprog = 'Check type of data required'.
ld_im_varia = 'Check type of data required'.
ld_im_old_tprog = 'Check type of data required'.
ld_im_old_varia = 'Check type of data required'.
ld_im_pending = 'Check type of data required'.
ld_im_notice = 'Check type of data required'.
ld_im_sub_date = 'Check type of data required'.
ld_im_sub_tprog = 'Check type of data required'.
ld_im_sub_varia = 'Check type of data required'.
ld_im_old_sub_tprog = 'Check type of data required'.
ld_im_old_sub_varia = 'Check type of data required'.
ld_im_approver_pernr = '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 PJP_FWS_REQUEST_CREATE or its description.