SAP Function Modules

EXIT_SAPLAIA1_002 SAP Function module - Assignment of Work Center when Creating PM Order from App. Req.







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

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


Pattern for FM EXIT_SAPLAIA1_002 - EXIT SAPLAIA1 002





CALL FUNCTION 'EXIT_SAPLAIA1_002' "Assignment of Work Center when Creating PM Order from App. Req.
  EXPORTING
    i_imak =                    " imak          Appropriation Request - General Data
*   i_imakt =                   " imakt         Appropriation Request - Short Texts
  IMPORTING
    e_nochange =                " ima_vaplz_nochange  Work Center Can No Longer Be Changed in Dialog
* TABLES
*   t_imaka =                   " rimaka        App. Req: Assets / Equipment to Be Replaced
*   t_imakpa =                  " rimakpa       App. Req: Request. CCenter / Bus.Area / Profit Ctr with % Distrib.
*   t_imakpi =                  " rimakpi       Approp. Request- Percentage Dist. by Invest.Reason
*   t_imakps =                  " rimakps       Approp. Request - Distribution by Requesting Division
*   t_imakpu =                  " rimakpu       App. Req: Reason for Environmental Investment with % Distrib.
*   t_imakpw =                  " rimakpw       App. Req: Distribution by Requesting Material Group
  CHANGING
    x_vawrk =                   " wergw         Plant Associated with Main Work Center
    x_vaplz =                   " gewrk         Responsible Work Center
    .  "  EXIT_SAPLAIA1_002

ABAP code example for Function Module EXIT_SAPLAIA1_002





The ABAP code below is a full code listing to execute function module EXIT_SAPLAIA1_002 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_e_nochange  TYPE IMA_VAPLZ_NOCHANGE ,
it_t_imaka  TYPE STANDARD TABLE OF RIMAKA,"TABLES PARAM
wa_t_imaka  LIKE LINE OF it_t_imaka ,
it_t_imakpa  TYPE STANDARD TABLE OF RIMAKPA,"TABLES PARAM
wa_t_imakpa  LIKE LINE OF it_t_imakpa ,
it_t_imakpi  TYPE STANDARD TABLE OF RIMAKPI,"TABLES PARAM
wa_t_imakpi  LIKE LINE OF it_t_imakpi ,
it_t_imakps  TYPE STANDARD TABLE OF RIMAKPS,"TABLES PARAM
wa_t_imakps  LIKE LINE OF it_t_imakps ,
it_t_imakpu  TYPE STANDARD TABLE OF RIMAKPU,"TABLES PARAM
wa_t_imakpu  LIKE LINE OF it_t_imakpu ,
it_t_imakpw  TYPE STANDARD TABLE OF RIMAKPW,"TABLES PARAM
wa_t_imakpw  LIKE LINE OF it_t_imakpw .

DATA(ld_x_vawrk) = 'Check type of data required'.
DATA(ld_x_vaplz) = 'Check type of data required'.
DATA(ld_i_imak) = 'Check type of data required'.
DATA(ld_i_imakt) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_imaka to it_t_imaka.

"populate fields of struture and append to itab
append wa_t_imakpa to it_t_imakpa.

"populate fields of struture and append to itab
append wa_t_imakpi to it_t_imakpi.

"populate fields of struture and append to itab
append wa_t_imakps to it_t_imakps.

"populate fields of struture and append to itab
append wa_t_imakpu to it_t_imakpu.

"populate fields of struture and append to itab
append wa_t_imakpw to it_t_imakpw. . CALL FUNCTION 'EXIT_SAPLAIA1_002' EXPORTING i_imak = ld_i_imak * i_imakt = ld_i_imakt IMPORTING e_nochange = ld_e_nochange * TABLES * t_imaka = it_t_imaka * t_imakpa = it_t_imakpa * t_imakpi = it_t_imakpi * t_imakps = it_t_imakps * t_imakpu = it_t_imakpu * t_imakpw = it_t_imakpw CHANGING x_vawrk = ld_x_vawrk x_vaplz = ld_x_vaplz . " EXIT_SAPLAIA1_002
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_x_vawrk  TYPE WERGW ,
ld_e_nochange  TYPE IMA_VAPLZ_NOCHANGE ,
ld_i_imak  TYPE IMAK ,
it_t_imaka  TYPE STANDARD TABLE OF RIMAKA ,
wa_t_imaka  LIKE LINE OF it_t_imaka,
ld_x_vaplz  TYPE GEWRK ,
ld_i_imakt  TYPE IMAKT ,
it_t_imakpa  TYPE STANDARD TABLE OF RIMAKPA ,
wa_t_imakpa  LIKE LINE OF it_t_imakpa,
it_t_imakpi  TYPE STANDARD TABLE OF RIMAKPI ,
wa_t_imakpi  LIKE LINE OF it_t_imakpi,
it_t_imakps  TYPE STANDARD TABLE OF RIMAKPS ,
wa_t_imakps  LIKE LINE OF it_t_imakps,
it_t_imakpu  TYPE STANDARD TABLE OF RIMAKPU ,
wa_t_imakpu  LIKE LINE OF it_t_imakpu,
it_t_imakpw  TYPE STANDARD TABLE OF RIMAKPW ,
wa_t_imakpw  LIKE LINE OF it_t_imakpw.

ld_x_vawrk = 'Check type of data required'.
ld_i_imak = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_imaka to it_t_imaka.
ld_x_vaplz = 'Check type of data required'.
ld_i_imakt = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_imakpa to it_t_imakpa.

"populate fields of struture and append to itab
append wa_t_imakpi to it_t_imakpi.

"populate fields of struture and append to itab
append wa_t_imakps to it_t_imakps.

"populate fields of struture and append to itab
append wa_t_imakpu to it_t_imakpu.

"populate fields of struture and append to itab
append wa_t_imakpw to it_t_imakpw.

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