SAP Function Modules

B45A_AP_ACC_GETBALANCEDITEMS SAP Function module - Display purchase order details







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

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


Pattern for FM B45A_AP_ACC_GETBALANCEDITEMS - B45A AP ACC GETBALANCEDITEMS





CALL FUNCTION 'B45A_AP_ACC_GETBALANCEDITEMS' "Display purchase order details
  IMPORTING
    po_header =                 " bbps_bapiekkol  PO header data
    po_address =                " bbps_bapiaddress  Ordering address data
* TABLES
*   po_header_texts =           " bbps_bapiekkotx  PO header texts
*   po_items =                  " bbps_bapiekpo  Purchase order items
*   po_item_account_assignment =   " bbp_bapiekkn  Account assignment data for item
*   po_item_schedules =         " bbps_bapieket  Schedule lines for item
*   po_item_confirmations =     " bbps_bapiekes  Confirmations for item
*   po_item_texts =             " bbps_bapiekpotx  Texts for item
*   po_item_history =           " bbps_bapiekbe  PO history for item
*   po_item_history_totals =    " bbps_bapiekbes  PO history for item: totals
*   po_item_limits =            " bbps_bapiesuh  Limits
*   po_item_contract_limits =   " bbps_bapiesuc  Limits with contract reference
*   po_item_services =          " bbps_bapiesll  Services
*   po_item_srv_accass_values =   " bbps_bapieskl  Value/link to service account assignment
*   return =                    " bapireturn    Return messages
*   control_record =            " bbp_control_record  Meta BAPI control record
    .  "  B45A_AP_ACC_GETBALANCEDITEMS

ABAP code example for Function Module B45A_AP_ACC_GETBALANCEDITEMS





The ABAP code below is a full code listing to execute function module B45A_AP_ACC_GETBALANCEDITEMS 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_po_header  TYPE BBPS_BAPIEKKOL ,
ld_po_address  TYPE BBPS_BAPIADDRESS ,
it_po_header_texts  TYPE STANDARD TABLE OF BBPS_BAPIEKKOTX,"TABLES PARAM
wa_po_header_texts  LIKE LINE OF it_po_header_texts ,
it_po_items  TYPE STANDARD TABLE OF BBPS_BAPIEKPO,"TABLES PARAM
wa_po_items  LIKE LINE OF it_po_items ,
it_po_item_account_assignment  TYPE STANDARD TABLE OF BBP_BAPIEKKN,"TABLES PARAM
wa_po_item_account_assignment  LIKE LINE OF it_po_item_account_assignment ,
it_po_item_schedules  TYPE STANDARD TABLE OF BBPS_BAPIEKET,"TABLES PARAM
wa_po_item_schedules  LIKE LINE OF it_po_item_schedules ,
it_po_item_confirmations  TYPE STANDARD TABLE OF BBPS_BAPIEKES,"TABLES PARAM
wa_po_item_confirmations  LIKE LINE OF it_po_item_confirmations ,
it_po_item_texts  TYPE STANDARD TABLE OF BBPS_BAPIEKPOTX,"TABLES PARAM
wa_po_item_texts  LIKE LINE OF it_po_item_texts ,
it_po_item_history  TYPE STANDARD TABLE OF BBPS_BAPIEKBE,"TABLES PARAM
wa_po_item_history  LIKE LINE OF it_po_item_history ,
it_po_item_history_totals  TYPE STANDARD TABLE OF BBPS_BAPIEKBES,"TABLES PARAM
wa_po_item_history_totals  LIKE LINE OF it_po_item_history_totals ,
it_po_item_limits  TYPE STANDARD TABLE OF BBPS_BAPIESUH,"TABLES PARAM
wa_po_item_limits  LIKE LINE OF it_po_item_limits ,
it_po_item_contract_limits  TYPE STANDARD TABLE OF BBPS_BAPIESUC,"TABLES PARAM
wa_po_item_contract_limits  LIKE LINE OF it_po_item_contract_limits ,
it_po_item_services  TYPE STANDARD TABLE OF BBPS_BAPIESLL,"TABLES PARAM
wa_po_item_services  LIKE LINE OF it_po_item_services ,
it_po_item_srv_accass_values  TYPE STANDARD TABLE OF BBPS_BAPIESKL,"TABLES PARAM
wa_po_item_srv_accass_values  LIKE LINE OF it_po_item_srv_accass_values ,
it_return  TYPE STANDARD TABLE OF BAPIRETURN,"TABLES PARAM
wa_return  LIKE LINE OF it_return ,
it_control_record  TYPE STANDARD TABLE OF BBP_CONTROL_RECORD,"TABLES PARAM
wa_control_record  LIKE LINE OF it_control_record .


"populate fields of struture and append to itab
append wa_po_header_texts to it_po_header_texts.

"populate fields of struture and append to itab
append wa_po_items to it_po_items.

"populate fields of struture and append to itab
append wa_po_item_account_assignment to it_po_item_account_assignment.

"populate fields of struture and append to itab
append wa_po_item_schedules to it_po_item_schedules.

"populate fields of struture and append to itab
append wa_po_item_confirmations to it_po_item_confirmations.

"populate fields of struture and append to itab
append wa_po_item_texts to it_po_item_texts.

"populate fields of struture and append to itab
append wa_po_item_history to it_po_item_history.

"populate fields of struture and append to itab
append wa_po_item_history_totals to it_po_item_history_totals.

"populate fields of struture and append to itab
append wa_po_item_limits to it_po_item_limits.

"populate fields of struture and append to itab
append wa_po_item_contract_limits to it_po_item_contract_limits.

"populate fields of struture and append to itab
append wa_po_item_services to it_po_item_services.

"populate fields of struture and append to itab
append wa_po_item_srv_accass_values to it_po_item_srv_accass_values.

"populate fields of struture and append to itab
append wa_return to it_return.

"populate fields of struture and append to itab
append wa_control_record to it_control_record. . CALL FUNCTION 'B45A_AP_ACC_GETBALANCEDITEMS' IMPORTING po_header = ld_po_header po_address = ld_po_address * TABLES * po_header_texts = it_po_header_texts * po_items = it_po_items * po_item_account_assignment = it_po_item_account_assignment * po_item_schedules = it_po_item_schedules * po_item_confirmations = it_po_item_confirmations * po_item_texts = it_po_item_texts * po_item_history = it_po_item_history * po_item_history_totals = it_po_item_history_totals * po_item_limits = it_po_item_limits * po_item_contract_limits = it_po_item_contract_limits * po_item_services = it_po_item_services * po_item_srv_accass_values = it_po_item_srv_accass_values * return = it_return * control_record = it_control_record . " B45A_AP_ACC_GETBALANCEDITEMS
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_po_header  TYPE BBPS_BAPIEKKOL ,
it_po_header_texts  TYPE STANDARD TABLE OF BBPS_BAPIEKKOTX ,
wa_po_header_texts  LIKE LINE OF it_po_header_texts,
ld_po_address  TYPE BBPS_BAPIADDRESS ,
it_po_items  TYPE STANDARD TABLE OF BBPS_BAPIEKPO ,
wa_po_items  LIKE LINE OF it_po_items,
it_po_item_account_assignment  TYPE STANDARD TABLE OF BBP_BAPIEKKN ,
wa_po_item_account_assignment  LIKE LINE OF it_po_item_account_assignment,
it_po_item_schedules  TYPE STANDARD TABLE OF BBPS_BAPIEKET ,
wa_po_item_schedules  LIKE LINE OF it_po_item_schedules,
it_po_item_confirmations  TYPE STANDARD TABLE OF BBPS_BAPIEKES ,
wa_po_item_confirmations  LIKE LINE OF it_po_item_confirmations,
it_po_item_texts  TYPE STANDARD TABLE OF BBPS_BAPIEKPOTX ,
wa_po_item_texts  LIKE LINE OF it_po_item_texts,
it_po_item_history  TYPE STANDARD TABLE OF BBPS_BAPIEKBE ,
wa_po_item_history  LIKE LINE OF it_po_item_history,
it_po_item_history_totals  TYPE STANDARD TABLE OF BBPS_BAPIEKBES ,
wa_po_item_history_totals  LIKE LINE OF it_po_item_history_totals,
it_po_item_limits  TYPE STANDARD TABLE OF BBPS_BAPIESUH ,
wa_po_item_limits  LIKE LINE OF it_po_item_limits,
it_po_item_contract_limits  TYPE STANDARD TABLE OF BBPS_BAPIESUC ,
wa_po_item_contract_limits  LIKE LINE OF it_po_item_contract_limits,
it_po_item_services  TYPE STANDARD TABLE OF BBPS_BAPIESLL ,
wa_po_item_services  LIKE LINE OF it_po_item_services,
it_po_item_srv_accass_values  TYPE STANDARD TABLE OF BBPS_BAPIESKL ,
wa_po_item_srv_accass_values  LIKE LINE OF it_po_item_srv_accass_values,
it_return  TYPE STANDARD TABLE OF BAPIRETURN ,
wa_return  LIKE LINE OF it_return,
it_control_record  TYPE STANDARD TABLE OF BBP_CONTROL_RECORD ,
wa_control_record  LIKE LINE OF it_control_record.


"populate fields of struture and append to itab
append wa_po_header_texts to it_po_header_texts.

"populate fields of struture and append to itab
append wa_po_items to it_po_items.

"populate fields of struture and append to itab
append wa_po_item_account_assignment to it_po_item_account_assignment.

"populate fields of struture and append to itab
append wa_po_item_schedules to it_po_item_schedules.

"populate fields of struture and append to itab
append wa_po_item_confirmations to it_po_item_confirmations.

"populate fields of struture and append to itab
append wa_po_item_texts to it_po_item_texts.

"populate fields of struture and append to itab
append wa_po_item_history to it_po_item_history.

"populate fields of struture and append to itab
append wa_po_item_history_totals to it_po_item_history_totals.

"populate fields of struture and append to itab
append wa_po_item_limits to it_po_item_limits.

"populate fields of struture and append to itab
append wa_po_item_contract_limits to it_po_item_contract_limits.

"populate fields of struture and append to itab
append wa_po_item_services to it_po_item_services.

"populate fields of struture and append to itab
append wa_po_item_srv_accass_values to it_po_item_srv_accass_values.

"populate fields of struture and append to itab
append wa_return to it_return.

"populate fields of struture and append to itab
append wa_control_record to it_control_record.

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