SAP Function Modules

SD_REPAIRORDER_PREPAREITEMS SAP Function module







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

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


Pattern for FM SD_REPAIRORDER_PREPAREITEMS - SD REPAIRORDER PREPAREITEMS





CALL FUNCTION 'SD_REPAIRORDER_PREPAREITEMS' "
  EXPORTING
*   i_stage =                   " tvrmav-zeitp
    i_headkom =                 " v46r_headkom
* TABLES
*   t_itemkom =                 " v46r_itemkom
*   t_repakom =                 " v46r_repakom
*   t_serikom =                 " v46r_serikom
  EXCEPTIONS
    MANUALLY_ACTION = 1         "
    NO_PROPOSAL = 2             "
    .  "  SD_REPAIRORDER_PREPAREITEMS

ABAP code example for Function Module SD_REPAIRORDER_PREPAREITEMS





The ABAP code below is a full code listing to execute function module SD_REPAIRORDER_PREPAREITEMS 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_t_itemkom  TYPE STANDARD TABLE OF V46R_ITEMKOM,"TABLES PARAM
wa_t_itemkom  LIKE LINE OF it_t_itemkom ,
it_t_repakom  TYPE STANDARD TABLE OF V46R_REPAKOM,"TABLES PARAM
wa_t_repakom  LIKE LINE OF it_t_repakom ,
it_t_serikom  TYPE STANDARD TABLE OF V46R_SERIKOM,"TABLES PARAM
wa_t_serikom  LIKE LINE OF it_t_serikom .


SELECT single ZEITP
FROM TVRMAV
INTO @DATA(ld_i_stage).

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

"populate fields of struture and append to itab
append wa_t_itemkom to it_t_itemkom.

"populate fields of struture and append to itab
append wa_t_repakom to it_t_repakom.

"populate fields of struture and append to itab
append wa_t_serikom to it_t_serikom. . CALL FUNCTION 'SD_REPAIRORDER_PREPAREITEMS' EXPORTING * i_stage = ld_i_stage i_headkom = ld_i_headkom * TABLES * t_itemkom = it_t_itemkom * t_repakom = it_t_repakom * t_serikom = it_t_serikom EXCEPTIONS MANUALLY_ACTION = 1 NO_PROPOSAL = 2 . " SD_REPAIRORDER_PREPAREITEMS
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_i_stage  TYPE TVRMAV-ZEITP ,
it_t_itemkom  TYPE STANDARD TABLE OF V46R_ITEMKOM ,
wa_t_itemkom  LIKE LINE OF it_t_itemkom,
ld_i_headkom  TYPE V46R_HEADKOM ,
it_t_repakom  TYPE STANDARD TABLE OF V46R_REPAKOM ,
wa_t_repakom  LIKE LINE OF it_t_repakom,
it_t_serikom  TYPE STANDARD TABLE OF V46R_SERIKOM ,
wa_t_serikom  LIKE LINE OF it_t_serikom.


SELECT single ZEITP
FROM TVRMAV
INTO ld_i_stage.


"populate fields of struture and append to itab
append wa_t_itemkom to it_t_itemkom.
ld_i_headkom = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_repakom to it_t_repakom.

"populate fields of struture and append to itab
append wa_t_serikom to it_t_serikom.

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