SAP AFX_ACTVTLOG_CREATE Function Module for
AFX_ACTVTLOG_CREATE is a standard afx actvtlog create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 afx actvtlog create FM, simply by entering the name AFX_ACTVTLOG_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: AFX_ACTVT_GLOBAL
Program Name: SAPLAFX_ACTVT_GLOBAL
Main Program: SAPLAFX_ACTVT_GLOBAL
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function AFX_ACTVTLOG_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 'AFX_ACTVTLOG_CREATE'".
EXPORTING
* I_LOG_OBJECT = "Application log: Object name (Application code)
* I_RUNUSER = SY-UNAME "User who Started Program Run
* I_STARTDATE = SY-DATUM "Date of Mass Run
* I_STARTTIME = SY-UZEIT "Time of Program Run
* I_LOG_OBJECT_EXC = "Application log: Object name (Application code)
* I_LOG_EXTNUMBER = "Application Log: External ID
* I_LOG_ALDATE = "Application log: date
* I_LOG_ALPROG = "Application log: Program name
* I_PROG_TYPE = "Program Type
* I_OBJECT = "Archiving Object
* I_APPLCATG = "Application Type in Parallel Processing
* I_ARMODE = "Archiving mode
IMPORTING
E_STR_ACTVT_LOG = "Activity ID
EXCEPTIONS
ACTVT_ID_GET_FAILED = 1 ACTVT_LOG_CREATE_FAILED = 2
IMPORTING Parameters details for AFX_ACTVTLOG_CREATE
I_LOG_OBJECT - Application log: Object name (Application code)
Data type: BALOBJ_DOptional: Yes
Call by Reference: Yes
I_RUNUSER - User who Started Program Run
Data type: BANK_DTE_PP_RUNUSRDefault: SY-UNAME
Optional: Yes
Call by Reference: Yes
I_STARTDATE - Date of Mass Run
Data type: BANK_DTE_PP_RUNDATDefault: SY-DATUM
Optional: Yes
Call by Reference: Yes
I_STARTTIME - Time of Program Run
Data type: BANK_DTE_PP_RUNTIMDefault: SY-UZEIT
Optional: Yes
Call by Reference: Yes
I_LOG_OBJECT_EXC - Application log: Object name (Application code)
Data type: BALOBJ_DOptional: Yes
Call by Reference: Yes
I_LOG_EXTNUMBER - Application Log: External ID
Data type: BALNREXTOptional: Yes
Call by Reference: Yes
I_LOG_ALDATE - Application log: date
Data type: BALDATEOptional: Yes
Call by Reference: Yes
I_LOG_ALPROG - Application log: Program name
Data type: BALPROGOptional: Yes
Call by Reference: Yes
I_PROG_TYPE - Program Type
Data type: AFX_DTE_PROG_TYPEOptional: Yes
Call by Reference: Yes
I_OBJECT - Archiving Object
Data type: OBJCT_TR01Optional: Yes
Call by Reference: Yes
I_APPLCATG - Application Type in Parallel Processing
Data type: BANK_DTE_PP_PAAPPLCATGOptional: Yes
Call by Reference: Yes
I_ARMODE - Archiving mode
Data type: AFX_DTE_ARCHMODEOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for AFX_ACTVTLOG_CREATE
E_STR_ACTVT_LOG - Activity ID
Data type: AFX_STR_ACTVTOptional: No
Call by Reference: Yes
EXCEPTIONS details
ACTVT_ID_GET_FAILED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ACTVT_LOG_CREATE_FAILED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for AFX_ACTVTLOG_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_log_object | TYPE BALOBJ_D, " | |||
| lv_e_str_actvt_log | TYPE AFX_STR_ACTVT, " | |||
| lv_actvt_id_get_failed | TYPE AFX_STR_ACTVT, " | |||
| lv_i_runuser | TYPE BANK_DTE_PP_RUNUSR, " SY-UNAME | |||
| lv_i_startdate | TYPE BANK_DTE_PP_RUNDAT, " SY-DATUM | |||
| lv_i_starttime | TYPE BANK_DTE_PP_RUNTIM, " SY-UZEIT | |||
| lv_i_log_object_exc | TYPE BALOBJ_D, " | |||
| lv_actvt_log_create_failed | TYPE BALOBJ_D, " | |||
| lv_i_log_extnumber | TYPE BALNREXT, " | |||
| lv_i_log_aldate | TYPE BALDATE, " | |||
| lv_i_log_alprog | TYPE BALPROG, " | |||
| lv_i_prog_type | TYPE AFX_DTE_PROG_TYPE, " | |||
| lv_i_object | TYPE OBJCT_TR01, " | |||
| lv_i_applcatg | TYPE BANK_DTE_PP_PAAPPLCATG, " | |||
| lv_i_armode | TYPE AFX_DTE_ARCHMODE. " |
|   CALL FUNCTION 'AFX_ACTVTLOG_CREATE' " |
| EXPORTING | ||
| I_LOG_OBJECT | = lv_i_log_object | |
| I_RUNUSER | = lv_i_runuser | |
| I_STARTDATE | = lv_i_startdate | |
| I_STARTTIME | = lv_i_starttime | |
| I_LOG_OBJECT_EXC | = lv_i_log_object_exc | |
| I_LOG_EXTNUMBER | = lv_i_log_extnumber | |
| I_LOG_ALDATE | = lv_i_log_aldate | |
| I_LOG_ALPROG | = lv_i_log_alprog | |
| I_PROG_TYPE | = lv_i_prog_type | |
| I_OBJECT | = lv_i_object | |
| I_APPLCATG | = lv_i_applcatg | |
| I_ARMODE | = lv_i_armode | |
| IMPORTING | ||
| E_STR_ACTVT_LOG | = lv_e_str_actvt_log | |
| EXCEPTIONS | ||
| ACTVT_ID_GET_FAILED = 1 | ||
| ACTVT_LOG_CREATE_FAILED = 2 | ||
| . " AFX_ACTVTLOG_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM AFX_ACTVTLOG_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.| DATA(ld_i_runuser) | = SY-UNAME. | |||
| DATA(ld_i_startdate) | = SY-DATUM. | |||
| DATA(ld_i_starttime) | = SY-UZEIT. | |||
Search for further information about these or an SAP related objects