SAP FM_ADVANCE_CASH Function Module for Create, check and post the following documents
FM_ADVANCE_CASH is a standard fm advance cash SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create, check and post the following 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 fm advance cash FM, simply by entering the name FM_ADVANCE_CASH into the relevant SAP transaction such as SE37 or SE38.
Function Group: FM_ADV_CASH_FUNCTIONS
Program Name: SAPLFM_ADV_CASH_FUNCTIONS
Main Program: SAPLFM_ADV_CASH_FUNCTIONS
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FM_ADVANCE_CASH 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 'FM_ADVANCE_CASH'"Create, check and post the following documents.
EXPORTING
I_ACTVT = "Activity
* I_RQUSE = ' ' "Specific Use
* U_T_WITH = "Table type for with item
TABLES
T_VBKPF = "
T_VBSEG = "
EXCEPTIONS
ERROR_POSTING_DOCUMENTS = 1
IMPORTING Parameters details for FM_ADVANCE_CASH
I_ACTVT - Activity
Data type: TACT-ACTVTOptional: No
Call by Reference: Yes
I_RQUSE - Specific Use
Data type: FM_RQUSEDefault: SPACE
Optional: Yes
Call by Reference: Yes
U_T_WITH - Table type for with item
Data type: WITH_TEM_TABOptional: Yes
Call by Reference: Yes
TABLES Parameters details for FM_ADVANCE_CASH
T_VBKPF -
Data type: FM_VBKPF_TABOptional: No
Call by Reference: Yes
T_VBSEG -
Data type: FM_VBSEG_TABOptional: No
Call by Reference: Yes
EXCEPTIONS details
ERROR_POSTING_DOCUMENTS -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FM_ADVANCE_CASH 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_i_actvt | TYPE TACT-ACTVT, " | |||
| lt_t_vbkpf | TYPE STANDARD TABLE OF FM_VBKPF_TAB, " | |||
| lv_error_posting_documents | TYPE FM_VBKPF_TAB, " | |||
| lv_i_rquse | TYPE FM_RQUSE, " SPACE | |||
| lt_t_vbseg | TYPE STANDARD TABLE OF FM_VBSEG_TAB, " | |||
| lv_u_t_with | TYPE WITH_TEM_TAB. " |
|   CALL FUNCTION 'FM_ADVANCE_CASH' "Create, check and post the following documents |
| EXPORTING | ||
| I_ACTVT | = lv_i_actvt | |
| I_RQUSE | = lv_i_rquse | |
| U_T_WITH | = lv_u_t_with | |
| TABLES | ||
| T_VBKPF | = lt_t_vbkpf | |
| T_VBSEG | = lt_t_vbseg | |
| EXCEPTIONS | ||
| ERROR_POSTING_DOCUMENTS = 1 | ||
| . " FM_ADVANCE_CASH | ||
ABAP code using 7.40 inline data declarations to call FM FM_ADVANCE_CASH
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.| "SELECT single ACTVT FROM TACT INTO @DATA(ld_i_actvt). | ||||
| DATA(ld_i_rquse) | = ' '. | |||
Search for further information about these or an SAP related objects