SAP Function Modules

IAOM_GET_ACCOUNT_ASSIGNMENT SAP Function module







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

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


Pattern for FM IAOM_GET_ACCOUNT_ASSIGNMENT - IAOM GET ACCOUNT ASSIGNMENT





CALL FUNCTION 'IAOM_GET_ACCOUNT_ASSIGNMENT' "
  EXPORTING
    i_bus_scenario_id =         " iaom_bs_identification  Business Scenario Indicator
    i_ext_object_id =           " iaom_ext_object_id  Technical Key of the External Object
*   i_base_uom =                " meins
*   i_posting_year =            " gjahr
*   i_with_log = 'X'            " boole_d
*   i_sub_obj_attrs =           " iaomt_sub_object_attribute_tab
*   i_ext_object_exist_check = ' '  " boole_d
*   i_historic_date = '00000000'  " datum       Historical Date
*   i_historic_time = '000000'  " uzeit
*   i_accept_no_controlling_object = ' '  " boole_d
*   i_avoid_checks = ' '        " boole_d
  IMPORTING
    e_account_assignment =      " iaom_account_assignment
    e_add_acc_info =            " iaom_add_acc_info  Additional Account Assignment Information
    e_account_assignment_set =   " iaom_account_assignment
    e_add_acc_info_set =        " iaom_add_acc_info
    e_business_key =            " iaom_business_key  Business (for Displaying Suitable) Object Keys
    e_hierarchy_level =         " iaom_object_level  Hierarchy Level of Object
    e_acc_ass_object_id =       " iaom_ext_object_id
    et_process_attributes =     " iaomt_object_attribute_tab  Process Attributes
    et_attributes =             " iaomt_object_attribute_tab  Attributes
    e_pre_acc_ass_object_id =   " iaom_ext_object_id  External Object Technical Key
    et_acc_ass_attributes =     " iaomt_object_attribute_tab  Attributes
    e_system_of_origin =        " logsystem     Logical System
    e_higher_level_object_id =   " iaom_ext_object_id
    e_referenced_object_id =    " iaom_ext_object_id
    e_archivable =              " boole_d
  EXCEPTIONS
    BUS_SCENARIO_UNKNOWN = 1    "
    EXT_OBJECT_ID_UNKNOWN = 2   "
    OBJECT_LOCKED = 3           "
    EXT_OBJECT_NOT_CO_RELEVANT = 4  "           External Object May Not be Assigned to an Account
    POSTING_YEAR_MISSING = 5    "
    PROF_SEGMENT_ERROR = 6      "
    OTHER_ERROR = 7             "
    EXT_OBJECT_ACC_ASS_PENDING = 8  "           Account Assignment in the Balance
    .  "  IAOM_GET_ACCOUNT_ASSIGNMENT

ABAP code example for Function Module IAOM_GET_ACCOUNT_ASSIGNMENT





The ABAP code below is a full code listing to execute function module IAOM_GET_ACCOUNT_ASSIGNMENT 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_account_assignment  TYPE IAOM_ACCOUNT_ASSIGNMENT ,
ld_e_add_acc_info  TYPE IAOM_ADD_ACC_INFO ,
ld_e_account_assignment_set  TYPE IAOM_ACCOUNT_ASSIGNMENT ,
ld_e_add_acc_info_set  TYPE IAOM_ADD_ACC_INFO ,
ld_e_business_key  TYPE IAOM_BUSINESS_KEY ,
ld_e_hierarchy_level  TYPE IAOM_OBJECT_LEVEL ,
ld_e_acc_ass_object_id  TYPE IAOM_EXT_OBJECT_ID ,
ld_et_process_attributes  TYPE IAOMT_OBJECT_ATTRIBUTE_TAB ,
ld_et_attributes  TYPE IAOMT_OBJECT_ATTRIBUTE_TAB ,
ld_e_pre_acc_ass_object_id  TYPE IAOM_EXT_OBJECT_ID ,
ld_et_acc_ass_attributes  TYPE IAOMT_OBJECT_ATTRIBUTE_TAB ,
ld_e_system_of_origin  TYPE LOGSYSTEM ,
ld_e_higher_level_object_id  TYPE IAOM_EXT_OBJECT_ID ,
ld_e_referenced_object_id  TYPE IAOM_EXT_OBJECT_ID ,
ld_e_archivable  TYPE BOOLE_D .

DATA(ld_i_bus_scenario_id) = 'Check type of data required'.
DATA(ld_i_ext_object_id) = 'Check type of data required'.
DATA(ld_i_base_uom) = 'Check type of data required'.
DATA(ld_i_posting_year) = 'Check type of data required'.
DATA(ld_i_with_log) = 'Check type of data required'.
DATA(ld_i_sub_obj_attrs) = 'Check type of data required'.
DATA(ld_i_ext_object_exist_check) = 'Check type of data required'.
DATA(ld_i_historic_date) = 'Check type of data required'.
DATA(ld_i_historic_time) = 'Check type of data required'.
DATA(ld_i_accept_no_controlling_object) = 'Check type of data required'.
DATA(ld_i_avoid_checks) = 'Check type of data required'. . CALL FUNCTION 'IAOM_GET_ACCOUNT_ASSIGNMENT' EXPORTING i_bus_scenario_id = ld_i_bus_scenario_id i_ext_object_id = ld_i_ext_object_id * i_base_uom = ld_i_base_uom * i_posting_year = ld_i_posting_year * i_with_log = ld_i_with_log * i_sub_obj_attrs = ld_i_sub_obj_attrs * i_ext_object_exist_check = ld_i_ext_object_exist_check * i_historic_date = ld_i_historic_date * i_historic_time = ld_i_historic_time * i_accept_no_controlling_object = ld_i_accept_no_controlling_object * i_avoid_checks = ld_i_avoid_checks IMPORTING e_account_assignment = ld_e_account_assignment e_add_acc_info = ld_e_add_acc_info e_account_assignment_set = ld_e_account_assignment_set e_add_acc_info_set = ld_e_add_acc_info_set e_business_key = ld_e_business_key e_hierarchy_level = ld_e_hierarchy_level e_acc_ass_object_id = ld_e_acc_ass_object_id et_process_attributes = ld_et_process_attributes et_attributes = ld_et_attributes e_pre_acc_ass_object_id = ld_e_pre_acc_ass_object_id et_acc_ass_attributes = ld_et_acc_ass_attributes e_system_of_origin = ld_e_system_of_origin e_higher_level_object_id = ld_e_higher_level_object_id e_referenced_object_id = ld_e_referenced_object_id e_archivable = ld_e_archivable EXCEPTIONS BUS_SCENARIO_UNKNOWN = 1 EXT_OBJECT_ID_UNKNOWN = 2 OBJECT_LOCKED = 3 EXT_OBJECT_NOT_CO_RELEVANT = 4 POSTING_YEAR_MISSING = 5 PROF_SEGMENT_ERROR = 6 OTHER_ERROR = 7 EXT_OBJECT_ACC_ASS_PENDING = 8 . " IAOM_GET_ACCOUNT_ASSIGNMENT
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 ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "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_e_account_assignment  TYPE IAOM_ACCOUNT_ASSIGNMENT ,
ld_i_bus_scenario_id  TYPE IAOM_BS_IDENTIFICATION ,
ld_i_ext_object_id  TYPE IAOM_EXT_OBJECT_ID ,
ld_e_add_acc_info  TYPE IAOM_ADD_ACC_INFO ,
ld_e_account_assignment_set  TYPE IAOM_ACCOUNT_ASSIGNMENT ,
ld_i_base_uom  TYPE MEINS ,
ld_i_posting_year  TYPE GJAHR ,
ld_e_add_acc_info_set  TYPE IAOM_ADD_ACC_INFO ,
ld_i_with_log  TYPE BOOLE_D ,
ld_e_business_key  TYPE IAOM_BUSINESS_KEY ,
ld_i_sub_obj_attrs  TYPE IAOMT_SUB_OBJECT_ATTRIBUTE_TAB ,
ld_e_hierarchy_level  TYPE IAOM_OBJECT_LEVEL ,
ld_i_ext_object_exist_check  TYPE BOOLE_D ,
ld_e_acc_ass_object_id  TYPE IAOM_EXT_OBJECT_ID ,
ld_i_historic_date  TYPE DATUM ,
ld_et_process_attributes  TYPE IAOMT_OBJECT_ATTRIBUTE_TAB ,
ld_i_historic_time  TYPE UZEIT ,
ld_et_attributes  TYPE IAOMT_OBJECT_ATTRIBUTE_TAB ,
ld_i_accept_no_controlling_object  TYPE BOOLE_D ,
ld_e_pre_acc_ass_object_id  TYPE IAOM_EXT_OBJECT_ID ,
ld_et_acc_ass_attributes  TYPE IAOMT_OBJECT_ATTRIBUTE_TAB ,
ld_i_avoid_checks  TYPE BOOLE_D ,
ld_e_system_of_origin  TYPE LOGSYSTEM ,
ld_e_higher_level_object_id  TYPE IAOM_EXT_OBJECT_ID ,
ld_e_referenced_object_id  TYPE IAOM_EXT_OBJECT_ID ,
ld_e_archivable  TYPE BOOLE_D .

ld_i_bus_scenario_id = 'Check type of data required'.
ld_i_ext_object_id = 'Check type of data required'.
ld_i_base_uom = 'Check type of data required'.
ld_i_posting_year = 'Check type of data required'.
ld_i_with_log = 'Check type of data required'.
ld_i_sub_obj_attrs = 'Check type of data required'.
ld_i_ext_object_exist_check = 'Check type of data required'.
ld_i_historic_date = 'Check type of data required'.
ld_i_historic_time = 'Check type of data required'.
ld_i_accept_no_controlling_object = 'Check type of data required'.
ld_i_avoid_checks = 'Check type of data required'.

SAP Documentation for FM IAOM_GET_ACCOUNT_ASSIGNMENT


The function module returns the account assignment for an external object, which was previously determined using the function module IAOM_ ...See here for full SAP fm documentation





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