SAP /ACCGO/BAPI_ADD_FEE_TO_DOC Function Module for Add Fees to Logistics Documents
/ACCGO/BAPI_ADD_FEE_TO_DOC is a standard /accgo/bapi add fee to doc SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Add Fees to Logistics Documents processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for /accgo/bapi add fee to doc FM, simply by entering the name /ACCGO/BAPI_ADD_FEE_TO_DOC into the relevant SAP transaction such as SE37 or SE38.
Function Group: /ACCGO/FG_ADD_FEE_TO_DOC
Program Name: /ACCGO/SAPLFG_ADD_FEE_TO_DOC
Main Program: /ACCGO/SAPLFG_ADD_FEE_TO_DOC
Appliation area:
Release date: 04-Sep-2020
Mode(Normal, Remote etc): Remote-Enabled
Update:
![](https://www.se80.co.uk/training-education/wp-content/uploads/2019/07/normal-function-module.png)
Function /ACCGO/BAPI_ADD_FEE_TO_DOC pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION '/ACCGO/BAPI_ADD_FEE_TO_DOC'"Add Fees to Logistics Documents.
EXPORTING
IT_DOCUMENT_DATA = "Fee Assignment Table type
* IV_COMMIT = 'X' "Data element for domain BOOLE: TRUE (='X') and FALSE (=' ')
* IV_PARTIAL_SAVING = 'X' "Partial saving allowed or not
* IV_SKIP_PF_EXIST = "Skip validation on Creation mode for PFX
* IV_SKIP_RESET = "Skip reset of all instances
IMPORTING
ET_RETURN = "Return parameter table
IMPORTING Parameters details for /ACCGO/BAPI_ADD_FEE_TO_DOC
IT_DOCUMENT_DATA - Fee Assignment Table type
Data type: /ACCGO/TT_DOC_FEE_ASGOptional: No
Call by Reference: No ( called with pass by value option)
IV_COMMIT - Data element for domain BOOLE: TRUE (='X') and FALSE (=' ')
Data type: BOOLE_DDefault: 'X'
Optional: No
Call by Reference: No ( called with pass by value option)
IV_PARTIAL_SAVING - Partial saving allowed or not
Data type: BOOLE_DDefault: 'X'
Optional: No
Call by Reference: No ( called with pass by value option)
IV_SKIP_PF_EXIST - Skip validation on Creation mode for PFX
Data type: BOOLE_DOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_SKIP_RESET - Skip reset of all instances
Data type: BOOLE_DOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for /ACCGO/BAPI_ADD_FEE_TO_DOC
ET_RETURN - Return parameter table
Data type: BAPIRET2_TOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for /ACCGO/BAPI_ADD_FEE_TO_DOC Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.DATA: | ||||
lv_et_return | TYPE BAPIRET2_T, " | |||
lv_it_document_data | TYPE /ACCGO/TT_DOC_FEE_ASG, " | |||
lv_iv_commit | TYPE BOOLE_D, " 'X' | |||
lv_iv_partial_saving | TYPE BOOLE_D, " 'X' | |||
lv_iv_skip_pf_exist | TYPE BOOLE_D, " | |||
lv_iv_skip_reset | TYPE BOOLE_D. " |
  CALL FUNCTION '/ACCGO/BAPI_ADD_FEE_TO_DOC' "Add Fees to Logistics Documents |
EXPORTING | ||
IT_DOCUMENT_DATA | = lv_it_document_data | |
IV_COMMIT | = lv_iv_commit | |
IV_PARTIAL_SAVING | = lv_iv_partial_saving | |
IV_SKIP_PF_EXIST | = lv_iv_skip_pf_exist | |
IV_SKIP_RESET | = lv_iv_skip_reset | |
IMPORTING | ||
ET_RETURN | = lv_et_return | |
. " /ACCGO/BAPI_ADD_FEE_TO_DOC |
ABAP code using 7.40 inline data declarations to call FM /ACCGO/BAPI_ADD_FEE_TO_DOC
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.DATA(ld_iv_commit) | = 'X'. | |||
DATA(ld_iv_partial_saving) | = 'X'. | |||
Search for further information about these or an SAP related objects