SAP Function Modules

AIPK_ORDERS_READ_OLD SAP Function module







AIPK_ORDERS_READ_OLD 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_ORDERS_READ_OLD 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_ORDERS_READ_OLD - AIPK ORDERS READ OLD





CALL FUNCTION 'AIPK_ORDERS_READ_OLD' "
  EXPORTING
*   i_flg_from_objects = 'X'    " c
    i_kokrs =                   " tka01-kokrs
*   i_flg_only_invest = 'X'     " c
  TABLES
*   t_auart_range =             " range_c4
*   t_bukrs_range =             " range_c4
*   t_aufnr_range =             " aufnr_rang
*   t_objnr =                   " jsto_pre
    t_aufk =                    " aufk
    .  "  AIPK_ORDERS_READ_OLD

ABAP code example for Function Module AIPK_ORDERS_READ_OLD





The ABAP code below is a full code listing to execute function module AIPK_ORDERS_READ_OLD 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_auart_range  TYPE STANDARD TABLE OF RANGE_C4,"TABLES PARAM
wa_t_auart_range  LIKE LINE OF it_t_auart_range ,
it_t_bukrs_range  TYPE STANDARD TABLE OF RANGE_C4,"TABLES PARAM
wa_t_bukrs_range  LIKE LINE OF it_t_bukrs_range ,
it_t_aufnr_range  TYPE STANDARD TABLE OF AUFNR_RANG,"TABLES PARAM
wa_t_aufnr_range  LIKE LINE OF it_t_aufnr_range ,
it_t_objnr  TYPE STANDARD TABLE OF JSTO_PRE,"TABLES PARAM
wa_t_objnr  LIKE LINE OF it_t_objnr ,
it_t_aufk  TYPE STANDARD TABLE OF AUFK,"TABLES PARAM
wa_t_aufk  LIKE LINE OF it_t_aufk .

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

SELECT single KOKRS
FROM TKA01
INTO @DATA(ld_i_kokrs).

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

"populate fields of struture and append to itab
append wa_t_auart_range to it_t_auart_range.

"populate fields of struture and append to itab
append wa_t_bukrs_range to it_t_bukrs_range.

"populate fields of struture and append to itab
append wa_t_aufnr_range to it_t_aufnr_range.

"populate fields of struture and append to itab
append wa_t_objnr to it_t_objnr.

"populate fields of struture and append to itab
append wa_t_aufk to it_t_aufk. . CALL FUNCTION 'AIPK_ORDERS_READ_OLD' EXPORTING * i_flg_from_objects = ld_i_flg_from_objects i_kokrs = ld_i_kokrs * i_flg_only_invest = ld_i_flg_only_invest TABLES * t_auart_range = it_t_auart_range * t_bukrs_range = it_t_bukrs_range * t_aufnr_range = it_t_aufnr_range * t_objnr = it_t_objnr t_aufk = it_t_aufk . " AIPK_ORDERS_READ_OLD
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_i_flg_from_objects  TYPE C ,
it_t_auart_range  TYPE STANDARD TABLE OF RANGE_C4 ,
wa_t_auart_range  LIKE LINE OF it_t_auart_range,
ld_i_kokrs  TYPE TKA01-KOKRS ,
it_t_bukrs_range  TYPE STANDARD TABLE OF RANGE_C4 ,
wa_t_bukrs_range  LIKE LINE OF it_t_bukrs_range,
ld_i_flg_only_invest  TYPE C ,
it_t_aufnr_range  TYPE STANDARD TABLE OF AUFNR_RANG ,
wa_t_aufnr_range  LIKE LINE OF it_t_aufnr_range,
it_t_objnr  TYPE STANDARD TABLE OF JSTO_PRE ,
wa_t_objnr  LIKE LINE OF it_t_objnr,
it_t_aufk  TYPE STANDARD TABLE OF AUFK ,
wa_t_aufk  LIKE LINE OF it_t_aufk.

ld_i_flg_from_objects = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_auart_range to it_t_auart_range.

SELECT single KOKRS
FROM TKA01
INTO ld_i_kokrs.


"populate fields of struture and append to itab
append wa_t_bukrs_range to it_t_bukrs_range.
ld_i_flg_only_invest = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_aufnr_range to it_t_aufnr_range.

"populate fields of struture and append to itab
append wa_t_objnr to it_t_objnr.

"populate fields of struture and append to itab
append wa_t_aufk to it_t_aufk.

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