SAP DEALDATA_AVAILABLE Function Module for Check Existence of a Financial Transaction









DEALDATA_AVAILABLE is a standard dealdata available SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check Existence of a Financial Transaction 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 dealdata available FM, simply by entering the name DEALDATA_AVAILABLE into the relevant SAP transaction such as SE37 or SE38.

Function Group: TB05
Program Name: SAPLTB05
Main Program: SAPLTB05
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function DEALDATA_AVAILABLE 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 'DEALDATA_AVAILABLE'"Check Existence of a Financial Transaction
EXPORTING
COMPANYCODE = "Company Code
* CURRENTLY_ACTIVE_STATUS = ' ' "Aktiver Status (X) oder zuletzt erzeugter Status
DEALNO = "Kennummer des Geschäfts
* STATUSNO = '00000' "Kennummer des Zustands

IMPORTING
DEAL = "Transaction
STATUS = "State

EXCEPTIONS
DEAL_NOT_FOUND = 1 STATUS_NOT_FOUND = 2
.



IMPORTING Parameters details for DEALDATA_AVAILABLE

COMPANYCODE - Company Code

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

CURRENTLY_ACTIVE_STATUS - Aktiver Status (X) oder zuletzt erzeugter Status

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

DEALNO - Kennummer des Geschäfts

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

STATUSNO - Kennummer des Zustands

Data type: VTBFHAZU-RFHAZU
Default: '00000'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for DEALDATA_AVAILABLE

DEAL - Transaction

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

STATUS - State

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

EXCEPTIONS details

DEAL_NOT_FOUND - Transaction Not Found

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

STATUS_NOT_FOUND - Zustand des Geschäfts nicht gefunden

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

Copy and paste ABAP code example for DEALDATA_AVAILABLE 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_deal  TYPE VTBFHA, "   
lv_companycode  TYPE VTBFHA-BUKRS, "   
lv_deal_not_found  TYPE VTBFHA, "   
lv_status  TYPE VTBFHAZU, "   
lv_status_not_found  TYPE VTBFHAZU, "   
lv_currently_active_status  TYPE VTBFHAZU, "   SPACE
lv_dealno  TYPE VTBFHA-RFHA, "   
lv_statusno  TYPE VTBFHAZU-RFHAZU. "   '00000'

  CALL FUNCTION 'DEALDATA_AVAILABLE'  "Check Existence of a Financial Transaction
    EXPORTING
         COMPANYCODE = lv_companycode
         CURRENTLY_ACTIVE_STATUS = lv_currently_active_status
         DEALNO = lv_dealno
         STATUSNO = lv_statusno
    IMPORTING
         DEAL = lv_deal
         STATUS = lv_status
    EXCEPTIONS
        DEAL_NOT_FOUND = 1
        STATUS_NOT_FOUND = 2
. " DEALDATA_AVAILABLE




ABAP code using 7.40 inline data declarations to call FM DEALDATA_AVAILABLE

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 BUKRS FROM VTBFHA INTO @DATA(ld_companycode).
 
 
 
 
DATA(ld_currently_active_status) = ' '.
 
"SELECT single RFHA FROM VTBFHA INTO @DATA(ld_dealno).
 
"SELECT single RFHAZU FROM VTBFHAZU INTO @DATA(ld_statusno).
DATA(ld_statusno) = '00000'.
 


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!