HOW TO SEND XML BACK TO PRINT? (See Inside thread for more info)

Hello Everybody,
Because there is not a lot of documentation on  if_fp and if_fp_pdf_object
I found out that i can retrive my PDF from the ADS with the following code:
    data:
    lo_fp                 TYPE REF TO if_fp ,
    lo_pdfobj             TYPE REF TO if_fp_pdf_object,
pdf_xstring           TYPE xstring,
    xml_data              TYPE xstring,
    lv_xml_data_string    TYPE string.
            Get FP reference
  lo_fp = cl_fp=>get_reference( ).
            Create PDF Object using destination 'ADS' (<-- this is how it is defined in SM59)
  lo_pdfobj = lo_fp->create_pdf_object( connection = 'ADS' ).
            set document
  lo_pdfobj->set_document(
  EXPORTING
    pdfdata = fp_formoutput-pdf ). " fp_formoutput-pdf is of type xstring
            Tell PDF object to extract data
lo_pdfobj->set_extractdata( )." obsolate!!!
  call METHOD lo_pdfobj->set_task_extractdata( ).
            Execute the call to ADS
  lo_pdfobj->execute( ).
  lo_pdfobj->get_data(
  IMPORTING
    formdata = xml_data ).
After this i can manipulate xml_data but dont know how to send it back to print...
Can you direct me to the solution please?
Thank you in advance,
Eran Fox
p.s.:
Component version    SAP ECC 6.0
Unicode System         No
Database system      ORACLE
Release                     10.2.0.2.0
Kernel release           700

Hi Billy
Yikes - how embarassing !  Thanks for pointing out my beginners mistake there.  I've fixed my code - and also implemented the substitutions of parameters like you suggested - I like that approach.
Unfortunately the end result is no better - the line
utl_http.read_text(resp,response_text);
Still returns nothing back
The headers that are coming back are
Date: Thu, 04 Jul 2013 08:31:56 GMT
Server: Apache/2.2.16 (Ubuntu)
X-Powered-By: PHP/5.3.3-1ubuntu9.3
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Connection: close
I guess I will need to try chasing it with the fastsms vendor so see if they can check my incoming request and see if there are any glaring problems. I know the xml is correct as I am now logging the xml string just before I send it and when I take that string and put it in their test form it works perfectly - something else in the puzzle is missing. I've had no experience using utl_http before - perhaps it's no possible to read the xml repsonse using this ?
Anyway, thanks for your help Billy.
ps - How do you paste your code into your message to get that formatting ?
Cheers,
Brent

Similar Messages

  • How do I create an iBooks ePub? Please read for more info.

    I would like to create an epub from a pages document for viewing on the iPod Touch, iPhone, and iPad. Here is my problem. I have made a whole book, and the whole thing has floating objects, and the epub format doesn't support floating objects, so how do I make an epub with floating objects (I need it in ePub, not PDF, because I want to submit it to the iBooks store, and also read it on my iPod Touch.)
    Also, my other problem is that I have pages and pages made, but all of them are square like or longer horizontally, not vertically like the iPhone. How do I adjust all of the pages to fit perfect or well on the iPhone screen?
    Thanks for the help.

    I appreciate the help. and I think I've figured it out with your help. To do what I want, here's how:
    To resize page size, go to file menu and choose page setup, and choose your size there.
    To convert to epub, I haven't done it yet, but you just need to export your pages document to a PDF, because Calibre doesn't support pages documents format, but it supports PDF, so import the PDF to Calibre, and convert it.
    For resizing photos, heres the way I figured out, maybe there's a different, easier way, but you just go to "Insert" > "Shape" > and choose your shape, then choose floating object so you can move it around where you want, and resize it BEFORE to the size you want the picture to be, then find your image in finder, and drag it to the shape, and adjust the mask and zoom of the image in the box.
    That's all I needed to do. Thank you!

  • How to send XML using UTL_HTTP

    I am trying to workout how to send XML data to a webserver using UTL_HTTP but am not getting any reply
    I need to submit the following XML document to a server "http://api.fastsms.co.uk/api/xmlapi.php"  Their instructions are "The XML Document should be posted unencoded, with a UTF-8 character set as parameter 'xml'"
    If I submit the following XML on their test form
    <?xml version="1.0"?>
    <apirequest version="1">
    <user>
      <username>**USER**</username>
      <password>**PASSWORD**</password>
    </user>
    <application>
      <name>Example Application</name>
      <version>1.0</version>
    </application>
    <inboundcheck lastid="10711399"/>
    </apirequest>
    I get an XML response back with the messages in my inbox. 
    This is the code I am trying to use to accomplish the same from PL/SQL : I know a response is coming back as there is header information - just no content.  What am I doing wrong ?
      l_xml VARCHAR2(5000);
      req utl_http.req;
      resp utl_http.resp;
      header_name VARCHAR2(256); -- Response header name
      header_value VARCHAR2(1024); -- Response header value
      response_text VARCHAR2(4000); -- Response body
      l_url VARCHAR2(100);
    BEGIN
      l_xml := 'xml=<?xml version="1.0"?>';
      l_xml := '<apirequest version="1">';
      l_xml := '<user>';
      l_xml := '<username>**USER**</username>';
      l_xml := '<password>**PASSWORD**</password>';
      l_xml := '</user>';
      l_xml := '<application>';
      l_xml := '<name>Example Application</name>';
      l_xml := '<version>1.0</version>';
      l_xml := '</application>';
      l_xml := '<inboundcheck lastid="10711399"/>';
      l_xml := '</apirequest>';
      -- Open HTTP connection
      l_url := 'http://api.fastsms.co.uk/api/xmlapi.php';
      req := utl_http.begin_request(l_url,'POST',utl_http.HTTP_VERSION_1_1);
      -- Set headers for type and length
      utl_http.set_header(req,'Content-Type','application/x-www-form-urlencoded');
      utl_http.set_header(req,'Content-Length',to_char(length(l_xml)));
      -- Write parameter
      utl_http.write_text(req,l_xml);
      -- Read response file
      resp := utl_http.get_response(req);
      -- Print out the response headers
      FOR i IN 1 .. utl_http.get_header_count(resp) LOOP
        utl_http.get_header(resp,i,header_name,header_value);
        logging_pkg.info(header_name || ': ' || header_value);
      END LOOP;
      -- Print out the response body
      BEGIN
        LOOP
          utl_http.read_text(resp,response_text);
          logging_pkg.info(response_text);
        END LOOP;
      EXCEPTION
        WHEN utl_http.end_of_body THEN
          logging_pkg.info('End of body');
      END;
      -- close http connection
      utl_http.end_response(resp);
      EXCEPTION
        WHEN utl_http.end_of_body THEN
          utl_http.end_response(resp);
    END;
    Cheers,
    Brent

    Hi Billy
    Yikes - how embarassing !  Thanks for pointing out my beginners mistake there.  I've fixed my code - and also implemented the substitutions of parameters like you suggested - I like that approach.
    Unfortunately the end result is no better - the line
    utl_http.read_text(resp,response_text);
    Still returns nothing back
    The headers that are coming back are
    Date: Thu, 04 Jul 2013 08:31:56 GMT
    Server: Apache/2.2.16 (Ubuntu)
    X-Powered-By: PHP/5.3.3-1ubuntu9.3
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Vary: Accept-Encoding
    Content-Length: 0
    Content-Type: text/html; charset=UTF-8
    Connection: close
    I guess I will need to try chasing it with the fastsms vendor so see if they can check my incoming request and see if there are any glaring problems. I know the xml is correct as I am now logging the xml string just before I send it and when I take that string and put it in their test form it works perfectly - something else in the puzzle is missing. I've had no experience using utl_http before - perhaps it's no possible to read the xml repsonse using this ?
    Anyway, thanks for your help Billy.
    ps - How do you paste your code into your message to get that formatting ?
    Cheers,
    Brent

  • How to send XML file to https server using POST

    Hi, I am having an requirement, that I have to connect to https server and I have to pass an input XML file as a response server will give me output XML file.
    The certificate validation part is over, I am using FileInputStream to read the XML file and attaching this to connection.getOutputStream(); but server is throwing me DTD does n't match.
    Can any body tell me how to send XML file, I have to use any DOM parser to send the XML file, suggest me and give me sample code.
    Thanks,

    Can anybody give me the solution

  • How to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 using ftp

    how to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 device using ftp through Ethernet

    Hello
    For using FTP function in LabVIEW, I recommend you to check this document: FTP Basics
    Also, take a look at FTP Browser.vi, which is available at the Example Finder.
    To edit a XML file, try to use VIs in XML palette. Maybe Write to XML.vi helps you.
    Post your current VI if possible.
    Regards
    Mondoni

  • How to send Earphones back to Apple(Warranty)??

    Hi, i got a problem with my earphone.
    my left earphone was garbled so i went to this website and ordered new ones for free(I still have warranty). Everything is fine so far, I got the new earphones and they work, but I don't know how to send the broken ones back. Apple said that I would get instructions how to send them back, but i didnt get any, only a letter that I dont have to pay anything because of my warranty.
    So now Im trying to find out if the carrier matters and what carrier it is. I really dont know what to do. My repair status number is D10792823.
    Im really mad right now because if I dont get my earphones sent to Apple I have to pay a $29 non-return fee.
    Hope somebody can help me.
    Marcel
    (Sry for my post in the others thread, I didnt know how to open a new thread)

    If you need to send them back, there will be shipping label under the one that shipped them to your house. Peel off the top label.
    You would use the same carrier.
    Everything is already paid for so don't fill out new forms and don't pay anything.
    You can go here -> https://support.apple.com/repairstatus/Main
    and check on the status. It should show Awaiting customer return (or something similar) if they want them back.
    If in doubt, call 1-800-myapple.

  • How to send data back to publishing stream

    Hi,
    Environment: ActionScript3.0, FMS, Flash Project created in Flash Develop
    How to send data back to publishing stream? I need to send data back to publishing stream.
    Using NetStream.send() we can send data to subscribers but is it possible to send data from subscriber back to publisher using any NetStream method.
    One other solution to this is remoteSharedObject, but if it is possible with NetStream class then let me know.
    Thanks

    There are a number of ways to extract data from CRM On Demand including:
    * Export - manual process, generate CSV file containing CRM On Demand data
    * List/Analytics - manual process, export the contents of a report of list to a CSV
    * Web Services - programmatic, develop an application that queries for data within CRMOD
    * Integration Events - programmatic, use workflow to trigger event creation and then poll for events to know when an operation occurs on a record (i.e. Insert of new Account record)
    As for getting that data into another system, that will depend on the system and the methods available for inserting data that it makes available.
    Hope this helps.
    Thanks,
    Sean

  • Ready to print. Now, how to send this to the printer?

    Hello Again,
    The little program is 5.5 x 8 inch pages (letter size paper folded in half). They must to
    print it in 4 pieces of paper letter size, put them together and then fold them in half, (staple it).
    I am using 1/4 inches in bleed and I would like to have crops marks. Must to be PDF!
    I have no idea how to send this to the printer. Any help?
    Thanks a lot!!
    Jesus

    First, ask your printer.
    Second, printers generally want unimposed PDF. IOW, export regular pages and let your printer arrange them the way they want it.
    But definitely ask them first. And make sure you mention the bleed.
    Ken Benson

  • How come when I try to print from my iPad for example Tim Horton's WiFi to mu home Airprint printer it does not work.

    How come when I try to print from my iPad for example Tim Horton's WiFi to mu home Airprint printer it does not work.

    The Airprint printer must be on the same local network (LAN) for Airprint to work. You cannot print to your home printer using the WiFi at Tim Horton's.
    See: http://support.apple.com/kb/ht4356

  • Power Bi for o365 - Odata connection test worked but "The server encountered an error processing the request. See server logs for more details". Port 8051? Authority\System

    We set up the Data Management Gateway and created a new data source (odata to SQL via sqL user)
    Did a connection test and it was successful!
    Tried the URL (maybe it needs more):
    https://ourdomain.hybridproxy.powerbi.com/ODataService/v1.0/odatatest
    That resolves to some :8051 port address and then spits out this message:
    The server encountered an error processing the request. See server logs for more details.
    I checked and the data management gateway is running.
    Does that 8051 port need to be opened on our firewall for this server? How can I confirm that is the issue.. I see no event on the server indicating this is the issue?
    I am seeing this event:
    Login failed for user 'NT AUTHORITY\SYSTEM'. Reason: Failed to open the explicitly specified database 'PowerBiTest'. [CLIENT: IP of the Server]

    O365,
    Is this still an issue?
    Thanks!
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • My iphoto quites unexpectedly everytime I open it and says closes while using the eOkaoFr.dylib plugin. Does anyone know how to fix this? iphoto won't stay open for more than 1 minute at a time.

    My iphoto quites unexpectedly everytime I open it and says closes while using the eOkaoFr.dylib plugin. Does anyone know how to fix this? iphoto won't stay open for more than 1 minute at a time. Help anyone?

    Is there a crash log? If so post the first 100 or so lines o fit
    Do you know what the ofending plugin is? and where it came from?
    LN

  • Error while accessing SharePoint 2013 news feed REST api - "The server encountered an error processing the request. See server logs for more details."

    Hi Experts,
    I am facing an issue while accessing SharePoint 2013 news feed REST api URL <SiteCollectionURL>/_api/social.feed/my/news from browser giving error "The server encountered an
    error processing the request. See server logs for more details."
    This is happening after posting the image to news feed without entering any text or description with that. If i post an image with some text or description, then i can able to get the feeds. Or else if i delete the image post then also i can able to get
    the feeds.
    I can able to see below logs in log files.
    Exception occured in scope Microsoft.Office.Server.Social.SPSocialRestFeed._SerializeToOData. Exception=System.MissingMethodException: No parameterless constructor defined for this object.     at System.RuntimeTypeHandle.CreateInstance(RuntimeType
    type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)     at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache,
    StackCrawlMark& stackMark)     at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)     at System.Activator.CreateInstance(Type type, Boolean nonPublic)
        at System.Activator.CreateInstance(Type type)     at Microsoft.SharePoint.C...
    ...lient.ValueTypeConverter.<GetODataProperties>d__2.MoveNext()     at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSerializer.WriteProperties(IEdmStructuredType owningType, IEnumerable`1 cachedProperties, Boolean isWritingCollection,
    Action beforePropertiesAction, Action afterPropertiesAction, DuplicatePropertyNamesChecker duplicatePropertyNamesChecker, EpmValueCache epmValueCache, EpmSourcePathSegment epmSourcePathSegment, ProjectedPropertiesAnnotation projectedProperties)    
    at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSerializer.WriteComplexValue(ODataComplexValue complexValue, IEdmTypeReference metadataTypeReference, Boolean isOpenPropertyType, Boolean isWritingCollection, Action beforeValueAction, Action afterValueAction,
    DuplicatePropertyNamesChecker duplicatePropertyNa...
    ...mesChecker, CollectionWithoutExpectedTypeValidator collectionValidator, EpmValueCache epmValueCache, EpmSourcePathSegment epmSourcePathSegment, ProjectedPropertiesAnnotation projectedProperties)     at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSerializer.WriteProperty(ODataProperty
    property, IEdmStructuredType owningType, Boolean isTopLevel, Boolean isWritingCollection, Action beforePropertyAction, EpmValueCache epmValueCache, EpmSourcePathSegment epmParentSourcePathSegment, DuplicatePropertyNamesChecker duplicatePropertyNamesChecker,
    ProjectedPropertiesAnnotation projectedProperties)     at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSerializer.WriteProperties(IEdmStructuredType owningType, IEnumerable`1 cachedProperties, Boolean isWritingCollection, Action beforePropertie...
    ...sAction, Action afterPropertiesAction, DuplicatePropertyNamesChecker duplicatePropertyNamesChecker, EpmValueCache epmValueCache, EpmSourcePathSegment epmSourcePathSegment, ProjectedPropertiesAnnotation projectedProperties)     at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSerializer.WriteComplexValue(ODataComplexValue
    complexValue, IEdmTypeReference metadataTypeReference, Boolean isOpenPropertyType, Boolean isWritingCollection, Action beforeValueAction, Action afterValueAction, DuplicatePropertyNamesChecker duplicatePropertyNamesChecker, CollectionWithoutExpectedTypeValidator
    collectionValidator, EpmValueCache epmValueCache, EpmSourcePathSegment epmSourcePathSegment, ProjectedPropertiesAnnotation projectedProperties)     at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSeriali...
    ...zer.WriteCollectionValue(ODataCollectionValue collectionValue, IEdmTypeReference propertyTypeReference, Boolean isOpenPropertyType, Boolean isWritingCollection)     at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSerializer.WriteProperty(ODataProperty
    property, IEdmStructuredType owningType, Boolean isTopLevel, Boolean isWritingCollection, Action beforePropertyAction, EpmValueCache epmValueCache, EpmSourcePathSegment epmParentSourcePathSegment, DuplicatePropertyNamesChecker duplicatePropertyNamesChecker,
    ProjectedPropertiesAnnotation projectedProperties)     at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSerializer.WriteProperties(IEdmStructuredType owningType, IEnumerable`1 cachedProperties, Boolean isWritingCollection, Action beforePropertiesAction,
    Action afterPropertiesAct...
    Can anyone please help me out.
    Thanks!
    dinesh

    O365,
    Is this still an issue?
    Thanks!
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Items could not be synced. See iTunes for more info.

    Sync of new iPad mini, popup on mini says 53 items could not be synced, see iTunes for more info. OK.
    Where in iTunes is more info? Which 53 items? I can find no clue. Also iBooks blows up on 2 of my books that open fine on my old iPad 1, maybe they didn't sync?

    I see now after the Sync, a  !triangle appears next to my mini in iTunes. Clicking on it brings up a list. Sure would be nice to be able to Save that list, since I can't fix anything while that list is showing! And once you close it, the warnings disappear along with the triangle. I ended up using Grab to save the info.
    Reset Warnings also makes the triangle go away. Along with all that info.

  • Something went wrong with my apple tv and now it says that it is in retail demo mode. How can i fix it?  I have had it for more than one year without any problem

    something went wrong with my apple tv and now it says that it is in retail demo mode. How can i fix it?  I have had it for more than one year without any problem

    To turn on/off retail mode, go to settings, general, legal.
    Do not open legal, just put the cursor there.
    Then, on the remote, type this sequence : right - right - left - center.
    The AppleTV should reboot.

  • Please see the log for more details.... where to find the log???

    Hi everyone,
    I have a WebI document in our DEV environment that I am trying to transport to PROD.
    When I try I get the message:
    Commit Status=Commit attempted and failed., Promotion Status=Failure : Object  has failed to promote. Please see the log for more details
    But where do I find this log that has more detail?
    As background, the document in PROD is corrupt and I want to replace it with the working copy from DEV. Perhaps the fact that the PROD document is banjaxed is the issue but I don't know.
    Many thanks
    Gill

    Hi Arvind,
    We are going live to live on the promotion side of things.
    Test promotion tells me everything is OK :-(
    I appreciate your workaround solution, I would like to understand full what's happening and put a more permanent solution in place.
    With regards
    Gill

Maybe you are looking for

  • MSI K8N Neo4 Platinum SLI sound needs -5V; newest Antec 550W has no -5V rail

    I came within a whisker of ordering a non-returnable  3700 Venice, MSI K8N Neo4 Platinum SLI mobo and an upgraded Power Supply, Antec's newest 550W PS the TP2-550 EPS12V ($117).  This has dual 2x24pin 12V 19A rails and is touted as the new V2.0 EPS12

  • 2nd Monitor issue

    I've been using a 2nd Monitor (ViewSonic 1080p) with my MacBook for several years.  After recent upgrade to Snow Leopard, MacBook no longer recognizes the 2nd monitor in the Preferences.  Monitor/cables are fine and work with another laptop OK. Do I

  • MDX Query: Equivalent of SQL's "IN" clause

    Hi, In SQL, we have an option of viewing data of multiple members by specifying IN as follows: SELECT column1 from TABLE WHERE column2 in ('value1','value2'); Is there any equivalent of that in MDX? Let's say my outline is like this: --Products (Stan

  • Quits unexpectedly when exporting multitrack mixdown

    I've recently updated to Audtion CC. Everytime I try to export the multitrack mixdown, I've received an error and Audition quits unexpectedly: Is there a fix for this?

  • Troubles (and a small horror) synchronizing mail

    I'm continuing a brief exchange from the end of this thread: /t5/Messaging-Email-and-Browsing/Nokia-Messaging-amp-Password-Problem-amp-GMail/m-p/659135#M24020 The short version of the story is that for a while now I've been using Nokia Messaging in a