Converting xmlstring into a node-set
Hi,
Is there any xsl function which could take an xml string and convert into a node-set?
Or could any function be written to achieve this kind of result?
Thanks.
Hi,
Seems no one understands my need in my post yet. Let me elaborate my requirement a little more...
Actually in my case, I used a variable to refer to a node set (in my actual implementation the conditions in the bracket [] are much much more complicated ), e.g.
<?variable:rows;”/ROWSET/ROW[SALARY>1000]”?>
And since the report involves a complex layout printed on pre-print forms which needs me to put the fields very precisely. I cannot use the For Each method but to extract the rows one by one, likes the following:
<?$rows[1]/ENAME?>
<?$rows[2]/ENAME?>
and put them on various position on the RTF Template.
So far so good, until I realized that the $rows node set is needed to be sorted according to ENAME.
Currently I can build a sorted list from $rows into another variable $sorted_rows as follows:
<xsl:variable name="sorted_rows"><xsl:for-each select="$rows"><xsl:sort select="ENAME"/><xsl:copy-of select="."/></xsl:for-each></xsl:variable>
But in $sorted_rows, it contains only one item which is the xml fragment of the sorted data, but not a node set.
So my question is, is there any way to convert this xml fragment into a node set so I can use the following to extract the fields?
<?$sorted_rows[1]/ENAME?>
<?$sorted_rows[2]/ENAME?>
Hope anyone can share with my some solution to this.
Thanks in advance,
Jonathan
Similar Messages
-
Casting a result-tree-fragment into a node set
Hi,
Is there anything in BI Publisher that converts a result-tree-fragment into a node set, which resembles the node-set function in as in the following link? http://www.exslt.org/exsl/functions/node-set/
Thanks,
JonathanHi,
Seems no one understands my need in my post yet. Let me elaborate my requirement a little more...
Actually in my case, I used a variable to refer to a node set (in my actual implementation the conditions in the bracket [] are much much more complicated ), e.g.
<?variable:rows;”/ROWSET/ROW[SALARY>1000]”?>
And since the report involves a complex layout printed on pre-print forms which needs me to put the fields very precisely. I cannot use the For Each method but to extract the rows one by one, likes the following:
<?$rows[1]/ENAME?>
<?$rows[2]/ENAME?>
and put them on various position on the RTF Template.
So far so good, until I realized that the $rows node set is needed to be sorted according to ENAME.
Currently I can build a sorted list from $rows into another variable $sorted_rows as follows:
<xsl:variable name="sorted_rows"><xsl:for-each select="$rows"><xsl:sort select="ENAME"/><xsl:copy-of select="."/></xsl:for-each></xsl:variable>
But in $sorted_rows, it contains only one item which is the xml fragment of the sorted data, but not a node set.
So my question is, is there any way to convert this xml fragment into a node set so I can use the following to extract the fields?
<?$sorted_rows[1]/ENAME?>
<?$sorted_rows[2]/ENAME?>
Hope anyone can share with my some solution to this.
Thanks in advance,
Jonathan -
Xml result fragment to node-set
I wrote a stylesheet that transforms data into a html table and dedupes all consecutive identical elements.
The consecutive duplicates obviously depend on the sorting of the data, which is also a variable of the stylesheet.
I ended up using the msxml:node-set function that allowed me to convert a sorted result fragment (in a variable) back into a node-set. Is there anything equivalent in oracle's parser? or a workarround to pre-sort the data?
I would like to avoid multi-step transforms if possible...
thanks for any help.
nullnever mind... found ora:node-set()
must have been blind I guess....
null -
Reading XML file into Dynamic Node and Display its output as Table.
Hi All,
Following is the output of XML file:
<Company>
<Employee>
<Name>John</Name>
<Age>23</Age>
<***>Male</***>
<Location>Frankfurt</Location>
</Employee>
<Employee>
<Name>Tina</Name>
<Age>21</Age>
<***>Female</***>
<Location>Boston</Location>
</Employee>
<Department>
<Name>Sales</Name>
<HQ>Chicago</HQ>
<Emplyoees>2300</Employees>
</Department>
I'm able to read the output through DOM parser. But How do I convert this into dynamic node and display this in Web dynpro as Table?
Any pointers in this regard will be great help?
Thanks
SrikantHi Maksim,
I've used your example and its now helping as there is kind of agreement on that I'll be knowing the structure of Xml and I can fill the nodes.
But suppose if you have Xml has following structure :
<?xml version="1.0" encoding="utf-8"?><DATA>
<item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">CONTRACT</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
<item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">CREDIT</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
<item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">EMPRESS</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
<item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">PAYMENT</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
<item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">PRICE</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
</DATA>
How we will do in this case?
Can we have something similar using DOM? Also what is the best method for displaying data being sent in form of XML. And generalize it for cases like this.
Thanks
Srikant -
Error converting DOM nodes into SOAP nodes
Hi,
i am doing an http call using http binding activity in oracle soa suite 11g.The http call requires some header information.When I pass the header information through headers in invoke activity and invoke the http call,I get an error " Error converting DOM nodes into SOAP nodes".What might be the reason and how to solve it.
NareshHello,
It appears your code is trying to repeat messagePart itself. Split Joins strictly adheres to a WSDL definition for incoming and outgoing messages.
Instead of repeating <RootElement> which is defined as single occurance in your message definition within WSDL, you should find a way to tweak the WSDL to have "repetitive node which will become single message after split" within 1 Root element.
This will call for having need of implementing transformation within split join based on need of target input message. Below is the example:
WSDL contains:
<wsdl:message name="inputMessageName">
<wsdl:part name="partInput" element="rootElement"/>
</wsdl:message>
What your current xml structure is(please note how message itself is repeating below while it has been defined as single in wsdl, unfortunately there is nothing maxOccurs for message in WSDL definition , although you can define multiple parts but that is not case here):
<soap:Body>
<rootElement>
</rootElement>
<rootElement>
</rootElement>
<rootElement>
</rootElement>
</soap:Body>
What Split-Join expects(If you have existing wsdl then you need to tweak it to conform to below kind of structure then use transformation within split join to convert it into correct xml structure for outgoing):
<soap:Body>
<rootElement>
<repetitiveElementSpecificToIndividualSplitRequest/>
<repetitiveElementSpecificToIndividualSplitRequest/>
<repetitiveElementSpecificToIndividualSplitRequest/>
</rootElement>
</soap:Body>
I hope this helps.
Regards,
Ankit -
Can I convert a collection into a collection set
Hi,
Is it possible to convert a collection into a collection set. I have two scenarios I am trying to deal with right now.
1. I have two separate collections. I would like to move one collection into another, such that collection A contains what was in collection A plus the collection B i move into it?
2. I have photos I want to make into a collection and place into another collection. The dialog box only allows you to select current collection sets.
To do this do I really need to basically start over and create a new collection set and new collections in order to move them into the collection set?
Thanks,
ScottNot possible. Why don't you do this?
Library-Grid View [ G ]
Click on Collection B
Cmd/CTRL A to select all
Drag (by grabbing the thumbnail - not the frame) into Collection A. -
In LR6CC, after using the merge to HDR and the photo returns to LR as a DRG, it is not automatically put into a previously set up stack. For example a stack of three photos. If I use NIK HDR and the photo returns to LR, the stack is automatically changed from 3 to 4. When LR's HDR merge brings a photo back into LR's library, the stack number does not change and the DRG version isn't included in the stack.
Hi,
The Ps CS6 public beta version contains the same camera support as found in Ps CS5/5.5 compatible CR 6.6. There will be future updates to CR 7 for Ps CS6 to pick up more camera support. The Nikon D800 NEF files are not supported, yet.
If you like to work with your D800 files in the public beta build now, you'll have to get the DNG Converter 6.7 from here: http://labs.adobe.com/technologies/cameraraw6-7/
and convert your files to DNG.
regards,
steve -
Making spool, convert it into PDF and send that PDf throgh EMAIl
Hi,
In my making ALV report. In that i want to make the spool and then convert it into the pdf and send mail to the recepient.
AtulHi,
please try the following code. It works for me.
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
DATA : path LIKE pcfile-path.
DATA : extension(5) TYPE c.
DATA : name(100) TYPE c.
DATA:receiver TYPE somlreci1-receiver ,
p_file LIKE rlgrap-filename.
declarations for PDF convertion
DATA: path1 TYPE string ,
fullpath TYPE string.
DATA :textlines LIKE tline OCCURS 100 WITH HEADER LINE.
DATA otf LIKE itcoo OCCURS 1000 WITH HEADER LINE.
DATA it_lines LIKE tline OCCURS 100 WITH HEADER LINE.
DATA options LIKE itcpo.
DATA header LIKE thead.
DATA result LIKE itcpp.
DATA: bin_filesize TYPE i.
fullpath type string.
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
DATA: filesize TYPE i,
convcount TYPE i,
cancel(1).
textlines-tdformat = '*'.
textlines-tdline = 'Hello Hao'.
APPEND textlines.
options-tdgetotf = 'X'.
options-tdnoprev = 'X'.
CALL FUNCTION 'PRINT_TEXT'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX = ' '
ARCHIVE_PARAMS = ' '
DEVICE = 'PRINTER'
dialog = ' '
header = header
OPTIONS = options
IMPORTING
NEW_ARCHIVE_PARAMS =
RESULT = RESULT
tables
lines = textlines
otfdata = otf
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
UNKNOWN = 6
FORMAT = 7
TEXTFORMAT = 8
COMMUNICATION = 9
BAD_PAGEFORMAT_FOR_PRINT = 10
OTHERS = 11
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 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = filesize
TABLES
otf = otf
lines = it_lines
EXCEPTIONS
err_conv_not_possible = 1
err_bad_otf = 2.
fullpath = 'C:/foldername/test.pdf'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = bin_filesize
filename = fullpath
filetype = 'BIN'
APPEND = ' '
CODEPAGE = ' '
NO_BYTEORDER_MARK = ' '
IMPORTING
FILELENGTH = c
TABLES
data_tab = it_lines
FORMAT_TAB =
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6.
*filename = fullpath.
CLEAR docdata.
REFRESH objpack.
CLEAR objpack.
REFRESH objhead.
REFRESH objtxt.
CLEAR objtxt.
REFRESH objbin.
CLEAR objbin.
REFRESH objhex.
CLEAR objhex.
REFRESH reclist.
CLEAR reclist.
REFRESH listobject.
CLEAR listobject.
CLEAR tab_lines.
CLEAR doc_size.
CLEAR att_type.
Set Variables
docdata-obj_name = 'Tst'.
docdata-obj_descr = 'Testing'.
reclist-receiver = give the mail id.
reclist-rec_type = 'U'.
APPEND reclist.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = fullpath
filetype = 'BIN'
TABLES
data_tab = itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
path = fullpath.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
CHECK_DOS_FORMAT =
IMPORTING
DRIVE =
extension = extension
name = name
NAME_WITH_EXT =
PATH =
EXCEPTIONS
invalid_drive = 1
invalid_extension = 2
invalid_name = 3
invalid_path = 4
OTHERS = 5
DATA : pos TYPE i.
DATA : len TYPE i.
Loop And Put Data
LOOP AT itab.
pos = 255 - len.
IF pos > 134. "length of pdf_table
pos = 134.
ENDIF.
objbin+len = itab(pos).
len = len + pos.
IF len = 255. "length of out (contents_bin)
APPEND objbin.
CLEAR: objbin, len.
IF pos < 134.
objbin = itab+pos.
len = 134 - pos.
ENDIF.
ENDIF.
ENDLOOP.
IF len > 0.
APPEND objbin.
ENDIF.
Packing Info For Text Data
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
Packing Info Attachment
name = extension.
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = name.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = name.
APPEND objpack.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
receivers = reclist
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 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
Keerthi -
DocumentBuilder.Parse() if converting & amp; into &
Hi,
I have a dom document which I have converted into a String and one of the Nodes had & amp; in it.
When I then parse the string back into a Dom Document the parser converts the & amp; back into a &.... and this causes my problems later on.
Does anyone know How I can get round this.
The whole I am converting a document into a string and back again is because the Dom document isn't serializable.
Any ideas?
Jagwell, that's the job of the parser to resolve entities, therefore converting & into a & is correct.
-
Why can't i convert itunes into an mp3 format?
I looked on Apple's website for information on how to convert itunes into a mp3 format on your windows pc. I followed each step. I clicked on Edit and Preferences and set it to Mp3 converter. I then selected the songs I wanted to convert into. Then I clicked Advanced. When I clicked Advanced, it showed "Create Mp3 Version" but it was grayed out. And i was unable to click it. I do not know if I did something wrong or..? Please help me out with this situation because I really want to convert it to an Mp3 format to post it on a website. Thanks.
It doesn't work if you simply open it in a browser tab. When you download it and open in an Adobe window you will be able to click on it and type your information in the spaces provided.
-
Error in Invoke Node-Set Control Value
I've a trouble with a VI: the error cluster warns ERR(7) when I try to pass the output of the "FLATTEN TO STRING" function to an Invoke Node-Set Control Value.
In the file attachments there's the upmentioned VI. Thank you
Attachments:
Cambia_i_valori_di_default.vi 147 KBError 7 is file not found. I would think that this error is generated by one of your Open VI References and not any of the Set Control Values. Check your paths and verify that they're correct. Also, you haven't included two subVIs or the VIs that you're trying to modify so it's impossible for anyone to try and recreate your problem. Save them into an LLB and attach that if you still have problems and want some help.
-
Convert variable into an array
I have variable, abc; whose value is in the format val1,val2,val3,..
I want to convert it into an array, like that arr[0]=val1; arr[1]=val2; so on. How can I do this?
Usmanexamine this class that I did
import java.lang.*;
public class ReadString {
public static void main(String[] args){
String abc = "1,2,3,4,5,6";
StringBuffer abc2 = new StringBuffer(abc);
int arrayLength = abc2.length(); //get length
int[] abcFinal = new int[6];
for (int i=0; i<arrayLength; i++) { //test characters
int anIndex;
if (!(abc2.substring(i,i+1)).equals(",")) { //if it is a number
//(i/2) is ta little formula to be able to assign the
//right index in the intArray to the number
anIndex = (i/2);
//set value to array
abcFinal[anIndex] = Integer.parseInt(abc2.substring(i,i+1));
for (int j=0;j<abcFinal.length;j++ ) {
System.out.println("i = " + j + " value = " + abcFinal[j]);
}//end main
}//end class -
IMP-00069: Could not convert to environment national character set's handle
While importing database objects from dmp we are getting the following Error
C:\>imp chem/chem@chemdb full=y file='E:\eiproject\expdat.dmp' log=y;
Import: Release 8.1.5.0.0 - Production on Thu Sep 13 10:28:54 2001
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Connected to: Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production
With the Partitioning and Java options
PL/SQL Release 8.1.5.0.0 - Production
Export file created by EXPORT:V08.01.07 via conventional path
import done in WE8ISO8859P1 character set and WE8ISO8859P1 NCHAR character set
IMP-00069: Could not convert to environment national character set's handle
IMP-00000: Import terminated unsuccessfully
nullHi James,
IMP-69 can occur if you try to use an EARLIER version of IMPORT against an export (.dmp) file produced by a LATER version of EXPORT.
How about trying this:
Use the 8.1.5 EXPORT utility from Win2K to connect to your Solaris 8.1.7 database; then use the 8.1.5 IMPORT utility to import the file into the 8.1.5 W2K database.
Nat -
Convert Halftones into Opacities?
Is there a quick and easy way to convert halftones into opacities?
For example, if I have an element with a 50% black fill, is there a way (besides manually) to convert to a solid black fill with a 50% opacity? This is, of course, a simplified example. But consider artwork with a large variety of halftones that I would like to be scales of opacity instead. As you can imagine, it would be mindnumbingly tedious to have to adjust manually across the entire artwork.
The primary use of this would be in recoloring art containing halftones. If I select a different swatch that I want as the new base color, the entire artwork is recolored at 100%, instead of retaining the appropriate halftones. I know I could use the "Recolor Artwork" method, but it would be much simpler to simply have the halftones set as opacities and be able to select any color that strikes my fancy on the fly from the main color palette.
So, is there a good way to do this?
Thanks in advance.
(PS: I'm using CS 5.5)Ok, say that you have a logo design which contains various "shades" of color (let's just say 1 color in this instance, be it black, red, whatever).
Now let's say that you want to be able to quickly switch the primary color on which that design is based (so, for instance, going from shades of black to shades of blue, or shades of green).
Rather than going through the whole Recolor Artwork function every time, it would be much easier if those shades (what I was calling "halftones", i.e. non-100% fills) were variants of opacity instead, in which case you can simply click from one color to the next in your swatches, changing the artwork's hue instantly, and without filling everything to 100% "shade" every time.
Does that make more sense? I gave the simplified example because if it works with that, it should work with any level of complexity I'm talking about in this type of situation.
Thanks -
How to convert smartforms into Adobe forms.
Hi......
How to convert smartforms into Adobe forms.
Regards
Anbu BHi,
You need to use the Function Module CONVERT_OTF.
Please check the below code
REPORT zsuresh_test.
Variable declarations
DATA:
w_form_name TYPE tdsfname VALUE 'ZSURESH_TEST',
w_fmodule TYPE rs38l_fnam,
w_cparam TYPE ssfctrlop,
w_outoptions TYPE ssfcompop,
W_bin_filesize TYPE i, " Binary File Size
w_FILE_NAME type string,
w_File_path type string,
w_FULL_PATH type string.
Internal tables declaration
Internal table to hold the OTF data
DATA:
t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
Internal table to hold OTF data recd from the SMARTFORM
t_otf_from_fm TYPE ssfcrescl,
Internal table to hold the data from the FM CONVERT_OTF
T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
This function module call is used to retrieve the name of the Function
module generated when the SMARTFORM is activated
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = w_form_name
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = w_fmodule
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Calling the SMARTFORM using the function module retrieved above
GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
format of the output
w_cparam-no_dialog = 'X'.
w_cparam-preview = space. " Suppressing the dialog box
" for print preview
w_cparam-getotf = 'X'.
Printer name to be used is provided in the export parameter
OUTPUT_OPTIONS
w_outoptions-tddest = 'LP01'.
CALL FUNCTION w_fmodule
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = w_cparam
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = w_outoptions
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = t_otf_from_fm
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
t_otf[] = t_otf_from_fm-otfdata[].
Function Module CONVERT_OTF is used to convert the OTF format to PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = W_bin_filesize
BIN_FILE =
TABLES
otf = T_OTF
lines = T_pdf_tab
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
To display File SAVE dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
WINDOW_TITLE =
DEFAULT_EXTENSION =
DEFAULT_FILE_NAME =
FILE_FILTER =
INITIAL_DIRECTORY =
WITH_ENCODING =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
filename = w_FILE_NAME
path = w_FILE_PATH
fullpath = w_FULL_PATH
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_bin_filesize
filename = w_FULL_PATH
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
tables
data_tab = T_pdf_tab
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks,
Ruthra
Maybe you are looking for
-
CRM 5.0 Dynpro error in BP trx Address Tab
Hi Guys, We have a Solution Manager based on CRM 5.0 and trx. BP has the address tab's fields mixed up. Whe thought it was SAP Logon version but it happens with SAP Logon 7.10 and 7.20. In other installation with same SAP Logon the problem doesn't ha
-
I was watching the NFL games yesterday on both CBS and Fox on my SD box. I was getting a widescreen feed... problem was, it was getting stretched to a 4:3 Aspect Ratio so everyone one the screen was super tall. It was awful. My secondary tv does n
-
hello gurus Can i get an idea of how do i restrict a particular t code for a certain mvt type. like issuing of goods for a process order by mb1a n mvt type 261 only. no other mvt type will be allowed.
-
Macbook Pro Core Duo, Normal heat problems???
Hi guys. I have a First Generation Macbook Pro, i bought it like 8 months ago from ebay. The guy that sold me this mac told me that it doesn't have any heat problems at all, but im just, im sorry, i can't say the same right now. Since i receive, when
-
I've created an image carousel and tested it in Flash and all is fine, but when i try and view it as an swf it doesn't playback? Is there are coding i need or is there something I'm missing?