SAP Function Modules

CSO_P_PUR_REQS_SET SAP Function module - Purchase Requisitions: Write Access







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

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


Pattern for FM CSO_P_PUR_REQS_SET - CSO P PUR REQS SET





CALL FUNCTION 'CSO_P_PUR_REQS_SET' "Purchase Requisitions: Write Access
* EXPORTING
*   pi_mode_refresh =           " wiso_hndl-xfield  Checkbox
*   pi_mode_renumber =          " wiso_hndl-xfield  Checkbox
*   pi_preq =                   " wiso_preq     SAP Retail Store Sales Order: Purchase Requisition
*   pi_preq_x =                 " wiso_preq_sc  SAP Retail Store Sales Order: Attribute Structure WISO_PREQ
*   pi_mode_set_rec =           " wiso_hndl-xfield  Checkbox
  IMPORTING
    pe_return =                 " wiso_return   SAP Retail Store: Sales Order: Return Structure
* TABLES
*   pi_t_preq =                 " wiso_preq     SAP Retail Store Sales Order: Purchase Requisition
*   pi_t_itmno =                " wiso_itmno    SAP Retail Store Sales Order: Linking Between Items
    .  "  CSO_P_PUR_REQS_SET

ABAP code example for Function Module CSO_P_PUR_REQS_SET





The ABAP code below is a full code listing to execute function module CSO_P_PUR_REQS_SET 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_pe_return  TYPE WISO_RETURN ,
it_pi_t_preq  TYPE STANDARD TABLE OF WISO_PREQ,"TABLES PARAM
wa_pi_t_preq  LIKE LINE OF it_pi_t_preq ,
it_pi_t_itmno  TYPE STANDARD TABLE OF WISO_ITMNO,"TABLES PARAM
wa_pi_t_itmno  LIKE LINE OF it_pi_t_itmno .


DATA(ld_pi_mode_refresh) = some text here

DATA(ld_pi_mode_renumber) = some text here
DATA(ld_pi_preq) = 'Check type of data required'.
DATA(ld_pi_preq_x) = 'Check type of data required'.

DATA(ld_pi_mode_set_rec) = some text here

"populate fields of struture and append to itab
append wa_pi_t_preq to it_pi_t_preq.

"populate fields of struture and append to itab
append wa_pi_t_itmno to it_pi_t_itmno. . CALL FUNCTION 'CSO_P_PUR_REQS_SET' * EXPORTING * pi_mode_refresh = ld_pi_mode_refresh * pi_mode_renumber = ld_pi_mode_renumber * pi_preq = ld_pi_preq * pi_preq_x = ld_pi_preq_x * pi_mode_set_rec = ld_pi_mode_set_rec IMPORTING pe_return = ld_pe_return * TABLES * pi_t_preq = it_pi_t_preq * pi_t_itmno = it_pi_t_itmno . " CSO_P_PUR_REQS_SET
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_pe_return  TYPE WISO_RETURN ,
ld_pi_mode_refresh  TYPE WISO_HNDL-XFIELD ,
it_pi_t_preq  TYPE STANDARD TABLE OF WISO_PREQ ,
wa_pi_t_preq  LIKE LINE OF it_pi_t_preq,
ld_pi_mode_renumber  TYPE WISO_HNDL-XFIELD ,
it_pi_t_itmno  TYPE STANDARD TABLE OF WISO_ITMNO ,
wa_pi_t_itmno  LIKE LINE OF it_pi_t_itmno,
ld_pi_preq  TYPE WISO_PREQ ,
ld_pi_preq_x  TYPE WISO_PREQ_SC ,
ld_pi_mode_set_rec  TYPE WISO_HNDL-XFIELD .


ld_pi_mode_refresh = some text here

"populate fields of struture and append to itab
append wa_pi_t_preq to it_pi_t_preq.

ld_pi_mode_renumber = some text here

"populate fields of struture and append to itab
append wa_pi_t_itmno to it_pi_t_itmno.
ld_pi_preq = 'Check type of data required'.
ld_pi_preq_x = 'Check type of data required'.

ld_pi_mode_set_rec = 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 CSO_P_PUR_REQS_SET or its description.