Headerfield Mapping

Hi,
Does anybody have experience with IDoc headerfield mapping?
I am sending IDocs from serveral senders (File, JDBC, Bus Process). At the receiving R/3 the status is red because of Control Record/Partner, where I get the wrong values for the EDI_DC40 fields RCVPOR, RCVPRT, RCVPRN, SNDPOR, SNDPRT, SNDPRN.
- How can I control that values?
- Do I need partners in the IB Directory? Or only partyless services?
- How to understand and how to use the fields "Headermapping" in the Receiver Agreement?
- What is about the about the fields "Agency" and "Schema" in the popup "Party Editor" (help for Headerfield Mapping fields)?
Regards, Udo

Hi Udo,
You're correct that this is a confusing area of XI. It took us a few days of looking through the notes and especially the document to understand this. It does work through and you can control all of these fields.
For example if you want to send out an IDoc and have the sender fields be your XI system (type LS) and your receiver fields be your R/3 system (type LS) then you would:
- Make sure the XI and R/3 systems are defined as Business Systems in the SLD and have their logical system name set.
- Add these Business Systems to your configuration
- In your receiver agreement, under Header Mapping, choose the XI business system as the Sender Service and your R/3 business system as the Receiver Service.
This is just an example so if you reply with what you specifically want to do, then we can hopefully give you a more relevant solution.
I would take a closer look at the 'Sample IDoc scenarios' document. It's confusing, but if you understand it, you'll be set.
Thanks,
Jesse

Similar Messages

  • File sender, dynamic interface

    Hello,
    we are receiving from many partners different messages (e.g. different idocs) in files. All files are stored in the same directory and the filename is only a date/time stamp.
    So from this information I do not know anything about the payload.
    How can I receive this files into XI by the fileadapter and to start teh correct receiver determination, allthough I do not know the sender (but which is in the payload) and the interface (all I know is that it is an IDOC).
    My goal is, that I can maintain also different (Sender)Parties, as I require different Header Mappings for the IDOC adapter to R/3.
    Who can help me???
    best regards
    Werner Magerl

    Hi Werner,
    the receiver can be determinated by X-Path but to have differnt interface is not easy because you have to put in the file adapter channel.
    One (dirty) trick would be to send the messages from file adapter to http adapter. For every receiver (idoc in R/3) you create a third party business system in SLD. You find now by X-Path the right 3rd party receiver and configure the http receiver adapter setting target host = <yourXI> and path = /sap/xi/adapter_plain?service=<yourService>&interface=<yourIF>&namespace=<yourNS>&qos=EO
    1. Message: File->XI->HTTP (X-Path-Receiver, a lot channels)
    2. Message: HTTP->XI->IDoc (normal Receiver, a lot interfaces)
    Regards,
    Udo
    PS: Werner, may be that helps you or not, but please, if you fit in headerfield mapping, can you help me by my question?

  • How to get a Parent Message Id in Mapping?

    Hi,
    I have a scenario to post the idoc to file to mulitple receivers. I have to get both Message ID and Parent Message ID in mapping. I am able to get Message ID but not Parent Message ID. I tried to get it from Table sxmspmast but it does not contain the entry during runtime.
    Any suggestions to get the Parent ID while in Mapping.
    Thanks,
    Manikandan R

    you can create a UDF,say getMSGID,  to get current message ID:
    String headerField;
    java.util.Map map;
    // get runtime constant map
    AbstractTrace trace=container.getTrace();
    map = container.getTransformationParameters();
    String key = "MessageId";
    // get value of header field by using variable key
    headerField = (String) map.get(key);
    return headerField;
    pass this output to an RFC  lookup UDF which calls this FM in XI ABAP stack:
    FUNCTION ZGET_PARENT_MSG_ID.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_CURRMSGID) TYPE  CHAR40
    *"  EXPORTING
    *"     VALUE(E_PARENTMSGID) TYPE  CHAR40
    DATA: lv_currmsgid type SXMSPMAST-MSGGUID,
          lv_parentmsgid LIKE SXMSPMAST-PARENTMSG,
    lv_currmsgid = i_currmsgid.
    select single PARENTMSG from SXMSPMAST into lv_parentmsgid where MSGGUID = lv_currmsgid.
    e_premsgid = lv_parentmsgid.
    ENDFUNCTION.

  • Message ID in Message Mapping

    Hello everyone,
    I have a BPM that executes an ABAP Proxy, my problem is that I need to send in the ABAP Proxy strcuture the Unique Message Id that the BPM has in XI, I don't know if I can obtain this field in Message Mapping and map it to the ABAP Proxy structure, can anyone help me? thanks in advance for your answers.
    Regards,
    Julio Cesar

    Hi Julio,
    You can get the message id through java UDF. Here is the code
    String headerField;
    java.util.Map map;
    // get runtime constant map
    map = container.getTransformationParameters();
    // get value of header field by using variable key
    headerField = (String) map.get(StreamTransformationConstants.MESSAGE_ID);
    return headerField;
    Thanks
    -Kulwant
    If helpful, assign score please

  • Using Dynamic Configuration Values in Mapping

    Hi
    I want to use the JMS CorrelationID and MessageID in my mapping
    Can anyone suggest me the UDF which i can use for the this
    I want to get the DynamicConfiguration Values and then map it to the target structure
    Rgds
    Aditya

    Hi Aditya,
    Accessing the Runtime Constants by Using Keys (Special Case)
    In certain exceptional and unavoidable cases, it may be necessary to use the keys to access the fields in the message header. This is always the case when you want to access the contents of the map by means of a variable. In the example below, a variable key key, which is to be used to read a field in the message header, is transferred to a user-defined function of a message mapping. You can only use a variable to access the map if the variable has the name of the key as its value and not the name of the string constant.
    String headerField;
    java.util.Map map;
    // get runtime constant map
    map = container.getTransformationParameters();
    // get value of header field by using variable key
    headerField = (String) map.get(key);
    For example, to read the message ID from the message header, the variable key must have the value MessageId and not MESSAGE_ID.
    Use the below link:
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    Thanks
    Farooq

  • Mapping in XI - cannot access Global Container parameters

    Hi all,
    we have the following problem in graphical XI mapping.
    Trying to retrieve the run-time value of a global parameter, we cannot access the value itself (e.g. test using "display queue" menu).
    We use 2 simple user-defined functions (getIdoc and corresponding setIdoc).
    The source code for our custom get/set methods is:
    public String getIdoc(Container container){
    // This is a CUSTOM global parameter set <- cannot get the value itself
    //String codMsgExport = (String) container.getGlobalContainer().getParameter("idoc");
    //return codMsgExport.toString();
    GlobalContainer globalContainer;
    java.util.Map map;
    globalContainer = container.getGlobalContainer();
    map = globalContainer.getParameters();
    // This is a STANDARD global parameter set <- cannot get the value itself, as well
    String headerField = (String) map.get(StreamTransformationConstants.INTERFACE_NAMESPACE);
    return headerField;
    public String setIdoc(String codMsgExport,Container container){
    container.setParameter("idoc", codMsgExport.toString());
    String retValue = (String) container.getGlobalContainer().getParameter("idoc");
    return retValue.toString();
    => anyway, get method returns only blank values (testing by "display queue" with some custom values...)
    It seems as if the parameter is seen, as pointing to a not existing variable - e.g. getParameter("idoczz") - XI runtime returns a NullPointerException.
    Some XI server details:
    Runtime Environment
    Java version: 1.4.2_06
    Java vendor: Sun Microsystems Inc.
    Version
    Service pack: 14
    Release: 30_REL
    Thanks all!
    Gianluca Tacchella

    Hi Sudharshan and Bhavesh,
    I forgot to put a value under the tab PARAMETERS (this is the reason for the blank value, thanks:)).
    Anyway, modifying (run-time by the set function) the standard runtime constant => leads to a get function with a single value returned (out) for "display queue", despite of test valorization: the initial value set under tab PARAMETERS.
    Instead of using the runtime (standard) constant, using my (custom) global variable => leads to NullPointerException ("display queue" for get function) EVEN IF I initialize the variable (e.g. initIdoc() function called once at top-level target message).
    under JAVA_SECTIONS_TOOLTIP button:
    Global Variables
    String idoc;
    Initialization Section
    idoc = "";
    Clean-Up Section
    idoc = "";
    public String initIdoc(Container container){
    GlobalContainer globalContainer;
    globalContainer = container.getGlobalContainer();
    // this is the only way NOT to get a NullPointerException
    if ( globalContainer.getParameter("idoc") == null )
    globalContainer.setParameter("idoc", "a");
    return globalContainer.getParameter("idoc").toString();
    initIdoc:
    out (*)
    [a]
    (*) despite of initialization under JAVA_SECTIONS_TOOLTIP button
    public void getIdoc(ResultList result,Container container){
    //String codMsgExport = (String) container.getGlobalContainer().getParameter("idoc");
    //return codMsgExport.toString();
    GlobalContainer globalContainer;
    java.util.Map map;
    globalContainer = container.getGlobalContainer();
    map = globalContainer.getParameters();
    //String headerField = (String) map.get(StreamTransformationConstants.INTERFACE_NAMESPACE);
    // this returns null (out stream)
    //String headerField = (String) map.get("idoc");
    //if ( globalContainer.getParameter("idoc") == null )
    //globalContainer.setParameter("idoc", "");
    // this returns NullPointerException
    String headerField = globalContainer.getParameter("idoc").toString();
    //result.addValue(headerField);
    // this returns NullPointerException
    //return headerField.toString();
    //return globalContainer.getParameter("idoc").toString();
    result.addValue(globalContainer.getParameter("idoc").toString());
    => leads to NullPointerException
    public String setIdoc(String codMsgExport,Container container){
    GlobalContainer globalContainer;
    globalContainer = container.getGlobalContainer();
    java.util.Map map;
    map = globalContainer.getParameters();
    //globalContainer.setParameter(StreamTransformationConstants.INTERFACE_NAMESPACE, codMsgExport.toString());
    //container.setParameter("idoc", codMsgExport.toString());
    //String retValue = (String) map.put(StreamTransformationConstants.INTERFACE_NAMESPACE, codMsgExport.toString());
    // this returns a NullpointerException
    //String retValue = (String) map.put("idoc", codMsgExport.toString());
    globalContainer.setParameter("idoc", codMsgExport.toString());
    //return "True";  // pointer for debug
    //return retValue.toString();  // pointer for debug
    return globalContainer.getParameter("idoc").toString();
    setidoc:     
    in0     out (*)
    [1]     [1]
    [2]     [2]
    (*) as if this "idoc" parameter is not the globally managed (JAVA_SECTIONS_TOOLTIP button), but one which lives inside the function and not outside for the get function..
    Regards,
    Gianluca

  • Fetching the business system name during graphical mapping

    Hi,
    After the receiver determination is done and in interface determination, while executing the interface mapping, i need the business system name for which the
    mapping is under progress. This i need during mapping.
    Also, i need the configuration scenario name during mapping.
    Is there any XI internal variable/system variables which hold these values so that using user defined function they can be accessed and used in graphical mapping ?
    In appreciate your input in this regard.
    Regards
    Ganesh

    Hi,
      For the configuration name you can map it with a constant and for the sender,receiver services and interfaces you nee to use the UDF as one mentioned below.
    Imports   com.racs.gpt.*;
    public String getMapValue(String a,String b,Container container)
    //String a denotes incoming data string |data1|data2|data3|...|dataN.
    //String b = lookupID.
    //container contains runtime parameters.
    AbstractTrace trace;
    String headerField;
    java.util.Map map;
    String  result;
    trace = container.getTrace();
    // get constant map
    map = container.getTransformationParameters();
    CrossReferenceAPI maprule1 = new CrossReferenceAPI();
    result  =   maprule1.getData(a,b,map);
    trace.addWarning("result = " + result);
    if (result.equals("$NULL$"))
    trace.addWarning("XREF Error.  Mapped data for " + a + " not found");
    ErrorHandler errHandler = new ErrorHandler();
    int lookupID = Integer.parseInt(b);
    errHandler.logSQLError(map, lookupID, a, "");
    result = "?";
    return result;
    Regards
    Madhu

  • Get Sender Service Name during Mapping

    Hi Guys! I would like to send the Sender Service Name to the Receiver System. Is it possible to get the Sender Service Name during Mapping ?
    thanks
    Julio

    sender --> gets the name of the sender business system.
    Test_Sender_System is output when you test the message mapping in the Integration Builder.
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/2d8c4024d26e1de10000000a1550b0/frameset.htm
    or
    in UDF
    String headerField;
    java.util.Map map = container.getTransformationParameters();
    headerField = (String) map.get(
            StreamTransformationConstants.SENDER_SERVICE);
    return headerField;

  • Remote System and Remote Key Mapping at a glance

    Hi,
    I want to discuss the concept of Remote System and Remote Key Mapping.
    Remote System is a logical system which is defined in MDM Console for a MDM Repository.
    We can define key mapping enabled at each table level.
    The key mapping is used to distinguish records at Data Manager after running the Data Import.
    Now 1 record can have 1 remote system with two different keys but two different records cannot have same remote system with same remote key. So, Remote key is an unique identifier for record for any remote system for each individual records.
    Now whenever we import data from a Remote System, the remote system and remote key are mapped for each individual records. Usually all records have different remote keys.
    Now, when syndicating back the record with default remote key is updated in the remote system that is sent by xml file format.
    If same record is updated two times from a same remote system, the remote key will be different and the record which is latest contains highest remote key.
    Now, I have to look at Data Syndication and Remote key.
    I have not done Data Syndication but my concept tell if there is duplicate record with same remote system but different remote keys both will be syndicated back. But if same record have two remote keys for same remote system then only the default remote key is syndicated back.
    Regards
    Kaushik Banerjee

    You are right Kaushik,
    I have not done Data Syndication but my concept tell if there is duplicate record with same remote system but different remote keys both will be syndicated back.
    Yes, but if they are duplicate, they needs to be merged.
    But if same record have two remote keys for same remote system then only the default remote key is syndicated back.
    This is after merging. So whichever remote key has tick mark in key mapping option(default) , it will be syndicated back.
    Pls refer to these links for better understanding.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/80eb6ea5-2a2f-2b10-f68e-bf735a45705f
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/7051c376-f939-2b10-7da1-c4f8f9eecc8c%0c
    Hope this helps,
    + An

  • Error while deleting a mapping

    Hi all,
    I am getting the following error while deleting a mapping. My client version is 10.2.0.4.36
    API5072: Internal Error: Null message for exception. Please contact Oracle Support with the stack trace and details on how to reproduce it.
    oracle.wh.util.Assert: API5072: Internal Error: Null message for exception. Please contact Oracle Support with the stack trace and details on how to reproduce it.
         at oracle.wh.util.Assert.owbAssert(Assert.java:51)
         at oracle.wh.ui.jcommon.OutputConfigure.showMsg(OutputConfigure.java:216)
         at oracle.wh.ui.common.CommonUtils.error(CommonUtils.java:370)
         at oracle.wh.ui.common.WhDeletion.doActualDel(WhDeletion.java:512)
         at oracle.wh.ui.common.WhDeletion.deleteObject(WhDeletion.java:203)
         at oracle.wh.ui.common.WhDeletion.deleteObject(WhDeletion.java:283)
         at oracle.wh.ui.jcommon.tree.WhTree.deleteItem(WhTree.java:346)
         at oracle.wh.ui.console.commands.DeleteCmd.performAction(DeleteCmd.java:50)
         at oracle.wh.ui.console.commands.TreeMenuHandler$1.run(TreeMenuHandler.java:188)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:189)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:478)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    Thanks in advance!
    Sebastian

    These type of Internal Errors are all too common in OWB and it's difficult to diagnose the exact problem.
    I'd suggest closing the Design Centre, going back in and trying to delete it again, this will often resolve Internal errors.
    There's also an article on Metalink Doc ID: 460411.1 about errors when deleting mappings but it's specific to an ACLContainer error, so may or may not be of use.
    One of the suggestions is to connect as the Repository Owner rather than a User and try to delete the mapping.
    Cheers
    Si
    Edited by: ScoobySi on Sep 10, 2009 11:44 AM

  • FileName in ABAP XSLT Mapping

    Dear SDN,
    In an integration scenario we are using sender File Adapter and a  ABAP XSLT Mapping.
    Is there any way to get the source FileName from such mapping.  Im trying to use the adapter-specific message attributes, but it doesn't work, and I didn´t find an example, probably I and doing somthing wrong.
    regards,
    GP

    Thank you for your help,
    I just try to access the adapter-specific attibutes using:
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:variable name="filename"  select="key:create('http://sap.com/xi/XI/System/File', 'Directory')" />
    </xsl:stylesheet>
    but the following error raised:
    <SAP:Stack>Error while calling mapping program YXSLT_TEST (type Abap-XSLT, kernel error ID CX_XSLT_RUNTIME_ERROR) Call of unknown function</SAP:Stack>
    have you had this situation?

  • Sample source code for fields mapping in expert routine

    Hi All
    Iam writing the expert routine from dso to cube for example I have two fields in dso FLD1,FLD2
    same fields in infocube also ,can any body provide me sample abap code to map source fields to target fields in expert routine,your help will be heighly appreciatble,it's an argent.
    regards
    eliaz

    Basic would be ;
    RESULT_FIELDS -xxx = <SOURCE_FIELDS> -xxx
    you have the source fields as source, and result fields for as the target. In between you can check some conditions as in other routines of transformation.
    BEGIN OF tys_SC_1, shows your source fields ( in your case DSO chars and key figures)
    BEGIN OF tys_TG_1, , shows your result fields ( in your case Cube characteristics)
    Hope this helps
    Derya

  • How can I distinguish different action mapping in one ActionClass file?

    I would like to create a ActionClass which will handle 3 mapping which comes from /add, /show or /del.
    My question is how can I change the code so that the ActionClass servlet can distinguish the request from different url mapping ? Can anyone give me some short hints? Thx.
    struts-config.xml
    <action-mappings>
    <action name="MemberInfoForm" path="/add" scope="request" type="com.myapp.real.MemberAction">
    <action name="MemberInfoForm" path="/show" scope="request" type="com.myapp.real.MemberAction">
    <action name="MemberInfoForm" path="/del" scope="request" type="com.myapp.real.MemberAction">
    </action-mappings>MemberAction.class
    public class MemberAction extends org.apache.struts.action.Action {
        private final static String SUCCESS = "success";
        public ActionForward execute(ActionMapping mapping, ActionForm  form,
                HttpServletRequest request, HttpServletResponse response)
                throws Exception {
            return mapping.findForward(SUCCESS);
    ...

    http://struts.apache.org/1.2.x/api/org/apache/struts/actions/MappingDispatchAction.html
    http://struts.apache.org/1.2.x/api/org/apache/struts/actions/DispatchAction.html
    Thank you so much for all of your suggestion.
    I read the document of MappingDispatchAction and its note say:
    NOTE - Unlike DispatchAction, mapping characteristics may differ between the various handlers, so you can combine actions in the same class that, for example, differ in their use of forms or validation.........
    I wonder in DispatchAction, we can also have various forms or validation as MappingDispatchAction does, just by using different name in the action tag, for example:
    <action input="/p1.jsp" name="MForm1" path="/member" scope="session" parameter="action" type="com.myapp.real.MemberAction">
    <action input="/p2.jsp" name="MForm2" path="/member" scope="session" parameter="action" type="com.myapp.real.MemberAction">
    <action input="/p3.jsp" name="MForm3" path="/member" scope="session" parameter="action" type="com.myapp.real.MemberAction">Hence, it is not the difference as stated from the NOTE, right?
    Edited by: roamer on Jan 22, 2008 10:32 AM

  • How can I save to the same map every time when printing pdfs?

    How can I save to the same map every time when printing pdfs?
    Finder points to the document map even when I chose a different map recently.
    I often print series of pdfs from the print dialog box, I'd like to choose the map to save to and then have all subsequent pdf prints automatically directed to the same map until I decide otherwise.

    that link seems to be broken right now:
    403 Error - Forbidden  - No cred, dude.

  • Sensor Mapping Express VI's performanc​e degrades over time

    I was attempting to do a 3d visualization of some sensor data. I made a model and managed to use it with the 3d Picture Tool Sensor Mapping Express VI. Initially, it appeared to work flawlessly and I began to augment the scene with further objects to enhance the user experience. Unfortunately, I believe I am doing something wrong at this stage. When I add the sensor map object to the other objects, something like a memory leak occurs. I begin to encounter performance degradation almost immediately.
    I am not sure how I should add to best add in the Sensor Map Object reference to the scene as an object. Normally, I establish these child relationships first, before doing anything to the objects, beyond creating, moving, and anchoring them. Since the Sensor Map output reference is only available AFTER the express vi run. My compromise solution, presently, is to have a case statement of controlled by the"First Call" constant. So far, performace seems to be much better.
    Does anyone have a better solution? Am I even handling these objects the way the community does it?
    EDIT: Included the vi and the stl files.
    Message Edited by Sean-user on 10-28-2009 04:12 PM
    Message Edited by Sean-user on 10-28-2009 04:12 PM
    Message Edited by Sean-user on 10-28-2009 04:16 PM
    Solved!
    Go to Solution.
    Attachments:
    test for forum.vi ‏105 KB
    chamber.zip ‏97 KB

    I agree with Hunter, your current solution is simple and effective, and I can't really visualize a much better way to accomplish the same task.
    Just as a side-note, the easiest and simplest way to force execution order is to use the error terminals on the functions and VIs in your block diagram. Here'a VI snippet with an example of that based on the VI you posted. (If you paste the image into your block diagram, you can make edits to the code)
    Since you expressed some interest in documentation related to 3D picture controls, I did some searching and found a few articles you might be interested in. There's nothing terribly complex, but these should be a good starting point. The first link is a URL to the search thread, so you can get an idea of where/what I'm searching.You'll get more hits if you search from ni.com rather than ni.com/support.
    http://search.ni.com/nisearch/app/main/p/q/3d%20pi​cture/
    Creating a 3D Scene with the 3D Picture Control
    Configuring a 3D Scene Window
    Using the 3D Picture Control 'Create Height Field VI' to convert a 2D image into a 3D textured heigh...
    Using Lighting and Fog Effects in 3d Picture Control
    3D Picture Control - Create a Moving Texture Using a Series of Images
    Changing Set Rotation and Background of 3D Picture Control
    Caleb Harris
    National Instruments | Mechanical Engineer | http://www.ni.com/support

Maybe you are looking for