Posts

Showing posts with the label Create .csv file from ABAP report

BAPI for material storage location Add

 We can add material storage location plant wise using third party app or web. BAPI names : BAPI_MATERIAL_MAINTAINDATA_RT Import parameters: HEADDATA: Material Tables: STORAGELOCATIONDATA: Material: Plant: STGE_LOC:   STORAGELOCATIONDATAX: Material: Plant: STGE_LOC:   use below code after completing steps. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.        

Create .csv file from ABAP report

 We can use like below: types truxs_t_text_data ( 4096 ) type c occurs 0 . data : csv_converted_table type table of TRUXS_T_TEXT_DATA . START-OF-SELECTION. call function 'SAP_CONVERT_TO_CSV_FORMAT' exporting i_field_seperator = ';' * I_LINE_HEADER = * I_FILENAME = '' * I_APPL_KEEP = ' ' tables i_tab_sap_data = internal_table changing i_tab_converted_data = csv_converted_table exceptions conversion_failed = 1 others = 2 . CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING filename = 'C:\example.csv' tables data_tab = csv_converted_table .