Message Mapping Requirement

Hi All,
Iam trying to send data from a File to an R/3 using RFC.
My input structure has a field called material number.Material numbers from the sender has a corresponding material code for receiver.ie for a material code SM01,receiver material code will be RM01.
This values are not fixed.i.e user will keep on changing the values for material code for sender and reciver.So I cannot give a fixed mapping in XI.
I have to give the user an option to enter the values for sender material code and receiver material code in a table and read that table evrytime in my mapping.
Can someone tell me if this option is possible and if there is a better option available?.
Thanks in advance.
Soumya.

Hi Soumya,
U can Use any of the following mapping techniques:
1)  <a href="/people/bhanu.thirumala/blog/2006/02/02/graphical-message-mapping-150-text-preview mapping</a>
2) <a href="http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm">XSLT</a>
3)  <a href="http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm">JAVA</a>
4)  <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/455">abap</a>
if you know the Java technologies and XML throughly, you can go with Java/XSLT mappings
from
Yallabandi...

Similar Messages

  • Help on message mapping requirement

    I have a source file with a structure like below:
    emp no , company code , dependent name , dependent age , dependent qualification
    an exp file would look something like below :
    PERNRA , 1000, ABC , 23, CA
    PERNRA,  1000, DEF , 25 , BE
    PERNRB,  1200, XYZ , 35 , GE
    PERNRA,  1000, TGH, 30, BE
    My target structure expects one node per employee number and the dependent information node recurring inside the <emp> ..... </emp> node.
    Please advise.
    Mathews

    Please look at following:
    I am asumming your source message will be do FCC to following format:
    <Recordset>
       <emp_no>PERNRA</emp_no>
       <comp_code>1000</comp_code>
       <dep_name>ABC</dep_name>
       <dep_age>23</dep_age>
       <dep_qua>CA</dep_qua>
    </Recordset>
    <Recordset>
       <emp_no>PERNRA</emp_no>
       <comp_code>1000</comp_code>
       <dep_name>DEF</dep_name>
       <dep_age>25</dep_age>
       <dep_qua>BE</dep_qua>
    </Recordset>
    I am assuming that your target message is something look like below:
    <emp>
      <emp_num>PERNRA</emp_no>
      <emp_info>
       <comp_code>1000</comp_code>
       <dep_name>ABC</dep_name>
       <dep_age>23</dep_age>
       <dep_qua>CA</dep_qua>
      </emp_info>
      <emp_info>
       <comp_code>1000</comp_code>
       <dep_name>DEF</dep_name>
       <dep_age>25</dep_age>
       <dep_qua>BE</dep_qua>
      </emp_info>
    </emp>
    <emp>
    </emp>
    Then your mapping design will look like below:
    remember that the formatbyExampe take two parameters, I put it just in same line of first parameter. Silimarly for sortbyKey
    emp_no -> removeConetext -> Sort -> SplitByValue[Value Change] -> CollapsContext -> removeContext --> emp
    emp_no -> removeConetext -> Sort -> SplitByValue[Value Change] -> CollapsContext ->emp
    _num
    emp_no --------------------------------------------------------->FormatbyExample -->emp_info
    emp_no -> removeContext -> sort -> SplitByValue[Value Change]--->
    Other nodes, for example dep_age:
    emp_no->removeContext-->sortbyKey -> SplitByValue[Each Value] -> dep_age
    dep_age->removeContext->
    Liang

  • Require a Message mapping for this Logic.

    Hi Experts,
    I require a Message mapping for this Logic.
    In the Source there are 4 fields and, the Target side, the fields should appear like this.
    Source Structure- File
    Record
    |-> Header
    Order_No
    Date
    |-> Item
    Mat_No
    Quantity
    Target Structure-IDoc
    IDoc
    |-> Header
    |-> Segment
    Delivery_Order_No
    Recv_Date
    |-> Item
    |-> Segment
    Delivery_Order_No
    Material_Num
    Recv_Quantity.
    The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note  is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
    For example:-
    we have
    Source Structure- File
    Order-no Date Mat_No Quantity
    1 01/02/2011 A 10
    1 01/02/2011 B 15
    1 01/02/2011 A 10
    2 01/02/2011 C 10
    2 01/02/2011 C 10
    3 01/02/2011 D 20
    3 01/02/2011 D 10
    3 01/02/2011 E 25
    Target Structure-IDoc
    Delivery_Order_No Recv_Date Material_Num Recv_Quantity
    1 01/02/2011 A 20
    1 01/02/2011 B 15
    2 01/02/2011 C 20
    3 01/02/2011 D 30
    3 01/02/2011 E 25
               So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B  then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field  in the Target Side.  ike wise the process goes on upto 3.Kindly do the needy..
    Thanq very much in advance..
    Edited by: Prashanth Bharadwaj on Oct 17, 2011 1:29 PM

    Hi Prashanth,
    Concatinate the two fields OrderNo and MaterialNo and follow the below logic which will resolve your problem.
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext-->IDOC
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(0,1)-->Delivery_Order_No
    formatByExample>collapseContext>SplitByEachValue-->Recv_Date
    FormatByExample:
    input1:resulrOfSortByKey
    input2:concatination>removecontext>sort-->SplitByValuChange
    sortByKey:
    input1:concatination-->removecontext
    input2:date-->removecontext
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(1,1)-->Material_Num
    formatByExample>sum>Recv_Quantity
    FormatByExample:
    input1:sortByKey
    input2:concatination>removecontext>sort-->SplitByValueChange
    SortByKey:
    input1:concatination-->removecontext
    input2:Quantity-->removeContext
    Regards,
    Priyanka.

  • Require some complex logic scenario in message mapping

    Hi all,
                 I need some complex logic scenarios for practice in message mapping . Kindly forward some links for message mapping logic scenarios.
    Thank you so much in advance.

    always search sdn first....
    http://wiki.sdn.sap.com/wiki/display/XI/MappingConceptsinSAPXI

  • Additional message mapping in the operation mapping-use

    Hi Friends,
       I could find the option for adding more than one message mappings in the operation mapping(Interface mapping). What is the actual purpose of it. when it is used. If there is any blogs regarding the same. refer any link for the same.
    Regards
    Prem

    Hi Prem
    Refer the blog provided by Sarvesh
    What is the actual purpose of it. when it is used. If there is any blogs regarding the same
    You can use more than one mapping programs for requirement where your message mapping cannot generate the desired structure you want or you want to do some transformations in a sequence for meeting your requirement.
    Example: You want to generate a excel sheet as a mail attachment but you have to read a flat file. What you can do here is you can read the Flat file in a single string variable itself. Use XSLT mapping1. Now in a sequence using XSLT Map2/Java mapping program to convert to excel and send as attachment over email
    Thanks
    Gaurav

  • File to file with out message mapping and using variable substitution

    Hi,
    Can any one send me a scenario where we can have file to file scenario with out message mapping and where i can use variable substitution.
    As of now i am using integrate configurations where i cant use variable substitution as the message does not reflect in integration engine. I need to populate time stamp between <filename><timestamp>.txt.pgp
    I am as of now using configuration scenario.
    The time stamp always writes before the last file extension.
    Let me know your thoughts?
    Thanks,
    Chandra.

    Hi Chandra,
    u can use the Variable substitution even without IR contents also(Mapping....).
    in the receiver communication channel just specify the path u want to access for a value...
    eg: filename                             payload:mt_name,1,records,1,name,1
    and in th file name give it as %filename%.txt... or vt ever ur requirement
    Babu

  • Accessing container variable of BPM in Message Mapping function

    Hi,
    I have a scenario in BPM where i have a container variable that is used as a loop counter.I want to access that counter defined , every time when i go around the loop and perform certain actions based on that counter. so how can i access that variable in my message Mapping function.

    Hi Sudharshan,
    check these links, hope they give you the required information (i think there is some problem with SDN site, check these links after a while)
    Re: How to use Container Variable across Maps
    Container object in Message Mapping
    Copy value of container (abstract interface) to an other container
    Regards
    Vishnu

  • Error in message mapping

    I used MT_PerformRate for both sender side and receiver side in message mapping
    When I goto interface mapping and click on the mapping program it gives following error.
    The source or target structure has been changed or could not be found in the Integration Repository. The mapping definition contains elements or attributes that do not exist in the changed structure. The relevant entries will be deleted
    Target structure has no such path: /ns0:MT_PerformRate/@EmpName. Skipping mapping
    Target structure has no such path: /ns0:MT_PerformRate/@EmpNo. Skipping mapping
    Target structure has no such path: /ns0:MT_PerformRate/@PerformRating. Skipping mapping
    Target structure has no such path: /ns0:MT_PerformRate/@RatingDesc. Skipping mapping
    Target structure has no such path: /ns0:MT_PerformRate/@EffectiveDate. Skipping mapping
    In mapping editor target fileds are shown in red.
    I can see two message mappings in Change list one with target fileds in red and one with green.
    I do not know what is happening
    PLs suggest

    Thanks Amith and Ameer for your answers.
    The exact reason was because I did not used recordset in my datatype creation.
    But I did not set ignoreRecordsetName to true
    For who get similar problem please see below details and link
    A <Recordset> element is inserted in the XML structure for each recordset structure. This level is not always required, particularly if the recordset only contains one structure definition.
    If you set the parameter to true, the <Recordset> element is not inserted.
    http://help.sap.com/saphelp_nw70/helpdata/EN/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
    Thanks,
    Raj

  • Certification Exam content  clarification - Message mapping patterns

    I was going through the Exam content for  SAP NetWeaver´04 - Exchange Infrastructure & Integration  Dev.Cons.
    Link
    Check out this part -
    " 4. Mapping (++)
    Concepts / Overview
    Test / Debug Environment
    Standard functions
    User-defined Functions
    Message mapping patterns
    Multi-mapping
    ABAP, Java, XSLT mapping overview "+
    What does Message mapping patterns mean?
    I have cert docs but nothing verifies this.
    Thanks for your time,
    Priya.

    Hi,
    Mapping “patterns” are some of the common mapping requirements found in the past which XSLT was used, because we did not think that Message Mapping provided the functionality
    Summarization
    Sequence–Number Generation
    Duplicating Subtrees
    Table / Value Lookups
    Tree–Reversal
    <removed_by_moderator>
    Read the "Rules of Engagement"
    Nilesh
    Edited by: Juan Reyes on Apr 3, 2009 11:15 AM

  • How to validate a date in message mapping

    Hi experts,
                    how to validate a date in message mapping. For ex:  if date comes as 2008/02/31, then file it shold not get processed.how to achieve this in message mapping. Please help .
    Thanks&Regards,
    Reyaz Hussain

    Hi,
    There are few simple ways for date validation as follow,
    1.If you would like to handle it in XI only, then in message mapping you could verify about it with the help of generating smart exception.
    For e.g in mapping there is one Date conversion API i.e. somthing DateTransformation It converts the incoming date format to required format. Here give the date format i.e expected from Sender File.
    If in case the format miss-matched then it will create the exception.
    You could handle this exception with the use of [Alert notification|http://help.sap.com/saphelp_nw04/helpdata/en/2c/abb2e7ff6311d194c000a0c93033f7/frameset.htm] and could be even able to notify to sender system about it.
    2. The another solution is easy for SAP synchornous communication --If you are passing the file data to SAP, then you could use below function modules to verify date format in receiver RFC/BAPI or inbound IDOC program. If the sy-subrc is not 0 then don't process further.
    CONVERT_DATE_FORMAT
    ISU_DATE_FORMAT_CHECK
    Thanks
    Swarup

  • Writing message mapping function in Java in integration repository

    Hi XI Pundits,
    I am new to XI. I was working on Message mapping in intergration repository.
    To map the source messages to target messages, we do graphical kind of mapping like drag and drop.
    There are some functions aavilable at the bottom like concatehate, trim and etc. which we use if we need to modify the source message and map to target.
    But in case we face a situation when we don't find the function which suits our requirement, I guess we need to write a new function. We can write these new function using Java only.
    Can someone throw some light on this ?
    <b>What do we do to invoke java editor in integartion reposity to write mapping function in java ?
    Can someone give an example of snippet of code ?</b>
    Thanks.

    Hi Tushar,
    Go thro this help link. You will get all info about User defined function.
    http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/frameset.htm
    To get more understanding on mapping go thro this link(PDF File)
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
    Hope this helps.
    regards,
    P.Venkat
    Message was edited by: Venkataramanan

  • RuntimeException in Message-Mapping transformatio

    Hi all,
    My XI server is successfully picking up a comma separated file from an FTP server and generating the corresponding XML:
    <?xml version="1.0" encoding="utf-8" ?>
    <ns:CondRec_MT xmlns:ns="http://namespace-ConditionRecords">
    <Recordset>
    <ConditionRecord>
      <Usage>A</Usage>
      <Table>018</Table>
      <Application>M</Application>
      <ConditionType>PB00</ConditionType>
      <VarKey>00000039301300-340 2 0</VarKey>
      <Material>1300-340</Material>
      <Vendor>3930</Vendor>
      <PurchasingOrg>2</PurchasingOrg>
      <Infotype>0</Infotype>
      <InfoRecord>5300003218</InfoRecord>
      <CondRecordNo>0000020727</CondRecordNo>
      <ValidFrom>30.05.2006</ValidFrom>
      <ValidTo>31.12.9999</ValidTo>
      <ScaleType>A</ScaleType>
      <CalculatType>C</CalculatType>
      <KBETR>15.00</KBETR>
      <CondCurrency>USD</CondCurrency>
      <CondItemIndex>01</CondItemIndex>
      <RelToPricing>X</RelToPricing>
      </ConditionRecord>
      </Recordset>
      </ns:CondRec_MT>
    But nothing is getting submitted to the receiver adapter.
    The error in SXMB_MONI reads as follows:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_file2file_mm_</SAP:P1>
      <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
      <SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>During the application mapping com/sap/xi/tf/_file2file_mm_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    I am using a simple one to one mapping(i.e the same msg type is being used for both the outbound and inbound interface).
    Pls can anybody guide me as to what can be the probable error.
    Thanks in advance
    Regards
    Neetu

    Hi all,
    Thanks for ur prompt responses.
    I followed the blog and performed testing of the mapping.
    The XML with which i tried was as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <ns:CondRec_MT xmlns:ns="http://namespace-ConditionRecords">
    <Recordset>
         <ConditionRecord>
              <Usage>A</Usage>
              <Table>018</Table>
              <Application>M</Application>
              <ConditionType>PB00</ConditionType>
              <VarKey>00000039301300-340          2   0</VarKey>
              <Material>1300-340</Material>
              <Vendor>3930</Vendor>
              <PurchasingOrg>2</PurchasingOrg>
              <Infotype>0</Infotype>
              <InfoRecord>5300003218</InfoRecord>
              <CondRecordNo>0000020727</CondRecordNo>
              <ValidFrom>30.05.2006</ValidFrom>
              <ValidTo>31.12.9999</ValidTo>
              <ScaleType>A</ScaleType>
              <CalculatType>C</CalculatType>
              <KBETR>15.00</KBETR>
              <CondCurrency>USD</CondCurrency>
              <CondItemIndex>01</CondItemIndex>
              <RelToPricing>X</RelToPricing>
         </ConditionRecord>
    </Recordset>
    </ns:CondRec_MT>
    this gave the following error:
    Cannot produce target element /ns:CondRec_MT/ConditionRecord. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
    But when i removed the tag 'RECORDSET', it works fine and output gets genersted.
    My datatype has no such field called recordset.
    The adapter generates it on its on.
    How do i solve this issue.
    Regards
    Neetu

  • UDF in message mapping instead of Java Mapping. Pls advice urgent

    Hi All,
    My scenario
    CRM --- XI -- CRM
    In XI I have to open socket connection.
    Pls refer link:
    /people/saravanakumar.kuppusamy2/blog/2005/12/15/socket-integration-with-xi
    Can Java Mapping code given in above link for socket connection can be used in Message Mapping (CRM -- CRM)UDF?
    Pls advice urgent
    Regards

    Hi Henry,
    I understood your requirement.
    But as per the architecture of XI/PI some message has to trigger your scenario.
    In this case there is no adapter where you can directly communicate with CRM system.
    Do one thing configure a dummy scenario on the sender side.
    Use File adapter for simplicity. once it pools the file with some dummy data in the file it comes to Interface mapping(message mapping) of the PIPELINE steps. Now use the code as you mentioned above(within UDF) for opening socket to CRM system and implement you business logic within that program and write the response to target interface which will infact talk with CRM system.
    Dont forget to do the coding in an infinite loop with some delay (if required). Other wise every time you have to put a message for File Adapter for triggering purposes.
    You can also acheive the same if you use Java Mapping instead of Graphical mapping with UDF(code for Opening socket and business logic). I suggest you to use Java Mapping.
    I dont know how you will comunicate with CRM system on receiver side.?
    Thanks,
    Gujjeti

  • Access current system or target system ID in message mapping

    Hi.
    I have a requirement to map three different constant values to Sales Org field, depending on whether the system is D, Q or Prod.
    This needs to be done in the message mapping section of the Interface along with all the other mapping logic.
    Is there any way how we can access the current system ID or the Target system ID (XI is communicating with target, in this case, ECC, using RFC receiver Communication channel)?
    Please help.
    Thanks.
    Anuradha.

    Hi,
    The key element would be :-
    System.getProperty("SAPSYSTEMNAME");
    Use this in UDF to get System Name ... and then on basis of systemname do whatever you want to perform.
    Regards
    Prabhat Sharma

  • How to implement validations in message mapping?

    Hi experts,
    I have a simple requirement:
    I have a simple synchronous scenario:
    SOAP -> XI -> RFC
    In a message mapping, one of the fields in the source message is of type String.
    However, the target application (RFC) does not expect a non-numeric characters in this string.
    My question is how can I perform the validation in XI and tell the sender that this field contains Non-numeric characters?
    Please help.
    Thanks.
    Ron

    > Ron,
    >
    > >>With a RunTime Exception thrown, how can I tell
    >  the sender an error has occured?
    >
    > Sure. You can do this with out a BPM. You need to
    > configure alerts for this. If you configure ALERTS
    > and SCOTT, this will send an email of the errors
    > occuring in your scenario.
    >
    > For configuring and trouble shooting alerts check
    > these
    >
    > https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/
    > 2327
    > https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/
    > 2328
    >
    > Regards,
    > Jai Shankar
    Hi Jai
    I already have alerts configured.
    But what I had in mind is to send a response to the sender (The sender is waiting for a reply since this is synchronous), instead of telling the sender through an alternative means such as email, sms, etc.
    Is this possible?

Maybe you are looking for

  • Excise duty manual entry - standard conditions

    Hi All i want enter  excise duty manually for Ex  JEXC- IN Manual Excise(% basis), simillerly i need standard conditions for per qty basis or even fixed value basis becose  i want update registers(if i am taking  credit). if i am not getting any cred

  • Hai.. i want to know, why my debit card have be deducted?

    Hai.. i want to know, why payment with my debit card have be deducted?

  • 0 Communication IDOCS

    Dear XI experts, I have setup a distribution model with the message type MATMAS and setup the partner profile to send IDOC from SAP to XI. I get this message below Model view SCBIT40 has not been updated Reason: the following ALE connection already e

  • Can't turn off vibrate

    I replaced my 16GB 3G yesterday. The new one vibrates when I get a text or email, even though vibrate is off. How do I turn this off?

  • HT3777 What if I do not have my 10.6.8 installation disk?

    I'm looking to install window 7 using boot camp.  I have no idea where to find the iOS 10.6.8 install disk is.  How do I proceed and what do I do?