SAP Function Modules

AIPA_CP_ORD SAP Function module







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

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


Pattern for FM AIPA_CP_ORD - AIPA CP ORD





CALL FUNCTION 'AIPA_CP_ORD' "
  EXPORTING
*   id_versn = '000'            " bpge-versn
    id_wrttp =                  " bpge-wrttp
*   id_versn_from = '000'       " bpge-versn
    id_wrttp_from =             " bpge-wrttp
*   iflg_suppl_ret_split = ' '  " im_flg_suppl_ret_split
*   iflg_reconv_obj_to_ca = ' '  " im_objtoca
*   iflg_reconv_ca_to_obj = ' '  " im_catoobj
*   id_reconv_from_year = '0000'  " im_yfromrc
*   iflg_adjust_to_actuals = ' '  " xfeld
*   id_adjust_statsel = ' '     " im_statsel
*   iflg_cons_only = ' '        " xfeld
*   iflg_cons_check = ' '       " im_conscheck_coarea
*   iflg_cons_check_obj = ' '   " im_conscheck_obj
*   iflg_cons_check_def = ' '   " im_conscheck_def
*   iflg_cons_adjust = ' '      " xfeld
*   id_cons_severity = 'E'      " symsgty
*   iflg_test_run = 'X'         " xfeld
*   id_sgtxt = ' '              " sgtxt
* TABLES
*   it_obj =                    " raip_obj
*   itx_covob_source =          " im_covob_tab_type
*   et_return =                 " bapiret2
  EXCEPTIONS
    ABEND_OCCURED = 1           "
    .  "  AIPA_CP_ORD

ABAP code example for Function Module AIPA_CP_ORD





The ABAP code below is a full code listing to execute function module AIPA_CP_ORD 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_it_obj  TYPE STANDARD TABLE OF RAIP_OBJ,"TABLES PARAM
wa_it_obj  LIKE LINE OF it_it_obj ,
it_itx_covob_source  TYPE STANDARD TABLE OF IM_COVOB_TAB_TYPE,"TABLES PARAM
wa_itx_covob_source  LIKE LINE OF it_itx_covob_source ,
it_et_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_et_return  LIKE LINE OF it_et_return .


SELECT single VERSN
FROM BPGE
INTO @DATA(ld_id_versn).


SELECT single WRTTP
FROM BPGE
INTO @DATA(ld_id_wrttp).


SELECT single VERSN
FROM BPGE
INTO @DATA(ld_id_versn_from).


SELECT single WRTTP
FROM BPGE
INTO @DATA(ld_id_wrttp_from).

DATA(ld_iflg_suppl_ret_split) = 'Check type of data required'.
DATA(ld_iflg_reconv_obj_to_ca) = 'Check type of data required'.
DATA(ld_iflg_reconv_ca_to_obj) = 'Check type of data required'.
DATA(ld_id_reconv_from_year) = 'Check type of data required'.
DATA(ld_iflg_adjust_to_actuals) = 'Check type of data required'.
DATA(ld_id_adjust_statsel) = 'Check type of data required'.
DATA(ld_iflg_cons_only) = 'Check type of data required'.
DATA(ld_iflg_cons_check) = 'Check type of data required'.
DATA(ld_iflg_cons_check_obj) = 'Check type of data required'.
DATA(ld_iflg_cons_check_def) = 'Check type of data required'.
DATA(ld_iflg_cons_adjust) = 'Check type of data required'.
DATA(ld_id_cons_severity) = 'some text here'.
DATA(ld_iflg_test_run) = 'some text here'.
DATA(ld_id_sgtxt) = 'some text here'.

"populate fields of struture and append to itab
append wa_it_obj to it_it_obj.

"populate fields of struture and append to itab
append wa_itx_covob_source to it_itx_covob_source.

"populate fields of struture and append to itab
append wa_et_return to it_et_return. . CALL FUNCTION 'AIPA_CP_ORD' EXPORTING * id_versn = ld_id_versn id_wrttp = ld_id_wrttp * id_versn_from = ld_id_versn_from id_wrttp_from = ld_id_wrttp_from * iflg_suppl_ret_split = ld_iflg_suppl_ret_split * iflg_reconv_obj_to_ca = ld_iflg_reconv_obj_to_ca * iflg_reconv_ca_to_obj = ld_iflg_reconv_ca_to_obj * id_reconv_from_year = ld_id_reconv_from_year * iflg_adjust_to_actuals = ld_iflg_adjust_to_actuals * id_adjust_statsel = ld_id_adjust_statsel * iflg_cons_only = ld_iflg_cons_only * iflg_cons_check = ld_iflg_cons_check * iflg_cons_check_obj = ld_iflg_cons_check_obj * iflg_cons_check_def = ld_iflg_cons_check_def * iflg_cons_adjust = ld_iflg_cons_adjust * id_cons_severity = ld_id_cons_severity * iflg_test_run = ld_iflg_test_run * id_sgtxt = ld_id_sgtxt * TABLES * it_obj = it_it_obj * itx_covob_source = it_itx_covob_source * et_return = it_et_return EXCEPTIONS ABEND_OCCURED = 1 . " AIPA_CP_ORD
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_id_versn  TYPE BPGE-VERSN ,
it_it_obj  TYPE STANDARD TABLE OF RAIP_OBJ ,
wa_it_obj  LIKE LINE OF it_it_obj,
ld_id_wrttp  TYPE BPGE-WRTTP ,
it_itx_covob_source  TYPE STANDARD TABLE OF IM_COVOB_TAB_TYPE ,
wa_itx_covob_source  LIKE LINE OF it_itx_covob_source,
ld_id_versn_from  TYPE BPGE-VERSN ,
it_et_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_et_return  LIKE LINE OF it_et_return,
ld_id_wrttp_from  TYPE BPGE-WRTTP ,
ld_iflg_suppl_ret_split  TYPE IM_FLG_SUPPL_RET_SPLIT ,
ld_iflg_reconv_obj_to_ca  TYPE IM_OBJTOCA ,
ld_iflg_reconv_ca_to_obj  TYPE IM_CATOOBJ ,
ld_id_reconv_from_year  TYPE IM_YFROMRC ,
ld_iflg_adjust_to_actuals  TYPE XFELD ,
ld_id_adjust_statsel  TYPE IM_STATSEL ,
ld_iflg_cons_only  TYPE XFELD ,
ld_iflg_cons_check  TYPE IM_CONSCHECK_COAREA ,
ld_iflg_cons_check_obj  TYPE IM_CONSCHECK_OBJ ,
ld_iflg_cons_check_def  TYPE IM_CONSCHECK_DEF ,
ld_iflg_cons_adjust  TYPE XFELD ,
ld_id_cons_severity  TYPE SYMSGTY ,
ld_iflg_test_run  TYPE XFELD ,
ld_id_sgtxt  TYPE SGTXT .


SELECT single VERSN
FROM BPGE
INTO ld_id_versn.


"populate fields of struture and append to itab
append wa_it_obj to it_it_obj.

SELECT single WRTTP
FROM BPGE
INTO ld_id_wrttp.


"populate fields of struture and append to itab
append wa_itx_covob_source to it_itx_covob_source.

SELECT single VERSN
FROM BPGE
INTO ld_id_versn_from.


"populate fields of struture and append to itab
append wa_et_return to it_et_return.

SELECT single WRTTP
FROM BPGE
INTO ld_id_wrttp_from.

ld_iflg_suppl_ret_split = 'some text here'.
ld_iflg_reconv_obj_to_ca = 'some text here'.
ld_iflg_reconv_ca_to_obj = 'some text here'.
ld_id_reconv_from_year = 'some text here'.
ld_iflg_adjust_to_actuals = 'some text here'.
ld_id_adjust_statsel = 'some text here'.
ld_iflg_cons_only = 'some text here'.
ld_iflg_cons_check = 'some text here'.
ld_iflg_cons_check_obj = 'some text here'.
ld_iflg_cons_check_def = 'some text here'.
ld_iflg_cons_adjust = 'some text here'.
ld_id_cons_severity = 'some text here'.
ld_iflg_test_run = 'some text here'.
ld_id_sgtxt = '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 AIPA_CP_ORD or its description.