Mapping Record structure to IDOC (mapping fundamentals)

Hello,
how and WHAT should i map? Because all the time the test in Integration Builder works fine, but at runtime i got an exception during mapping (i dont know why).
Left Side (Message Type)           Right Side (IDOC)
CMA_MSGTYP1      1..1              OILBLM.SAVE...   1..1
  RECORD         1..1                IDOC           1..1
    CONTROL      1..1                  EDI_DC40     1..1
    SEGMENT      0..unbounded          E1BPP...     0..999
SEGMENT contains all values for the corresponding IDOC segment E1BPP..
The attributes BEGIN for IDOC and SEGMENT for EDI_DC40 are set to "1" with the constant function.
Do i really need to map EDI_DC40?
Do i need to map CMA_MSGTYP1, RECORD and CONTROL?
Thanks!

Thanks for your help!
I have found the error. I just put the payload from SXMB_MONI into the test tab. The result was the same as described - empty. At a closer look i have found one small difference:
The incoming message SXMB_MONI files starts with
<ns:CMA_FILEINPUT1 xmlns:ns="http://ww..
The CMA_FILEINPUT1 is coming from the file adapter.
The xml source in message mapping test tab starts with
<ns:CMA_MSGTYP1 xmlns:ns="http://ww..
where CMA_MSGTYP1 is the name of the message type.
If i change now the parameter "document name" in conversion parameters of the file adapter to CMA_MSGTYP1 everything works fine!
That means: "document name" in conversion parameters of file adapter must be the same name of the message type in message mapping.
I must admit that i don't quite understand this...

Similar Messages

  • Message Mapping from flat XML to a Record structure

    Hi All,
    We have a scenario in which the input message is a PDF document. we are following below the blog to convert PDF to XML format which uses <b>PDF box utitlity</b>.
    /people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
    We are able to convert the PDF doc to a flat XML file.
    Now we have the following queries...
    what are the different ways to map the flat XML to our record structure?
    Do we have any utitlity in PDF box to do that?
    Regards,
    Rakesh.

    Hi Rakesh,
    You have Graphical mapping, Java mapping, ABAP mapping and XSLT mapping. The choice depends on the scenario and what target result you require.
    <b>Message mapping using graphical mapping editor:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/49/1ebc6111ea2f45a9946c702b685299/frameset.htm
    <b>XSLT mapping:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm
    <b>Java Mapping:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    <b>ABAP mapping:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/frameset.htm
    As said earlier, graphical mapping is the simplest and quite a few built in options are available with it, explore it and see which is suitable for your scenario.
    Regards,
    Chandra

  • Calling IDoc structure from IDOC metadata into Java mapping.

    Hi All,
    I have a requirement where we need to post an IDOC on target side, We are having to go for  a Java Mapping ,so  I need to create a Target XML with IDOC Structure, So i need to understand if we could import the structure from IDOC Meta Data  in to the Java Mapping insted of creating the IDOC Structure, I am using DOM parser for my Java Mapping,
    Really appreciate your response in this regard.
    Best Regards
    Jayaram

    Hi Jayram,
    In your requirement, get the xsd format of the idoc from idoc structure and using String xsdFormat ="xsd retrieved";  in the java mapping, you can create the xml structure using DOM parse APIs and then you can put values into the structure and pass it.
    Thanks,
    RK

  • How to isolate error with a record/segment in IDOC with multiple records

    I have an IDOC with multiple records/segments (typically 1000 records/segments). Sometime XI can not process the IDOC because of some control characters in data.
    1. How can I pre-processed the IDOC to remove those control characters?
    Can I use XPATH expression/Java class to do it? How can I configure the XPATH expression/Java class in XI to pre-process the file?
    2. Until I have answer to 1st question. I would like to find out the error is exactly for which record? What configuration can I do in XI to isolate the error is with which record/segment in IDOC?
    Thanks in advance.

    Split the IDoc.
    with in the UDF, after the validations if every thing fine, pass as successful records to success_MT and pass it to target system using Branching in BPM.
    if errors found in the record, then store the error records in Hash table with in UDF, get the IDoc number, frame as a string and raise alert.
    U have to do this in the context of IDoc.
    If U wanna get the IDoc Number, Segment Name and field name for every failure, U can pass the expected error field name as constant to UDF, frame the sentence in the UDF like -> <b>IDoc 1234321 segment – SEG001 – field – FLD03 has a special character ‘*’</b>.
    If U wanna pass this string to source/target, U can do in error messages branch in BPM.
    U must use BPM for splitting the IDoc, since it is multi-mapping.
    reg.,
    Yallabandi.

  • Comparing two data records of same IDOC

    Hi,
    In PI, we need to compare two data records of same IDOC to figure out if what type change occurred.  For example, BENFIT3 IDOC contains data records tilted "E1BEN04".  When there are multiple "E1BEN04" data records, then we need to compare the data inside them to see whether name, or data of birth or SSN is changed. 
    Has anybody came across this before. Your help is much appreciated.
    Thanks
    -Teja

    If it is very few fields then you could use graphical mapping to determine the changes.

  • LSMW, batch input recording, structured file

    Hello,
    I'm new with LSMW.
    Is it right that with LSMW when used in batch input recording, it is impossible to use a structured file, with a header and with many item for exemple ?
    ( i try to do that with a financial transaction like F-02 )
    Thanks in advance for any help.
    (we are in WAS 6.20, LSMW 4.0 )
    Denis

    hai
    can any one help me how to handle lsmw with two structures  header & item data structures
    how can i map the target structures to source structures
    for example target recording structure have  ematn_01
                                                ematn_02
                                       how to map these 01 and 02 to source structures
    i have to take two source fields as ematn_01 & ematn_02
    or i have to map only one source ematn to all emant_01
                                                       _02
                                                       _03
    if there are n ematn's in that case how to map dynamically

  • Uploading the WBS structure using IDOC

    Hi All,
                    I have a requirement in which i need to upload the data from the excel spreadsheet into the wbs structure using IDOC.
    A standard basic type PROJECT01 is available for this.
    Every record on the Excel Spreadsheets will be interfaced for loading. The assumption is that the file has the correct data.
    Can anybody provide an insight into the steps to be followed in this case

    Dear experts,
    Plz help me to resolve my problem.
    v.srinivas

  • How to get structure of IDOC into xi in the scenario is IDOC - XI - File

    hi XI Guys,
          When i want to Integrate SAP sys(IDOC) with File how to get structure of IDOC into XI, As we will define Data types in File -> XI -> File. Please send Step by Step process as i am new to Netweaver(XI)
    ThankYou,
    B.Pushparaju.

    When i want to Integrate SAP sys(IDOC) with File how to get structure of IDOC into XI
    >>>>
    import the IDoc under the imported object in your SCV. Note that import should be allowed for the SCV.
    As we will define Data types in File -> XI -> File.
    >>>>
    Ref. these blogs to help you out ..
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

  • Report to display all the status records of an Idoc

    Hi,
      I need to find out all the status records for an idoc and display them as a report. Is there any existing SAP Report that does that. I checked in table edids and all the status records of the idoc are not stored in the status text which is empty althogh there are 12 counters for the idoc.
    regards
    Aveek

    Hey Aveek;
       Try this, which will get the most recent one.  You would just need to change it to loop at the edids records to get at them all...
          TABLES: *edidc, *edids, *t100.
          DATA: wf_string type string.
          CLEAR *edids.
          SELECT SINGLE *
             INTO *edids
             FROM edids
             WHERE docnum = *edidc-docnum
               AND status = '51'.
          SELECT SINGLE text
             INTO *t100-text
             FROM t100
             WHERE sprsl = 'EN'
               AND arbgb = *edids-stamid
               AND msgnr = *edids-stamno.
             CLEAR wf_string.
          MOVE *edids-stapa1 TO wf_string.
          REPLACE '&' WITH wf_string INTO *t100-text.
          IF sy-subrc EQ 0.
            CLEAR wf_string.
            MOVE *edids-stapa2 TO wf_string.
            REPLACE '&' WITH wf_string INTO *t100-text.
            IF sy-subrc EQ 0.
              CLEAR wf_string.
              MOVE *edids-stapa3 TO wf_string.
              REPLACE '&' WITH wf_string INTO *t100-text.
              IF sy-subrc EQ 0.
                CLEAR wf_string.
                MOVE *edids-stapa4 TO wf_string.
                REPLACE '&' WITH wf_string INTO *t100-text.
              ENDIF.
            ENDIF.
          ENDIF.
          A little sloppy (OK, alot!), but it gets the job done...
    Cheers,
    John

  • Updated content for multi-level record structure in PLSQL

    Hi All,
    please help me
    Need a FUNCTION which would take PERSON_id as the INPUT PARAMETER and RETURN the FULL DETAILS in a multi-level record structure in PLSQL.
    CREATE TABLE people(
    name VARCHAR2(5),
    person_id number
    INSERT INTO people(name,person_id) VALUES ('n1',1);
    INSERT INTO people(name,person_id) VALUES ('n2',2);
    INSERT INTO people(name,person_id) VALUES ('n3',3);
    INSERT INTO people(name,person_id) VALUES ('n4',4);
    INSERT INTO people(name,person_id) VALUES ('n5',5);
    INSERT INTO people(name,person_id) VALUES ('n6',6);
    A person can be assigned many tasks. Below,we can see person_id =1 has 2 tasks 10,20
    CREATE TABLE tasks(
    task_id number,              --->PK
    task_name VARCHAR2(5),
    person_id number          -->FK to People
    INSERT INTO tasks(task_id,task_name,person_id) VALUES (10, 'cleaning',1);
    INSERT INTO tasks(task_id,task_name,person_id) VALUES (20', 'washing',1);
    INSERT INTO tasks(task_id,task_name,person_id) VALUES (30, 'sweeping',2);
    INSERT INTO tasks(task_id,task_name,person_id) VALUES (40, 'ironing',3);
    Each TASK has many ACTIVTIES as below. Below,we can see task_id =10 ---->3 ACTIVITIES of activity_id of 100,200,300
    CREATE TABLE activities(
    activity_id number,
    activity_name VARCHAR2(50),
    task_id number,              --->FK  to task table
    INSERT INTO activities(activity_id,activity_name,task_id)VALUES (100, 'Clean home',10);
    INSERT INTO activities(activity_id,activity_name,task_id)VALUES (200, 'Clean Garden',10);
    INSERT INTO activities(activity_id,activity_name,task_id)VALUES (300, 'Clean clothes,10');
    INSERT INTO activities(activity_id,activity_name,task_id)VALUES (400, 'Wash car',20);
    Write a FUNCTION which would take PERSON_id as the INPUT PARAMETER and RETURN the FULL DETAILS in a multi-level record structure in PLSQL.
    Meaning We would get
    First ,person_details for a person-->next level is TASKS-->Activities_list in a NESTED RECORD SET
    create or replace function person_details(person_id NUMBER)
    RETURNs a
    PERSON_DETAILS RECORD structure as shown below.A person -->Tasks--> all activities
    record PERSON_DETAILS[1]
         person_id,
         name
         TASKS_DETAILS[1]          ---->2nd level
                     task_id[1],
               task_name[1]
                   ACTIVITIES[1]----->3rd level
                        activity_id[1],
                        activity_name[1]     
                      ACTIVITIES[2]
                        activity_id[2],
                        activity_name[2]                    
                   ACTIVITIES[3]
                        activity_id[3],
                        activity_name[3]
    *(1)--Most important part is how do i DEFINE AND DECLARE the RESULT RECORD SET in my FUNCTION?
      (2)--HOW DO WE DYNAMICALLY ALOCATE MEMORY for the record structure based on the no. of rows by each SELECT?
       (3)Access the nested levels and FILL in the DATA in the above record seperately USING SELECT statements.
    */*SELECT 1 ---Find and fill Person*/*
    *select person_id,name from people where person_id =1*
    *-->From this SELECT fill the OUTER record PERSON_DETAILS[no. of records] -->person_id,name*
    */**SELECT 2 ---I want to FIND all TASKS for THE ABOVE PERSON and fill the next part */*
    *select task_id,name from tasks where person_id = PERSON_DETAILS[1].person_id*
    *We get three TASK_ids,*
    *-->From this, HOW TO fill DATA for each TASK,how to  PERSON_DETAILS[1]->TASKS_DETAILS[1st record].task_id -->person_id,name*
    */**SELECT 3 ---I want to FIND all ACTIVITIES for THE ABOVE TASKS and fill the next part */*
    *for EACH of the TASKS found,we need to LOOP and*
    *select activity_id,name from activities where task_id = PERSON_DETAILS[1].-->TASKS_DETAILS[1st record]--->ACTIVITY_DETAILS[1].activity_id*
    I have tried my best to explain with the tables and the relationships.I just hope its not confusing now.Edited by: user_7000011 on 01-Apr-2009 12:46

    try this one.
    Learned something new today.
    CREATE TABLE temp_clob_tab(result CLOB);
    CREATE or replace TYPE task_t AS OBJECT("@task_id"   NUMBER,
                                last_name        VARCHAR2(20),
                                 activitylist     activity_tab
    create or replace type activity_t as object("@activity_id" number, activity_name varchar2(20));
    CREATE or replace  TYPE tasklist_t AS TABLE OF task_t;
    create or replace type activity_tab as table of activity_t;
    CREATE or replace TYPE people_t AS OBJECT("@people_id" NUMBER,
                                 task_name  VARCHAR2(20),
                                 task_t          tasklist_t
    DECLARE
      qryCtx DBMS_XMLGEN.ctxHandle;
      result CLOB;
    BEGIN
      DBMS_XMLGEN.setRowTag(qryCtx, NULL);
      qryCtx := DBMS_XMLGEN.newContext
        ('SELECT people_t(person_id,
                        name,
                        CAST(MULTISET
                               (SELECT e.task_id, e.task_name,cast(multiset
                                        (select activity_id,activity_name from activities a
                                            where a.task_id = e.task_id) as activity_tab)
                                  FROM tasks e
                                  WHERE e.person_id= d.person_id)
                             AS tasklist_t))
            AS peoplexml
            FROM people d
            where person_id = 1');
      -- now get the result
      result := DBMS_XMLGEN.getXML(qryCtx);
      INSERT INTO temp_clob_tab VALUES (result);
      -- close context
      DBMS_XMLGEN.closeContext(qryCtx);
    END;
    select * from          temp_clob_tab ;output
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
      <PEOPLEXML people_id="1">
       <TASK_NAME>n1</TASK_NAME>
       <TASK_T>
        <TASK_T task_id="10">
         <LAST_NAME>cleaning</LAST_NAME>
         <ACTIVITYLIST>
          <ACTIVITY_T activity_id="100">
           <ACTIVITY_NAME>Clean home</ACTIVITY_NAME>
          </ACTIVITY_T>
          <ACTIVITY_T activity_id="200">
           <ACTIVITY_NAME>Clean Garden</ACTIVITY_NAME>
          </ACTIVITY_T>
          <ACTIVITY_T activity_id="300">
           <ACTIVITY_NAME>Clean clothes</ACTIVITY_NAME>
          </ACTIVITY_T>
         </ACTIVITYLIST>
        </TASK_T>
        <TASK_T task_id="20">
         <LAST_NAME>washing</LAST_NAME>
         <ACTIVITYLIST>
          <ACTIVITY_T activity_id="400">
           <ACTIVITY_NAME>Wash car</ACTIVITY_NAME>
          </ACTIVITY_T>
         </ACTIVITYLIST>
        </TASK_T>
       </TASK_T>
      </PEOPLEXML>
    </ROW>
    </ROWSET>

  • Delete status records in an IDOC

    Hello experts,
    I have a requirement to delete all status records in an IDOC. The IDOC is used for re-processing & then posted again. When it is done so & if there are errors posting application document, a fresh set of status records need to be added to the IDOC. All previous status records need to be deleted.
    Please let me know if there are any function modules / class methods that can be used to acheive this.

    I doubt very much there is standard functionality for this, as I believe it to be a part of the Audit Trail. It's a bit like deleting change logs from a transaction. If you really had to do it, I suspect deleting records directly from table EDIDS would be the way to go. I wouldn't recommend it though.
    Cheers, Paul.

  • Creating a Record structure and passing this to a Procedure

    Hi there
    I have a query please.
    Can I create a Record Structure composed of fields
    from different tables and then pass this record structure
    to a procedure.?
    ie Create Procedure ProcedureTest(empRec empStructCreated%ROWTYPE)
    where empStructCreated is the RECORD STRUCTURE created
    and composed of fields from different tables.
    Please can some one help me on this.
    Assume that I have 3 tables and I am creating a record structure
    composed of 6 fields (2 fields from each of the 3 tables),and then
    once this record structure is created,I will be passing this to
    a procedure.

    SQL> create or replace package my_package as
      2  type my_rec is record (empno number,deptno number,dname varchar2(10),hiredate date);
      3  end;
      4  /
    Package created.
    SQL> create or replace procedure my_proc(rec1 my_package.my_rec) is
      2  begin
      3  dbms_output.put_line(rec1.empno||' '||rec1.dname||' '||rec1.hiredate);
      4  end;
      5  /
    Procedure created.
    SQL> declare
      2  rec1 my_package.my_rec;
      3  begin
      4  select empno,emp.deptno,dname,hiredate into rec1
      5  from emp,dept where  emp.deptno = dept.deptno and rownum =1;
      6   my_proc(rec1);
      7  end;
      8  /
    7369 RESEARCH 17-DEC-80
    PL/SQL procedure successfully completed.
    SQL>

  • Converting File Content: 2 different record structures

    Dear all,
    I have the following question: Is the PI 7.0 file adapter capable to convert the file content of a file which has two different record types? E.g.
    Rekord 1: String(2) String(4) String(19)
    Rekord 2: String(2) String(7) String(8)
    In the XML structure I need for each of the record set, an own record structure e.g.
    <documentName>...
    <recordset1>
    <NameA>
    <field-nameA1>field-value</field-nameA1> // String(2)
    <field-nameA2>field-value</field-nameA2> // String(4)
    <field-nameA3>field-value</field-nameA3> // String(19)
    </NameA>
       </recordset1>
    <recordset2>
    <NameA>
    <field-nameA1>field-value</field-nameA1> // String(2)
    <field-nameA2>field-value</field-nameA2> // String(7)
    <field-nameA3>field-value</field-nameA3> // String(8)
    </NameA>
      </recordset2>
    The different record sets can be determined by the value of field 1 (string(2))
    Thanks and best regards
    Florian

    HI,
    I can see that.
    The number of characters in the file for TABLE2 is lesser then the number of field size given.
    for eg. if the table2 fixed field length sum is 20 ,your file contains only 10 characters. Please give complete data for table2
    Test file
    100WELCOME 0430000960603201321
    <b>2000000000040008000803</b>
    Table2.fieldFixedLengths: 1,10,10,10,3,3,4,1,38
    Ragards
    vijaya
    Message was edited by: vijaya kumari

  • We are upgrading from 8.3 to 9.2. How can i get the table(record) structure changes between these 2 version

    We are upgrading from 8.3 to 9.2. How can i get the table(record) structure changes between these 2 versions. I am not able to find it in Oracle support.

    My guess is you want to upgrade HR8.3 to 9.2 - and that is not one jump upgrade. You will need to go HRMS 83 to 90
    (PeopleSoft Enterprise HRMS 8.3x to 9.0 Upgrade (Doc ID 747333.1) and then 90 to 92 (PeopleSoft Human Capital Management 9.0 to 9.2 Upgrade Home Page (Doc ID 1536087.1)
    Each these MOS pages contains the Demo to Demo Compare Reports that show the data structures changes between the releases.
    Hope it helps.

  • How to create a record structure dynamically

    Hi,
    I would like to create a record structure dynamically in the body of my pl/sql procedure.
    I don't want to create the structure in the declaration because my record structure depends on some parameters that the procedure will receive.
    Thank you

    > I would like to create a record structure dynamically in the body of my pl/sql procedure
    Terrible idea. Why? Because if the structure is dynamic then you need to write pretty complex code to handle this structure that could be anything. Complex code means buggy code. Inconsistent code. Weird run-time errors. Etc.
    Yes, you can create dynamic "structures" - for example, you can create a user defined type that at execution time can decide what properties it has. Similar to a an object in an o-o language that has a RTTI (Run Time Type Information) interface.
    But this is complex. And what did I say about complex code above? Not the best of ideas most of the time.
    There is however a very easy way to deal with dynamic data via a "dynamic" structure that is in fact a statically defined structure. Arrays aka collections aka associative arrays.
    E.g.
    create or replace type TStrings as table of varchar2(4000);
    Using this I can create a SQL statement (cursor) on any table, with any predicates, and pass the results (dynamic list of columns) to a procedure for processing:
    select TStrings(object_id,object_type,object_name) as DYNAMIC_LIST from user_objects order by object_type, object_name
    Using this I can create a procedure that accepts a dynamic list of values and process these:
    create or replace procedure DynamicProcess( list TStrings ) as ...
    So when thinking "dynamic structures" - think it through carefully. There is a difference between an UNKNOWN structure and a DYNAMIC structure.
    The former needs a RTTI interface. You have no idea what the structure contains. You need an interface to call in order for it to describe the structure for you. This is complex stuff.
    The latter means that you know the structure as it is pre-defined (statically defined). At run-time, it can contain any number of elements - thus making the structure dynamic. This is easy stuff.
    I would rather go for the easy stuff than the complex stuff any time of the day - even when on my 3rd cup of coffee...

Maybe you are looking for

  • How to setup a static IP for a wireless printer

    This problem has been ongoing for several versions of OS X and the last five printers I've had and I'm finally over messing with it.  For some reson, when using a wireless printer with OS X this is a repetetive problem, and I think if I configured th

  • HP DV1000 Sound and Video Drivers Won't Install

    I just had to reformat my DV1000 due to a corrupt Windows XP installation. I downloaded the drivers from the HP website but they will not install, it just says FAILURE at the end of attempting to install them. The p/n of my laptop is ED338AV. Any hel

  • 24" iMac Display uneven

    I have a 24" iMAc with the matte display. I've noticed that the color is not even from side to side. I calibrate the display because being a graphic artist, color is important. On the left side it seems to be cooler and, as you move towards the cente

  • REG : SYNC/ASYNC bridge

    Hi all,              I have a scenario where my sender is a syncronus and receiver is asyncronus. I have used sync/async bridge in BPM to acheive this.But when i send the input data from runtime workbench with QOS as BEST EFFORT i  got the following

  • HT201401 Iphone 3GS screen flashes and doesn't display

    Hi there i have been given a Iphone 3gs 16Gb from a friend as they have upgraded to a nexus 4 and the screen connecter was damaged so i have now replaced the LCD with a new one now the screen flashes and doesn't show anything on the screen there is n