Skip to Content
-1

How to save sap ole reports in excel?

Jan 28, 2017 at 04:15 AM

79

avatar image

SPAN {font-family: "Courier New";font-size: 10pt;color: #000000;background: #FFFFFF;}.L0S31 {font-style: italic;color: #808080;}.L0S32 {color: #3399FF;}.L0S33 {color: #4DA619;}.L0S52 {color: #0000FF;}.L0S55 {color: #800080;}.L0S70 {color: #808080;}

create object gs_application 'excel.application'.
set property of gs_application 'visible' = 1.
call method of gs_application 'Workbooks' = workbook.
set property of gs_application 'SheetsInNewWorkbook' = 1.
call method of workbook 'Add'.


call method of gs_application 'Worksheets' = sheet
exporting #1 = 1.

call method of sheet 'Activate'. "Activate the sheet.

set property of sheet 'Name' = 'sheet1'.

**********************************************************************


*CALL METHOD OF gs_sheets 'Activate'.
*SET PROPERTY OF gs_sheets 'Name' = gv_sheet_name .

perform excel_header.
perform excel_data.
perform excel_save.

leave program.

endform. " OPERATION
*&---------------------------------------------------------------------*
*& Form CONDENSE
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_I_DESIGN_RPMKWT1 text
*----------------------------------------------------------------------*
form condense using p_data.

call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
exporting
input = p_data
importing
output = p_data.

endform. " CONDENSE

*&---------------------------------------------------------------------*
*& Form EXCEL_HEADER
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form excel_header .

call method of sheet 'Cells' = gs_cell1 "gs_excel
exporting
#1 = 1
#2 = 1.
set property of gs_cell1 'Value' = 'Name Plate Type'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 2.
set property of gs_cell1 'Value' = 'Type Reference'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 3.
set property of gs_cell1 'Value' = 'Frame Size'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 4.
set property of gs_cell1 'Value' = 'Machine Number'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 5.
set property of gs_cell1 'Value' = 'Ambient Temperature'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 6.
set property of gs_cell1 'Value' = 'DE Bearing Number'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 7.
set property of gs_cell1 'Value' = 'NDE Bearing Number'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 8.
set property of gs_cell1 'Value' = 'KW'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 9.
set property of gs_cell1 'Value' = 'HP'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 10.
set property of gs_cell1 'Value' = 'Insulation class'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 11.
set property of gs_cell1 'Value' = 'Temperature rise class'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 12.
set property of gs_cell1 'Value' = 'Duty and CDF1'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 13.
set property of gs_cell1 'Value' = 'CDF2'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 14.
set property of gs_cell1 'Value' = 'Motor weight'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 15.
set property of gs_cell1 'Value' = 'Voltage'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 16.
set property of gs_cell1 'Value' = 'Voltage variation +'.
***************************************************************************

call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 17.
set property of gs_cell1 'Value' = 'Voltage variation -'.
***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 18.
set property of gs_cell1 'Value' = 'Voltage -'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 19.
set property of gs_cell1 'Value' = 'Voltage +'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 20.
set property of gs_cell1 'Value' = 'Connection'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 21.
set property of gs_cell1 'Value' = 'Full Load Current'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 22.
set property of gs_cell1 'Value' = 'Power Factor'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 23.
set property of gs_cell1 'Value' = 'IP protection'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 24.
set property of gs_cell1 'Value' = 'Efficiency'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 25.
set property of gs_cell1 'Value' = 'Full Load speed'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 26.
set property of gs_cell1 'Value' = 'Frequency'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 27.
set property of gs_cell1 'Value' = 'Frequency Variation +'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 28.
set property of gs_cell1 'Value' = 'Frequency Variation -'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 29.
set property of gs_cell1 'Value' = 'Frequency - %'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 30.
set property of gs_cell1 'Value' = 'Frequency + %'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 31.
set property of gs_cell1 'Value' = 'Efficiency Class'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 32.
set property of gs_cell1 'Value' = 'Date of manufacturing'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 33.
set property of gs_cell1 'Value' = 'Special Remark'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 34.
set property of gs_cell1 'Value' = 'Vibration'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 35.
set property of gs_cell1 'Value' = 'Noise Level'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 36.
set property of gs_cell1 'Value' = 'Temperature Class'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 37.
set property of gs_cell1 'Value' = 'Time te'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 38.
set property of gs_cell1 'Value' = 'Starting Current'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 39.
set property of gs_cell1 'Value' = 'Starting Torque'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 40.
set property of gs_cell1 'Value' = 'Brake Voltage AC'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 41.
set property of gs_cell1 'Value' = 'Brake Voltage DC'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 42.
set property of gs_cell1 'Value' = 'Brake Current'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 43.
set property of gs_cell1 'Value' = 'Brake Torque'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 44.
set property of gs_cell1 'Value' = 'Sales Order'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 45.
set property of gs_cell1 'Value' = 'Speed2'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 46.
set property of gs_cell1 'Value' = 'KW2'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 47.
set property of gs_cell1 'Value' = 'HP2'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 48.
set property of gs_cell1 'Value' = 'Full Load Current 2'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 49.
set property of gs_cell1 'Value' = 'Power Factor 2'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 50.
set property of gs_cell1 'Value' = 'Efficiency 2'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 51.
set property of gs_cell1 'Value' = 'Full Load speed 2'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 52.
set property of gs_cell1 'Value' = 'Connection 2'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 53.
set property of gs_cell1 'Value' = 'Voltage 2'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 54.
set property of gs_cell1 'Value' = 'Production Order'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 55.
set property of gs_cell1 'Value' = 'PESO'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 56.
set property of gs_cell1 'Value' = 'CIMFR / ERTL'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 57.
set property of gs_cell1 'Value' = 'DGFASLI'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 58.
set property of gs_cell1 'Value' = 'Grease Quantity'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 59.
set property of gs_cell1 'Value' = 'Greasing Interval'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 60.
set property of gs_cell1 'Value' = 'Grease Make'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 61.
set property of gs_cell1 'Value' = 'Rotor Voltage'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 62.
set property of gs_cell1 'Value' = 'Rotor Current'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 63.
set property of gs_cell1 'Value' = 'Rotor Resistance'.

****************************************************************************
*CALL METHOD OF gs_excel 'Cells' = gs_cell1
*EXPORTING
*#1 = 1
*#2 = 64.
*SET PROPERTY OF gs_cell1 'Value' = 'RPM 380V/50'.
*
****************************************************************************
*CALL METHOD OF gs_excel 'Cells' = gs_cell1
*EXPORTING
*#1 = 1
*#2 = 65.
*SET PROPERTY OF gs_cell1 'Value' = 'Amp 380V/50'.
*
****************************************************************************
*CALL METHOD OF gs_excel 'Cells' = gs_cell1
*EXPORTING
*#1 = 1
*#2 = 66.
*SET PROPERTY OF gs_cell1 'Value' = 'Eff 380V/50'.
*
****************************************************************************
*CALL METHOD OF gs_excel 'Cells' = gs_cell1
*EXPORTING
*#1 = 1
*#2 = 67.
*SET PROPERTY OF gs_cell1 'Value' = 'RPM 380V/60'.
*
****************************************************************************
*CALL METHOD OF gs_excel 'Cells' = gs_cell1
*EXPORTING
*#1 = 1
*#2 = 68.
*SET PROPERTY OF gs_cell1 'Value' = 'Amp 380V/60'.
*
****************************************************************************
*CALL METHOD OF gs_excel 'Cells' = gs_cell1
*EXPORTING
*#1 = 1
*#2 = 69.
*SET PROPERTY OF gs_cell1 'Value' = 'Eff 380V/60'.
*
****************************************************************************
*CALL METHOD OF gs_excel 'Cells' = gs_cell1
*EXPORTING
*#1 = 1
*#2 = 70.
*SET PROPERTY OF gs_cell1 'Value' = 'RPM 440V/60'.
*
****************************************************************************
*CALL METHOD OF gs_excel 'Cells' = gs_cell1
*EXPORTING
*#1 = 1
*#2 = 71.
*SET PROPERTY OF gs_cell1 'Value' = 'Amp 440V/60'.
*
****************************************************************************
*CALL METHOD OF gs_excel 'Cells' = gs_cell1
*EXPORTING
*#1 = 1
*#2 = 72.
*SET PROPERTY OF gs_cell1 'Value' = 'Eff 440V/60'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 64.
set property of gs_cell1 'Value' = 'Blank1'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 65.
set property of gs_cell1 'Value' = 'Blank2'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 66.
set property of gs_cell1 'Value' = 'Blank3'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 67.
set property of gs_cell1 'Value' = 'Blank4'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 68.
set property of gs_cell1 'Value' = 'Blank5'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 69.
set property of gs_cell1 'Value' = 'Blank6'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 70.
set property of gs_cell1 'Value' = 'Blank7'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 71.
set property of gs_cell1 'Value' = 'Blank8'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 72.
set property of gs_cell1 'Value' = 'Blank9'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 73.
set property of gs_cell1 'Value' = 'Blank10'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 74.
set property of gs_cell1 'Value' = 'Blank11'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 75.
set property of gs_cell1 'Value' = 'Blank12'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 76.
set property of gs_cell1 'Value' = 'Blank13'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 77.
set property of gs_cell1 'Value' = 'Blank14'.

***************************************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = 1
#2 = 78.
set property of gs_cell1 'Value' = 'Blank15'.

endform. " EXCEL_HEADER
*&---------------------------------------------------------------------*
*& Form EXCEL_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form excel_data .
call method of gs_application 'Worksheets' = sheet
exporting #1 = 2.

loop at itab2 into wa_itab2.
if sy-tabix = 1.
count = 2.
endif.
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 1.
set property of gs_cell1 'Value' = wa_itab2-lv_code. "Name Plate Type
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 2.
set property of gs_cell1 'Value' = wa_itab2-matnr. "Type Reference
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 3.
set property of gs_cell1 'Value' = wa_itab2-framesize. "Frame Size
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 4.
set property of gs_cell1 'Value' = wa_itab2-accno. "Machine Number
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 5.
set property of gs_cell1 'Value' = wa_itab2-ambtemp. "Ambient Temperature
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 6.
set property of gs_cell1 'Value' = wa_itab2-debrg11m. "DE Bearing Number
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 7.
set property of gs_cell1 'Value' = wa_itab2-ndebrg11m. "NDE Bearing Number
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 8.
set property of gs_cell1 'Value' = wa_itab2-kw1. "KW
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 9.
set property of gs_cell1 'Value' = wa_itab2-hp1. "HP
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 10.
set property of gs_cell1 'Value' = wa_itab2-insulation. "Insulation class
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 11.
set property of gs_cell1 'Value' = wa_itab2-tempriseclass. "Temperature rise class
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 12.
set property of gs_cell1 'Value' = wa_itab2-duty. "Duty and CDF1
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 13.
set property of gs_cell1 'NumberFormat' = '@'. "Success
set property of gs_cell1 'Value' = wa_itab2-cdf2. "CDF2
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 14.
set property of gs_cell1 'Value' = wa_itab2-ntgew(8). "Motor weight
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 15.
set property of gs_cell1 'Value' = wa_itab2-voltage1. "Voltage
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 16.
set property of gs_cell1 'Value' = wa_itab2-volt_vari1. "Voltage variation +
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 17.
set property of gs_cell1 'Value' = wa_itab2-volt_vari2. "Voltage variation -
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 18.
set property of gs_cell1 'NumberFormat' = '@'. "Success
set property of gs_cell1 'Value' = wa_itab2-vol_vari_down. "Voltage -
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 19.
set property of gs_cell1 'NumberFormat' = '@'. "Success
set property of gs_cell1 'Value' = wa_itab2-vol_vari_up. "Voltage +
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 20.
set property of gs_cell1 'Value' = wa_itab2-connection1. "Connection
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 21.
set property of gs_cell1 'NumberFormat' = '@'. "Success
set property of gs_cell1 'Value' = wa_itab2-ikwt1. "Full Load Current
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 22.
set property of gs_cell1 'NumberFormat' = '@'. "Success
set property of gs_cell1 'Value' = wa_itab2-pf10. "Power Factor
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 23.
set property of gs_cell1 'Value' = wa_itab2-protection. "IP protection
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 24.
set property of gs_cell1 'NumberFormat' = '@'. "Success
set property of gs_cell1 'Value' = wa_itab2-eff50. "Efficiency
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 25.
set property of gs_cell1 'Value' = wa_itab2-rpmkwt1. "Full Load speed
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 26.
set property of gs_cell1 'Value' = wa_itab2-freq1. "Frequency
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 27.
set property of gs_cell1 'NumberFormat' = '@'. "Success
set property of gs_cell1 'Value' = wa_itab2-freq_vari1. "Frequency Variation +
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 28.
set property of gs_cell1 'NumberFormat' = '@'. "Success
set property of gs_cell1 'Value' = wa_itab2-freq_vari2. "Frequency Variation -
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 29.
set property of gs_cell1 'NumberFormat' = '@'. "Success
set property of gs_cell1 'Value' = wa_itab2-freq_vari_down. "Frequency - %
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 30.
set property of gs_cell1 'NumberFormat' = '@'. "Success
set property of gs_cell1 'Value' = wa_itab2-freq_vari_up. "Frequency + %
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 31.
set property of gs_cell1 'Value' = wa_itab2-effclass. "Efficiency Class
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 32.
set property of gs_cell1 'NumberFormat' = '@'. "Success
set property of gs_cell1 'Value' = wa_itab2-lv_date. "Date of manufacturing
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 33.
set property of gs_cell1 'Value' = wa_itab2-remarks. "Special Remark
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 34.
set property of gs_cell1 'Value' = wa_itab2-nsvibdet. "Vibration
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 35.
set property of gs_cell1 'Value' = wa_itab2-noiselevel. "Noise Level
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 36.
set property of gs_cell1 'Value' = wa_itab2-temprise. "Temperature Class
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 37.
set property of gs_cell1 'Value' = wa_itab2-te. " Time te
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 38.
set property of gs_cell1 'NumberFormat' = '@'. "Success
set property of gs_cell1 'Value' = wa_itab2-stc1. "Starting Current
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 39.
set property of gs_cell1 'NumberFormat' = '@'. "Success
set property of gs_cell1 'Value' = wa_itab2-stor1. "Starting Torque
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 40.
set property of gs_cell1 'Value' = wa_itab2-calac. "Brake Voltage AC
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 41.
set property of gs_cell1 'Value' = wa_itab2-caldc. "Brake Voltage DC
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 42.
set property of gs_cell1 'Value' = wa_itab2-ampere. "Brake Current
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 43.
set property of gs_cell1 'Value' = wa_itab2-torque. "Brake Torque
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 44.
set property of gs_cell1 'Value' = wa_itab2-kdauf. "Sales Order
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 45.
set property of gs_cell1 'Value' = wa_itab2-speed. "Speed2
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 46.
set property of gs_cell1 'Value' = wa_itab2-kw2. "KW2
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 47.
set property of gs_cell1 'Value' = wa_itab2-hp2. "HP2
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 48.
set property of gs_cell1 'Value' = wa_itab2-ikwt2. "Full Load Current 2
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 49.
set property of gs_cell1 'Value' = wa_itab2-pfkwt2. "Power Factor 2
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 50.
set property of gs_cell1 'Value' = wa_itab2-ef20. "Efficiency 2
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 51.
set property of gs_cell1 'Value' = wa_itab2-rpmkwt2. "Full Load speed 2
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 52.
set property of gs_cell1 'Value' = wa_itab2-connection2. "Connection 2
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 53.
set property of gs_cell1 'Value' = wa_itab2-voltage2. "Voltage 2
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 54.
set property of gs_cell1 'Value' = wa_itab2-aufnr. "Production Order
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 55.
set property of gs_cell1 'Value' = wa_itab2-ccea. "PESO
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 56.
set property of gs_cell1 'Value' = wa_itab2-cmri. "CIMFR / ERTL
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 57.
set property of gs_cell1 'Value' = wa_itab2-dgfa. "DGFASLI
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 58.
set property of gs_cell1 'Value' = wa_itab2-greaseqty. "Grease Quantity
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 59.
set property of gs_cell1 'Value' = wa_itab2-greasetime. "Greasing Interval
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 60.
set property of gs_cell1 'Value' = wa_itab2-grstype. "Grease Make
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 61.
set property of gs_cell1 'Value' = wa_itab2-rotvolt. "Rotor Voltage
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 62.
set property of gs_cell1 'Value' = wa_itab2-rotamp. "Rotor Current
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 63.
set property of gs_cell1 'Value' = wa_itab2-rotres. "Rotor Resistance
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 64.
set property of gs_cell1 'Value' = wa_itab2-blank1. "Blank1
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 65.
set property of gs_cell1 'Value' = wa_itab2-blank2. "Blank2
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 66.
set property of gs_cell1 'Value' = wa_itab2-blank3. "Blank3
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 67.
set property of gs_cell1 'Value' = wa_itab2-blank4. "Blank4
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 68.
set property of gs_cell1 'Value' = wa_itab2-blank5. "Blank5
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 69.
set property of gs_cell1 'Value' = wa_itab2-blank6. "Blank6
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 70.
set property of gs_cell1 'Value' = wa_itab2-blank7. "Blank7
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 71.
set property of gs_cell1 'Value' = wa_itab2-blank8. "Blank8
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 72.
set property of gs_cell1 'Value' = wa_itab2-blank9. "Blank9
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 73.
set property of gs_cell1 'Value' = wa_itab2-blank10. "Blank10
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 74.
set property of gs_cell1 'Value' = wa_itab2-blank11. "Blank11
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 75.
set property of gs_cell1 'Value' = wa_itab2-blank12. "Blank12
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 76.
set property of gs_cell1 'Value' = wa_itab2-blank13. "Blank13
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 77.
set property of gs_cell1 'Value' = wa_itab2-blank14. "Blank14
*******************************************************
call method of sheet 'Cells' = gs_cell1
exporting
#1 = count
#2 = 78.
set property of gs_cell1 'Value' = wa_itab2-blank15. "Blank15
count = count + 1.
endloop.

endform. " EXCEL_DATA
*&---------------------------------------------------------------------*
*& Form EXCEL_SAVE
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form excel_save .
call method of sheet 'SaveAs'
exporting #1 = 'c:\your_excel.xls' "name of excel
#2 = 1. "file format
free object gs_columns.
free object sheet.
free object workbook.
free object gs_application.
endform. " EXCEL_SAVE

Above is my code I am not able to save data in my local system.

Please help.

Regards,

Abhishek S.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers