XML import to change field state

I am importing xml into a form.  I have some if expressions to change the state of a field based on the value of xml fields. Here is my expression for the color - initialize event: if (Lv= "blue"){ this.fontColor="0,0,204"; }else if (Lv = "black"){ this.fontColor="0,0,0";} Lv is a field from the original form. Here is what's going on - the first fontColor value in the expression gets applied no matter what Lv is equal to. So in this case,  the fontColor ="0,0,204" gets applied even if Lv="black".  It's almost as if the event is ingoring if expression and just pickng up the "this.fontColor" statement. Any ideas?

Hi,
In your if statement try a double ==, which you use when testing equality. Also if there are only two incoming colours, you could drop the other if statement and just run with an else.
if (Lv.rawValue == "blue")
     this.fontColor = "0,0,204";
else
     this.fontColor = "0,0,0";
Good luck,
Niall
My bad: It depends on how you are bringing in the XML, but I presume Lv is one field receiving XML data. Because the language is javascript, you will need .rawValue for the Lv field.

Similar Messages

  • XML import into floating fields issue

    Probably missing something obvious, but my searches are coming up blank.  Here's the workflow I'm shooting for:<br /><br />-Create form1 in LCD<br />-User fills out form and submits via email the XML data<br />-Create form2 in LCD that uses floating text fields to create a dynamic text document based on the info in form1<br />-Import XML data from form1 into form2<br />-Print form2<br /><br />Most of it works, but there is a subform on form1 that form2 doesn't import the data from.<br /><br />The XML winds up like this:<br /><variable1>Variable 1 Info</variable1><br /><variable2>Variable 2 Info</variable2><br /><subform><br /><variable3>Variable 3 Info</variable3><br /><variable4>Variable 4 Info</variable4><br /></subform><br /><br />In this example, form2 properly imports variable1 and variable2, but ignores variable3 and variable4.  Manually removing the <subform> tags yields the desired result.<br /><br />Something in the text field binding in form2, maybe?<br /><br />Thanks in advance,<br />SyddyS

    The answer appears to lie in the hierarchy and naming. All forms, pages, subforms, etc. have to be named exactly the same and have the same hierarchical flow for the floating text fields to bind properly to imported data. This kind of blows for my purposes, as "form2" had my text fields spread across multiple pages and multiple subforms. Naming all the subforms the same as the subform in "form1" made the first one work, but none of the subsequent.
    If anyone has any alternative thoughts, I'd appreciate it. My workaround is to put ALL of my text fields in form1 on the same level, and then call them out one by one in the scripting to make the ones I want visible or hidden. Wrapping them in a subform just causes too much trouble down the line. Ugly, but functional.
    Thanks,
    SyddyS

  • XML import is changing paragraph styles?!

    After importing my translated XML-File the "copy"- Paragraph style is overwritten by my "Headline"- Paragraph style. Any Ideas why this issue is occuring? I hope the screenshot is kinda helpful in any way (simplified version of my problem) - best regards!

    On the paragraph styles panel or table styles panel, delete the style and replace with another style.

  • Sub Agreement XML import error:  XML import could not process field: CONTRACT_UNIQUE_DOC_NAME

    Hi All,
    I am importing Sub Agreement in XML format and getting below error.
    XML import could not process field: CONTRACT_UNIQUE_DOC_NAME
    unsupported null bind parameter no. 0
    Below is the XML.
    <?xml version="1.0" encoding="UTF-8"?>
    <sapesourcing xsi:noNamespaceSchemaLocation="Contracts.xsd" defaultlanguage="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <objects>
        <object classname="contracts.Agreement">
    <fields> 
                                    <CONTRACT_UNIQUE_DOC_NAME>P-XXXX-00001</CONTRACT_UNIQUE_DOC_NAME>
                                    <DISPLAY_NAME>Testing Agreement Name 1 </DISPLAY_NAME>
                                    <CALC_METHOD>UNIT_PRICE_ENTERED</CALC_METHOD>
                                    <UNIQUE_DOC_NAME>S0002510</UNIQUE_DOC_NAME>
                                    <STATUS>In Process</STATUS>
                                    <COMPANY>TEST</COMPANY>
                                    <LOCATION>Location_114</LOCATION>
                      </fields>
        </object>
      </objects>
    </sapesourcing>
    If anyone is successful in importing Sub Agreement in XML format?  also please validate the above xml structure?
    Note: I am able to load  Sub Agreement using CSV. But in our scenario data comes in XML format.
    Thanks & Regards
    Sai

    Hi Gary,
    I am able to load below objects in XML format without any issues. And I am using Scheduled Task of type “Data Import Monitor” to load them.
    1)  Project (1100)
    2)  Master Agreement (1004)
    3) Extension Collections for Project
    4) Extension Collections for Master Agreement
    1) Working XML Structure for Project(1100) .
    <?xml version="1.0" encoding="UTF-8"?>
    <sapesourcing xsi:noNamespaceSchemaLocation="Projects.xsd" defaultlanguage="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <objects>
        <object classname="projects.projects">
          <fields>
    <UNIQUE_DOC_NAME>S0004392</UNIQUE_DOC_NAME>
      <DISPLAY_NAME>Test Project</DISPLAY_NAME>
    2) Working XML Structure for Master Agreement (1004) object.
    <?xml version="1.0" encoding="UTF-8"?>
    <sapesourcing xsi:noNamespaceSchemaLocation="Contracts.xsd" defaultlanguage="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <objects>
    <object classname="contracts.Contract">
    <fields>
    <UNIQUE_DOC_NAME> 00215944</UNIQUE_DOC_NAME>
    <DISPLAY_NAME>TEST MA</DISPLAY_NAME>
    <DOCUMENT_DESCRIPTION>Contract Desc</DOCUMENT_DESCRIPTION>
    3) Working XML Structure for Extension Collections for Project(1100).
    <?xml version="1.0" encoding="UTF-8"?>
    <sapesourcing xsi:noNamespaceSchemaLocation="Projects.xsd" defaultlanguage="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <objects>
    <object classname="projects.projects">
    <fields>
    <UNIQUE_DOC_NAME> S0004392</UNIQUE_DOC_NAME>
    </fields>
    <collections>
    <Z_DETAILS replace="true">
    <object classname="extension_collections">
    <fields>
    <NAME>Sai</NAME>
    <EMAIL>[email protected]</EMAIL>
    </fields>
    </object>
    <object classname="extension_collections">
    <fields>
    <NAME>Krishna</NAME>
    <EMAIL>[email protected]</EMAIL>
    </fields>
    </object>
    </ Z_DETAILS >
    </collections>
    </object>
    </objects>
    </sapesourcing>
    4) Working XML Structure for Extension Collections for Master Agreement (1004).
    <?xml version="1.0" encoding="UTF-8"?>
    <sapesourcing xsi:noNamespaceSchemaLocation="Contracts.xsd" defaultlanguage="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <objects>
    <object classname="contracts.Contract">
    <fields>
    <UNIQUE_DOC_NAME>00215944</UNIQUE_DOC_NAME>
    </fields>
    <collections>
    <ZLINKS replace="true">
    <object classname="extension_collections">
    <fields>
    <LINK_NAME>SAP</ LINK_NAME>
    < LINK_URL> http://www.sap.com/index.html </ LINK_URL >
    </fields>
    </object>
    <object classname="extension_collections">
    <fields>
    <LINK_NAME>SCN Sourcing</ LINK_NAME>
    < LINK_URL>http://scn.sap.com/community/sourcing</ LINK_URL >
    </fields>
    </object>
    </ ZLINKS >
    </collections>
    </object>
    </objects>
    </sapesourcing>
    Could you please help me with the right XML Structure for Agreement( 1003)?
    Regards,
    Sai

  • Can we change the state based upon another field value?

    I want to change the state to Done when completed work is set to 0. I googled it and came to know about this:
    Handle it from the server side, monitoring the WorkItemChanged event. The downside is that it doesn't reflect immediately in the end-user screen. After editing a work item, the user would have to hit Refresh to see the new state.
    Will it be perfect in this way? Any other suggestions.
    Please provide best links to learn about creating server plugins and depoying.

    Hi divya,
    For your questions, you can refer to the link that Alexandr mentioned above to check the Pros and cons of custom controls for work item tracking.
    And for server side plugin, it has the ability to capture all the occurred events without exception. You can get more information about how to implement it by refering links below:
    https://socialtfs.codeplex.com/wikipage?title=How%20to%20create%20and%20debug%20a%20Team%20Foundation%20Server%20server-side%20plugin&referringTitle=Documentation
    http://vgaltes.com/index.php/2013/04/14/create-a-team-foundation-server-event-handler/
    http://geekswithblogs.net/jakob/archive/2010/10/27/devleoping-and-debugging-server-side-event-handlers-in-tfs-2010.aspx
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Change a state in main.mxml from a script in another mxml

    Hi,
    i'm having some trouble with my application, let's say i have the main application file called MAIN.MXML
    in wich i have set different States, and have different forms.
    now i have a form called loginForm which contains the textInput item for Login and Password, i also have a link Need to Register
    which onClick will change the state to show in the same panel a different form registerForm (with the relevant textInput items)
    now the MAIN.MXML includes a custom component called <comp: NetworkManager /> which includes all the logic scripts and MXML
    tags to create and manage an HTTPService request to a PHP Server.
    when the user click on the Login button, this will call a function included in the main.as script (imported in MAIN.MXML) which
    will call a function in the script within NetworkManager.MXML passing all the form data.
    in NetworkManager.MXML the script will create an XML message, will send to the PHP Server and wait the response... if this comes
    true the user is authenticated, otherwise is not.
    so far so good, i get the message sent, the correct response back. Now i want to hide the form in MAIN.MXML and put something like
    Welcome firstName lastName!! instead. But i don't know how to do it. If i try to access the states in MAIN.MXML from the NetworkManager.MXML
    i'll get all sort of errors which i don't have it here with me.
    I know this sounds like a newbie question, and it really is ... any taker?
    your help is much appreciated.
    thanks
    T.

    Hi,
    i've tried RemoveChild but i get an error like:
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/removeChild()
    at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$removeChild()[C:\autobuild\3.2.0\frameworks\p rojects\framework\src\mx\core\UIComponent.as:5096]
    at mx.core::Container/removeChild()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\ core\Container.as:2274]
    at components::NetworkManager/sendUserAuthHandler()[C:\Documents and Settings\Tom\My Documents\flex_prj\Shoppy\src\components\NetworkManager.mxml:182]
    at components::NetworkManager/serverHandler()[C:\Documents and Settings\Tom\My Documents\flex_prj\Shoppy\src\components\NetworkManager.mxml:98]
    at components::NetworkManager/__serverRPC_result()[C:\Documents and Settings\Tom\My Documents\flex_prj\Shoppy\src\components\NetworkManager.mxml:290]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\framewor ks\projects\rpc\src\mx\rpc\http\mxml\HTTPService.as:290]
    at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\autobuild\3.2.0\frameworks\ projects\rpc\src\mx\rpc\AbstractInvoker.as:193]
    at mx.rpc::Responder/result()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responde r.as:43]
    at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\ AsyncRequest.as:74]
    at DirectHTTPMessageResponder/completeHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\s rc\mx\messaging\channels\DirectHTTPChannel.as:403]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    who is the caller of loginForm then? i've tried with Application.application.loginForm but i do get the same error though.
    loginForm is contained in a Canvas item, is it the caller? or who else?
    thanks
    T.

  • Changing container State from a component

    Hi, I try to change the state of an application from a button
    inside a mxml component. I found a way for this by handling click
    event inside the component and dispatch event to the container (see
    the code below). But my problem is that any click is dispatched ! I
    would like that only one button dispatch this event, or better :
    calling a container's function from the button inside my component
    ! Is this possible ?
    Thanks for your help
    Here is a part of the container code :
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="570" height="360" xmlns:local="*">
    <mx:Script>
    <![CDATA[
    import flash.events.Event;
    public function handleCloseEvent(eventObj:Event):void {
    currentState='carte';
    ]]>
    </mx:Script>
    <mx:states>
    <mx:State name="liste">
    <mx:AddChild position="lastChild">
    <local:liste_vin_region click="handleCloseEvent(event);"
    id="fenetre">
    </mx:AddChild>
    </mx:State>
    <mx:State name="carte"/>
    </mx:states>
    </mx:Canvas>
    And the component code :
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="514" height="300" xmlns:local="*">
    <mx:Metadata>
    [Event(name="click", type="flash.events.Event")]
    </mx:Metadata>
    <mx:Script>
    <![CDATA[
    import flash.events.Event;
    // Redispatch event.
    private function
    handleCloseEventInternally(eventObj:Event):void {
    dispatchEvent(eventObj);
    ]]>
    </mx:Script>
    <mx:states>
    <mx:State name="liste"/>
    </mx:states>
    <mx:TitleWindow layout="absolute" left="10" top="10"
    bottom="10" right="10" id="titlewindow1"/>
    <mx:Button y="14" label="X" right="19" width="29"
    click="handleCloseEventInternally(event);" id="button1"/>
    </mx:Canvas>

    Yes ! That's exactly what I need !
    I've tried to do : this._parent like in Flash, but no
    result...
    Thanks for your help, parentApplication is right for me
    !

  • Insane XML Import, Huge Project, Duplicate file names work around...

    I planned on kicking off my journey attempting to edit a massive multi year documentary on FCPX with a nice introduction of the blog I'm going to keep about the experience, but I've run into a bit of a roadblock, or maybe major speed bump at least before even getting to that point. I wanted to share what is working as a work around for me and you guys can tell me how I'm doing it wrong.
    Ok, I will try to explain this as succinctly as possible. I'll write in somewhat stream of consciousness just to try and get through it quicker... Basically, after discovering the work around below, I am now utterly confused on how FCPX handles the relationship between its own database of where media is stored, and the actual media itself. I have plenty experience on FCPX now, probably done 30-40 pro commercial jobs on it over the last year since XML became doable as I'm also a Resolve Colorist and all the FCPX projects where hardcore coloring product spots. For commercial work, I never needed to worry about splitting up footage up over multiple Events. Everything, all in one, FCPX handled it no problem. (well the occasional beach ball, but that seems to be a thing with FCPX in general)
    This will be my 10th feature documentary as an Editor. Every one before it was either on Avid's many flavors over the last 12 years or FCP Studio. When this new film came along, I made the decision a few months ago to use FCPX for a few reasons, but mostly because I'm insane and I like to try to mix it up for myself in a career that can get stale quick if you aren't willing to be that way. The film was shot over 2+ years, every shoot was multi cam 5D (yes i know, looks great, but please kill me), I haven't done the math on length, but there is over 10,000 clips of video (this is actually medium in size compared to what I've dealt with before). Its 5D, so theres external audio for everything. FCPX's syncing is great, but I've learned that theres an unsaid window of heads and tales clips must fall within to sync properly with the nearby clips, if they are too far apart FCPX gives up. One shoot day could have 3 cams, 50 clips each, and 2 audio files to sync to, FCPX simply cannot handle this, so off to Plural eyes they went, no problems.
    Ok, all this is relevant eventually I swear! Again, in the past, all in one event, no problem. I tried for fun to bring all media into one Event on this film. It worked, but there is a 10+ second spinning beach ball for every single move you make, so thats no good. Ok, I'll separate the Events out to, lets say, each shoot month. Well that's dumb, in verite documentary, any shot could be the first, any shot could be the last, you need a command over all searchable footage at all times. Shift selecting all events to search *****, and it actually takes longer for FCP to reload each event each time than it does to just have the one massive one. So no go there. Next hair brained idea... What if make a new Event that is just Compound Clips of all the other Event's contents and do more with Markers and Favorites in logging that I was planning to parse it all out. That way I'm working with and FCPX is dealing with 50-60 clips instead of 10,000+ Quick test, Cmd-A, Opt-G, boom, boom, boom, move all to dedicated to Event, hide huge Event, BEHOLD, that works! FCPX chokes a little bit on the insane length of some of the clips, but searching, and general performance is back on par!
    So your saying to yourself "Ok *********, sounds like you figured it out, what's the problem." Well to you I say, "Not so fast!" Remember, that was just a quick test using the media I had imported into the massive 10,000+ clip Event. To do this project proper, I am having to import Multicam sync'd XMLs from Plural Eyes. And this is where it all starts to fall apart. A little foreshadowing for your eager eyes. 10,000+ files all shot with multiple 5D's over the course of years. What does that mean? many, many duplicate file names!
    FCPX as well all know irritatingly imports XML's as new Events, not into existing ones. This obviously takes a lot of burden off media management because with a new Event comes a new database referencing its own version of the raw media. All well and good, and I'm betting its starting to click for some if you advanced users where I'm finally going with this. So I have 50 or so XMLs to bring in, all done no problem. Now I want to replicate that singular Event like I did with the Compound Clip test and have it all in one place to be my master as extensive logging begins for easy searching once editing begins. Highlight the Events, click Merge Events. NOPE. I get a new "Kill Yourself Now" error (a term I coined for Out of Memory and General Error messages in FCP Legacy meaning there ain't much you can do about it): "Two or more files have the same name. Change the names and try again, because I don't know what the **** to do with them." Ok I made up that last part but that's basically what it's saying. Just take the variable out of the equation, this happens with every which way you could try to get the clips together. Merge Events, dragging events on top of each other, dragging just the Multicam clip alone, nothing gets passed that message. What's worse is that while Batch Renaming seems like a solution, the renames do not populate inside the created clips and there is no way to Batch Rename those. Renaming everything at the finder level isn't so great because then I'd have to resync and theres an offline/online thing going here where the film has to be reconformed eventually.
    Basically, I've found that FCPX handles media management in completely different ways depending on whether you are importing into one Event yourself or doing essentially what is a new import with FCPX moving or merging Events. If you bring in all the media to one Event, on a macro level FCPX goes through file by file making aliases referencing the master file. If it hits a duplicate, it makes a parenthesis counter, and keeps going. And with the genius of FCPX metadata, that file name doesn't even matter, you can change it at the Finder level and FCPX will keep the link intact. BUT for some reason if you try to do this outside the realm of a single Event and combine files after the fact a different process takes over in creating this database system and can't handle the duplicates. I can't totally figure the reason other than it probably is scared to change the originally referenced alias to something else (which it shouldn't be scared of since Merge Events deletes the original anyway).
    This is where it gets INSANE and where I lose all understanding of what is going on, and believe me it was a delicate understanding to begin with. It comes in to play with the work around I figured out. I make the master Event with the 10,000+ clips. Then I import all the XMLs as dedicated Events. Now, I then drag the Multicam clips into the master Event, it WORKS! just takes it, no "Kill Yourself Now" error. Stranger still, now with the switched referenced Event, it even takes into account which aliased duplicate file name it's referencing in the Original Media folder. Somehow, it's taking into account the original file path and saying "Ok, I see 5 instances of MVI_5834.mov. Based on the original file path or maybe creation date or god knows what, it must be MVI_5834 (fcp3).mov." It connects perfectly. I can even remove the old XML imported Event with no problem. Crazier yet, I can now move those again to the dedicated Event I wanted originally that only contains those Multicam or Compound Clips.
    So instead of going straight from A to C, going from A to B to C works even though that actually seems way more complicated. Why can't FCPX handle Merge Events and dragging clips the same way it handles media imported into a single Event. And weirder still, why can't FCPX handle the (fcp1,2,3...) appending in the same scenario. But if the appended links are already there, No Problem. And for the love of god, it'd be nice to important XML's into existing Events and make the correct referencing happen right from the get go, which is really the source of all the above headache. I'd have no problem helping FCPX with a little manual pointing in the right direction just like any other NLE needs.
    Ok, having said all of that crap above, my question is, have I missed something completely simple I should have done instead? Now that I have everything in place how I originally envisioned, I think I will still play around a little bit more to make sure FCPX is really going to be able to handle this project. I'm at a stage right now where going another direction is still an option, although the dare devil in me wants to make this work. Media management aside, once you start editing on a FCPX timeline, its hard to go back to anything else. Apple is going to have to figure out some way not to access to everything at all times to work fluidly or big projects like this are never going to be practical in FCPX.
    Sorry for the long confusing post....

    I'm having the exact same problem, but I know nothing of ruby scripts. I've exhausted my resources with tech support, and after literally hours of work with them it seems I now am faced with either re-rating each individual song, or pointing iTunes to each song that it can't locate. Is yours a solution that could help me? How can I find out more about Ruby Scripts? Thanks for your help, hellolylo (or anyone else who might also be able to help...)
    Kenn

  • How to find out Last Changed Fields for a line item of a PO

    Dear All,
    Pls let me know is there any FM or procedure to find the last changed fields for each line item of a PO. I should be able to get the details on the basis of Last changed Date. Can u pls guide me in this?

    Hello,
    Check the table CDHDR,CDPOS for PO items,
    Check this code:
    REPORT ZV_GET_LATEST_SO .
    DATA: BEGIN OF ITAB OCCURS 0,
            OBJECTCLAS TYPE CDHDR-OBJECTCLAS,
            OBJECTID TYPE CDHDR-OBJECTID,
            CHANGENR TYPE CDHDR-CHANGENR,
            USERNAME TYPE CDHDR-USERNAME,
            UDATE TYPE CDHDR-UDATE,
            UTIME TYPE CDHDR-UTIME,
            TCODE TYPE CDHDR-TCODE,
            TABNAME TYPE CDPOS-TABNAME,
            TABKEY TYPE CDPOS-TABKEY,
            FNAME TYPE CDPOS-FNAME,
            CHNGIND TYPE CDPOS-CHNGIND,
          END OF ITAB.
    TABLES: CDHDR,CDPOS.
    DATA: LT_CDHDR LIKE CDHDR OCCURS 0 WITH HEADER LINE,
    LT_CDPOS LIKE CDPOS OCCURS 0 WITH HEADER LINE.
    *REFRESH AUSG.
    CLEAR CDHDR.
    CLEAR CDPOS.
    CDHDR-OBJECTCLAS = 'EINKBELEG'.
    CDHDR-OBJECTID   = '0000001784'.  " Purchase order number
    **SELECT A~OBJECTCLASS A~OBJECTID A~CHANGENR A~USERNAME A~UDATE A~UNAME
    **B~TCODE
    **B~TABNAME B~TABKEY B~FNAME B~CHNGIND INTO TABLE ITAB FROM CDHDR AS A
    **INNER JOIN CDPOS AS B ON A~OBJECTCLASS = B~OBJECTCLASS
    **                         A~OBJECTID    = B~OBJECTID
    **                         A~CHANGENR    = B~CHANGENR
    **                    WHERE OBJECTCLAS = 'VERKBELEG'
    **                      AND OBJECTID = '0000001784'.
    *SELECT * FROM CDPOS INTO TABLE LT_CDPOS WHERE OBJECTCLAS = 'VERKBELEG'
    *                                    AND OBJECTID = '0000001784'.
    *IF NOT LT_CDPOS[] IS INITIAL.
    *  SELECT *
    *  INTO   TABLE LT_CDHDR
    *  FROM   CDHDR
    *  FOR    ALL ENTRIES IN LT_CDPOS
    *  WHERE  OBJECTCLAS = LT_CDPOS-OBJECTCLAS
    *  AND    OBJECTID = LT_CDPOS-OBJECTID
    *  AND    CHANGENR = LT_CDPOS-CHANGENR.
    *ENDIF.
    **  SORT ITAB BY OBJECTCLAS ODJECTID DESCENDING.
    *LOOP AT ITAB.
    *  WRITE: ITAB-UDATE."ITAB-UNAME.
    *ENDLOOP.
    *--- Interne Tabellen -------------------------------------------------
    DATA: BEGIN OF ICDSHW OCCURS 50.       "Ausgabeaufbereitung
            INCLUDE STRUCTURE CDSHW.       "Zwischendatei
    DATA: END OF ICDSHW.
    CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
         EXPORTING
              DATE_OF_CHANGE    = CDHDR-UDATE
              OBJECTCLASS       = CDHDR-OBJECTCLAS
              OBJECTID          = CDHDR-OBJECTID
              TIME_OF_CHANGE    = CDHDR-UTIME
              USERNAME          = CDHDR-USERNAME
         TABLES
              I_CDHDR           = LT_CDHDR
         EXCEPTIONS
              NO_POSITION_FOUND = 1
              OTHERS            = 2.
    LOOP AT LT_CDHDR.
      CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
        EXPORTING
    *   ARCHIVE_HANDLE                = 0
          CHANGENUMBER                  = LT_CDHDR-CHANGENR
    *   TABLEKEY                      = '00000000 '
    *   TABLENAME                     = ' '
    * IMPORTING
    *   HEADER                        =
       TABLES
         EDITPOS                       = ICDSHW
    *   EDITPOS_WITH_HEADER           =
    * EXCEPTIONS
    *   NO_POSITION_FOUND             = 1
    *   WRONG_ACCESS_TO_ARCHIVE       = 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.
      LOOP AT ICDSHW.
        IF ICDSHW-TABKEY+3(10) = '0000001784'
           AND ICDSHW-TABKEY+13(6) = '000001'.
        ENDIF.
      ENDLOOP.
    ENDLOOP.
    Vasanth

  • [CS2][AS] Make XML import map is calling a refresh on styles?

    If this can be of use to someone else... it's probably not CS2,AS specific.. but this is what i use.
    It's the second time i have a bug like this, where changing the order of my calls is fixing the problem. With this one, i was getting random missing font error (times(1)) while batching documents(wich make the batch script batch crash as there is a modal dialog open). Not always on the same document, it was really fustrating as i was not able to get my finger on the problem!
    I actually knew the source of the problem as i had added a fix (maybe not the best solution, but it was working well) that actually was removing the style from all the text frame (i noticed that using map style to tag was not always working well(when text frame had overriden?), so that's why i added code to reset the style before doing a map. But i was not understanding why it was happening so randomly...
    I tought at first it was happening during save (as it reopen the document) but after a few experimentation it looked like it was occuring during the import map redefinition (See code below: make XML import map with properties {markup tag:tStyle, mapped style:tStyle}).
    Looks like the make XML import is calling some sort of document refresh wich then pop the font missing dialog (even with never interact as script preferences!)! (missing font is actually a bug i had also in other circumstances.. exemple when you have a extra return at the end of a tagged text (outside the tag)). A bit unexpected, i really tought that creating a xml import map was just creating data structure in document model to be used later on by the auto style call...
    The problematic script:
    tell application "Adobe InDesign CS2"
    set myDocument to document 1
    tell myDocument
    --Reset styles.
    set applied character style of every text of every text frame of every spread to character style 1
    set applied paragraph style of every text of every text frame of every spread to paragraph style 1
    --Create a tag to style mapping.
    set tList to name of every XML tag
    set tNumItems to count of tList
    repeat with i from 1 to tNumItems
    set tStyle to item i of tList
    make XML import map with properties {markup tag:tStyle, mapped style:tStyle}
    end repeat
    --Map the XML tags to the defined styles.
    auto style
    end tell
    end tell
    And the working solution (just moved the reset of style after the import map creation loop):
    tell application "Adobe InDesign CS2"
    set myDocument to document 1
    tell myDocument
    --Create a tag to style mapping.
    set tList to name of every XML tag
    set tNumItems to count of tList
    repeat with i from 1 to tNumItems
    set tStyle to item i of tList
    make XML import map with properties {markup tag:tStyle, mapped style:tStyle}
    end repeat
    --Reset styles.
    set applied character style of every text of every text frame of every spread to character style 1
    set applied paragraph style of every text of every text frame of every spread to paragraph style 1
    --Map the XML tags to the defined styles.
    auto style
    end tell
    end tell

    it doesnt print any server control message. in my "page_404.jsp" I am printing current date and time (to check if the server visited that page) everytime when i refresh "index.jsp" the server goes to "page_404.jsp" and prints the current date and time.
    so basically the only message which the console shows is the current date/time which i am printing in the "page_404.jsp"
    Thanks.

  • XML --import/ Export in SAP BW

    Hi
    I need to import/export from my production to my development systems to maintian the consistencies. This is due to some changes that has been incorporated in the production on exigent basis.
    Now we wish to maintain the consistencies in Develeopment.
    I will be oblized if somebody can help me with the steps to achive the purposes..
    Regards

    Hi
    Chekc these links..
    help.sap.com/saphelp_bw30b/helpdata/en/60/2edd3b8f1b127de10000000a114084/content.htm
    www.bwexpertonline.com/search.cfm?bwe=yes&q=bw
    http://sap.ittoolbox.com/groups/technical-functional/sap-bw/xml-import-query-elements
    regards
    ashwin

  • Source xml is in one field

    Hi all,
    How to do the mapping since all source xml is in one field. I am on PI 71 ehp1.
    Thanks Janos

    How to do the mapping since all source xml is in one field. I am on PI 71 ehp1
    Is your source structure something like:
    <SRC>
    <Filed1><Name>SAP</Name><Location>Germany</Location></Field>
    </SRC>
    i.e. an XML in one node and now you want to separate it into the relevant message structure in XI?
    If yes then follow the De-serialization logic as mentioned by Udo in this thread:
    Re: Changing XML message into a string
    Regards,
    Abhishek.

  • XML Mapping with B1 Field

    Hi Expert,
    can anybody know how to identify / map the xml document with b1 field. I did not found any link / documentation on this.
    Thanks,
    Tushar

    Hi Tushar
    You will need to be more specific. Do you want an XML layout to use for importing or exporting SAP Business One objects? Maybe give us details of the specific object. Most DI API objects have a write to XML which will give you the layout for that object. You can also refer to the REFDI.CHM file under the SDK Help folder.
    Kind regards
    Peter Juby

  • How to delete empty tags after xml-import

    Hello collegues,
    I'm totally new in this forum so excuse me if I make a mistake, but I've a little question.
    I've imported text and images with a xml-import but sometimes empty tags (the colored invisible blocks) are in my text, with the result that I can't Find/Change on double-returns.
    Does anybody know an awnser to this matter? I would love to write an apple-script that will find/change this so i don't have to look after all my pages.
    Thank you very much in advance.

    ThePictureCreator wrote:
    ...I can't Find/Change on double-returns.
    What's your search query? I think you should be able to, with either a grep find of "\r+" or a normal text find of "^p^p". InDesign pretends like the tag-holding characters aren't there for the purpose of search. But you will lose the empty elements along with the extra returns. Maybe that is the problem?
    Jeff

  • XML Import: Hide HTML?

    When I import an XML file into text fields in InDesign the HTML markup tags get transfered (are not removed or rendered as an HTML section).
    For instance when I import:
    <article>
         <title>This is a title</title>
         <body>&lt;p&gt;This is a body paragraph.&lt;/p&gt;&lt;p&gt;This is another paragraph&lt;/p&gt;</body>
    </article>
    OR
    <article>
         <title>This is a title</title>
         <body><![CDATA[<p>This is a body paragraph.</p><p>This is another paragraph</p>]]></body>
    </article>
    The <p> tags still appear in the InDesign text boxes instead of being converted into InDesign paragraphs or stripped out entirely.
    Is there a way to remove or hide the tags when they are imported in InDesign?

    JTRobinson wrote:
    ... For instance when I import:
    <article>
         <title>This is a title</title>
         <body>&lt;p&gt;This is a body paragraph.&lt;/p&gt;&lt;p&gt;This is another paragraph&lt;/p&gt;</body>
    </article>
    This is correct; those are not HTML tags, but literal characters < and > -- correctly encoded as "&lt;" and "&gt;" -- and then translated into their correct representations, which only happens to look like HTML.
    <article>
         <title>This is a title</title>
         <body><![CDATA[<p>This is a body paragraph.</p><p>This is another paragraph</p>]]></body>
    </article>
    This is also correct. Any stuff inside a CDATA bracketed section should not be parsed as XML, so this is also plain text.

Maybe you are looking for

  • Error Message when Delivery Note is created

    HI ALL,           "Quantity falls into negative inventory" error message appears when Delivery Note is created from Sale Orders in SAP B1  system.           Pls, solve my problem,          Thanks u so much. kyimoh Best Regards

  • Cycle images in a thumbnail gallery

    Hi, I'm very new to HTML, so please bear with me. I'm currently using a "Thumbnail Gallery" style page for my online portfolio (when the cursor hovers over a thumbnail the image pops up to the left of it) Here's a link: Portfolio What I'm wondering i

  • NLS_DATE_FORMAT and sql*loader

    dear all. Facts: - oracle 10g r2 std edition - centos 4.3 i have a problem. i want to upload data through sql*loader but there are date format errors. - the data in the date field is in that format: MM/DD/YYYY - i want to upload in that formar : DD/M

  • Case Mod Competition 2004 by CoolerMaster

    Case Mod Competition 2004 by CoolerMaster. Please find the link for more information. http://www.coolermaster.com/phpBB2/viewtopic.php?t=235

  • Budget controle and the field Overall Limit in a PO

    When we are making a budget from 50.000 in CO and creating a PO for 100 then in the the PO tab Limits you see Expected value 100. When you fill in the field overall Limit 100.000. It is possible to post a value from 100.000 even when the budget in co