‎2009 Aug 25 5:31 AM
Hi All,
I need to create a excel output which has header combined for two fields. like
month 1
quantity value
under month1 i need to have two sub headers quantity and value. I'm able to prepare the excel file till the level where each data has header. so now how to add header combined to two columns.
right now i'm using SAP_CONVERT_TO_CSV_FORMAT and then manually inserting the header i.e quantity and value.
and this excel has to be sent as an attachment to external email id which i'm doing it by BCS class.
Please help how to insert the header data combined to two columns.
can the attributes in the class CL_ABAP_CHAR_UTILITIES will be helpful.
I'm using the carraige return and horizontal tab to construct the data from CSV to Excel.
‎2009 Aug 25 5:55 AM
You can create excel by using DOI technique by using this method you can manuplate your excel output as you want.
Please go through the below links.
/people/alvaro.tejadagalindo/blog/2009/02/05/excel-ole-and-abap--create-fancy-reports
https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/204d1bb8-489d-2910-d0b5-cdddb3227820
You can also find topics related to OLE in saptechnical, search by keyword OLE and you will get it.
Hope this will help you.
‎2009 Aug 25 6:24 AM
Hi Sheelesh,
OLE and class gui front end services will download the excel to the path you have given, but my program will be run in background and the excel need to be sent as an attachment to the external email id.
So i cannot go ahead with those FM's.
If you have any idea if we can use them for background also, please can you tell how to use them for background.
Thanks,
Bharathi.
‎2009 Aug 25 6:36 AM
Hi,
Are you trying to download the excel file to the presentation server using the OLE and class gui front end services and then try to use it as a attachment and send a E-mail in background? If so am afraid its not possible. Ensure you are downloading the file to the application server and then run it in the background.
Regards,
Vik
‎2009 Aug 25 6:54 AM
Hi,
I'm not downloading the excel and attaching the file,
I'm preparing the data in excel format in the internal table and using this internal table i'm sending the excel as an attachment to the email in back ground,
The problem is related to header.
Merging the header column for two columns.
like under month i need two sub columns quantity and value.
month 1
quantit value
‎2009 Aug 25 7:11 AM
Hi,
Well in that case you may try to have another internal table with the quantity and value columns concatenated into a single column seperated by certain amount of space using offsets and then use this internal table and merge with the header column and check.
Regards,
Vik
‎2009 Aug 25 9:49 AM
but vik, in this case we will get the quantity and values under one column,but these should be under two columns but heading for it should be one above....so thinking of how to achieve it....
‎2009 Aug 25 10:43 AM
‎2009 Aug 25 10:49 AM
The only way to do this is OLE. In background there is no gui and therefore no OLE. Pull your own conclusions now....
‎2009 Sep 08 10:39 AM