SAP AFO_TAFO_POSFUT_CREATE Function Module for Anlegen eines Positionskonto-Gattungs-Bestand
AFO_TAFO_POSFUT_CREATE is a standard afo tafo posfut create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Anlegen eines Positionskonto-Gattungs-Bestand 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 afo tafo posfut create FM, simply by entering the name AFO_TAFO_POSFUT_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: AFO_TAFO
Program Name: SAPLAFO_TAFO
Main Program: SAPLAFO_TAFO
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function AFO_TAFO_POSFUT_CREATE 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 'AFO_TAFO_POSFUT_CREATE'"Anlegen eines Positionskonto-Gattungs-Bestand.
EXPORTING
I_OBJNR = "Objektnummer für Finanzgeschäfte
I_CLASS_POS = "Treasury: Mappingstruktur für TRF-Gattungsposition
* I_FLG_TEST_RUN = ' ' "Flag Testlauf ('X'); die Daten des Finanzobjekts werden nicht gesichert
I_MSG_HANDLER = "Treasury: Protokoll-Verwalter
IMPORTING
E_FLG_ERROR = "Flag für einen schweren Fehler - Keine Sicherung der Daten
IMPORTING Parameters details for AFO_TAFO_POSFUT_CREATE
I_OBJNR - Objektnummer für Finanzgeschäfte
Data type: JBDOBJ1-OBJNROptional: No
Call by Reference: Yes
I_CLASS_POS - Treasury: Mappingstruktur für TRF-Gattungsposition
Data type: TRFS_CLASS_POSOptional: No
Call by Reference: Yes
I_FLG_TEST_RUN - Flag Testlauf ('X'); die Daten des Finanzobjekts werden nicht gesichert
Data type: CDefault: ' '
Optional: Yes
Call by Reference: Yes
I_MSG_HANDLER - Treasury: Protokoll-Verwalter
Data type: CL_PROTOCOL_HANDLER_TRPOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for AFO_TAFO_POSFUT_CREATE
E_FLG_ERROR - Flag für einen schweren Fehler - Keine Sicherung der Daten
Data type: COptional: No
Call by Reference: Yes
Copy and paste ABAP code example for AFO_TAFO_POSFUT_CREATE 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_objnr | TYPE JBDOBJ1-OBJNR, " | |||
| lv_e_flg_error | TYPE C, " | |||
| lv_i_class_pos | TYPE TRFS_CLASS_POS, " | |||
| lv_i_flg_test_run | TYPE C, " ' ' | |||
| lv_i_msg_handler | TYPE CL_PROTOCOL_HANDLER_TRP. " |
|   CALL FUNCTION 'AFO_TAFO_POSFUT_CREATE' "Anlegen eines Positionskonto-Gattungs-Bestand |
| EXPORTING | ||
| I_OBJNR | = lv_i_objnr | |
| I_CLASS_POS | = lv_i_class_pos | |
| I_FLG_TEST_RUN | = lv_i_flg_test_run | |
| I_MSG_HANDLER | = lv_i_msg_handler | |
| IMPORTING | ||
| E_FLG_ERROR | = lv_e_flg_error | |
| . " AFO_TAFO_POSFUT_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM AFO_TAFO_POSFUT_CREATE
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 OBJNR FROM JBDOBJ1 INTO @DATA(ld_i_objnr). | ||||
| DATA(ld_i_flg_test_run) | = ' '. | |||
Search for further information about these or an SAP related objects