Process a PDF File to an ABAP Proxy
Hello,
Does anyone know how to process a pdf file straight to an abap proxy.
With just a flat sender file adapter without conversion to a xsd:Base64Binary field straight to a Abap-proxy.
Error message :
SAP:Code area="ABAP">PARSE_APPLICATION_DATA</SAP:Code>
<SAP:P1>Request Message</SAP:P1>
<SAP:P2>CX_ST_MATCH_ELEMENT</SAP:P2>
<SAP:P3>/1SAI/TXS00000000000000000543</SAP:P3>
<SAP:P4>XML Bytepos.: 0 XML Path: Error Text: Element 'mt_pdf' expected</SAP:P4>
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Error during XML => ABAP conversion (Request Message; error ID: CX_ST_MATCH_ELEMENT; (/1SAI/TXS00000000000000000543 XML Bytepos.: 0 XML Path: Error Text: Element 'mt_pdf' expected)) Element 'mt_pdf' expected</SAP:Stack>
I HAVE READ ALL the possibilities with java coding in the module tab etc. etc.
JUST is there "simple' way to solve this.
regards meinhart
Hi Meinhart,
I think you need to go with Conversion agent here.
Ref: http://www.saptechnical .com/Tutorials/XI/PDF/Index.htm
This would help you....
Thanks,
Similar Messages
-
How to print PDF file content from ABAP in background?
Hi,
Is it possible to print PDF file content from ABAP in background?
I have some PDF content which I need to print it, these PDF files are generated outside the SAP.
Please have you any suggestions?
Thank you
Tomas<b><u>Solution:</u></b><br>
<br>
The target output device must support PDF print, this is only one limitation.<br>
<br>
REPORT z_print_pdf.
TYPE-POOLS: abap, srmgs.
PARAMETERS: p_prnds LIKE tsp01-rqdest OBLIGATORY DEFAULT 'LOCL',
p_fname TYPE file_table-filename OBLIGATORY LOWER CASE,
p_ncopi TYPE rspocopies OBLIGATORY DEFAULT '1',
p_immed AS CHECKBOX.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
DATA: lv_rc TYPE i,
lv_filter TYPE string.
DATA: lt_files TYPE filetable.
FIELD-SYMBOLS: <fs_file> LIKE LINE OF lt_files.
CONCATENATE 'PDF (*.pdf)|*.pdf|' cl_gui_frontend_services=>filetype_all INTO lv_filter.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
file_filter = lv_filter
CHANGING
file_table = lt_files
rc = lv_rc
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0 AND lv_rc EQ 0.
MESSAGE 'Error' TYPE 'E' DISPLAY LIKE 'S'.
ENDIF.
READ TABLE lt_files ASSIGNING <fs_file> INDEX 1.
IF sy-subrc EQ 0.
p_fname = <fs_file>-filename.
ENDIF.
AT SELECTION-SCREEN.
DATA: lv_name TYPE string,
lv_result TYPE boolean.
lv_name = p_fname.
CALL METHOD cl_gui_frontend_services=>file_exist
EXPORTING
file = lv_name
RECEIVING
result = lv_result
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
MESSAGE 'Bad file!' TYPE 'E' DISPLAY LIKE 'S'.
ENDIF.
IF lv_result NE abap_true.
MESSAGE 'Bad file!' TYPE 'E' DISPLAY LIKE 'S'.
ENDIF.
START-OF-SELECTION.
END-OF-SELECTION.
PERFORM process.
FORM process.
DATA: lv_name TYPE string,
lv_size TYPE i,
lv_data TYPE xstring,
lv_retcode TYPE i.
DATA: lt_file TYPE srmgs_bin_content.
lv_name = p_fname.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = lv_name
filetype = 'BIN'
IMPORTING
filelength = lv_size
CHANGING
data_tab = lt_file
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
MESSAGE 'Read file error!' TYPE 'E' DISPLAY LIKE 'S'.
ENDIF.
CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
EXPORTING
input_length = lv_size
IMPORTING
buffer = lv_data
TABLES
binary_tab = lt_file
EXCEPTIONS
failed = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE 'Binary conversion error!' TYPE 'E' DISPLAY LIKE 'S'.
ENDIF.
PERFORM print USING p_prnds lv_data CHANGING lv_retcode.
IF lv_retcode EQ 0.
WRITE: / 'Print OK' COLOR COL_POSITIVE.
ELSE.
WRITE: / 'Print ERROR' COLOR COL_NEGATIVE.
ENDIF.
ENDFORM. " PROCESS
FORM print USING iv_prndst TYPE rspopname
iv_content TYPE xstring
CHANGING ev_retcode TYPE i.
DATA: lv_handle TYPE sy-tabix,
lv_spoolid TYPE rspoid,
lv_partname TYPE adspart,
lv_globaldir TYPE text1024,
lv_dstfile TYPE text1024,
lv_filesize TYPE i,
lv_pages TYPE i.
CLEAR: ev_retcode.
CALL FUNCTION 'ADS_SR_OPEN'
EXPORTING
dest = iv_prndst
doctype = 'ADSP'
copies = p_ncopi
immediate_print = p_immed
auto_delete = 'X'
IMPORTING
handle = lv_handle
spoolid = lv_spoolid
partname = lv_partname
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
ev_retcode = 4.
RETURN.
ENDIF.
CALL FUNCTION 'ADS_GET_PATH'
IMPORTING
ads_path = lv_globaldir.
CONCATENATE lv_globaldir '/' lv_partname '.pdf' INTO lv_dstfile.
OPEN DATASET lv_dstfile FOR OUTPUT IN BINARY MODE.
IF sy-subrc NE 0.
ev_retcode = 4.
RETURN.
ENDIF.
TRANSFER iv_content TO lv_dstfile.
IF sy-subrc NE 0.
ev_retcode = 4.
RETURN.
ENDIF.
CLOSE DATASET lv_dstfile.
IF sy-subrc NE 0.
ev_retcode = 4.
RETURN.
ENDIF.
CALL FUNCTION 'ZBAP_RM_PDF_GET_PAGES'
EXPORTING
iv_content = iv_content
IMPORTING
ev_pages = lv_pages.
lv_filesize = XSTRLEN( iv_content ).
CALL FUNCTION 'ADS_SR_CONFIRM'
EXPORTING
handle = lv_handle
partname = lv_partname
size = lv_filesize
pages = lv_pages
no_pdf = ' '
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
ev_retcode = 4.
RETURN.
ENDIF.
CALL FUNCTION 'ADS_SR_CLOSE'
EXPORTING
handle = lv_handle
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
ev_retcode = 4.
RETURN.
ENDIF.
ENDFORM. " PRINT -
How to process the PDF files at one time
Hello,
I'm using WebDynpro for ABAP and Adobe Interactive Forms as offline forms.
I collect PDF files from received e-mails.
I want them to be taken in at one time.
(for example,
system job read PDF files and create data in ERP,
or I upload the files one time.)
Please let me know
- How to process the PDF files at one time.
Best regards,
KojiWhen you click the edit button in recents, try clicking the clear button in the upper left.
-
File/FTP to ABAP Proxy (file as attachment)
I have the following scenario: File/FTP -> XI -> ABAP Proxy but not the normal case. What I need is the picked file as attachment and the file name. I hope this is possible.
I have found the following blogs:
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
/people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
I have no idea where I have to start. How I should define the sender and receiver message interface? How I have to configure the sender file/ftp adapter?
I'm using PI 7.1 SP 7.At the moment I have the following problem. I always get an error during mapping the request message. This is the error message:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Mapping der Request-Message
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_MT_SCANFILE_to_MT_SAP_SCANFILE_</SAP:P1>
<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException:</SAP:P2>
<SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.ParserE</SAP:P3>
<SAP:P4>xception: XMLParser: No data allowed here: (hex) ~</SAP:P4>
<SAP:AdditionalText />
<SAP:Stack>Während des Anwendungs-Mappings com/sap/xi/tf/_MT_SCANFILE_to_MT_SAP_SCANFILE_ ist eine RuntimeException aufgetreten. com.sap.aii.utilxi.misc.api.BaseRuntimeException:Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) ~</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
And if I use transaction sxmb_moni I see that the payload MainDocument is my pdf document and I can read it.
MG%PDF-1.3
%âãÏÓ
2 0 obj
/WinAnsiEncoding
endobj
3 0 obj
<<
%Devtype POST2 Font COURIER normal Lang DE
/Type /Font
/Subtype /Type1
/BaseFont /Courier
/Name /F001
/Encoding 2 0 R
>>
endobj
4 0 obj
<<
/Length 5 0 R
u2026.
I believe there is still an error at my communication channel configuration of the ftp sender adapter. -
FILE TO INBOUND ABAP PROXY - " LOOP_IN_MESSAGE_ROUTING ERROR "
Hi ,
Getting the following Error in *FILE TO INBOUND ABAP PROXY* which is updating a Database table in R/3.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Call Adapter
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIProtocol</SAP:Category>
<SAP:Code area="MESSAGE">LOOP_IN_MESSAGE_ROUTING</SAP:Code>
<SAP:P1>is.01.lgscms</SAP:P1>
<SAP:P2>IS</SAP:P2>
<SAP:P3>XI</SAP:P3>
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>XI protocol error</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
How to rectify the Error..
Regards,
RaviHi Ravi !
Check if the url for the receiver is
http://<host>:<port>/sap/xi/engine?type=receiver
or
http://<host>:<port>/sap/xi/engine?type=entry
if using XI 3.0
Regards,
Matias.
Edited by: Matias Denker on Feb 25, 2008 2:12 PM -
How to upload a pdf file using webdynpro abap
Hi Experts,
I need to upload pdf files using webdynpro abap.my question is where to upload this files and how to upload this files, and how to display this pdf file.
Please Provide Requried Information.
Waiting for Reply.
Thanks & Regards.
Bhushan.Hi,
There is a UI element with the type 'File Upload'.
You can use that in your view.
For further details and coding, please refer to
[http://www.****************/Tutorials/WebDynproABAP/Upload/Page1.htm]
Hope this helps you.
Regards,
Dolly -
Display pdf file using webdynpro abap
Hi Friends,
My requirement is to display pdf file in the second page with the input text entered in the fisrt page when clicked on action
button( in the first page) using webdynpro abap.
Can anybody explain the step by step procedure as I am new to this area.
Thanks in advance.
Reagrds,
NagarajuHi,
Check this.,
Creating a PDF file in webdynpro abap.
Web Dynpro ABAP display pdf
hope this helps u.,
Thanks & Regards
Kiran -
FILE TO INBOUND ABAP PROXY - error
Hi,
Getting the following Error in FILE TO INBOUND ABAP PROXY which is updating a Database table in R/3.
Error:
com.sap.aii.utilxi.misc.api.BaseRuntimeException
thrown during application mapping
com/sap/xi/tf/_file2proxy_mm_: RuntimeException in
Message-Mapping transformatio~
How to rectify the error...
RaviHi,
The error mentioned is indicating about the Message Mapping error.
I think you need to test your Message Mapping with test tab.
Here Goto SXMB_Moni and select the related message and double click on it.
It will show you the various steps in Message flow.
Take the Inbound Message and look for Payload in it. Open it in right side window and right click on it to see source code.
Copy it in Message Mapping and test it
Thanks
swarup -
in my file to server abap proxy scenario,<b>filexisap .</b>
i have some doubt in configuration part.
i have to create one http destination but not clear where it should be created?in xi or in sap system??Hi
you can either key in the Details of the R3 system in the XI adapter directly or you can maintain a HTTP destination on your XI in SM59 and use this in the XI adaper.
regards
krishna -
Creating a PDF file in webdynpro abap.
Hi friends,
Can anybody tell me how to create PDF file in webdynpro abap and how to save and edit, copy etc., whatever you can do through normal pdf file?
I have checked with the standard application WDR_TEST_ADOBE and WDR_TEST_ADOBE_ONLY. But none of the applications are working...
Could anyone please suggest me how to do this?
Regards
Sireesha.Hello Sireesha,
Good places to start are the online help and tutorials, which you can find here:
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/interactiveforms-elearning">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/interactiveforms-elearning</a>
<a href="http://help.sap.com/saphelp_erp2005/helpdata/en/2c/241a427ff6db2ce10000000a1550b0/frameset.htm">http://help.sap.com/saphelp_erp2005/helpdata/en/2c/241a427ff6db2ce10000000a1550b0/frameset.htm</a>
Best regards,
Thomas -
How to Download a PDF file from Webdynpro ABAP Screen
Hi,
I have developed a input form in webdynpro - ABAP(Not Adobe),
As I am not using above services here, but would like to download the information I am capturing into a PDF file.
can I do it without using adobe interactive forms ?
thanks
SiddharthHi siddharth,
My suggestion would be to create your output as a Smartform and call your Smartform in your View.
For more Click this link.
[HOW TO DISPLAY A SMARTFORM AS PDF DOCUMENT IN WEB DYNPRO FOR ABAP|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785]
Regards
Bulent -
Opening a pdf file without using ABAP
Hi All,
Can I open a pdf file in the ITS without using ABAP
coding. I mean by using Java Script in an another
dialog/page can i open a pdf file. If anyone has got
any idea or sample code please let me know.
Thanks,
AmitabhHi,
Where exactly you want to open the file?
The most simple way would be to upload the file under MIMES and provide the URL in the corresponding ITS service.
BR,
Disha.
Pls reward points for helpful answers. -
Query on processing a PDF file using Java mapping
Hi All,
i am trying to process a XML and PDF file using Java mapping, it is successful in XML but unable to do for PDF.
below is the code i am using... can any one guide me how to process PDF's..
byte byte1 = 0;
java.io.ByteArrayOutputStream bos = (ByteArrayOutputStream)outputstream;
while((byte1=(byte)inputstream.read())!=-1){
bos.write(byte1);
bos.close();
Thank You,
MadhavHi Madhav,
I think instead of going with JAVA mapping you can write a custom adapter module for it.
Ref: /people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
Also check : Re: PI 7.1 : Taking a input PDF file and mapping it to a hexBinary attribute
/people/shabarish.vijayakumar/blog/2009/05/17/trouble-writing-out-a-pdf-in-xipi
Thanks,
Edited by: Hareenkumar on Dec 21, 2010 11:12 AM -
Message processing is stopped - Exactly Once Async Abap Proxy
Hi Guys
I have two JDBC->Xi->Abap Proxy scenarios. The Abap Proxiy server is in a BW 3.1 with SAP WebAS 6.20 (XI 2.0) and the XI is the XI 3.0 (NetWeaver 2004s).
First scenario is synchronous. It works without problem.
Second scenario is asynchronous and a processing of message stops at the Receiver Grouping stage.
So, there are only 3 stages in Integration Engine:
1. Inbound Message (CENTRAL)
2. Receiver Grouping
3. Response (I don't understand why Response is appeared!!!)
Message don't go to BW. Nevertheless message status is successful !
Can somebody help me?
Best regards,
Denis.
Edited by: Denis Vezhov on Feb 5, 2008 1:01 PMhi
in bw, check tcode
sxi_monitor and see if message passed to bw, here, the status could be error, but in XI success.
if no message, in proxy define next code
data: i_aux type int value 1
while i_aux EQ 1
endwhile
execute your scenario, them in bw go to SM50 and look for your proxy ZAIIXXX.
go to programs/session --> program --> debugging and chek the proxy execution.
also verify the configuration of your CC
Addressing type: URL Address
Target Host: the host you create the proxy (bi,bw)
service number: Port http, you can get it in TCODE SMICM
Path: /sap/xi/engine?type=receiver
QoS = EO
Hope it helps.
Thanks
Rodrigo
Edited by: Rodrigo Pertierra on Feb 5, 2008 9:43 AM -
Hi Experts,
I have a scenario like File to ABAP Proxy. Input file is huge like 60 MB and it's a XML file. Currently, it's consuming large resources in both XI & R/3 system.
I would like to use the option of Recordsets per message using the File Content Conversion. As the Input file being the XML, how the parameters under the File Content Conversion can be handled? Can you please throw some input on this?
Thanks,
Kumar.Hi Kumar,
I guess u cannot use File Content Conversion for an input file which is in XML format. But if ur concern is to handle the large file then, u can go thru the following link which talks abt handling large files...
<a href="/people/alessandro.guarneri/blog/2007/02/21/sap-xi-acting-as-a-huge-file-mover:///people/alessandro.guarneri/blog/2007/02/21/sap-xi-acting-as-a-huge-file-mover
Regards,
Akshay
Maybe you are looking for
-
Is it possible to load multi applet whose version is different ?
Is it possible to load on same browser multi applet whose version of JRE is different (1.3.1 and 1.4.2) at same time? These applets are loaded <OBJECT> tag. If Not, is there documentation written above things are specification. Thank you for advance.
-
Splitting without product cost collector
Hello All, Can anybody tell me how a splitting of a existing production order can be done without a product cost collector. i tried splitting but it is doing with product cost collector. Thank you. Alok Tiwari
-
Root CA certs repository of Linux FlashPlayer plugin
Hello. My application uses RTMPS. This is not browser's SSL but FlashPlayer's native SSL. Windows client works good. But Linux client cannot connect the server. This is server log. SSL state (accept): before/accept initialization SSL state (accept):
-
http://t.co/8pFTP2Rs Σ:D『 The error! ◎Buggy? (:])『 I don't know!! I've No Idea! Confused! ◎Ah? Please take tea. (:])『Thanks. ◎More. Σ/D『I have no idea.JavaScript error or Troy? ◎That no picture appeared. Please help me. [:]]『Thank you.
-
Encore CS5 "Initailizing Transcoding" total lockup during program start.
During the transfer of a project from Premeire Pro to Encore, as the project is opening Encore the startup of Encore freezes the computer totally during the "initailizing transcoding" phase of startup. I have tried to "disable" the LG Blue Ray drive