Compare XMLElements or export XMLElement to memory

Hey,
I'm trying to compare two XMLElements to check if they have the same data, same childs, same values, same attributes. Is there an easy function to do so? I've walked through all the Util files I could find, but nothing came up.
Another solution for this problem is to generate XML code from an XMLElement and compare it with another XML String. But again, I can't find the correct way to do that! There is enough documentation for the export to file, not to memory
I tried this:
InterfacePtr<IIDXMLElement> rootXMLElement(Utils<IXMLUtils>()->QueryRootElement(document));
InterfacePtr<IPMStream> myStream(StreamUtil::CreateDBStreamWrite( db, fStoredResourceUID ));
InterfacePtr<IXMLOutStream> myXMLStream( Utils<IXMLStreamUtils>()->CreateXMLOutPMStream(myStream, xmlExportOptions->GetEncodingType()) );
Utils<IXMLUtils>()->ExportDTDToStream( rootXMLElement->GetXMLReference(), myXMLStream );
But then InDesign gives a bad access on the ExportDTDToStream line, so I must be doing something wrong. The IPMStream seems correct, and also IXMLOutStream seems to work.
Anyone here with a solution? Maybe a small example for ExportDTDToStream, or another idea for this comparison?
Thanks a lot!

hai,
   this is report name for lsmw t.code '/SAPDMC/SAPMLSMW'
submit this report with selection screen fields.
shan.

Similar Messages

  • Submit and return exporting list to memory is not working in background

    Hi gurus,
    i am using submit statement and exporting list to memory. it works fine in foreground and i am able to get the output. but in case of background , it is not exporting the list.PLease help me on this.
    Thanks and regards,
    Rajeshwar

    Hello Rajeshwar,
    This is a duplicate thread. You have a thread with the same question.
    [list_to_memory is not working in background;
    Jayant Sahu

  • Will SUBMIT report EXPORTING LIST TO MEMORY work, when Run in Background?

    You can use SUBMIT <report> EXPORTING LIST TO MEMORY, and then Call the FM LIST_FROM_MEMORY to get the Data.
    This works fine, when the Program is Run in Foreground. My question is, will it work when I Run the Program in Background? i.e. When I Run the Program in Background, will the SUBMIT Statement, Export the List to Memory? Because only then the FM LIST_FROM_MEMORY will get the Data.
    Any alternate solution to meet the same requirement will be appreciated.

    It works for me... my spool output looked like:
    11.01.2008          JC: Calling program - test list to memory                  1                                                                               
    ZLOCAL_JC_SDN_CALLING_PROGRAM                started at 12:54:29                        
    ZLOCAL_JC_SDN_CALLING_PROGRAM                call complete 12:54:30                     
    ZLOCAL_JC_SDN_CALLING_PROGRAM                started at 12:54:30                                                                               
    11.01.2008           JC: Called program - testing list to memory                                                                               
    ZLOCAL_JC_SDN_CALLED_PROGRAM                 was called at: 12:54:29                    
    for the following code:
    report zlocal_jc_sdn_calling_program.
    parameters:
      p_start(1)            type c.
    start-of-selection.
      perform testcase.
    *&      Form  testcase
    form testcase.
      data:
       lt_list              type table of abaplist.
      write: / sy-repid, 'started at', sy-uzeit.
      submit zlocal_jc_sdn_called_program
        exporting list to memory
        and return.
      write: / sy-repid, 'call complete', sy-uzeit.
      call function 'LIST_FROM_MEMORY'
        tables
          listobject = lt_list.
      write: / sy-repid, 'started at', sy-uzeit.
      call function 'WRITE_LIST'
        tables
          listobject = lt_list.
    endform.                    "testcase
    and
    report zlocal_jc_sdn_called_program.
    start-of-selection.
      write: / sy-repid, 'was called at:', sy-uzeit.

  • Submit  ALV report in Background & exporting list to memory and return

    Dear all,
    I created one Z program (ZPROGRAM2). 
    Here i use SUBMIT ZPRORAM1_ALV exporting list to memory and return.
    call function 'LIST_FROM_MEMORY'.
    call function 'TABLE_COMPRESS' .
    ZPRORAM1_ALV output i send mail.
    This all are working in foreground.
    If i schedule ZPROGRAM2 in background. that SUBMIT ZPRORAM1_ALV statement not working.
    Please give me the Solution.
    Thanks,
    Durai.V

    It is because of the ALV output that you are using. Check the condition sy-batch = 'X' (background processing) and then display a classical report. It will work then.
    Thanks,
    Jayant

  • Submit program exporting list to memory and return in background

    Dear Experts,
    I am using the following code in one of my program to get opening and closing stock of a material.
    SUBMIT RM07MLBD
             WITH MATNR IN LOC_R_MATNR
             WITH WERKS IN LOC_R_WERKS
             WITH DATUM IN LOC_R_DATE
             WITH PA_SUMFL = WL_X
             AND RETURN
             EXPORTING LIST TO MEMORY.
    The program is working fine when executed in foreground. however when executed in background the job is cancelled. I tried to debug in background through SM50 and found that the program is terminated(No short dump but debug screen is closed and i dont see this program running in SM50) when the above code is executed.
    I found in the forum that when an ALV report is submitted in background it does not work. In my case the standard program is producing an ALV list (not ALV grid though).
    How would i avoid this situation because the program i am submitting is a standard program.
    What is the best solution to avoid from background jobs being cancelled when the above code is executed. Is there an alternate way that i can use to submit the program  and get data.
    Thanks in advance.
    Rajesh.

    Hi Rajesh,
    Just excute your standard program with the same input in back ground mode and check
    out put is coming or not .
    If output is not coming search by sy-batch and make the break points there and Ideantify
    the problem.
    When you execute the standard program  in back ground mode If the output is come it should in your Zreport also.
    I tried in my system in background mode also the output is coming for me.
    Thnx,
    Sam.

  • Export / Import   to memory Id 2 . ( Unicode System)

    hi all ,
    we get unicode syntax error for the statement
       EXPORT d1200  TO MEMORY ID 2.
    Error discription is -
    2 must be a character-type field (data type C, N, D, or T) . "INTERFACE".
    We get similar error in import statement as well.
    Please refer this code ..........
    DATA:  BEGIN OF d1200,
             form    LIKE mard-matnr,
             formbez LIKE makt-maktx,
             labst(10),
             zeichnr LIKE drad-doknr,
             zeichnr1 LIKE drad-doknr,
             produktion_brutto(08) TYPE p, " (16) type c
             reparatur(08) TYPE p,
             zaehlerstand(16),
             maxprod(08) TYPE p,
             kapazitaet(06) TYPE p DECIMALS 2,
             hoehe(07),
             gewicht(07),
             netto-gesamt(07) TYPE p,
             ausschuss-gesamt(07) TYPE p,
             brutto-gesamt(07) TYPE p,
           restmenge(07) TYPE p,
    *mico20000430
    *notwendig für korrekte Anzeige in Druckliste
             restmenge(08) TYPE p,
             datenuebernahme(16),
             menge(08) TYPE p decimals 0 ,
             maxprod2(08) TYPE p decimals 0,
             umwertung(08) TYPE p decimals 0,
             ohnefa(08) TYPE p decimals 0,
             charge like mchb-charg,
             fhmnr LIKE mara-matnr,
           END   OF d1200.
    EXPORT d1200  TO MEMORY ID 2.

    Unicode systems have a problem in that you can't define stuff as type X. Structures also have to be properly "bounded".  You can also no longer rely on code such as field1+7(9) .
    You could define your structure as a STRING and delimit the fields with say a tab symbol ( use the attribute in cl_abap_utilities to get the tab char in a unicode system).
    export the string to memory.
    on the import end use the SPLIT command on the string to re-create your data elements.
    You will then have to manage the decimal arithmetic yourself.
    It's a pain - but that's largely the point of Unicode --everything is treated as TYPE C.
    Structures containing anything other than type C data are also a real problem if you want to upload / download data. Handling Binary files is a nightmare.
    There are some SAP supplied utilities  / notes / documentations on converting to a Unicode system.
    Cheers
    jimbo

  • How can I compare a (partial) export folder from iPhoto to an event in iPhoto to find images not exported?

    How can I compare a (partial) export folder from iPhoto to an event in iPhoto to find images not exported?  Or better yet, how can I export selected events to a new iPhoto library or an existing iPhoto library with events, titles and keywords intact?

    Ask here:
    https://discussions.apple.com/community/ilife/iphoto

  • EXPORT l_werks to memory id 'MEM1'

    HI gurus,
    I am struck in from many days..
    I have a program which posts data using IDOCS.
    the code below
    Export l_werks into memory id 'MEM1'.
    Then the IDOC FM IDOC_INPUT_*  ( which in turns calls the inbound IDOC FM ) is called and it posts the data into application (its an inbound process).
    This code is written in program ZPAG_PROGRAM1, the data of werks is passed to business area and idocs are created and when we check the transaction the werks is copied to business area. All this works well good.
    Now if I copy the program ZPAG_PROGRAM1 to ZPAG_PROGRAM 2, the idoc fails and the werks is not copied to business area field.
    Its importan t for me please throw some idea. I check the USER_EXITS in the IDOC_INPUT* and Inbound IDOC FM there is no code related to the import filed.
    Export is done in the program1, ther should be IMPORT some where.. where can I find this?
    Plea se He lp .
    regards,
    Nazeer

    Hello Nazeer,
    I guess there is no foolproof way of find the exact import statement for a corresponding export statement. As already suggested you could use RPR_ABAP_SOURCE_SCAN with the memord id as the search term. Also you can get the list of programs loaded in the ABAP stack by running the actual program and have a search in those programs for the memory id.
    Vikranth

  • Export t_temp to memory id 'Y2'.

    i used these export and import parameters in my program !!
    this is the export syntax..
    export t_temp to memory id 'Y2'.
    refresh t_temp.
    import t_temp from memory id 'Y2'.
    delete from memory id 'Y2'.
    when I'm not passing any values in the export  the import parameter is still picking the previous value..
    the export parameter is empty but the import parameter is still having one record
    How to delete the memory...

    to export, use the following
    DATA: wa_indx TYPE indx.
    EXPORT tab = itab TO DATABASE indx(xy) FROM wa_indx CLIENT
    SY-MANDT
    ID 'DETAILLIST'.
    to import use this
    imports from database the list sent by the calling program
    IMPORT tab = itab FROM DATABASE indx(xy) TO wa_indx CLIENT sy-mandt
    ID 'DETAILLIST'.
    deletes the data to save wastage of memory
    DELETE FROM DATABASE indx(xy)
    CLIENT sy-mandt
    ID 'DETAILLIST'.

  • Export- Import to Memory Query

    Hello Everyone,
    I have 2 FMs where one exports variable to memory and other FM imports the same .
    FM A:
      DATA: id    TYPE c LENGTH 10 VALUE 'SWITCH_WO',
            id1   TYPE c LENGTH 10 VALUE 'SWITCH_OP'.
      EXPORT   g_workorder from g_workorder  TO MEMORY ID  id.
      EXPORT   g_operation from g_operation  TO MEMORY ID  id1.
    FM B:
    DATA: id    TYPE c LENGTH 10 VALUE 'SWITCH_WO',
            id1   TYPE c LENGTH 10 VALUE 'SWITCH_OP'.
      IMPORT g_workorder   FROM MEMORY ID  id.
      IMPORT g_operation   FROM MEMORY ID  id1.
    When it export Sy-subrc is 0 but when i import it is 4 , where  can i check memory variable in new debugger.
    Please let me know ,
    Regards,
    Raj

    Hello,
    You can use the Import and export to Memory Id only with the programs and FM which runs in the same session, because that memory is only available in the same session of the memory. Once you have imported say a internal table/work area to some memory id and the session ends the memory is cleared by the Garbage Collector.
    In your case you are using 2 FM each running in different session, Import and Export to memory id will not work for you (as said it works in a single session). Try to use concepts of Shared Memory Object or populate a table (Custom table) and try to retrieve the same from 2nd FM.
    Hope it helps.
    Thanks,
    Jayant

  • EXPORT/IMPORT  to MEMORY

    Hi,
    I want to know if a parameter ID  of "export/import to memory" instruction is available in two differents session with different user's login?
    tks
    Carlos

    The use of the shared buffer may be of some interest to you.
    <b>From F1 help</b>
    <i>EXPORT obj1 ... objn TO SHARED BUFFER dbtab(ar) ID key.
    Additions:
    1. ... = f (for each field you want to export)
    2. ... FROM f (for each field you want to export)
    3. ... CLIENT g (before ID key)
    4. ... FROM wa (as last addition or after dbtab(ar))
    In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Implicit field names not allowed in clusters and Table work areas not allowed.
    Effect
    Stores a data cluster in the cross-transaction application buffer.The specified objects obj1 ... objn (fields, structures, or tables) are stored as a single cluster in the buffer.
    The specified table dbtab must have a standard structure.
    The buffer area for the table dbtab is divided into various logically-related areas (ar, two-character ID).
    You can export a collection of data objects (data cluster) to an area of the buffer under a key of your own choosing (key field).
    You can import individual data objects from this collection using the IMPORT statement (as long as the data has not been deleted from the buffer).
    Notes
    In classes, you must always specify explicit names for the data objects. Addition 1 or addition 2 is therefore obligatory.
    In classes, you must always specify the work area explicitly. Addition 4 is therefore obligatory.
    The table dbtab that you specify after SHARED BUFFER must be declared under TABLES (except in addition 4).
    You cannot export the header line of an internal table. If you specify the name of an internal table with a header line, the system always exports the actual table data.
    You cannot export data, object, and interface references.
    Please consult Data Area and Modularization Unit Organization documentation as well.
    Example
    Exporting two fields and an internal table to the buffer with structure INDX:
    TABLES INDX.
    TYPES: BEGIN OF ITAB3_TYPE,
              CONT(4),
           END OF ITAB3_TYPE.
    DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE',
          F1(4), F2 TYPE P,
          ITAB3 TYPE STANDARD TABLE OF ITAB3_TYPE WITH
                     NON-UNIQUE DEFAULT KEY INITIAL SIZE 2,
          WA_INDX TYPE INDX.
    Fill data fields before CLUSTR
    before the actual export
    INDX-AEDAT = SY-DATUM.
    INDX-USERA = SY-UNAME.
    Export data.
    EXPORT F1    FROM F1
           F2    FROM F2
           ITAB3 FROM ITAB3
           TO SHARED BUFFER INDX(ST) FROM WA_INDX ID INDXKEY.
    Addition 1
    ... = f (for each object you want to export)
    Effect
    Exports the contents of the field f and stores them under the specified name.
    Addition 2
    ... FROM f (for each field you want to export)
    Effect
    Exports the contents of field f and stores them under the specified name.
    Addition 3
    ... CLIENT g (before ID key)
    Effect
    The data objects are stored in client g (as long as the import/export table dbtab is client-specific).
    Addition 4
    ... FROM wa (as last addition or after dbtab(ar))
    Effect
    Use this addition if you want to store user data fields in the application buffer. Instead of the table work area, the system uses the specified work area wa. The specified work area must have the same structure as the table dbtab.
    Example
    DATA WA LIKE INDX.
    DATA F1.
    WA-AEDAT = SY-DATUM.
    WA-USERA = SY-UNAME.
    WA-PGMID = SY-REPID.
    EXPORT F1 = F1 TO SHARED BUFFER INDX(AR)
                   CLIENT '001' ID 'TEST'
                   FROM WA.
    Note
    Catchable runtime error
    EXPORT_BUFFER_NO_MEMORY: The EXPORT data cluster is too big for the application buffer. This error should not occur often, since the buffer uses a procedure similar to the LRU(Least Recently Used) procedure to monitor the buffer contents. However, if the error does occur, you can increase the profile parameter rsdb/obj/buffersize (see Profile Parameter Attributes), which may help.</i>
    Regards,
    Rich Heilman

  • EXPORT/IMPORT TO MEMORY ID

    Hi,
    I'm using FM EXIT_SAPLV51S_001.(USER EXIT)
    In the row :
    EXPORT sy-uzeit TO MEMORY ID 'YTIME'.
    I got sy-subrc = 4.
    Why??? What is the problem?
    Thanks
    DIANA

    Hi,
    try this in user exit.
    data: v_time type sy-uzeit.
    <b>GET TIME.</b>
    V_time = sy-uzeit.
    EXPORT v_time TO MEMORY ID 'YTIME'.
    GET TIME is must.
    Regards
    vijay

  • How to Export data to memory and Import data from memory?

    hi
    I have the follwoing some code of program.
    The data is not filled from memory. I have to find what is the wrong in code.
    REPORT ZIFT_TEST1..
    SELECT-OPTIONS : so_budat FOR bkpf-budat,
                     sd_saknr FOR ska1-saknr.
      EXPORT so_budat TO MEMORY ID 'ZBUDAT'.
      EXPORT sd_saknr TO MEMORY ID 'ZSAKNR'.
      SUBMIT ZIFT_TEST2 AND RETURN.
    REPORT ZIFT_TEST2..
    SELECT-OPTIONS so_budat FOR bsis-budat NO DATABASE SELECTION.
    SELECT-OPTIONS: SD_SAKNR    FOR  SKA1-SAKNR MATCHCODE OBJECT SAKO.
      import so_budat = so_budat from memory id 'ZBUDAT'.
      import sd_saknr from memory id 'ZSAKNR'.
    Regards
    Iftikhar Ali
    Islamabad.

    Program1----
    REPORT demo_program_rep3 NO STANDARD PAGE HEADING.
    DATA: number TYPE i,
    itab TYPE TABLE OF i.
    SET PF-STATUS 'MYBACK'.
    DO 5 TIMES.
    number = sy-index.
    APPEND number TO itab.
    WRITE / number.
    ENDDO.
    TOP-OF-PAGE.
    WRITE 'Report 2'.
    ULINE.
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'MBCK'.
    EXPORT itab TO MEMORY ID 'HK'.
    LEAVE.
    ENDCASE.
    Program2----
    REPORT demo_programm_leave NO STANDARD PAGE HEADING.
    DATA: itab TYPE TABLE OF i,
    num TYPE i.
    SUBMIT demo_program_rep3 AND RETURN.
    IMPORT itab FROM MEMORY ID 'HK'.
    LOOP AT itab INTO num.
    WRITE / num.
    ENDLOOP.
    TOP-OF-PAGE.
    WRITE 'Report 1'.
    ULINE.
    end of program 2----
    Now you copy this programs with same name as i mentioned and execute demo_programm_leave Program.you will understnad clearly.
    Notes::: A logical memory model illustrates how the main memory is distributed from the view of executable programs. A distinction is made here between external sessions and internal sessions .
    An external session is usually linked to an R/3 window. You can create an external session by choosing System/Create session, or by entering /o in the command field. An external session is broken down further into internal sessions. Program data is only visible within an internal session. Each external session can include up to 20 internal sessions (stacks).
    Every program you start runs in an internal session.
    To copy a set of ABAP variables and their current values (data cluster) to the ABAP memory, use the EXPORT TO MEMORY ID statement. The (up to 32 characters) is used to identify the different data clusters.
    If you repeat an EXPORT TO MEMORY ID statement to an existing data cluster, the new data overwrites the old.
    To copy data from ABAP memory to the corresponding fields of an ABAP program, use the IMPORT FROM MEMORY ID statement.

  • Need help in Exporting list to memory and return in background

    Hello Experts,
    I have a program which reads data from mc.9 by exporting list to memory.When I run it in foreground its working fine . However if I schedule it as a  background program it is unable to get list from memory.
    Any help will be appreciable.
    Thank you

    Hi jayaram,
    I tried to do as you said. Its creating spool request and status to completed (sm37 instead of sm36 bcoz i don't hv authorization in production server). Now I didn't see any errors in job log. But data coming to ztable is as usual ( all are ZEROS).
    Hey when i tried doing it as below
      SUBMIT RMCB0300 WITH SL_WERKS-LOW = P_WERKS
                      WITH SL_LGORT = 'W001'
                      WITH SL_SPMON-LOW = P_FPERIOD
                      WITH SLV_NO = 'MC.9N'
                      WITH SL_SPMON-HIGH = P_FPERIOD EXPORTING LIST TO MEMORY AND RETURN .
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          LISTOBJECT = LISTOBJECT
        EXCEPTIONS
          NOT_FOUND  = 4
          OTHERS     = 8.
      IF SY-SUBRC <> 0.
        if SY-SUBRC = 4.
          message 'not_found' type 'i'.
        ELSEIF SY-SUBRC = 8.
          message 'others' type 'a'.
        endif.
      ENDIF.
    I found that my job with completed status but with in job log i found error of type I means that the error is with notfound type in exceptions.
    Hey sorry for the postings may be due to some issues Im unable to see what i have replied in postings that's why im posting repeatedly..
    Edited by: Praveen Pathuri on Apr 23, 2009 7:30 AM
    Edited by: Praveen Pathuri on Apr 23, 2009 7:55 AM

  • Maintain keyword when export photo to memory stick

    When you assign a keyword to an image, is there a way to export the image such that the keyword (e.g. 'family') remains associated with it?
    In other words, the ideal would be that you could export to a memory stick and the keyword would "stick" to that picture so that you could take it to another computer and use iphoto (or some other program) to identify that picture by keyword rather than filename.

    Terence,
    Bad news. I went ahead and skipped 07 and upgraded to iPhoto8. It appears that either your advice was incorrect or this feature was broken in 08. Adding keywords within iPhoto08 does not actually change the EXIF metadata.
    I added keywords within iPhoto08 and exported the image to the desktop. I then used MacMetaShow and found that the exif data was not modified. I did some Googling and found a few complaints that this is still a problem. I suppose it is possible that MacMetaShow is not reading the data correctly so I will try to find a different program to verify this.
    Can anybody else corroborate this problem?

  • I am getting an error message when i try to export "Not enough memory" what do it do?

    I am getting an error message when i try to export "Not enough memory" what do it do?

    Your 400GB is not what I was speaking of. I was not speaking of disk space. I was speaking of memory.
    The memory in your computer needs to be 8GB or more, and you must have a 64 bit operating system (which can still happen even if your computer is less than 12 months old). What operating system do you have? Is it 32bits or 64bits?

Maybe you are looking for

  • Fetching into a double from pro*c program

    Hi, I want to fetch data from number column (value is 100400000664137.68) into double host variable in a pro*c program. When i fetch and print, the value is getting rounded as 100400000664138.000000. I dont want this rounding off to happen as i have

  • ERROR message while posting SHIPMENT order

    Hi all, i have developed one program which can create a shipment order using BAPI_SHIPMENT_CREATE.After uploading, i have passed all the data to this FM. in my return parameter, i am getting only error message number & type of message but message  is

  • How do I get the printer to work with AirPort?

    I have had my printer connected via USB cable to the AirPort for a while, but recently when I had to disconnect the printer for some home improvement, I ended up with problems. Upon reconnecting the printer to the AirPort, I started receiving this me

  • Can't connect to iTunes through passbook on my iPhone 4

    I have tried Changing the date forward 1 year, 2 years as well, i have tried with wifi off and wifi on, i have even closed down all the apps, done a soft reset and also switched the phone off between changing dates BEFORE opening passbook and selecti

  • Hyperlink to a Page in the current document ? LiveCycle v8.2

    Can anyone help me with the syntax to hyperlink to a page in the current PDF ? I have not been able to locate any information on this ! This is a fill able XFA form & am attempting a Table of Content TextBox on the Main page with links to different p