Date format problem in excel format
Hi,
I am uploading the date field from excel to program.
My problem is in date format.
I am gettting the date format in ddmmyyyy if it is 01012006 then my excel sheet contains the date as 1012006 i.e '0' initial zero is truncated in the excel sheet .
Now how can i use this date in my program i.e i have to convert into date as per program requirements like dd.mm.yyyy .How can i convert.
Thanks and regards,
shyla
Hi Shyla,
if the provided excel sheet contains date in format "20122006" the field is considered as a number format.
In this case you can do the following select the whole column and go to format/cells. Choose the "custom" category on the Number tab and
enter zeros in eight digits, i.e. 00000000 under "Type:".
This should solve your problem before uploading the data into SAP.
Similar Messages
-
Problem while downloadind data from ALV in excel format.
Hi Experts,
I have developed one ALV Report.
it have 53 columns. when i tried to download it in excel format using standard functionality, all columns are not coming in one line i.e 50 cloumns in one line and rest columns to the next line.
For Example.
Row 1 Header-> Fld1 Fld2 Fld3 Fld4 Fld5
Fld6 Fld7
Row 2 Values-> Val1 Val2 Val3 Val4 Val5
Val6 Val7
how i will get all these 53 columns in one line in EXCEL..
its urget........
Usefull answer will be rewarded...hi,
there are some specific restrictions in downloading data in alv.
i.e you cannot have morethan 1024 characters that can be downloaded in single row.
so change your report columns accordingly. -
Problem in excel format while sending mail with excel attachment.
Hi Gurus ,
I am sending a email with Excel attachment using FM SO_DOCUMENT_SEND_API1 or SO_NEW_DOCUMENT_ATT_SEND_API1.
I am able to send a mail with excel attachment with a piece of code which I got from SDN itself.
But the problem is when I am trying to open the attachment, <b>A pop up comes which says that it is not in recognizable format. Would you like to open it?
and several other lines of caution.</b>
When i choose to open it, i get the correct data in one excel sheet. Certain vertical lines of the excel sheet is missing. <b>But no data is missing. </b>
I am attaching the code below. Can any one please tell me where is the problem in this code ?
Thanx in advance
types: begin of t_mara,
matnr type mara-matnr,
matkl type mara-matkl,
mtart type mara-mtart,
meins type mara-meins,
end of t_mara.
data: gt_mara type table of t_mara,
wa_mara like line of gt_mara,
it_packing_list type table of SOPCKLSTI1,
wa_packing_list like line of it_packing_list,
it_receivers type table of SOMLRECI1,
wa_receivers like line of it_receivers,
it_mailbody type table of SOLISTI1,
wa_mailbody like line of it_mailbody,
it_attachment type table of SOLISTI1,
wa_attachment like line of it_attachment.
data: la_doc type SODOCCHGI1.
constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret type c value cl_abap_char_utilities=>CR_LF.
* get material
select matnr matkl mtart meins
into table gt_mara
from mara
up to 25 rows.
* Populate the subject/generic message attributes
la_doc-obj_langu = sy-langu.
la_doc-obj_descr = 'Material Details' . "Mail Header
la_doc-sensitivty = 'F'.
la_doc-doc_size = 1.
* Add the recipients email address
CLEAR wa_receivers.
REFRESH it_receivers.
wa_receivers-receiver = 'PCSDEVL'.
wa_receivers-rec_type = 'U'.
wa_receivers-com_type = 'INT'.
wa_receivers-notif_del = 'X'.
wa_receivers-notif_ndel = 'X'.
APPEND wa_receivers to it_receivers.
* Mail Body
CLEAR wa_mailbody.
REFRESH it_mailbody.
wa_mailbody-line = 'Please find the attachment'.
APPEND wa_mailbody to it_mailbody.
* Mail attachmwnt
CLEAR wa_attachment.
REFRESH it_attachment.
CONCATENATE 'MATNR' 'MATKL' 'MTART' 'MEINS'
INTO wa_attachment SEPARATED BY con_tab.
CONCATENATE con_cret wa_attachment INTO wa_attachment.
APPEND wa_attachment to it_attachment.
LOOP AT gt_mara INTO wa_mara.
CONCATENATE wa_mara-matnr wa_mara-matkl
wa_mara-mtart wa_mara-meins
INTO wa_attachment SEPARATED BY con_tab.
CONCATENATE con_cret wa_attachment INTO wa_attachment.
APPEND wa_attachment to it_attachment.
ENDLOOP.
* Describe the body of the message
CLEAR wa_packing_list.
REFRESH it_packing_list.
wa_packing_list-transf_bin = space.
wa_packing_list-head_start = 1.
wa_packing_list-head_num = 0.
wa_packing_list-body_start = 1.
wa_packing_list-body_num = 1.
wa_packing_list-doc_type = 'RAW'.
APPEND wa_packing_list to it_packing_list.
* Create attachment notification
wa_packing_list-transf_bin = 'X'.
wa_packing_list-head_start = 1.
wa_packing_list-head_num = 1.
wa_packing_list-body_start = 1.
DESCRIBE TABLE it_attachment LINES wa_packing_list-body_num.
wa_packing_list-doc_type = 'XLS'. " To word attachment change this as 'DOC'
wa_packing_list-obj_descr = ' '.
concatenate wa_packing_list-doc_type 'file' into wa_packing_list-OBJ_DESCR
separated by space.
wa_packing_list-doc_size = wa_packing_list-body_num * 255.
APPEND wa_packing_list to it_packing_list.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = la_doc
PUT_IN_OUTBOX = 'X'
* SENDER_ADDRESS = SY-UNAME
* SENDER_ADDRESS_TYPE = 'B'
COMMIT_WORK = 'X'
* IMPORTING
* SENT_TO_ALL =
* NEW_OBJECT_ID =
* SENDER_ID =
tables
packing_list = it_packing_list
* OBJECT_HEADER =
CONTENTS_BIN = it_attachment
CONTENTS_TXT = it_mailbody
* CONTENTS_HEX =
* OBJECT_PARA =
* OBJECT_PARB =
receivers = it_receivers
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.REPORT Zex5 LINE-SIZE 255 LINE-COUNT 255 .
class CL_ABAP_CHAR_UTILITIES definition load. "-->
TABLES : vbap.
SELECT-OPTIONS: s_vbeln FOR vbap-vbeln.
DATA : BEGIN OF itab OCCURS 1,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
matnr LIKE vbap-matnr,
END OF itab.
parameters : p_email like somlreci1-receiver
DATA: tlines type i.
DATA: itmessage LIKE solisti1 OCCURS 1 WITH HEADER LINE. "Ok
DATA: itattach LIKE solisti1 OCCURS 2 WITH HEADER LINE. "Ok
DATA: itpacklist LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
DATA: itreclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
data: itattachment like solisti1 OCCURS 2 WITH HEADER LINE.
start-of-selection.
SELECT vbeln posnr matnr
FROM vbap
INTO TABLE itab
WHERE vbeln IN s_vbeln.
**Make the internal table data to be compatible in excel format .
PERFORM BUILD_XLS_FORMAT.
**Populate message of body text.
clear itmessage.
refresh itmessage.
itmessage = 'Please find attached Excel file'.
append itmessage.
PERFORM send_mail_as_xls_attachment tables itmessage
itattach
using p_email 'Excel Attachment' 'TXT' " 'XLS'
using p_email 'TEXT Attachment' 'TXT' " 'XLS'
'TestFileName'
'SalesOrders' .
*& Form BUILD_XLS_FORMAT
text
--> p1 text
<-- p2 text
form BUILD_XLS_FORMAT.
previosuly we were using for unicode ..now replaced
**Declare constants for the spacing .
*Constants : con1 type x value '0D',
con2 type x value '09'.
Constants : con1 type c
value CL_ABAP_CHAR_UTILITIES=>CR_LF,
con2 type c
value CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
**For the Header descriptions.
Concatenate 'SalesORdNo'
'Item'
'Materialno' into itattach separated by con2.
Concatenate con1 itattach into itattach.
Append itattach.
**Now align the items in the itab as above .
Loop at Itab.
concatenate itab-vbeln
itab-posnr
itab-matnr into itattach separated by con2.
concatenate con1 itattach into itattach .
Append itattach.
endloop.
endform. " BUILD_XLS_FORMAT
*& Form send_mail_as_xls_attachment
text
-->P_ITMESSAGE text
-->P_ITATTACH text
-->P_P_EMAIL text
-->P_0116 text
-->P_0117 text
-->P_0118 text
-->P_0119 text
form send_mail_as_xls_attachment tables p_itmessage
p_itattach
using p_email
p_mtitle
p_format
p_filename
p_attdescription.
Data : xdocdata like sodocchgi1,
xcnt type i.
*Fill the document data.
xdocdata-doc_size = 1.
*Populate the subject/generic message attributes.
xdocdata-obj_name = 'SAPRPT'.
xdocdata-obj_langu = sy-langu.
xdocdata-obj_descr = p_mtitle.
*Fill the document data and fetch size of attachment.
clear xdocdata.
read table itattach index xcnt.
xdocdata-doc_size = ( xcnt - 1 ) * 255 + strlen( itattach ).
xdocdata-doc_size = ( xcnt - 1 ) * 255.
xdocdata-obj_name = 'SAPRPT'.
xdocdata-obj_langu = sy-langu.
xdocdata-obj_descr = p_mtitle.
clear itattachment. refresh itattachment.
itattachment[] = p_itattach[].
*Describe the body of the message.
clear itpacklist. refresh itpacklist.
itpacklist-transf_bin = 'X'.
itpacklist-head_start = '1'.
itpacklist-head_num = '0'.
itpacklist-body_start = '1'.
describe table itattachment lines itpacklist-body_num .
itpacklist-doc_type = 'TXT'.
itpacklist-doc_type = 'XLS'.
append itpacklist.
*Create attachment notification.
itpacklist-transf_bin = 'X'.
itpacklist-head_start = '1'.
itpacklist-head_num = '1'.
itpacklist-body_start = '1'.
describe table itattachment lines itpacklist-body_num .
itpacklist-doc_type = p_format.
itpacklist-obj_name = p_filename.
itpacklist-obj_descr = p_attdescription.
itpacklist-doc_size = itpacklist-body_num * 255 .
append itpacklist.
*FIll the receivers list.
Clear itreclist. refresh itreclist.
itreclist-receiver = p_email.
itreclist-rec_type = 'U'.
itreclist-com_type = 'INT'.
itreclist-notif_del = 'X'.
itreclist-notif_ndel = 'X'.
*itreclist-notif_read = 'X'.
append itreclist.
*CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = xdocdata
PUT_IN_OUTBOX = 'X'
commit_work = 'X'
SENDER_ADDRESS = SY-UNAME
tables
packing_list = itpacklist
CONTENTS_BIN = itattachment
CONTENTS_TXT = itmessage
receivers = itreclist
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8
*IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = xdocdata
PUT_IN_OUTBOX = 'X'
TABLES
packing_list = itpacklist
CONTENTS_BIN = itattachment
CONTENTS_TXT = itmessage
receivers = itreclist
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. " send_mail_as_xls_attachment
Just execute the above code and let me know.
What is the sap version u r using .
Vijay -
Download data from memory to Excel format.
Hi Gurus,
How can I download data from Memory( not in application server ) to Excel format ? Now I am using below function modules but not coming in proper format.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'LIST_TO_ASCI' "report to ASCII text
TABLES
listasci = listasci
listobject = listobject
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.Hi,
use this function module.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
Regards,
NNR. -
Formatting report in excel format
Hi,
I have to generate report in excel format but I don't know how to format it for example to add a dynamic title, and to add a logo in the top of the excel sheet...
any help..
thanks in advance.Hi,
Oracle Portal Reports generated do not pick up the foramting conditions which you would see in HTML/ASCII format .Hence ,TITLE ,FOOTER or number ,date formats wouldn't work in Excel format .Incase you needed formatted output ,you can use HTML/ASCII foramt.
Incase you want to use the EXCEL format.Save the Excel file and right macros to do so.
Thanks,
Anu -
Hi Everyone,
I have a requirement where in i have to download data to an excel sheet with some formatting like, few fields need to centrally aligned, few fields to be bold and coloured.Is it possible to have such formatting done thru ABAP.Is there a way to use the Excel Macro in ABAP.
Thanks.
KhanHi,
Check if this blog helps
[Excel OLE and ABAP - Create fancy reports|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414800)ID0678095350DB20068480028225103659End?blog=/pub/wlg/13091]
Vikranth -
Problem with EXCEL format while sending a mail with excel attachment
Hi,
I'm trying to send a report through mail as an excel attchment. But though I get all the details in the attachmnet format in excel is not proper. It's in a very hapazard way. I tried putting control break statements after each record then also though there is slight betterment it's not ok. If I send the same thing as a pdf attachment it's perfect. May I know what else i need to do for excel.....? I tried compressing and then sending no luck......
I'm in version 4.6c.....
Thanks in advance....Hi,
Just check out this..
TYPES: BEGIN OF t_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
END OF t_ekpo.
DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
wa_ekpo TYPE t_ekpo.
TYPES: BEGIN OF t_charekpo,
ebeln(10) TYPE c,
ebelp(5) TYPE c,
aedat(8) TYPE c,
matnr(18) TYPE c,
END OF t_charekpo.
DATA: wa_charekpo TYPE t_charekpo.
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
*START_OF_SELECTION
START-OF-SELECTION.
Retrieve sample data from table ekpo
PERFORM data_retrieval.
Populate table with detaisl to be entered into .xls file
PERFORM build_xls_data_table.
*END-OF-SELECTION
END-OF-SELECTION.
Populate message body text
perform populate_email_message_body.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_message
it_attach
using p_email
'Example .xls documnet attachment'
'XLS'
'filename'
changing gd_error
gd_reciever.
Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM initiate_mail_execute_program.
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp aedat matnr
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekpo.
ENDFORM. " DATA_RETRIEVAL
*& Form BUILD_XLS_DATA_TABLE
Build data table for .xls document
FORM build_xls_data_table.
CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
con_tab TYPE x VALUE '09'. "OK for non Unicode
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
class cl_abap_char_utilities definition load.
CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
INTO it_attach SEPARATED BY space.
APPEND it_attach.
LOOP AT it_ekpo INTO wa_charekpo.
CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
wa_charekpo-aedat wa_charekpo-matnr
INTO it_attach SEPARATED BY space.
APPEND it_attach.
ENDLOOP.
ENDFORM. " BUILD_XLS_DATA_TABLE
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables pit_message
pit_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = pit_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
FORM initiate_mail_execute_program.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
Populate message body text
form populate_email_message_body.
REFRESH it_message.
it_message = 'This mail is scheduled automatically and excel file is
attached for your reference'.
APPEND it_message.
endform. " POPULATE_EMAIL_MESSAGE_BODY
Regards,
Sriram.
PS: Reward Points if it is useful. -
Regarding Download data in MS Excel format and Check box
Hi Friends
In my Project some task is here i.e. select check box of the particular Customer number click on submit button. That time display of those customer details
How we can do this if have any coding of this application can you sent me.
And one more query
One form having some data click on submit button that data will display in Excel format and Download data in MS Excel format
Can you tell me how to work on these two concepts?
Regards
VijayDear Vijay,
Please go through the [Download data in MS Excel format|http://wiki.sdn.sap.com/wiki/display/WDJava/ExporttoExcel(WithoutthirdpartyAPIs)]
to download the table contents to MS Exel.
& Also go through [How to Add Dynamic Checkboxes in a Web Dynpro Java |http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90915916-c158-2c10-6fa0-f0e25f3ccd6b?quicklink=index&overridelayout=true] for check bok UI.
Warm Regards,
Upendra Agrawal -
GUI_DOWNLOAD in Excel format
Hi Gurus,
I am using GUI_DOWNLOAD for excel (.XLS) format
I Used
*FILETYPE = 'ASC' / DAT
WRITE_FIELD_SEPARATOR = 'X'
My problem is the data not getting proper excel format.
thanking you.
SubashYou can create a file with extension .xls,
but in fact the file contains only plain text, but when you open a file by using ms.excel, it will be generated so that it becomes a table. -
Hi all,
I am not able to view the output in EXCEL format after registered the RTF file in the XML Publisher Administrator to run as a concurrent program.
I am wokring in XMLP 5.6.2 and Microsoft Office 2003.
When i preview the output as EXCEL in the options before run the conc. program, i have the following error msg and also when i view the output,it shows the output in some htm tags format not in EXCEL Format.
java.sql.SQLException: No corresponding LOB data found : SELECT FILE_DATA, DBMS_LOB.GETLENGTH(FILE_DATA), FILE_NAME, LAST_UPDATE_DATE FROM XDO_LOBS WHERE LOB_TYPE = :1 AND APPLICATION_SHORT_NAME = :2 AND LOB_CODE = :3 AND LANGUAGE = :4 AND TERRITORY = :5 at oracle.apps.xdo.oa.schema.server.XdoLobsInputStream.<init>(XdoLobsInputStream.java:108) at oracle.apps.xdo.oa.schema.server.LobHelper.getLob(LobHelper.java:877) at oracle.apps.xdo.oa.schema.server.LobHelper.getBlobDomain(LobHelper.java:912) at oracle.apps.xdo.oa.template.server.TemplatesAMImpl.processTemplate(TemplatesAMImpl.java:2053) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:189) at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152) at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:721) at oracle.apps.xdo.oa.template.webui.TemplateGeneralCO.previewTemplate(TemplateGeneralCO.java:741) at oracle.apps.xdo.oa.template.webui.TemplateGeneralCO.processRequest(TemplateGeneralCO.java:158) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:581) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1095) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:932) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:899) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:932) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:899) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353) at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2298) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1711) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418) at oa_html._OA._jspService(_OA.java:88) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267) at oracle.jsp.JspServlet.internalService(JspServlet.java:186) at oracle.jsp.JspServlet.service(JspServlet.java:156) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162) at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187) at oa_html._RF._jspService(_RF.java:102) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267) at oracle.jsp.JspServlet.internalService(JspServlet.java:186) at oracle.jsp.JspServlet.service(JspServlet.java:156) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456) at org.apache.jserv.JServConnection.run(JServConnection.java:294) at java.lang.Thread.run(Thread.java:534).
please post your comments to solve this issue.
Regards
PrabuPrabhu
adding to above post
first fix -- No corresponding LOB data found
then follow the steps in below post for excel output
Excel output in EBS? -
Hi iam getting the alv grid data in excel format but iam facing one problem
hi iam getting the alv grid data in excel format but iam facing one problem ,
i.e., i want it read only but iam getting it in edit mode i use layout default in excel iam getting in xl directly but in edit mode but i need it in read only mode
what i have to do for that and bdy knows reply me i need it urgently.there's always edit-mode if you choose excel-inplace - but noone can modify/rewrite the data
A. -
Problem in dispaying Data in Excel format
Hello,
This is Dasaradh, Here i am having a problem while generating Excel report. I am generating excel by using the following code
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment; filename=myfile.xls");
It is generating Excel file but i am getting small problem here i.e i would like to display numbers(time) in four digits.For if i display 0021 it is displaying 21. But it is wrong. Here i ma using rs.getString("time")--> value is '0021'
But while displaying rs.getString("time") in excel format it is dispaying 21.
can any one please help me regarding this issue.
Thanking You,
Dasaradh.what does this have to do with EJBs?
% -
Export to Excel formating problem
I am having a problem with the formatting of a an export file
to Excel, which is created by a Coldfusion page. My export file
contains numbers that need to be formatted as text. I found the
style code below on this forum, but I am not having any luck with
it. I tried adding it to my style file or directly as style
formatting on the export page, but neither one of the two are
getting recognized.
Is there anything else I need to code before this works? Your
help is greatly appreciated. Thanks,
Rose
<html>
<STYLE TYPE="text/css">
TD {
mso-number-format:\@;
</style><body>
<!---<cfheader name="Content-Disposition"
value="inline; filename=Exportdata1.xls">--->
<cfcontent type="application/vnd.msexcel">
<cfheader name="Content-Disposition" value="inline;
filename=export.xls">
<cfquery name = "getclub" datasource="#DSN#">
Select mail_name name,…
</cfquery>
<table width="200" border="2">
<cfoutput query='getclub'> <tr>
<td>#customer#</td>
<td>#dateformat(begin_date,'mm/dd/yyyy')# -
#dateformat(end_date,'mm/dd/yyyy')#</td>
</tr></cfoutput>
</table>Could it be a case sensitivity issue? I also noticed that you
are missing a <head> tag pair, and that your date range field
is not actually numeric. I doubt that excel is that delicate when
it comes to those issues, but you might try:
<html><head>
<STYLE TYPE="text/css">
TD.number {
mso-number-format:\@;
</style></head><body>
<cfcontent type="application/vnd.msexcel">
<cfheader name="Content-Disposition" value="inline;
filename=export.xls">
<cfquery name = "getclub" datasource="#DSN#">
Select mail_name name,…
</cfquery>
<table width="200" border="2">
<cfoutput query='getclub'> <tr>
<td class="number">#customer#</td>
<td>#dateformat(begin_date,'mm/dd/yyyy')# -
#dateformat(end_date,'mm/dd/yyyy')#</td>
</tr></cfoutput>
</table>
</body>
</html> -
Problem with Excel output format
Hi Guys,
I am creating a report in XML Publisher (not standalone). I am facing some problems could anyone please help me to figure out the issues.
Is it possible to have all three output format (PDF, HTML & EXCEL) exact (same aligned) only by creating a single RTF Template? I am facing the problem with Excel output format the output format of excel is taking excels cell formatting.
Example Numeric fields --> Right Aligned, text fields --> Left Aligned
One more issue with excel is -ve(negative) values are getting displayed in red and in brackets like ($13) (with red color).
Our client want excel output on priority.
Is there any limitation for excel output format of reports?
It is very urgent for us please help.
Any help would be highly appreciated.
Thanks,
Pragati
Edited by: user11237443 on Aug 27, 2009 1:22 AMHi Mahi,
Thanks for your response. But i could not understand how can we write wrapper program could you please give some light on this or provide some link it would be helpful for me:-)
I have read that blog for excel limitations but i have more question?
1) What about the negative values?
if any field is displaying negative amount then excel not displaying right value for that:(
2)How can we align header or data?
Do XMLP with EBS provide any solution for formatting in excel?
3) If for the alignment of numeric value we concatenate them with any special character then how can we perform calculation that field?
Here are so many formatting issues do we need to write any code in xml for that?
Please help.
Many Thanks,
Pragati -
Excel File Format Problem while downloading in ALV Grid
Hi All,
My program gives an ALV Grid Output which contains the file download button , when I choose spread sheet as the file format , the actual data starts only from 4th line and the lines above it contain date, heading etc and the rest are blank. Is it possible that I can download only the records in the grid output with the column names and not the unnecessary log?
Also the format is not proper excel format, this same file will be used for upload into another program using the Function Module 'TEXT_CONVERT_XLS_TO_SAP'. When I load the file saved in the above format, this Function Module always fails.
Please let me know any solution for this problem
Thanks in Advance.Hi
try this code----
*& Form DOWNLOAD_EXCEL_TEMPLATE
text
--> p1 text
<-- p2 text
FORM download_excel_template .
TYPES: BEGIN OF lt_data,
field1(20),
field2(30),
field3(20),
field4(20),
field5(20),
field6(30),
field7(15),
field8(10),
field9(10),
field10(20),
field11(20),
field12(10),
field13(20),
field14(20),
END OF lt_data.
DATA: lv_file TYPE rlgrap-filename,
li_data TYPE STANDARD TABLE OF lt_data,
wa_data TYPE lt_data,
lv_pathcheck type c,
lv_file1 type string.
wa_data-field1 = ''.
APPEND wa_data TO li_data.
REFRESH gi_header.
wa_header-name = 'Company Code'.
APPEND wa_header TO gi_header.
wa_header-name = 'Main Asset Number'.
APPEND wa_header TO gi_header.
wa_header-name = 'Asset Sub Number'.
APPEND wa_header TO gi_header.
wa_header-name = 'Document Date'.
APPEND wa_header TO gi_header.
wa_header-name = 'Posting Date'.
APPEND wa_header TO gi_header.
wa_header-name = 'Asset Value Date'.
APPEND wa_header TO gi_header.
wa_header-name = 'Item Text'.
APPEND wa_header TO gi_header.
wa_header-name = 'Reference'.
APPEND wa_header TO gi_header.
wa_header-name = 'Allocation'.
APPEND wa_header TO gi_header.
wa_header-name = 'Amount Posted'.
APPEND wa_header TO gi_header.
wa_header-name = 'Percentage Rate'.
APPEND wa_header TO gi_header.
wa_header-name = 'Quantity'.
APPEND wa_header TO gi_header.
wa_header-name = 'Prior-Yr Quantity'.
APPEND wa_header TO gi_header.
wa_header-name = 'Curr-Yr Quantity'.
APPEND wa_header TO gi_header.
lv_file = gv_file.
lv_file1 = gv_file.
CALL METHOD cl_gui_frontend_services=>directory_exist
EXPORTING
directory = lv_file1
RECEIVING
result = lv_pathcheck
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
wrong_parameter = 3
not_supported_by_gui = 4
OTHERS = 5.
FIND '.xls' IN lv_file IGNORING CASE.
IF sy-subrc = 0.
REPLACE '.XLS' IN lv_file WITH ' ' IGNORING CASE.
ENDIF.
FIND '.TXT' IN lv_file IGNORING CASE.
IF sy-subrc = 0.
REPLACE '.TXT' IN lv_file WITH ' ' IGNORING CASE.
ENDIF.
CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
EXPORTING
file_name = lv_file
data_sheet_name = 'DATA'
TABLES
data_tab = li_data
fieldnames = gi_header
EXCEPTIONS
file_not_exist = 1
filename_expected = 2
communication_error = 3
ole_object_method_error = 4
ole_object_property_error = 5
invalid_pivot_fields = 6
download_problem = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID gv_msgid TYPE 'E' NUMBER 002.
ENDIF.
ENDFORM. " DOWNLOAD_EXCEL_TEMPLATE
regards,
Prashant
Maybe you are looking for
-
Xslt transform problem on Sun AS 8PE
Hi, I have following xslt: <xsl:call-template name="CustomerFilter"> <xsl:with-param name="custFilterPath" select="CustomerFilter"/> </xsl:call-template> <xsl:template name="CustomerFilter"> <xsl:param name="custFilterPath"/> <xsl:text>Cust
-
Ugh. what to do? help!
i updated to the new ios4 and now all my apps either crash or freeze. the phone is super sluggish. can i just go back to ios3 or is there a way to fix this? i just got my phone may 19 and it is brand new! i dont have to have the few changes offered i
-
I just bought a new iphone 4s, and when I plug it into my computer nothing happens, I have turned off, reset and re-plug in and still nothing. Also Siri keeps answering me with "I'm sorry I can't search locations in Canada" so frustrating.. can anyo
-
What happens when NAC Server License Exceeds ?
Hi all, Got a simple question for which I could not find the explanations ? I know that licensing is run by the endpoints which are in Online User (posture assessed) list. Lets say I purchased a NAC server with 100 License. What happens if a client c
-
ERR_WIS_30253 and user should not have 'save' rights to public folder
Hello Environment - BO XI 3.2 SP2, FP 3.6 Source is SAP - BI 7 I am trying to implement the security in the project for the very first time from scratch , and requirement is - there should be 3 type of user Groups - Super, Power and End users All the