SAP FITP_API_CREATE_HAFAS_CONTEXT Function Module for









FITP_API_CREATE_HAFAS_CONTEXT is a standard fitp api create hafas context 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 fitp api create hafas context FM, simply by entering the name FITP_API_CREATE_HAFAS_CONTEXT into the relevant SAP transaction such as SE37 or SE38.

Function Group: FITP_API_HAFAS
Program Name: SAPLFITP_API_HAFAS
Main Program:
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function FITP_API_CREATE_HAFAS_CONTEXT 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 'FITP_API_CREATE_HAFAS_CONTEXT'"
EXPORTING
HAFAS_VER = "
DLL_DIR = "

IMPORTING
HANDLE = "

EXCEPTIONS
HHAC_INVALID_HWND = 1 HHAC_INVALID_HINST = 2 HHAC_INVALID_HPID = 3 HHAC_INVALID_PTR = 4 HHAC_STR_TOO_LONG = 5 HHAC_NO_MEMORY = 6 HHAC_DLL_IN_USE = 7 HHAC_ERROR = 8
.



IMPORTING Parameters details for FITP_API_CREATE_HAFAS_CONTEXT

HAFAS_VER -

Data type: FTPS_HAFAS-DLL_VERSION
Optional: No
Call by Reference: No ( called with pass by value option)

DLL_DIR -

Data type: FTPS_HAFAS-DIR_NAME
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for FITP_API_CREATE_HAFAS_CONTEXT

HANDLE -

Data type: FTPS_HAFAS-HANDLE
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

HHAC_INVALID_HWND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

HHAC_INVALID_HINST -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

HHAC_INVALID_HPID -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

HHAC_INVALID_PTR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

HHAC_STR_TOO_LONG -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

HHAC_NO_MEMORY -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

HHAC_DLL_IN_USE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

HHAC_ERROR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for FITP_API_CREATE_HAFAS_CONTEXT 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_handle  TYPE FTPS_HAFAS-HANDLE, "   
lv_hafas_ver  TYPE FTPS_HAFAS-DLL_VERSION, "   
lv_hhac_invalid_hwnd  TYPE FTPS_HAFAS, "   
lv_dll_dir  TYPE FTPS_HAFAS-DIR_NAME, "   
lv_hhac_invalid_hinst  TYPE FTPS_HAFAS, "   
lv_hhac_invalid_hpid  TYPE FTPS_HAFAS, "   
lv_hhac_invalid_ptr  TYPE FTPS_HAFAS, "   
lv_hhac_str_too_long  TYPE FTPS_HAFAS, "   
lv_hhac_no_memory  TYPE FTPS_HAFAS, "   
lv_hhac_dll_in_use  TYPE FTPS_HAFAS, "   
lv_hhac_error  TYPE FTPS_HAFAS. "   

  CALL FUNCTION 'FITP_API_CREATE_HAFAS_CONTEXT'  "
    EXPORTING
         HAFAS_VER = lv_hafas_ver
         DLL_DIR = lv_dll_dir
    IMPORTING
         HANDLE = lv_handle
    EXCEPTIONS
        HHAC_INVALID_HWND = 1
        HHAC_INVALID_HINST = 2
        HHAC_INVALID_HPID = 3
        HHAC_INVALID_PTR = 4
        HHAC_STR_TOO_LONG = 5
        HHAC_NO_MEMORY = 6
        HHAC_DLL_IN_USE = 7
        HHAC_ERROR = 8
. " FITP_API_CREATE_HAFAS_CONTEXT




ABAP code using 7.40 inline data declarations to call FM FITP_API_CREATE_HAFAS_CONTEXT

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 HANDLE FROM FTPS_HAFAS INTO @DATA(ld_handle).
 
"SELECT single DLL_VERSION FROM FTPS_HAFAS INTO @DATA(ld_hafas_ver).
 
 
"SELECT single DIR_NAME FROM FTPS_HAFAS INTO @DATA(ld_dll_dir).
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!