SAP RECEIPT_DELETE Function Module for
RECEIPT_DELETE is a standard receipt delete 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 receipt delete FM, simply by entering the name RECEIPT_DELETE into the relevant SAP transaction such as SE37 or SE38.
Function Group: TRTP
Program Name: SAPLTRTP
Main Program: SAPLTRTP
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function RECEIPT_DELETE 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 'RECEIPT_DELETE'".
EXPORTING
EMPLOYEENUMBER = "Employee's Personnel Number
TRIPNUMBER = "Trip Number
STATUS = "Trip Status
IMPORTING
RETURN = "Return Value (Instead of Exceptions)
TABLES
* ADDINFO = "Additional Receipt Information
* TEXT = "Trip Text
RECEIPTS = "Documents
* STOPOVER = "Trip stopovers; Structure for BAPI interface
* COSTDIST_RECE = "Cost distrib.indiv.receipt; Structure for BAPI interface
* RETURNTAB = "Return Parameter(s)
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLTRTP_001 Customer Exit: Offline Travel Expenses Receipts
IMPORTING Parameters details for RECEIPT_DELETE
EMPLOYEENUMBER - Employee's Personnel Number
Data type: BAPIEMPL-PERNROptional: No
Call by Reference: No ( called with pass by value option)
TRIPNUMBER - Trip Number
Data type: BAPITRVXXX-TRIPNOOptional: No
Call by Reference: No ( called with pass by value option)
STATUS - Trip Status
Data type: BAPITRVSTAOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RECEIPT_DELETE
RETURN - Return Value (Instead of Exceptions)
Data type: BAPIRETURNOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RECEIPT_DELETE
ADDINFO - Additional Receipt Information
Data type: BAPITRADDIOptional: Yes
Call by Reference: Yes
TEXT - Trip Text
Data type: BAPITRTEXTOptional: Yes
Call by Reference: Yes
RECEIPTS - Documents
Data type: BAPITRVRECOptional: No
Call by Reference: No ( called with pass by value option)
STOPOVER - Trip stopovers; Structure for BAPI interface
Data type: BAPITRVSTOOptional: Yes
Call by Reference: Yes
COSTDIST_RECE - Cost distrib.indiv.receipt; Structure for BAPI interface
Data type: BAPITRVCOROptional: Yes
Call by Reference: Yes
RETURNTAB - Return Parameter(s)
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for RECEIPT_DELETE 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_return | TYPE BAPIRETURN, " | |||
lt_addinfo | TYPE STANDARD TABLE OF BAPITRADDI, " | |||
lv_employeenumber | TYPE BAPIEMPL-PERNR, " | |||
lt_text | TYPE STANDARD TABLE OF BAPITRTEXT, " | |||
lv_tripnumber | TYPE BAPITRVXXX-TRIPNO, " | |||
lv_status | TYPE BAPITRVSTA, " | |||
lt_receipts | TYPE STANDARD TABLE OF BAPITRVREC, " | |||
lt_stopover | TYPE STANDARD TABLE OF BAPITRVSTO, " | |||
lt_costdist_rece | TYPE STANDARD TABLE OF BAPITRVCOR, " | |||
lt_returntab | TYPE STANDARD TABLE OF BAPIRET2. " |
  CALL FUNCTION 'RECEIPT_DELETE' " |
EXPORTING | ||
EMPLOYEENUMBER | = lv_employeenumber | |
TRIPNUMBER | = lv_tripnumber | |
STATUS | = lv_status | |
IMPORTING | ||
RETURN | = lv_return | |
TABLES | ||
ADDINFO | = lt_addinfo | |
TEXT | = lt_text | |
RECEIPTS | = lt_receipts | |
STOPOVER | = lt_stopover | |
COSTDIST_RECE | = lt_costdist_rece | |
RETURNTAB | = lt_returntab | |
. " RECEIPT_DELETE |
ABAP code using 7.40 inline data declarations to call FM RECEIPT_DELETE
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 PERNR FROM BAPIEMPL INTO @DATA(ld_employeenumber). | ||||
"SELECT single TRIPNO FROM BAPITRVXXX INTO @DATA(ld_tripnumber). | ||||
Search for further information about these or an SAP related objects