PTRV_AIRPLUS_EXTRACT_TO_CSV is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for To improve credit card transaction reporting in the travel expenses area, data has to be extracted from the SAP system and imported at Airplus...see full standard documentation available for this report. Also check out the submitted Comments related to this SAP report and the details below to see which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC.
If you would like to execute this report or see the full code listing simply enter PTRV_AIRPLUS_EXTRACT_TO_CSV into the relevant SAP transactions such as SE38 or SE80
This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.
Title: PTRV_AIRPLUS_EXTRACT_TO_CSV
Text Symbol: 001 = Data Extraction for Airplus
Text Symbol: 002 = Path for Saving CSV File
Text Symbol: 004 = Data Extraction Period
Text Symbol: 005 = Last Day
Text Symbol: 006 = Last Week
Text Symbol: 007 = Last Month
Text Symbol: 008 = All
Text Symbol: 009 = Production System?
Text Symbol: 010 = Customer ID
Text Symbol: 011 = File could not be written to the path specified
No INCLUDES are used within this REPORT code!
No SAP DATABASE tables are accessed within this REPORT code!
RE_ADD_MONTH_TO_DATE CALL FUNCTION 'RE_ADD_MONTH_TO_DATE' EXPORTING MONTHS = '-1' OLDDATE = sy-datum IMPORTING NEWDATE = lv_extract_date.
PTRM_UTIL_IMPORT_TC_CLUSTER CALL FUNCTION 'PTRM_UTIL_IMPORT_TC_CLUSTER' EXPORTING i_pernr = tc_key-pernr i_sw_decryption = ' ' IMPORTING * et_ccbel = lt_ccbel[] et_inbel = lt_inbel[] * et_trans = lt_trans[] * e_letzt = lv_letzt * e_subrc = lv_tc_subrc EXCEPTIONS ccnum_decryption_error = 1 OTHERS = 2.
HR_READ_INFOTYPE CALL FUNCTION 'HR_READ_INFOTYPE' EXPORTING tclas = 'A' pernr = tc_key-pernr infty = '0001' begda = begda endda = endda IMPORTING subrc = subrc TABLES infty_tab = p0001 EXCEPTIONS infty_not_found = 1 OTHERS = 2.
CONVERT_DATE_TO_EXTERNAL CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL' EXPORTING DATE_INTERNAL =
IMPORTING DATE_EXTERNAL = L_DATE_EXTERN EXCEPTIONS OTHERS = 4. "C_RC4.
FLTP_CHAR_CONVERSION CALL FUNCTION 'FLTP_CHAR_CONVERSION' EXPORTING INPUT =
IMPORTING FLSTR = L_DATE_EXTERN EXCEPTIONS OTHERS = 4. "C_RC4.
Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.