SAP Function Modules

AIPK_PROJECTS_CONTROL SAP Function module







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

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


Pattern for FM AIPK_PROJECTS_CONTROL - AIPK PROJECTS CONTROL





CALL FUNCTION 'AIPK_PROJECTS_CONTROL' "
* EXPORTING
*   i_flg_from_invprog = SPACE  " c
*   i_prnam =                   " impr-prnam
*   i_gnjhr =                   " impr-gjahr
*   i_flg_from_select = SPACE   " c
*   i_flg_total_values = 'X'    " c
*   i_flg_test = 'X'            " c
  TABLES
*   t_prart_range =             " range_c2
*   t_pkokr_range =             " range_c4
*   t_pbukr_range =             " range_c4
*   t_pspid_range =             " rng_pspid
*   t_posid_range =             " rng_posid
    t_gjahr_range =             " rng_gjahr
* CHANGING
*   c_flg_data_found =          " c
    .  "  AIPK_PROJECTS_CONTROL

ABAP code example for Function Module AIPK_PROJECTS_CONTROL





The ABAP code below is a full code listing to execute function module AIPK_PROJECTS_CONTROL 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_prart_range  TYPE STANDARD TABLE OF RANGE_C2,"TABLES PARAM
wa_t_prart_range  LIKE LINE OF it_t_prart_range ,
it_t_pkokr_range  TYPE STANDARD TABLE OF RANGE_C4,"TABLES PARAM
wa_t_pkokr_range  LIKE LINE OF it_t_pkokr_range ,
it_t_pbukr_range  TYPE STANDARD TABLE OF RANGE_C4,"TABLES PARAM
wa_t_pbukr_range  LIKE LINE OF it_t_pbukr_range ,
it_t_pspid_range  TYPE STANDARD TABLE OF RNG_PSPID,"TABLES PARAM
wa_t_pspid_range  LIKE LINE OF it_t_pspid_range ,
it_t_posid_range  TYPE STANDARD TABLE OF RNG_POSID,"TABLES PARAM
wa_t_posid_range  LIKE LINE OF it_t_posid_range ,
it_t_gjahr_range  TYPE STANDARD TABLE OF RNG_GJAHR,"TABLES PARAM
wa_t_gjahr_range  LIKE LINE OF it_t_gjahr_range .

DATA(ld_c_flg_data_found) = 'Check type of data required'.
DATA(ld_i_flg_from_invprog) = 'Check type of data required'.

SELECT single PRNAM
FROM IMPR
INTO @DATA(ld_i_prnam).


SELECT single GJAHR
FROM IMPR
INTO @DATA(ld_i_gnjhr).

DATA(ld_i_flg_from_select) = 'Check type of data required'.
DATA(ld_i_flg_total_values) = 'Check type of data required'.
DATA(ld_i_flg_test) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_prart_range to it_t_prart_range.

"populate fields of struture and append to itab
append wa_t_pkokr_range to it_t_pkokr_range.

"populate fields of struture and append to itab
append wa_t_pbukr_range to it_t_pbukr_range.

"populate fields of struture and append to itab
append wa_t_pspid_range to it_t_pspid_range.

"populate fields of struture and append to itab
append wa_t_posid_range to it_t_posid_range.

"populate fields of struture and append to itab
append wa_t_gjahr_range to it_t_gjahr_range. . CALL FUNCTION 'AIPK_PROJECTS_CONTROL' * EXPORTING * i_flg_from_invprog = ld_i_flg_from_invprog * i_prnam = ld_i_prnam * i_gnjhr = ld_i_gnjhr * i_flg_from_select = ld_i_flg_from_select * i_flg_total_values = ld_i_flg_total_values * i_flg_test = ld_i_flg_test TABLES * t_prart_range = it_t_prart_range * t_pkokr_range = it_t_pkokr_range * t_pbukr_range = it_t_pbukr_range * t_pspid_range = it_t_pspid_range * t_posid_range = it_t_posid_range t_gjahr_range = it_t_gjahr_range * CHANGING * c_flg_data_found = ld_c_flg_data_found . " AIPK_PROJECTS_CONTROL
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_c_flg_data_found  TYPE C ,
ld_i_flg_from_invprog  TYPE C ,
it_t_prart_range  TYPE STANDARD TABLE OF RANGE_C2 ,
wa_t_prart_range  LIKE LINE OF it_t_prart_range,
ld_i_prnam  TYPE IMPR-PRNAM ,
it_t_pkokr_range  TYPE STANDARD TABLE OF RANGE_C4 ,
wa_t_pkokr_range  LIKE LINE OF it_t_pkokr_range,
ld_i_gnjhr  TYPE IMPR-GJAHR ,
it_t_pbukr_range  TYPE STANDARD TABLE OF RANGE_C4 ,
wa_t_pbukr_range  LIKE LINE OF it_t_pbukr_range,
ld_i_flg_from_select  TYPE C ,
it_t_pspid_range  TYPE STANDARD TABLE OF RNG_PSPID ,
wa_t_pspid_range  LIKE LINE OF it_t_pspid_range,
ld_i_flg_total_values  TYPE C ,
it_t_posid_range  TYPE STANDARD TABLE OF RNG_POSID ,
wa_t_posid_range  LIKE LINE OF it_t_posid_range,
ld_i_flg_test  TYPE C ,
it_t_gjahr_range  TYPE STANDARD TABLE OF RNG_GJAHR ,
wa_t_gjahr_range  LIKE LINE OF it_t_gjahr_range.

ld_c_flg_data_found = 'Check type of data required'.
ld_i_flg_from_invprog = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_prart_range to it_t_prart_range.

SELECT single PRNAM
FROM IMPR
INTO ld_i_prnam.


"populate fields of struture and append to itab
append wa_t_pkokr_range to it_t_pkokr_range.

SELECT single GJAHR
FROM IMPR
INTO ld_i_gnjhr.


"populate fields of struture and append to itab
append wa_t_pbukr_range to it_t_pbukr_range.
ld_i_flg_from_select = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_pspid_range to it_t_pspid_range.
ld_i_flg_total_values = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_posid_range to it_t_posid_range.
ld_i_flg_test = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_gjahr_range to it_t_gjahr_range.

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