Problem with "CALL Transformation" in ABAP

Hello All,
       I am creating XML from ABAP program and using CALL TRANSFORMATION. Everything works fine but when my XML is created sometimes in some "element" values it is truncating space between the texts. For example, I have a field "description" with value "Bon Apetite" it changes to "BonApetite" (space truncated) after transformation! I did research everywhere but could not find why this would happen! Please give me any feedback if you have any information.
Thanks.
Mithun

Hello Mithun,
when you use the call transformation statement you have to specifiy the xslt transformation used. As a first step you usually use the transformation with the name ID. This is a special transformation for making the asXML representation of abap data. Unfortunately if you look into this transformation you find the following:
<xsl:transform version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
  <xsl:copy-of select="."/>
</xsl:template>
</xsl:transform>
If I remember correctly when you use another transformation this will first call the ID transformation and after this the specified one. So it should not be possible to just copy ID transformation and remove the line. I'll have to think again how to avoid the behaviour.
Best Regards
Roman

Similar Messages

  • Problem with CALL TRANSFORMATION xml - abap

    Hello!
    I got the following problems using call transformation to read a xml-file to local abap datatype!
    Simple xml file for testing:
    <BMECAT>
    <HEADER>
    asdf
    </HEADER>
    </BMECAT>
    XSLT file:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
      <xsl:template match="/">
        <xsl:value-of select="./BMECAT/HEADER"/>
      </xsl:template>
    </xsl:transform>
    The xslt transformation works with xslt-tester!
    My Source:
    DATA: xmlupl TYPE string,
    outputx TYPE XSTRING,
    lv_string TYPE string.
    * in xmlupl my xml import is stored
    CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
    EXPORTING
    text = xmlupl " variable type string
    IMPORTING
    buffer = outputx. " variable type xstring
    TRY .
         CALL TRANSFORMATION path_to_xslt_file
           SOURCE XML outputx
         RESULT HEADER = lv_string.
    CATCH cx_xslt_exception INTO xslt_error.
         data: xslt_message type string .
         xslt_message = xslt_error->get_text( ).
    ENDTRY.
    After debugging in xslt_message is stored the following text:
    "The element abap was expected for the XML-ABAP transformation"
    Can anyone help me with this problem?
    Regards,
    Daniel

    hi
    good
    try this code
    Just look at this piece of code, I think it should help you.
      DATA : ITAB   TYPE TABLE OF SPFLI,
             L_XML  TYPE REF TO CL_XML_DOCUMENT.
      SELECT * FROM SPFLI INTO TABLE ITAB.
    CREATE THE XML OBJECT
      CREATE OBJECT L_XML.
    CONVERT THE DATA TO XML
      CALL METHOD L_XML->CREATE_WITH_DATA( DATAOBJECT = ITAB[] ).
    DATA IS CONVERTED TO XML; DISPLAY THE XML-DOCUMENT
      CALL METHOD L_XML->DISPLAY.
    thanks
    mrutyun^

  • Problem with Call Transformation (ABAP to XML)

    Hello
       I call the tranformation function to serialize. I want to convert a ABAP internal table into XML.One of the column type is of time(t). On transformation, the values are changed.
      Ex : If I have  a value of 000009 (time format), on calling transformation it gets converted to 00:00:09. I dont want this conversion. I want to have the value as it is. I cant change the column data type from time to string.
    Regards
    Raghavendra

    hi
    good
    try this code
    Just look at this piece of code, I think it should help you.
      DATA : ITAB   TYPE TABLE OF SPFLI,
             L_XML  TYPE REF TO CL_XML_DOCUMENT.
      SELECT * FROM SPFLI INTO TABLE ITAB.
    CREATE THE XML OBJECT
      CREATE OBJECT L_XML.
    CONVERT THE DATA TO XML
      CALL METHOD L_XML->CREATE_WITH_DATA( DATAOBJECT = ITAB[] ).
    DATA IS CONVERTED TO XML; DISPLAY THE XML-DOCUMENT
      CALL METHOD L_XML->DISPLAY.
    thanks
    mrutyun^

  • Problem with calling on some numbers

    Hi my mum has problem with calling on my number. She is in the USA and has a lof of money on her Skype account. When she was in Poland (country when I am now) she could without any troubles calling on my number. What is wird now in the USA she can call on some other polish numbers (I think that Skype doesn't support connection with my mobile operator).
    I fell deceived because I created Skype account and transfered some money on it for my mum to give her possibility to call to me. Is possible to fix it? Is somewhere table with can help me check which one numbers (mobile operators) Skype supports in the USA?
    My mom used Skype from Android smartphone.

    Hi my mum has problem with calling on my number. She is in the USA and has a lof of money on her Skype account. When she was in Poland (country when I am now) she could without any troubles calling on my number. What is wird now in the USA she can call on some other polish numbers (I think that Skype doesn't support connection with my mobile operator).
    I fell deceived because I created Skype account and transfered some money on it for my mum to give her possibility to call to me. Is possible to fix it? Is somewhere table with can help me check which one numbers (mobile operators) Skype supports in the USA?
    My mom used Skype from Android smartphone.

  • Problem with call forwarding. Calls can not be forwarded for incoming external calls

    Hi Everybody, how are you?
    I have a problem with call forwarding. Everything was fine but now is not working.
    In the reception of an office, the receptionist activate the call forward option to an internal extension. If somebody, internal in the office, call to the reception, the call is forwarding to the extension configured. But if I call from the outside (in example, from my cellphone) the call is not forwarded to the extension configured and continue ringing in the reception phone. Why this behavior? Any idea?
    If you know something please tell me.
    Thanks. Best regards.
    Andres Collazos.

    I encounter a similar problem with 9.1.1.
    My problem is link to this bug ID : CSCtq10477.
    Mathieu

  • Problem with Call Transaction opt-RACOMMIT = 'X'.

    Hello Experts
    I am having a problem with call transction. I am calling a Z transaction in function module. Within the Z transaction I am furhter calling some function modules and doing commit work and then some more processing  after the comit work inside  So to make sure the code after comit work is fired I am using opt-RACOMMIT = 'X' in call transaction. Whenever I set this parameter opt-RACOMMIT = 'X' call transaction fails and gives error saying No batch Input data for screen XXXX. However the Z tcode processed succesfully.
    By changing the Mode to E i found that it remians at the last screen of call transction after executing the Z transaction and never comes back 
    But if I donot use RACOMMIT = 'X'  everything is fine. Please let me know if anyone came across such problem. Any help will be apreciated.
    Thanks,
    kamal

    Hello,
    as you said, if there is more than commit statement in your ztransaction, then you should put RACOMMIT to 'X'.
    I think the problem is in your bdcdata: change it to be sure to get back to the 1st screen of your ztransaction. Then, at this point (1st screen) hit "back" button.
    Cordialement,
    Chaouki

  • Problem with calling onApplicationStart() method

    Hi all,
         I have a problem with calling application.cfc's methods from coldfusion template. The problem is like when i am calling "onapplicationstart" method inside a cfml template i getting the error shown below
    The onApplicationStart method was not found.
    Either there are no methods with the specified method name and argument types or the onApplicationStart method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity.
    My code is like below.
    Application.cfc
    <cfcomponent hint="control application" output="false">
    <cfscript>
    this.name="startest";
    this.applicationtimeout = createtimespan(0,2,0,0);
    this.sessionmanagement = True;
    this.sessionTimeout = createtimespan(0,0,5,0);
    </cfscript>
    <cffunction name="onApplicationStart" returnType="boolean">
        <cfset application.myvar = "saurav">
    <cfset application.newvar ="saurav2">
        <cfreturn true>
    </cffunction>
    </cfcomponent>
    testpage.cfm
    <cfset variables.onApplicationStart()>
    I have tried to call the above method in different way also like
    1--- <cfset onApplicationStart()>
    i got error like this
    Variable ONAPPLICATIONSTART is undefined.
    2---<cfset Application.onApplicationStart()>
    The onApplicationStart method was not found.
    Either there are no methods with the specified method name and argument types or the onApplicationStart method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity
    Please help me out.
    Thanks
    Saurav

    You can't just call methods in a CFC without a reference to that CFC. This includes methods in Application.cfc.
    What are you trying to do, exactly, anyway? You'd probably be better served by placing a call to onApplicationStart within onRequestStart in Application.cfc, if your goal is to refresh the application based on some condition:
    <cffunction name="onRequestStart">
         <cfif someCondition>
              <cfset onApplicationStart()>
         </cfif>
    </cffunction>
    Dave Watts, CTO, Fig Leaf Software
    http://www.figleaf.com/
    http://training.figleaf.com/

  • My sister had a problem with call volume being too low on the iPhone 5S.  Is the iPhone 6 louder?  Is anyone else feeling that call volume on iPhone 5S isn't loud enough?

    My sister had a problem with call volume being too low on the iPhone 5S.  Is the iPhone 6 louder?  Is anyone else feeling that call volume on iPhone 5S isn't loud enough?

    I personally haven't experienced much of the "reverberation/feedback" when using a headset on the i4S...
    Yes, I have near-perfect hearing too (for scope, squeaky brakes hurt my ears) I come from many conversations on many phones and types and first off, CDMA technology is great for coverage, terrible for voice quality. HD Voice in Europe made for some of the best phone conversations I've ever had.
    Back on track, feedback is most noticable (similar to the landline phone) when using the iPhone without a headset, but for me it's not an absolute criticality mainly because I use VoIP apps alot, so maybe it has desensitized me some over the past year.
    But whenever I'm on a call, and the other person has me on speakerphone, I have alot of trouble talking because of the feedback loop caused. So the less of my voice I hear the better I can talk.
    Have you tried a bluetooth headset yet?

  • Lync 2013 I have a strange problem concerning group call pickup in lync 2013.the pickup calls on snom 710 having only a second delay, but in lync client it having about 5-7 second Anybody out there having similar problems with call pickup Groups?

    HI
    I have a strange problem concerning  group call pickup  in lync 2013.the pickup calls on snom 710 having only a second delay, but in lync client it having  about 5-7 second
    Anybody out there having similar problems with call pickup Groups?

    Hi,
    Did you meet any other call delay when you using Lync?
    As the issue happen for Lync desktop client, it can be performance issue. Please check if there is any error message from FE Server when the issue happen.
    Also please check if you have updated Lync Server to the latest version, if not, update it and then test again.
    Best Regards,
    Eason Huang  
    Eason Huang
    TechNet Community Support

  • I am getting weary of my iPhone 4s. the battery life is non-existent, second, i had problems with calls, the caller couldn't hear me and now it cannot detect internet networks. Be they wi-fi or cellular. what could be the problem.

    I am getting weary of my iPhone 4s. The battery life is non-existent, secondly, I had problems with calls, the caller couldn't hear me and now it cannot detect internet networks. Be they Wi-Fi or cellular. what could be the problem?

    Mullaly75 wrote:
    I assume u guys don't understand what open source software is
    Yes, I think most of us do understand what open source software is. It sounds as if you don't. Here's some information:
    Open-source software (OSS) is computer software that is available in source code form: the source code and certain other rights normally reserved forcopyright holders are provided under an open-source license that permits users to study, change, improve and at times also to distribute the software.
    Open source software is very often developed in a public, collaborative manner. Open-source software is the most prominent example of open-sourcedevelopment and often compared to (technically defined) user-generated content or (legally defined) open content movements.
    from http://en.wikipedia.org/wiki/Open_source_software
    Yes, Tom Wu of Stanford wrote a paper on something called Secure Remote Access Protocol. It's a form of Asymetric Key Exchange and has nothing to do with hacking anything. It's actually intended to protect data.

  • Problems with calls and Answering Machine

    I have a problem with calls on my Z3 dual and the Answering Machine after the update to L.I don't have Smart Answer enabled -gesture to answer calls- but when I answer a call too close to the time set to the Answering Machine to kick in, when the call reaches this time (say 25 seconds) the call will be interrupted for about 2 to 5  seconds where I can't hear the other party and they can't hear me, and then the call will resume.If I disasble the answering machine, this bug is gone.I have cleared data of the phone app but still this issue persists.

    I suggest that you try to repair the phone software using PC Companion..
    Before repairing your device you may want to backup your information first. Check out this topic for more information on how to.
    How to backup?
    Let us know if the problem persist after you've repaired the software.

  • New 4s connects with bluetooth in my Lexus, but I have intermittent problems with calls.  I can hear them, but they can't hear me.  Never did this with 3gs.  Anyone else have this problem?

    New 4s connected to my Lexus bluetooth.  Having intermittent problem with calls.  I can hear them, but they can't hear me.  Never a problem with 3gs phone.  Anyone else having this problem? 

    I ended up getting a new phone, straight through Apple.  I called their technical support and went through all he basics again and they decided to replace it.  Was a pretty quick process - after defaulting and resetting the whole phone (about 2 hours),  I called them back to inform that there was no change, so they set up the order.
    I had to give my CC# so they could hold a charge on it (in case I didn't send my old phone bach, which they sent me a pre-posted package to send it in anyway).  Had a brand new iPhone 4S in my hands in 4 days, which was pretty decent.  I had uploaded everything previously to iCloud, so setting up the new phone was a snap.
    Only thing I really didn't like was they charged me almost 30 bucks for shipping or processing, or something.  Not so sure that should have been my responsibility after spending so much on a brand new product, only to have to have it warrantied after, like, a month.

  • TS3367 FaceTime has a problem with calling (audio, video) between two devices when they are in the different networks.

    Hi,
    I have a problem with calling by FaceTime when me and my friend are in the different networks.
    When i call to another device I see this call on that device and tap to the answer button after that i see a message "connecting" but the first device is trying to call in during about 1 minute and finish the call.
    But if both of the devices have connected to the one network (wifi) it works correct.

    Actually, it started working fine when I told it to capture
    sound at 11kHz.. I should have tried that first, before making a
    fuss here, sorry. Looks like some weird glitch, a driver problem
    maybe, but anyway, switching to 11kHz seems to have solved
    it.

  • ABAP-Mapping with CALL TRANSFORMATION

    Hi everybody,
    I got an ABAP mapping that uses CALL TRANSFORMATION:
    TRY.
          CALL TRANSFORMATION (strxsltid)
            SOURCE XML IDOCXML_DOCUMENT
            RESULT XML result.
        CATCH cx_xslt_abap_call_error INTO lr_oref.
          text = lr_oref->get_text( ).
      ENDTRY.
    The TRANSFORMATION returns result THAT GETS ALREADY serialized!
    On base of the result I want to create an new output document:
    * Create output document
      DATA: li_odocument TYPE REF TO if_ixml_document.
      li_odocument = NEW_DOCUMENT.
    * Render document
      DATA: li_ostream TYPE REF TO if_ixml_ostream.
      li_ostream = li_streamfactory->create_ostream_xstring( result ).
    * Create renderer
      DATA: li_renderer TYPE REF TO if_ixml_renderer.
      li_renderer = li_ixmlfactory->create_renderer( ostream = li_ostream
                                                     document = li_odocument ).
      li_renderer->render( ).
    --> The problem is, that already CALL TRANSFORMATION creates a output document. so at the end of the mapping I got a new document wich includes the result of CALL TRANSFORMATION  and NEW_DOCUMENT in one document.
    How can I suppress CALL TRANSFORMATION from writing the output-stream?
    Thanks regards
    Mario
    Edited by: Mario Müller on Feb 24, 2010 2:27 AM

    no answers

  • XML to ABAP internal table with CALL TRANSFORMATION

    I can't create a transformation that allow passing next XML file  to an internal table:
    Please, I need someone could help me, because I don t have XML knowledge
    << Moderator message - Everyone's problem is important. But the answers in the forum are provided by volunteers. Please do not ask for help quickly. >>
    Kind regards,
    Edited by: Rob Burbank on Jul 21, 2011 4:02 PM

    Hi Gastón Juarez,
    sorry, didn't see your post, you should have linked the previous to this one
    If we create a ZZZ transformation of type ST, it would be something like this (I didn't test). Note that I concatenated the date and time, because field operations in ST are not possible (we should use XSLT instead, but it's counter performant): 
    ... (here the usual header)
    <tt:root name="ABAP_X"/>
    <tt:template>
      <corailExport xmlns= " http://www.abc.com/corailExport_Transcou201D
    xmlns: xsi= " http://www.w3.org/2001/XMLSchema-instanceu201D
    xsi: schemaLocation= " http://www.abc.com/corailExport_Transco corailExport_Transco.xsd u201C>
        <exportDate><tt:skip></tt:skip></exportDate>
        <tt:loop ref=".ABAP_X" name="line">
          <transcodification>
                 <tt:attribute name="applyingDate" value-ref="$line.APPLYING_DATE"></tt:attribute>
            <previousCofor><tt:value ref="$line.OLD_COFOR"></tt:value></previousCofor>
            <newCofor><tt:value ref="$line.NEW_COFOR"></tt:value></newCofor>
          </transcodification>
        </tt:loop>
      </corailExport>
    </tt:template>
    The program:
    TYPES : BEGIN OF ty_x,
    applying_date TYPE string,
    old_cofor TYPE lifnr,
    new_cofor TYPE lifnr,
    END OF ty_x.
    DATA l_xml TYPE string.
    DATA lt_x TYPE TABLE OF ty_x.
    l_xml = 'your xml'.
    CALL TRANSFORMATION zzz
       SOURCE XML l_xml
       RESULT abap_x = lt_x.
    BR
    Sandra

Maybe you are looking for