Conversion of IFD to XDP Format
I have got a IFD file which I want to convert into XDP format.I know there is a utility called ConverIFD.exe provided in Adobe Livecycle Designer.But its not working, it is prompting with an error that Adobe Output Designer need to be installed.Is there any other way to convert the IFD to XDP format.
Any one who can help me in this. Thanks
You must have Adobe Output Designer installed (5.5 version at a minimum). The ConvertIFD.exe actually uses the Adobe Output Designer program to do the conversion.
You should also be aware that there is a known issue with older versions of Adobe LiveCycle Designer when you have Output Designer 5.6 installed. You will need to install Output Designer 5.5 if you are using a version of LC Designer that predates LiveCycle Output ES (i.e. 8.1.x).
Similar Messages
-
Programmatically submitting XDP format
I am attempting to programmatically submit a form in the XDP format with the PDF embedded. I can make the submit work fine but resulting XML received on the web page is empty. If I change the format to XML instead of XDP the resulting XML contains my data fields but the XML format cannot contain the embedded PDF.
I am using the ready:layout event to call the execEvent("click") for a submit button.
Am I scripting within the wrong event?There is a scripting editor that is hidden by default. To open it you can click on the Window menu and choose the Script Editor or you can hit Ctrl-Shift-F5 and the script editor pod will appear. To script against an object - highlight the object, choose the Language you want to script with (Javascript or FormCalc - FormCalc is default), choose the Run At option (server or client - client is default)and then the event you want to program against (under the Show dropdown). Different types of objects will have different events available. Once code exists under an event an * will appear next to the event showing you that there is code behind that event.
-
Converting .indd or pdf to ifd or mdf format.
I have built some forms in indesign and save as .indd files. I can certainly export to pdf. How can I save these or export them (build them) in .ifd or .mdf files. I have someone that needs my forms in an old jet form format. They have requested the forms in .ifd or mdc format. Is this possible. If so how do I build them?
I have never heard about these file types nor aubout Output Designer but I did a look here:
http://www.adobe.com/products/server/outputdesigner/overview.html (the links away from this page are broken, it seems to be very old.)
It seems that you can export in different filetypes that are supported from Output Designer like PostScript or JPG. -
Poor raw conversion from Fujifilm X100 .raf format in Lightroom 3 and 4
I'm seeing very poor results when doing raw conversion from Fujifilm X100 .raf format. Who can I contact about this? Is there anything I can do?
See below for what is supposed to be a white curtain, lit by stage lighting. It results in a blown out blue channel, serious loss of detail, and very ugly gradient.
(Lightroom 4.2, Camera Raw 7.2 on LEFT --- Fujifilm X100 in-camera jpg on RIGHT)
And for more detail:
(Lightroom 4.2, Camera Raw 7.2 on TOP --- Fujifilm X100 in-camera jpg on BOTTOM)
(Lightroom 4.2, Camera Raw 7.2 on LEFT --- Fujifilm X100 in-camera jpg on RIGHT)The blue light is so intense that it is, or almost is, saturating the sensor.
The camera’s built-in raw conversion handles this by shifting the color to cyan—clipping the blue and allowing the green to contribute more. I doubt there was cyan lighting in the scene, only blue.
Adobe does not shift the hue, but this makes the blue seem over saturated. Adobe’s conversion may be more colorimetrically correct, but less pleasing in this case of intense lighting that the sensor cannot accurately record.
It is a difference in camera profile used between the camera and Adobe. Since Adobe does not supply camera-match profiles for much more than Nikon and Canon cameras, you’re not going to be able to fix things other than managing the over-saturation using HSL or WB or other things like lower-vibrance, higher saturation.
You could try making your own camera profile using an X-Rite Color-Checker Passport or the color-checker and the Adobe DNG Profile Editor:
http://xritephoto.com/ph_product_overview.aspx?id=1257 -
Conversion of string to BLOB format
Hi,
Scenario is proxy to JDBC:
I have a requirement where my PFD file name is maintained in one ABAP R3 table and I need to convert the PDF file name to BLOB format.
Is there any function module available in R3 for converting to BLOB data type. or java mapping is required in graphical mappping for this conversion.
My pdf file name is:
SHELL_INC_123456789012_851000000005290_DE_04_2008.pdf
Thnx
ChiragHi Chirag,
I don't think there is any FM in ABAP is written for this purpose. you should need to write an UDF. Also my concern is that "where is the PDF file located"? If the answer is "on a file system accessible to the Oracle database" Then you can use directory objects and the DBMS_LOB package. It would look something like this:
as SYS user do:
-- assume the PDF files are in /data/documents filesystem directory
create or replace directory pdfdir as '/data/documents';
grant read on directory pdfdir to <USER>;
as USER do:
create table mydocs (id integer primary key, doc blob);
declare
bf bfile;
b blob;
src_offset integer := 1;
dest_offset integer := 1;
begin
' insert a new blob and return it to local variable
insert into mydocs values(1, empty_blob()) returning doc into b;
' open the bfile for file "summary.pdf"
bf := bfilename('PDFDIR', 'summary.pdf');
dbms_lob.loadBlobFromFile(b, bf, dbms_lob.lobmaxsize, dest_offset, src_offset);
' done
commit;
end;
I assumed that you are working with 2 different machines, one client, one server.
If you are working on a single machine, there may be a simple bug in the code.
try adding the line
dbms_lob.open(bf, dbms_lob.file_readonly);
between the calls to bfilename() and loadBlobFromFile()
Also if you want to do this using java then please have a look in this link.
http://publib.boulder.ibm.com/infocenter/idshelp/v111/index.jsp?topic=/com.ibm.jccids.doc/com.ibm.db2.luw.apdv.java.doc/doc/cjvjdlbv.html
Hopefully this will help you.
Regards
Aashish Sinha -
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 -
Conversion from UTF to EBCDIC format- Urgent
I want to convert the data from UTF* format to EBCDIC format and create a flat file for the same. Is there any utility tools available in oracle. If not what are the other possibilities? pls help me.
Thanks
KrishnarajHi ,
I am trying to convert the normal text data to EBCDIC. As we all know, there is a corresponding value for each normal character in ASCII/HEX/BINARY/EBCDIC etc.
Using CONVERT I am able to see some data converted correctly but rest of hte accented characters not correctly.
select convert('^', 'US7ASCII','EBCDIC' ) from dual;
select convert(';' ,'WE8EBCDIC500','US7ASCII') from dual;
^ = ascii normal txt
; = corresponding ebcdic of ^
Internally CONVERT function seems to be doing correct conversion but there is a problem wiht the actually new - to be replaced characters. SQLPLUS is not able to display all the characters correctly. For all the accented chars of "a", it shows plain english a, same wiht e , u etc.
I would like to know is there anyone who knows what client side settings need to be done so that the CONVERT function output is displayed correctly on SQLPLUS.
I am using Oracle 9i Rel 2
NLS_LANG on my client (win XP) is set to AMERICAN_AMERICA.WE8MSWIN1252
As seen in the CONVERT function, the correct charset is - 'WE8EBCDIC500'
And the db params are as follows --
===========================================
SQL> select * from NLS_DATABASE_PARAMETERS;
PARAMETER VALUE
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET WE8ISO8859P1
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 9.2.0.1.0
===================================================
Can anyone help me on this??
Thanks in advance
regards
Abhivyakti,
Pune, India -
Conversion from ABC to 123 format causes data loss
Hi,
I have imported Excel data onto Lumira. The data set contains a "Net Price" column which is detected as ABC. Whenever I convert it to numerical format, I lose some data. Please see the snapshots. What can be the issue? Any background information about conversions?Hi,
I too faced the same issues, but may be we can try this one.
Split the data with currency using format option to just data(number) and then convert that particular data(only numeric) part to measure.
I don't think we have any option to append currency and make it as a measure.
May be in the further releases
Thanks,
Varsha -
IFD to XDP convertion Span tags issue...
Hi,
When we convert the IFD (Adobe output designer-5.6) to XDP through Adobe livecycle ES, some unicode special characters included to the XDP file between <span> tags.
like, <span style="xfa-spacerun:yes">ô </span>
It results, special characters printed on form.
Let us know, how to rectify the issue.
Regards,
SasiHi Frank,
Thanks for your answer. Only been using ADF for a month now so a lot to be learned!
I am styling using CSS and skins (very confusing how ADF does this but thats another matter all together) but concerning my query on how to centrally vertical and horizontally align components within a button. How would I achieve this desired effect if the use of 2 span tags is not allowed/suggested in ADF. The af:outputText tag doesn't seem to implement span tags as I would have thought.
Any help would be very appreciated as searching the internet it would seem the use of the 2 classes on span tags is the best cross browser solution. -
Formate Conversion: From Reports to Msword Format
Hi all
I am using oracle 9i reports. I generate one report and the out put in rtf format. when run this report and get the out put in file and can see by double click on it and its going open in Msword automatically. my problem start when i run this report from the forms using the run_report object and then suing web.show_documents to see the report in word. its working fine but every time it ask me the editor where i have to open this file. so i have to select Msword then its open. My all users can not do this one. so is there any way that it should be open automatically with out asking.
here is my code
WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)|| '?'||'server=' || :global.reportserver,'_blank');
and in my report object property i have set all the property that the format is rtf
ThanksI believe that is not possible. When getting a RTF document from a web site, Internet Explorer always asks you if you want to open or save the file. The file cannot be viewed directly in IE. That has to do with the fact that MS Word has to convert the RTF file first before it can be displayed.
There may be IE plugins on Internet that can directly view RTF files in the browser, but I'm not sure.
Another option is to use PDF instead of RTF. PDF can be viewed directly in the browser. -
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 smf to pdf format
Hi ,
I want to convert smartform (smf format) into pdf format. Please let me know which Function module I can use for this.
Thanks,
Sushant Singhhi
refer this porgram
*& Report ZTEST_NREDDY1
REPORT ztest_nreddy1 NO STANDARD PAGE HEADING.
DATA: it_otf TYPE STANDARD TABLE OF itcoo,
it_docs TYPE STANDARD TABLE OF docs,
it_lines TYPE STANDARD TABLE OF tline,
st_job_output_info TYPE ssfcrescl,
st_document_output_info TYPE ssfcrespd,
st_job_output_options TYPE ssfcresop,
st_output_options TYPE ssfcompop,
st_control_parameters TYPE ssfctrlop,
v_len_in TYPE so_obj_len,
v_language TYPE sflangu VALUE 'E',
v_e_devtype TYPE rspoptype,
v_bin_filesize TYPE i,
v_name TYPE string,
v_path TYPE string,
v_fullpath TYPE string,
v_filter TYPE string,
v_uact TYPE i,
v_guiobj TYPE REF TO cl_gui_frontend_services,
v_filename TYPE string,
v_fm_name TYPE rs38l_fnam.
CONSTANTS c_formname TYPE tdsfname VALUE 'ZTEST'.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
i_language = v_language
i_application = 'SAPDEFAULT'
IMPORTING
e_devtype = v_e_devtype.
st_output_options-tdprinter = v_e_devtype.
*st_output_options-tdprinter = 'locl'.
st_control_parameters-no_dialog = 'X'.
st_control_parameters-getotf = 'X'.
.................GET SMARTFORM FUNCTION MODULE NAME.................
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = c_formname
IMPORTING
fm_name = v_fm_name
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.
...........................CALL SMARTFORM............................
CALL FUNCTION v_fm_name
EXPORTING
control_parameters = st_control_parameters
output_options = st_output_options
IMPORTING
document_output_info = st_document_output_info
job_output_info = st_job_output_info
job_output_options = st_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.
ELSE.
.........................CONVERT TO OTF TO PDF.......................
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
bin_filesize = v_bin_filesize
TABLES
otf = st_job_output_info-otfdata
doctab_archive = it_docs
lines = it_lines
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 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.
........................GET THE FILE NAME TO STORE....................
CONCATENATE 'smrt' '.pdf' INTO v_name.
CREATE OBJECT v_guiobj.
CALL METHOD v_guiobj->file_save_dialog
EXPORTING
default_extension = 'pdf'
default_file_name = v_name
file_filter = v_filter
CHANGING
filename = v_name
path = v_path
fullpath = v_fullpath
user_action = v_uact.
IF v_uact = v_guiobj->action_cancel.
EXIT.
ENDIF.
..................................DOWNLOAD AS FILE....................
MOVE v_fullpath TO v_filename.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_bin_filesize
filename = v_filename
filetype = 'BIN'
TABLES
data_tab = it_lines
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.
ENDIF. -
Conversion of String to Raw format
How to Convert String to Raw format?
Hi,
Data : L_temp type string.
Move 'TEST PROGRAM' to l_temp.
Best regards,
Prashant -
Conversion from Word 2003 changed format
Converted a manuscript from Word 2003 to PDF. The PDF changed the format/margins slightly, resulting in different pagination. How do I work around that?
Most likely what has happened is that the PDF printer resolution is different than your default printer. While you are editing the DOC file, change the printer to the Adobe PDF printer and go through the WORD file to get the pages the way you want. Then the resultant PDF should be the same. WORD usually reflows and document to best flow for the selected printer. So if you change the printer before you print (or select PDF Maker), then WORD reformats the document for output. This is the difference between a word processor and a layout program.
-
Conversion of timestamp to another format
How to convert a timestamp into another format which results as a timestamp object only.
I mean i have a timestamp in one format. I should convert this timestamp in another format and print. The object I should print is a timestamp and not a string . Any one have solution for thisNow I have the timestamp object t. I want to the
timestamp object t into dd-mm-yyyy format and print
the output in required format which should be a
timestamp object again.
like 24-07-2004 09:45:52 which should be a timestamp
object and not string.timestamp object does not have a format by itself. it only recognizes strings in yyyy-MM-dd hh:mm:ss format by default. if you need to display in any other format you will have to use simpledateformat class. you cannot change the format of the timestamp. you can only have a different format purely for display
Maybe you are looking for
-
How to burn Bootcamp Support software on DVD?
Hello guys i just downloaded Windows via Bootcamp but the only problem is i need Bootcamp support software in order to get things going. I can't even connect to internet right now. I know i can burn Bootcamp Support software on an external drive; but
-
HT2240 how do i unistall quicktime x??
how do I unistall Quicktime x? my new quicktime 7 pro will not install untill the X is unistalled
-
Best way to find out the applications/packages on the Sun Servers
I need to find out what applications or packages are running on 10+ Sun Solaris servers, and the dependence. I am wondering what is the best practice to do this?
-
Generate MF_password for a JCOP applet to access mifare ?
Where can I download any tools to generate MF_Password? I find nothing in the Philips website. Or I should implement a generation function within the applet? Great thanks! ^_^
-
Layout best practices with TLF
Hello everybody.. i hope someone can give me a tip on a mobile App i'm developing. When pressing a button, i have to refresh a screen which contains 40+ clips. I evaluate an array, and for each entry i call a function to create the relative item. Bas