REGARDING CONVERSION OF SPOOL (XML FORMAT ) INTO READABLE FORMAT
HELLO EVRYONE, I AM GETTING MY SMARTFORM OUTPUT IN XML FORMAT ON SPOOL, I WANT TO CHECK IT SO I NEED THAT XML OUTPUT IN TEXT FORMAT OR ANY OTHER READABLE FORMAT, PLEASE REPLY ME. ITS URGENT.
THANKS & REGARDS,
VIMARSH B.
Hi Check this link..
http://www.****************/Tutorials/Smartforms/OTF2PDF.htm
IT contains the code to convert smartform output to PDF File
Regards,
Sai Ramesh
Similar Messages
-
Regarding Conversion of the Charecter field Into Lowercase in an ALV REPORT
HI ALL,
I have created an editable alv Report. In which i have a coloumn with charecter field where i can enter 64 charecters. when ever i have enter and moved to another Tab its converting into Capital Letters. I need to stop it conversion. Can any one suggest me Regarding It. I am Using the Docking Container and method set_table_for_first_display for displaying the Grid.
Please give some suggestion in order to control conversion of charecters.
Thanks in Advance.
NareshWhat Kind of Dataelement/Domain you are using? CHAR60? Then try TEXT60 f.e.
Maybe you check this out
http://help.sap.com/saphelp_erp2005/helpdata/DE/bf/3bd1369f2d280ee10000009b38f889/frameset.htm
and there the FC option lowercase..
Edited by: Mathias Maerker on Apr 23, 2009 2:14 PM -
Issue with Date Conversion when loading XML File into Oracle 10g Database
Hello all,
I have the interface shown in the screenshot below. In it, amongst other actions, I'm mapping an XML file element representing a date to an Oracle table column defined as DATE. The source and target columns are highlighted in the screenshot.
!http://img223.imageshack.us/img223/1565/odiscr275.jpg!
When I execute the interface, I get the following error message:
java.lang.IllegalArgumentException at java.sql.Date.valueOf(Date.java:103)
I'm assuming this refers to the date conversion!
I've already tried replacing SRC_TRADES.DEAL_DATE with TO_DATE( SRC_TRADES.DEAL_DATE, 'DD/MM/YYYY' ) in the Implementation tab. This function was not recognised when I executed the interface, so it didn't work! The date value in the XML file is in DD/MM/YYYY format.
I'm guessing that Oracle SQL Date functions don't work in the Implementation tab. Please could somebody let me know:
1. Which Date Conversion function I could use instead?
2. Where I can find a reference for the methods/functions I can use in the Implementation tab (if such a reference exists)?
Cheers.
JamesHi.
Try to change the execution area to staging area. After You change it, write in the mapping box just SRC_TRADERS.DEAL_DATE. When You use TO_DATE, the source field typu should be varchar2, not date (as it is in your source datastore) -
Regarding conversion of invoice in XML format
Hi everyone,
I am working on smartforms and i require smartforms and its output in XML format, if its possible then please let me know the procedure to transmit smartforms output in XML format. Please reply, its urgent.
Thanks & Regards
V.B.In transaction SE80 browse menu Workbench -> Edit Object. In the popup window enter XSLT Program name (e.g. ZXSLT) and click on create button.
Enter the following code into the editor
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<!xsl:output encoding="utf-8" indent="yes"/>
<xsl:template match="D2CXML">
<PurchaseOrders>
<xsl:apply-templates/>
</PurchaseOrders>
</xsl:template>
<xsl:template match="item">
<PONO>
<xsl:attribute name="no">
<xsl:value-of select="EBELN"/>
</xsl:attribute> 1
<PORDNO>
<xsl:apply-templates select="EBELN"/>
</PORDNO>
<Vendor>
<xsl:apply-templates select="LIFNR"/>
</Vendor>
<PurchaseOrg>
<xsl:apply-templates select="EKORG"/>
</PurchaseOrg>
<PurchaseGrp>
<xsl:apply-templates select="EKGRP"/>
</PurchaseGrp>
<xsl:apply-templates select="X-MLSTRUCT"/>
</PONO>
</xsl:template>
<xsl:template match="X-MLSTRUCT">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="X-MLSTRUCT/item">
<Product>
<ItemNo>
<xsl:apply-templates select="EBELP"/>
</ItemNo>
<Material>
<xsl:apply-templates select="MATNR"/>
</Material>
<Qty>
<xsl:apply-templates select="MENGE"/>
</Qty>
<Price>
<xsl:apply-templates select="NETPR"/>
</Price>
</Product>
</xsl:template>
</xsl:transform>
Create Extraction Program
Create a report program using ABAP Workbench and the code of the extracting program will be as follows.
REPORT ZXML_EXTRACTION .
- - - - - - - - - - DATA DECLARATION - - - - - - - - --*
TYPE-POOLS: ABAP.
TYPES: BEGIN OF TY_XML,
EBELP TYPE STRING,
MATNR TYPE STRING,
MENGE TYPE STRING,
NETPR TYPE STRING,
END OF TY_XML.
TYPES: BEGIN OF TY_FINAL_XML,
EBELN TYPE STRING,
EKORG TYPE EKKO-EKORG,
EKGRP TYPE EKKO-EKGRP,
LIFNR TYPE EKKO-LIFNR,
XMLSTRUCT TYPE TY_XML,
END OF TY_FINAL_XML.
TYPES: BEGIN OF TY_EKPO,
EBELN TYPE EKPO-EBELN,
LIFNR TYPE EKKO-LIFNR,
EKORG TYPE EKKO-EKORG,
EKGRP TYPE EKKO-EKGRP,
EBELP TYPE EKPO-EBELP,
MATNR TYPE EKPO-MATNR,
MENGE TYPE EKPO-MENGE,
NETPR TYPE EKPO-NETPR,
END OF TY_EKPO.
TYPES: TY_TSRCLIN(1024) TYPE X,
TY_TSRCTAB TYPE STANDARD TABLE OF TY_TSRCLIN.
Global Data for XML Creation
DATA: G_XML_STRING TYPE STRING,
G_XML_STRING1 TYPE STRING,
G_FILENAME TYPE STRING,
G_PATH TYPE STRING,
G_FULLPATH TYPE STRING,
G_TITLE TYPE STRING,
G_LEN TYPE I.
DATA: G_XSLTP TYPE REF TO CL_XSLT_PROCESSOR,
G_IXML TYPE REF TO IF_IXML,
G_STREAM_FACTORY TYPE REF TO IF_IXML_STREAM_FACTORY,
G_ENCODING TYPE REF TO IF_IXML_ENCODING,
RESSTR TYPE REF TO IF_IXML_OSTREAM,
HTTP_CLIENT TYPE REF TO IF_HTTP_CLIENT,
G_SRCSTR TYPE REF TO IF_IXML_ISTREAM,
G_GEN_EX TYPE REF TO CX_XSLT_EXCEPTION,
G_MESSAGE TYPE STRING,
G_PROGNAME TYPE CXSLTDESC VALUE 'ID'.
Work Area
DATA: WA_XML TYPE TY_XML,
WA_EKPO TYPE TY_EKPO,
WA_EKPO1 TYPE TY_EKPO,
WA_SOURCE TYPE ABAP_TRANS_SRCBIND.
DATA: BEGIN OF WA_FINAL_XML,
EBELN TYPE STRING,
LIFNR TYPE STRING,
EKGRP TYPE STRING,
EKORG TYPE STRING,
XMLSTRUCT TYPE TABLE OF TY_XML,
END OF WA_FINAL_XML.
INTERNAL TABLES
DATA: T_XML TYPE TABLE OF TY_XML,
T_FINAL_XML LIKE TABLE OF WA_FINAL_XML,
T_EKPO TYPE TABLE OF TY_EKPO,
T_SOURCE TYPE ABAP_TRANS_SRCBIND_TAB,
T_SRCTAB TYPE TY_TSRCTAB.
- - - - - - - - - - SELECTION-SCREEN - - - - - - - - - - - - - - *
---Select options/Parameters--
SELECTION-SCREEN BEGIN OF BLOCK DOWNLOAD
WITH FRAME TITLE TEXT-002.
PARAMETERS: P_COMP TYPE CHAR1 AS CHECKBOX.
PARAMETERS: P_FILE TYPE RLGRAP-FILENAME.
SELECTION-SCREEN END OF BLOCK DOWNLOAD.
AT SELECTION-SCREEN.
IF NOT P_COMP IS INITIAL AND
P_FILE IS INITIAL.
MESSAGE E000(38) WITH 'Please enter the file name'(E01).
ENDIF.
IF NOT P_COMP IS INITIAL AND
NOT P_FILE IS INITIAL.
TRANSLATE P_FILE TO UPPER CASE.
G_LEN = STRLEN( P_FILE ) - 4.
IF P_FILE+G_LEN(4) NE '.XML'.
MESSAGE E000(38) WITH 'Please use the extension as .XML'(E02).
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
G_TITLE = 'Result Document'(I01).
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE = G_TITLE
FILE_FILTER = '*.XML'
CHANGING
FILENAME = G_FILENAME
PATH = G_PATH
FULLPATH = G_FULLPATH.
IF SY-SUBRC = 0.
P_FILE = G_FULLPATH.
ENDIF.
- - - - - - - - - - LOGIC SECTION - - - - - - - - - - - - *
START-OF-SELECTION.
PERFORM CLEAR_VARIABLES.
PERFORM START_SELECTION.
END-OF-SELECTION.
WA_FINAL_XML-XMLSTRUCT[] = T_XML[].
APPEND WA_FINAL_XML TO T_FINAL_XML.
PERFORM CREATE_XML.
IF NOT P_COMP IS INITIAL.
PERFORM DOWNLOAD_FILE.
ENDIF.
*& Form START_SELECTION
Select all the Guids
FORM START_SELECTION .
SELECT HEBELN HLIFNR HEKORG HEKGRP
IEBELP IMENGE INETPR IMATNR
INTO CORRESPONDING FIELDS OF TABLE T_EKPO
FROM EKKO AS H INNER JOIN EKPO AS I
ON HEBELN = IEBELN.
LOOP AT T_EKPO INTO WA_EKPO.
WA_EKPO1 = WA_EKPO.
AT NEW EBELN.
REFRESH T_XML.
CLEAR WA_XML.
WA_FINAL_XML-EBELN = WA_EKPO-EBELN.
WA_FINAL_XML-LIFNR = WA_EKPO1-LIFNR.
WA_FINAL_XML-EKORG = WA_EKPO1-EKORG.
WA_FINAL_XML-EKGRP = WA_EKPO1-EKGRP.
ENDAT.
MOVE-CORRESPONDING WA_EKPO TO WA_XML.
APPEND WA_XML TO T_XML.
AT END OF EBELN.
WA_FINAL_XML-XMLSTRUCT[] = T_XML[].
APPEND WA_FINAL_XML TO T_FINAL_XML.
ENDAT.
ENDLOOP.
ENDFORM. " START_SELECTION
*& Form CREATE_XML
Create XML
FORM CREATE_XML .
Prepare for Transformation
WA_SOURCE-NAME = 'D2CXML'.
GET REFERENCE OF T_FINAL_XML INTO WA_SOURCE-VALUE.
APPEND WA_SOURCE TO T_SOURCE.
CLEAR G_XML_STRING.
CALL TRANSFORMATION ZXSLT
SOURCE (T_SOURCE)
RESULT XML G_XML_STRING.
IF SY-SUBRC <> 0.
ELSE.
G_XML_STRING1 = G_XML_STRING.
REPLACE 'utf-16' WITH 'utf-8' INTO G_XML_STRING.
ENDIF.
ENDFORM. " CREATE_XML
*& Form DOWNLOAD_FILE
Download the XML into a file
FORM DOWNLOAD_FILE .
Local Data
DATA: L_FILENAME TYPE STRING.
TRY.
CREATE OBJECT G_XSLTP.
CATCH CX_XSLT_EXCEPTION.
ENDTRY.
G_IXML = CL_IXML=>CREATE( ).
G_STREAM_FACTORY = G_IXML->CREATE_STREAM_FACTORY( ).
G_SRCSTR = G_STREAM_FACTORY->CREATE_ISTREAM_CSTRING(
STRING = G_XML_STRING1 ).
XML source is specified by stream
CALL METHOD G_XSLTP->SET_SOURCE_STREAM
EXPORTING
STREAM = G_SRCSTR.
CALL METHOD G_XSLTP->SET_RESULT_TABLE
EXPORTING
TABLE = T_SRCTAB.
RUN
TRY.
CALL METHOD G_XSLTP->RUN
EXPORTING
PROGNAME = G_PROGNAME.
CATCH CX_XSLT_EXCEPTION INTO G_GEN_EX.
G_XML_STRING = G_GEN_EX->GET_TEXT( ).
ENDTRY.
L_FILENAME = P_FILE.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = L_FILENAME
FILETYPE = 'BIN'
TABLES
DATA_TAB = T_SRCTAB.
IF SY-SUBRC = 0.
G_MESSAGE = 'File downloaded successfully'(I03).
ELSE.
G_MESSAGE = 'Error in downloading file'(I04).
ENDIF.
MESSAGE I000(38) WITH G_MESSAGE.
ENDFORM. " DOWNLOAD_FILE
*& Form CLEAR_VARIABLES
Clear the values of Global Variables
FORM CLEAR_VARIABLES .
CLEAR: G_TITLE,
G_FILENAME,
G_PATH,
G_FULLPATH,
G_LEN,
G_SRCSTR,
Work Areas
WA_SOURCE,
WA_XML,
WA_FINAL_XML.
REFRESH: T_XML,
T_SOURCE,
T_SRCTAB,
T_FINAL_XML.
ENDFORM. " CLEAR_VARIABLES
Edited by: Minal Nampalliwar on Jan 21, 2008 6:44 AM -
Conversion of spool to pdf format in landscape mode
Hi All,
I have a requirement where I need to print the output from a spool request in SAP to a pdf page .
The page has to be in landscape format. Is it possible to create a pdf page which is always in landscape format?
I am using FM convert abapspool 2pdf for conversion of spool to pdf.
Does this require any setting from BASIS end?
Any ideas/thoughts are welcome..
Thanks -
Harmeet Singh.hi check this...
*& Report ZSPOOLTOPDF *
*& Converts spool request into PDF document and emails it to *
*& recipicant. *
*& Execution *
*& This program must be run as a background job in-order for the write *
*& commands to create a Spool request rather than be displayed on *
*& screen *
REPORT zspooltopdf.
PARAMETER: p_email1 LIKE somlreci1-receiver,
p_sender LIKE somlreci1-receiver,
p_delspl AS CHECKBOX.
*DATA DECLARATION
DATA: gd_recsize TYPE i.
Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des.
Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV',
c_no(1) TYPE c VALUE ' ',
c_device(4) TYPE c VALUE 'LOCL'.
*START-OF-SELECTION.
START-OF-SELECTION.
Write statement to represent report output. Spool request is created
if write statement is executed in background. This could also be an
ALV grid which would be converted to PDF without any extra effort
WRITE 'Hello World'.
new-page.
commit work.
new-page print off.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
Alternative way could be to submit another program and store spool
id into memory, will be stored in sy-spono.
*submit ZSPOOLTOPDF2
to sap-spool
spool parameters %_print
archive parameters %_print
without spool dynpro
and return.
Get spool id from program called above
IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
PERFORM convert_spool_to_pdf.
PERFORM process_email.
if p_delspl EQ 'X'.
PERFORM delete_spool.
endif.
IF sy-sysid = c_dev.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDIF.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool',
'request to be created.'.
ENDIF.
FORM obtain_spool_id *
FORM obtain_spool_id.
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
message s004(zdd) with gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.
MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM.
FORM get_job_details *
FORM get_job_details.
Get current job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
ENDFORM.
FORM convert_spool_to_pdf *
FORM convert_spool_to_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
FORM process_email *
FORM process_email.
DESCRIBE TABLE it_mess_att LINES gd_recsize.
CHECK gd_recsize > 0.
PERFORM send_email USING p_email1.
perform send_email using p_email2.
ENDFORM.
FORM send_email *
--> p_email *
FORM send_email USING p_email.
CHECK NOT ( p_email IS INITIAL ).
REFRESH it_mess_bod.
Default subject matter
gd_subject = 'Subject'.
gd_attachment_desc = 'Attachname'.
CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
it_mess_bod = 'Message Body text, line 1'.
APPEND it_mess_bod.
it_mess_bod = 'Message Body text, line 2...'.
APPEND it_mess_bod.
If no sender specified - default blank
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = 'INT'.
ENDIF.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_mess_bod
it_mess_att
using p_email
'Example .xls documnet attachment'
'PDF'
gd_attachment_name
gd_attachment_desc
p_sender
gd_sender_type
changing gd_error
gd_reciever.
ENDFORM.
FORM delete_spool *
FORM delete_spool.
DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
ld_spool_nr = gd_spool_nr.
CHECK p_delspl <> c_no.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = ld_spool_nr.
ENDFORM.
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables it_message
it_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.
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.
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[] = it_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.
regards,
venkat appikonda -
How can I convert IDoc in XML format w/DTD into a string?
I want to send by e-mail outbound IDoc in XML format with its document type definition (DTD).
I want to be able to get the same output result into a string than the XML file IDoc port type with DTD activated. I have created a FM (based on SAP "OWN_FUNCTION") assigned to an IDoc port of type ABAP-PI that executes the following processing steps:
1-Extract outbound IDoc information to get the sender & recipient mail addresses (EDP13 / EDIPHONE tables).
2-Convert & Transform IDoc data into XML string using FM IDX_IDOC_TO_XML.
3-Prepare and send e-mail with XML attachement using FM SO_NEW_DOCUMENT_ATT_SEND_API1.
I cand generate the e-mail with the XML file attachement but FM IDX_IDOC_TO_XML does not convert the IDoc with proper formating and DTD.
What should I use to accomplish the IDoc conversion to XML w/DTD into a string?
Should I use XSLT tools ?
How does that work?
Thank you
Carlmuks wrote:
Use decimal string to number
Specifically, you can define a constant with a different datatype on the input on the lower left if you need a different datatype (e.g. U8, I64, DBL, etc) Are all your values integers or do you also need to scan fractional numbers? In this case, you should use "fract/exp string to number" instead.
LabVIEW Champion . Do more with less code and in less time . -
How could I export FCE project into XML format?
Hello,
I recently decided to upgrade from Final Cut Express to Final Cut Pro X. But I don't seem to be able to export my FCE unfinish projects. That is because FCE does not export into XML format !!!
Does anyone knows how to have FCE to generate a XML file? Or to have the FCP file format converted into a XML file format?
ThanksIf you are editing in FCE4, then you can open your FCE Project in FCP6 or FCP7 and do the .xml export there. Once you have that .xml file, you need to use the software 7toX to convert the file to FCP-X.
http://assistedediting.intelligentassistance.com/7toX/
It should be noted that the conversion of a sequence file to .xml and then .xml to FCP-X may not pass 100% of the information.
There is information about what is and is not translated here:
http://assistedediting.intelligentassistance.com/7toX/about.html
MtD -
Convert the XML file into XSD format?
Hello All,
I got XML file and i need to convert into XSD format and import it into PI system, so no need to create the structure.
Please let me know how to convert XML format into XSD format.
Regards,
chinnaHi ,
You can use Altova XML Spy software. There just open the xml file and goto Menu bar DTD/Schema there you have an option like Genrate DTD/Schema click on it and press ok, Then it will ask you for location to store xsd select Desktop or some folder.
.xsd will be created. and you can import that.
Thanks. -
Error: Conversion of complete file content of 'filename here' to XML format
"Error: Conversion of complete file content of 'filename here' to XML format failed"
We process inbound files every hour, we now got this message we have never seen. But every hour, for three hours, one in many files that are processed get this error. But the file ends with success, and after spot checking the file looks like it made it into SAP.
What is happening? Anybody know?
Thank-You.hey
did u see any adapter with red button?
i m pretty sure there will some sender adapter with red button(meaning error)
also whatever message failed,can u copy that payload from sxmb_moni and test the message mapping under test tab in IR
thanx
ahmad -
How to automate conversion of PDF forms to XML format
Hi
I have created a form using adobe livecycle designer 8. It has a email submit button that will send the form as a pdf file to a server.
Once the server recevive this pdf file, they will store the pdf file into a local drive. How do I convert the pdf files in the local drive into XML format without actually opening the pdf file in the Adobe Professional and clicking export data as XML?
Is there a way to write a code to convert these pdf files to XML format automatically?
Hope someone can help me with this issue
Regards
Delvin KhongHi Andersson,
The request command is a form server command? Where do i type the Request.Form("page.form.field"). I dont really understand your statement on "Use request on the receiving page to get data" Could you help me by explaining more?
Thank a lot for your advice
Warmest Regards
Delvin Khong -
Idoc be converted into XML format
Hi,
Can idoc be converted into XML format? If yes guide me the path , how to do?
Thanks
Avi<b>Hi,
we can .
Follow the link
http://www.erpgenie.com/sap/sapedi/Conversion%20of%20IDOCs%20to%20XML%20format.pdf</b>
Thanks
Manju
<u><b>Don't repeat the Questions</b></u> -
OWB11gR2 - simple and easy way to load XML formatted data into db tables?
Hi,
we're currently trying to load table data stored in XML files into our datawarehouse using OWB 11gR2.
However, we're finding this is not quite as trivial as loading flat files...
Most postings on this forum points to the blog-entry title "Leveraging XDB" found here (http://blogs.oracle.com/warehousebuilder/2007/09/leveraging_xdb.html).
This blog also references the zip-file owb_xml_etl_utils.zip, which seems to have disappeared from it's original location and can now be found on sourceforge.
Anyway, the solution described is for OWB 10g, and when trying to import experts from the zip-file etc. we end up not being able to run the "Create ETL from XSD" expert, as the 11gR2 client is different from the 10g and does not have the Experts menu et.al.
Also, this solution was published over 3 years ago, and it seems rather strange that importing XML-formatted data should still be so cumbersome in the newer warehouse builder releases.
The OWB 11gR2 documentation is very sparse (or rather - quite empty) on how to load XML data, all it has is a few lines on "XML Transformations", giving no clue as to how one goes about loading data.
Is this really the state of things? Or are we missing some vital information here?
We'd have thought that with 11g-releases, loading XML-data would be rather simple, quick and painless?
Is there somewhere besides the blog mentioned above where we can find simple and to the point guidelines for OWB 11gR2 on how to load XML-formatted data into Oracle tables?
Regards,
-Haakon-Yes it is possible to use SQL*Loader to parse and load XML, but that is not what it was designed for and so is not recommended. You also don't need to register a schema, just to load/store/parse XML in the DB either.
So where does that leave you?
Some options
{thread:id=410714} (see page 2)
{thread:id=1090681}
{thread:id=1070213}
Those talk some about storage options and reading in XML from disk and parsing XML. They should also give you options to consider. Without knowing more about your requirements for the effort, it is difficult to give specific advice. Maybe your 7-8 tables don't exist and so using Object Relational Storage for the XML would be the best solution as you can query/update tables that Oracle creates based off the schema associated to the XML. Maybe an External Table definition works better for reading the XML into the system because this process will happen just once. Maybe using WebDAV makes more sense for loading XML to be parsed (I don't have much experience with this, just know it is possible from what I've read on the forums). Also, your version makes a difference as you have different options available depending upon the version of Oracle.
Hope all that helps as a starter.
Edited by: A_Non on Jul 8, 2010 4:31 PM
A great example, see the answers by mdrake in {thread:id=1096784} -
Tool or mechanism to put the Oracle metadata into XML format
Hi,
Is there any tool or mechanism provided by Oracle to put the Oracle metadata into XML format?I mean metadata here represents Database objects like Tables, Columns, Schemas, stored procedures, Table spaces etc.
Regards,
DayakarFrom 9i and onwards, the dbms_metadata package will do this.
Either use the documentation or Morgan's library [http://www.psoug.org/reference] for further info
Sybrand Bakker
Senior Oracle DBA -
How to convert ALV output into XML format.
Hi all,
I just want to know how to convert an ALV output into a XML format, this is really urgent.
regards,
Ruchika sainiThis program exports an internal table to an XML file. *----
Report ZPRUEBA_MML_13 *
Export an internal table to XML document *
NO BORRAR ESTE CODIGO *
REPORT ZPRUEBA_MML_13.
PANTALLA SELECCION *
PARAMETERS: GK_RUTA TYPE RLGRAP-FILENAME.
PANTALLA SELECCION *
TYPE TURNOS *
TYPES: BEGIN OF TURNOS,
LU LIKE T552A-TPR01,
MA LIKE T552A-TPR01,
MI LIKE T552A-TPR01,
JU LIKE T552A-TPR01,
VI LIKE T552A-TPR01,
SA LIKE T552A-TPR01,
DO LIKE T552A-TPR01,
END OF TURNOS.
TYPE TURNOS *
TYPE SOCIO *
TYPES: BEGIN OF SOCIO,
NUMERO LIKE PERNR-PERNR,
REPOSICION LIKE PA0050-ZAUVE,
NOMBRE LIKE PA0002-VORNA,
TURNOS TYPE TURNOS,
END OF SOCIO.
TYPE SOCIO *
ESTRUCTURA ACCESOS *
DATA: BEGIN OF ACCESOS OCCURS 0,
SOCIO TYPE SOCIO,
END OF ACCESOS.
ESTRUCTURA ACCESOS *
START OF SELECTION *
START-OF-SELECTION.
PERFORM LLENA_ACCESOS.
PERFORM DESCARGA_XML.
END-OF-SELECTION.
END OF SELECTION *
FORM LLENA_ACCESOS *
FORM LLENA_ACCESOS.
REFRESH ACCESOS.
CLEAR ACCESOS.
MOVE: '45050' TO ACCESOS-SOCIO-NUMERO,
'MOISES MORENO' TO ACCESOS-SOCIO-NOMBRE,
'0' TO ACCESOS-SOCIO-REPOSICION,
'T1' TO ACCESOS-SOCIO-TURNOS-LU,
'T2' TO ACCESOS-SOCIO-TURNOS-MA,
'T3' TO ACCESOS-SOCIO-TURNOS-MI,
'T4' TO ACCESOS-SOCIO-TURNOS-JU,
'T5' TO ACCESOS-SOCIO-TURNOS-VI,
'T6' TO ACCESOS-SOCIO-TURNOS-SA,
'T7' TO ACCESOS-SOCIO-TURNOS-DO.
APPEND ACCESOS.
CLEAR ACCESOS.
MOVE: '45051' TO ACCESOS-SOCIO-NUMERO,
'RUTH PEÑA' TO ACCESOS-SOCIO-NOMBRE,
'0' TO ACCESOS-SOCIO-REPOSICION,
'T1' TO ACCESOS-SOCIO-TURNOS-LU,
'T2' TO ACCESOS-SOCIO-TURNOS-MA,
'T3' TO ACCESOS-SOCIO-TURNOS-MI,
'T4' TO ACCESOS-SOCIO-TURNOS-JU,
'T5' TO ACCESOS-SOCIO-TURNOS-VI,
'T6' TO ACCESOS-SOCIO-TURNOS-SA,
'T7' TO ACCESOS-SOCIO-TURNOS-DO.
APPEND ACCESOS.
ENDFORM.
FORM LLENA_ACCESOS *
FORM DESCARGA_XML *
FORM DESCARGA_XML.
DATA: L_DOM TYPE REF TO IF_IXML_ELEMENT,
M_DOCUMENT TYPE REF TO IF_IXML_DOCUMENT,
G_IXML TYPE REF TO IF_IXML,
W_STRING TYPE XSTRING,
W_SIZE TYPE I,
W_RESULT TYPE I,
W_LINE TYPE STRING,
IT_XML TYPE DCXMLLINES,
S_XML LIKE LINE OF IT_XML,
W_RC LIKE SY-SUBRC.
DATA: XML TYPE DCXMLLINES.
DATA: RC TYPE SY-SUBRC,
BEGIN OF XML_TAB OCCURS 0,
D LIKE LINE OF XML,
END OF XML_TAB.
CLASS CL_IXML DEFINITION LOAD.
G_IXML = CL_IXML=>CREATE( ).
CHECK NOT G_IXML IS INITIAL.
M_DOCUMENT = G_IXML->CREATE_DOCUMENT( ).
CHECK NOT M_DOCUMENT IS INITIAL.
WRITE: / 'Converting DATA TO DOM 1:'.
CALL FUNCTION 'SDIXML_DATA_TO_DOM'
EXPORTING
NAME = 'ACCESOS'
DATAOBJECT = ACCESOS[]
IMPORTING
DATA_AS_DOM = L_DOM
CHANGING
DOCUMENT = M_DOCUMENT
EXCEPTIONS
ILLEGAL_NAME = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WRITE 'Ok'.
ELSE.
WRITE: 'Err =',
SY-SUBRC.
ENDIF.
CHECK NOT L_DOM IS INITIAL.
W_RC = M_DOCUMENT->APPEND_CHILD( NEW_CHILD = L_DOM ).
IF W_RC IS INITIAL.
WRITE 'Ok'.
ELSE.
WRITE: 'Err =',
W_RC.
ENDIF.
CALL FUNCTION 'SDIXML_DOM_TO_XML'
EXPORTING
DOCUMENT = M_DOCUMENT
IMPORTING
XML_AS_STRING = W_STRING
SIZE = W_SIZE
TABLES
XML_AS_TABLE = IT_XML
EXCEPTIONS
NO_DOCUMENT = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WRITE 'Ok'.
ELSE.
WRITE: 'Err =',
SY-SUBRC.
ENDIF.
LOOP AT IT_XML INTO XML_TAB-D.
APPEND XML_TAB.
ENDLOOP.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_SIZE
FILENAME = GK_RUTA
FILETYPE = 'BIN'
TABLES
DATA_TAB = XML_TAB
EXCEPTIONS
OTHERS = 10.
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.
Message was edited by:
Hymavathi Oruganti -
Conversion of Minitab to xMII XML format
Hi,
how to convert minitab file into xml format. i tried possibilities but facing problems. i tried for two psiibilities.
1) i imported minitab file(.mtw) into BLS text loader. then i added flat file parser then StringList to XML parser. but it doesnt show correct xml output. it shows each row as single item.
2) I saved minitab file as text file by applying comma seperator. then i opened that file in BLS. this file having column names but in BLS it consider each item as single row. for example if i have 2x2 rows / columns means, BLS consider it as 4 rows and take column name also as row.
how to solve it? how to convert minitab file as it is(with .mtw) extension to xMII XML format.
-senthilSenthil,
In xMII 11.5 SP3 in the Logic Editor under Misc Functions -> Minitab Export
-Sam
Maybe you are looking for
-
End Routine - populating Target Field based on Master Data
Hi, I have an issue with my End Routine in BI 7.0. The scenario is as follows.... The Target-Fields ZSALES_OFFICE , 0SALES_CHANNEL etc. are being mapped 1:1 from their respective source fields. In addition to these target fields I have a target field
-
Oracle 11g express --- Wish list --- Match or beat IBM and Microsoft
Oracle's significant competitors IBM and Microsoft have had support for XSLT and XQuery in their express editions for a while. My wish-list for Oracle 11g express is to match it or even beat it. With increasing adoption of XML a lot of innovation is
-
Unable to process row of table.......
When i trying to insert the data im getting below error ORA-20505: Error in DML: p_rowid=1, p_alt_rowid=BOOKING_NO, p_rowid2=, p_alt_rowid2=. * ORA-01403: no data found* Unable to process row of table. how to resolve this? Thanks and regard, skud
-
0CCA_C11 Infocune : Update Rule Migration Error
Hello, I have installed the cube 0CCA_C11 from the standard BI content and started the migration of the update rule. Here, i am getting an error in one routine. There is one field in the cube "0CO_REPLINE", which is mapped with all fields of infosour
-
I am taking a flat file into ODS everytime request is failing in the process chain but i can see the data in PSA. So i did the techinal request to red and deleted the data from PSA and tried the process again but i am getting 2 errors as DATA IS NOT