Message mapping from 0..1 to 1 (IDoc to JDBC)

Hi,
My Scenario is IDoc to JDBC. I have a field in IDoc which is optional, this optional filed is mapped to a mandatory field in JDBC.
If the optional filed in IDoc doesn't exist, then mapping between Optional field and mandatory field is not happening and hence the mandatory field is becoming null which is throwing error in JDBC.
Can any one guide me in how to map these fields and even if optional field in IDoc doesn't exits, a constant 'false' should be filled in mandatory field.

Hi
Use mapwithdefault standard function. so even if your optional field does not occur then a blank value will still be pased to your target field.
Also you can check if your optional field exitst, if it does not then pass a blank constant else pass your value.
You can use any of the above 2
FIELDNAME->MAPWITHDEFAULT->TARGET
Hope this solves your issue
THanks
Saiyog

Similar Messages

  • Problem by transporting the message mapping from PI 7.0 to PI 7.1

    Hi Everyone,
    by transporting the message mapping from PI 7.0 to PI 7.1 i have got the following problem.
    "Source code has syntax error:
    K:\usr\sap\E71\DVEBMGS00\j2ee\cluster\serve......
    package udfpool does not exist
    import udfpool.*;
    i have used a UDF in my message mapping.
    This UDF calls for a method of a java class, which is imported as a .jar file with this message mapping.
    this message mapping works very well on PI 7.0,
    but doesn't work any more on PI 7.1 because of the problem described above.
    anyone can help me out of this problem?
    thanks!
    zc

    hi,
    but did you import the jar archive to 7.1 first?
    Regards,
    Michal Krawczyk
    http://mypigenie.com XI/PI FAQ

  • Re-use message mapping from within java mapping?

    Hi there,                                                                               
    I have a question regarding java mapping. What I would like to do is to re-use an existing message mapping from within java mapping.
    Technicaly, message mapping is perfomed by com.sap.aii.mappingtool.tf3.AMappingProgram.execute, right? I would like to call that mapping program for a specifc message mapping from within my java mapping.
    Pseudo java code would look like this:
    public void execute(InputStream in, OutputStream out)
      throws StreamTransformationException {
    com.sap.aii.mappingtool.tf3.AMappingProgram.execute(in,out,'SomeMessageMapping');
    SomeMessageMapping is a message mapping that is defined in the integration repository.
    Is it possible? If so, could you provide me with some details?
    Thank you and best regards,
    Wolfgang

    Hi Wolfgang,
    very interesting idea?
    I would activa a dummy message mapping. than I would have a look in the file directory of the java-stack and try to find out the name of the *.class or *.jar file.
    On the other hand you could generate a tpz-transport-file an unpack this file, to explore the name of the *.class or *.jar
    Unfortunately I do not have access to the file system. So I can't explore the name.
    Regards Mario

  • MESSAGE MAPPING FROM SQL TO RFC(BAPI)

    Hello Guys,
    Im just new here in SAP XI version 7.0 . Can anyone teach me how to map objects using IR (design) between sender (data coming from sql 2005) and receiver (using Bapi_Salesorder_Createfromdat2)?
    there are only specific fields i need to transfer the data like the followings :
    do i need to map all fields from sender to receiver?tell me how..
    *ORDER_HEADER_IN
    -DOC_TYPE = ZTRV
    -SALES_ORG =4000
    -DISTR_CHAN =40
    -DIVISION=41
    -SALES_OFF=4101
    -SALES_GRP=411
    -PURCH_NO_C='TEST TPL1' (MUST BE UNIQUE)
    -PMNTTRMS =Z015
    -PURCH_DATE=09/04/2008
    *ORDER_PARTNERS
    -PARTN_ROLE= AG
    -PARTN_NUMB=1100074
    Thanks in advance
    aVaDuDz

    Hi,
    Create :
    1. Source & Target Data Types
    2. Messge Type (for source & target data types)
    3. Two Message Interface for using above message types
    4. One Message mapping using source & target message Type
    5. One Interface mapping.
    In message mapping just map those field which you require. You can leave rest of the fileds un mapped at source which are not required to map.
    Regards,
    Sarvesh

  • 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

  • How to "get" message mapping from XI scenario

    Hi guys!
    Is there a way, how to export message mapping description in some way from PI? In XI 3.0 it was possible, but what about PI 7.0? Hope you understand me:)
    We need it to save this mm description as documentation.
    Thanx a lot!
    Olian

    Hey Oilan,
    with the message mapping open, hold ctrl + shift and right-click in the data-flow editor (the part of the screen where the function boxes and links go).
    a different menu will pop-up. just follow "export tools, export" or something like that. It is pretty straightforward.
    It will save the mapping in a .mte (or something like that) extension file. It is nothing but an XML. Good thing is that you can also import this .mte file in another message mapping (of course, with same source and target messages, or it won't be able to reference the links).
    Regards,
    Henrique.

  • Mapping from PEXR2002 iDoc to EDI 820

    We are planning to use XI to map from the payment advice (PEXR2002) iDoc to EDI 820. 
    We have 2 options: (1) Use XI and an EDI adapter (e.g. Seeburger); or (2) Use XI's own mapping functionality.
    If you have done iDoc to EDI mapping with either of the above 2 options, please briefly advise about your experiences and how much efforts it took to develop the mapping.
    Thank-you
    Bac Quan

    Hi Bac,
    Although it is possible to create an EDI message in an XI mapping (or XSLT), this is not very nice.  The use of an EDI adapter (iWay or SeeBurger) is strongly recommended.
    The other way around (rom EDI to XML) is hardly feasiable without an EDI adapter.  Although I haven't worked the SeeBurger adapter, it looks quite nice.
    Kind regards, Guy Crets

  • Message mapping challenge in IDOC to EDI scenario

    Dear PI message mapping experts,
    I'm a newbie in PI and facing a mapping problem using graphical message mapping.
    I'm in an IDOC (INVOIC.INVOICE02) to FILE (EDI) scenario.
    Here after is the mapping i need to perform :
    Source structure IDOC :
    <E1EDKA1> (0..99)
       <NAME1> A </NAME1>  (0..1)
       <NAME2> B </NAME2>  (0..1)
       <NAME3> C </NAME3>  (0..1)
       <NAME4> D </NAME4>  (0..1)
    </E1EDKA1>
    Target structure :
    <AccountingCustomerParty>  (1..1)
       <Party> (0..1)
          <PartyName> (0..unbounded)
              <Name>A</Name> (1..1)
          </PartyName>
          <PartyName>
              <Name>B</Name>
          </PartyName>
          <PartyName>
              <Name>C</Name>
          </PartyName>
          <PartyName>
              <Name>D</Name>
          </PartyName>
       </Party>
    </AccountingCustomerParty>
    I know i have to play with context and queues with stanard function or UDF but cannot succeed to do it.
    Could you please help me ?
    Thanks in advance,
    Alysee

    One approach out of available few ways to implement this:
    NAME1 - Exists - CreateIf - PartyName[0]
    NAME2 - Exists - CreateIf - PartyName[1] (Create deuplicate segment)
    NAME3 - Exists - CreateIf - PartyName[2] (Create deuplicate segment)
    NAME4 - Exists - CreateIf - PartyName[3] (Create deuplicate segment)
    Srikanth Srinivasan

  • Retrive message mapping error from java class

    Hi,
    I'm trying to create a scenario that if exist an error in the message mapping step this error will be inserted in a Ztable. I'm thinking in to call to the message mapping from a java class to catch the exception and this java class will be used in the interface mapping.
    Is it possible? If yes, How to call the message mapping from java code?
    Exists other possible solution?
    I need to do it because we want store all mapping errors in a Ztable. (Customer requeriment)
    Thanks, in advance
    Jose Manuel

    you can throw generic exceptions from the message mapping like this - /people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping
    you can then decide how to handle these exceptions

  • Activation error in message mapping

    Hi,
    while activating Message mapping i am getting the error like this.
    how to get rid of this error?
    error:
    Activation of the change list canceled Check result for Message Mapping MM_XXXXXX | http://www.xyerxd.com/mm
      Imported source message has invalid reference IDoc
    DEBMAS.DEBMAS06 | urn:sap-com:document:sap:idoc:messages  
    Imported target message has invalid reference Message Type MT_Receiver  | http://www.xyerxd.com/mm

    hi
    Hope you are using the inactive versions of message/Idoc types for mapping.
    First activate the message/Idoc types used in the message mapping.
    Then open the message mapping, from the menu choose refresh.
    Complete the mapping and test.
    Now do the activation.
    rgds,
    Arun

  • Message mapping changes

    Hi All.
    I created a message mapping from a custom message type towards MATMAS_BAPI01.
    I disabled the EDI_DC40 field and in the idoc communication channel I disabled "Apply control record values from payload".
    When I check the final idoc message created, I noticed that some EDI_DC40 parameters were wrong.
    <SAP:TABNAM>EDI_DC40</SAP:TABNAM>
      <SAP:MANDT>200</SAP:MANDT>
      <SAP:DOCREL>640</SAP:DOCREL>
      <SAP:DOCNUM>0000000000037246</SAP:DOCNUM>
      <SAP:DIRECT>2</SAP:DIRECT>
      <SAP:IDOCTYP>MATMAS_BAPI01</SAP:IDOCTYP>
      <SAP:CIMTYP />
      <SAP:MESTYP>MATMAS_BAPI</SAP:MESTYP>
      <SAP:MESCOD />
      <SAP:MESFCT />
      <SAP:SNDPOR>SAPCX1</SAP:SNDPOR>
      <SAP:SNDPRN>host01</SAP:SNDPRN>
      <SAP:SNDPRT>LS</SAP:SNDPRT>
      <SAP:SNDPFC />
      <SAP:RCVPOR>CFDCLNT200</SAP:RCVPOR>
      <SAP:RCVPRN>CFDCLNT200</SAP:RCVPRN>
      <SAP:RCVPRT>LS</SAP:RCVPRT>
      <SAP:RCVPFC />
      <SAP:TEST />
      <SAP:SERIAL />
      <SAP:EXPRSS />
      <SAP:STD />
      <SAP:STDVRS />
      <SAP:STATUS>03</SAP:STATUS>
      <SAP:OUTMOD />
      <SAP:SNDSAD />
      <SAP:SNDLAD />
      <SAP:RCVSAD />
      <SAP:RCVLAD />
      <SAP:STDMES />
      <SAP:REFINT />
      <SAP:REFGRP />
      <SAP:REFMES />
      <SAP:CREDAT>2005-09-12</SAP:CREDAT>
      <SAP:CRETIM>23:21:31</SAP:CRETIM>
       <SAP:ARCKEY>2FE85D8023D311DA9BDB000D56B9D8A6</SAP:ARCKEY>   </SAP:IDocOutbound>
    In concrete
    <SAP:SNDPRN>host01</SAP:SNDPRN> had to be changed into <SAP:SNDPRN>hostXX</SAP:SNDPRN>. I thought the value host01 came from the sld (logical system name of the technical system attached to the business system), so I changed that towards hostXX.
    <SAP:RCVPOR>CFDCLNT200</SAP:RCVPOR> had to be changed into <SAP:RCVPOR>SAPCDD</SAP:RCVPOR>. I thought this value came from the rfc destination in the xi sytem, so I created a new one called SAPCDD and configured it into the idoc adapter.
    However, this change in the sld/XI system  did not affect the generated idoc (no, I did not forget to activate ).
    I decided to do some more drastic changes:
      - enable EDI_DC40 field in the message mapping
      - enable "Apply control record values from payload" in the idoc communication channel
    I now hardcode the wanted values.
    After activating the changes, still the same idoc is send towards the R/3 system.
    Can anyone tell me what I am doing wrong.
    Is it a caching problem or am I doing something wrong.
    Kind regards

    hi Geert,
    take a look at my weblog:
    /people/michal.krawczyk2/blog/2005/09/01/xi-idoc-adapter--edidc40--demystified
    it may answer some of your questions:)
    Regards,
    michal

  • Error When Save Message Mapping

    Hi evreybody,
    I try to save my mapping. I did the test to check to know if everything is ok. The test is executed succesfully but when I try to save, I receive the following error message:
    Internal error: Unable to transfer changes for object Message Mapping MM_Order_Idoc | http://accenture.com/PI01/Idoc to change list "Standard Change List" (348cd3a0-f384-11dd-c70e-003005989c0a) since object still in change list "Standard Change List" (faa66160-f699-11dd-8a1b-003005989c0a)
    Thank you for your support,
    Mohamed.

    Release the lock by going to XI Admin page and check Integration repository and lock tab where you can see the objects locked ,release the lock and you can do the needed.
    Rajesh

  • Message mapping challenge for a newbie

    Dear PI message mapping experts,
    I'm a newbie in PI and facing a mapping problem using graphical message mapping.
    I'm in an IDOC (INVOIC.INVOICE02) to FILE (EDI) scenario.
    Here after is the mapping i need to perform :
    Source structure IDOC :
    <E1EDKA1> (0..99)
       <NAME1> A </NAME1>  (0..1)
       <NAME2> B </NAME2>  (0..1)
       <NAME3> C </NAME3>  (0..1)
       <NAME4> D </NAME4>  (0..1)
    </E1EDKA1>
    Target structure :
    <AccountingCustomerParty>  (1..1)
       <Party> (0..1)
          <PartyName> (0..unbounded)
              <Name>A</Name> (1..1)
          </PartyName>
          <PartyName>
              <Name>B</Name>
          </PartyName>
          <PartyName>
              <Name>C</Name>
          </PartyName>
          <PartyName>
              <Name>D</Name>
          </PartyName>
       </Party>
    </AccountingCustomerParty>
    I know i have to play with context and queues with stanard function or UDF but cannot succeed to do it.
    Could you please help me ?
    Thanks in advance,
    Alysee

    Hi,
    Please try as below:
    1. Create a source structure
    <AccountingCustomerParty>  (1..1)
       <Party> (0..1)
           <PartyName> (0..unbounded)
                <Name>A</Name> (1..1)
           </PartyName>
       </Party>
    </AccountingCustomerParty>
    2. When in message mapping, duplicate the node 'PartyName' 4 times. Right click on the 'PartyName' Node and you would find Duplicate Subtree.
    3. Map 'Name1' field in the source to the first 'PartyName' node in the target. Similarly, map Name2, Name3 and Name4 fields to their respective 'PartyName' nodes.
    4. Map the 'Name1' field in the source structure to first 'Name' field in the first 'PartyName' Node. Similarly, follow the same process for Name2, Name3 and Name4 fields. By doing so, your requirement would be met.
    Thank  you.
    Regards,
    Subbu

  • Message mapping Query

    Hi,
    I have (xml)file to idoc scenario where the xml xsd has following structure.Its is PO posting
    batch
      header
         item
    now in batch i have a feild total po which i need to validate with the total number of po in the file and if the two are not matching then i need to send a error xml file back to same ftp server (insted of sending it to R3 for idoc posting), so my receiver will change based on this check.
    Can anyone let me know how to do this.

    Yes ,
    Certainly , You can do this without BPM.
    There may be few other ways also , i am explaining you one out of them .
    Message Mapping .  Create three message Mapping .
    i. ) File sender to IDOC Receiver
    ii.) file sender  to file receiver (with error information).
    iii.)file sender to receivers ( Message type :Receivers namespace : http://sap.com/xi/XI/System) : This one will be used to choose receiver dynamicaly.
    at target  Message type :Receivers  the element Service Populate with the value of buisness system based on your condition.
    like in your case : IDoc receiver Buisness system if counts matches, else File Receiver buisness system if count doesnt matches.
    Operation Mapping .  Create three Operation  Mapping .
    i. ) File sender OUTB to IDOC Receiver INB
    ii.) file sender OUTB  to file receiver (with error information) INB.
    iii.)file sender OUTB to ReceiverDetermination INB
    ( target service interface :ReceiverDetermination  namespace : http://sap.com/xi/XI/System) : This one will be used to choose receiver dynamicaly.
    Rest is same in ESR Side.
    Now let us come to Key points in ID.
    1. Receiver Determination.
    It would be extended : Here choose third Type Operation mapping : iii.)file sender OUTB to ReceiverDetermination INB
    this will deside, Receiver Dynamically.
    2. Interface Determination.
    now for each buisness system , create interface determination and choose appropriate operation mapping.
    Rest steps would be same ....
    Do ask if found any problem .
    Regards
    Dragon

  • Copy of Message Mapping between SW-Components: Function Module undefined

    Hi Gurus,
    we want to copy a Message Mapping from one Software Component to an other. We right click on it and say "copy to" and choose the Target Softwarecomponent and Namespace. When we say ok.. we got an error "Function Module Undefined (FUNCMODL_UNDEF)"
    Has anybody an idea what can be wrong?
    Big Thanks in Advance

    Hi Everybody. Thanks for your fast replies.
    I have played a bit with the PI System and ihave the following Situation
    SW-T (Target SWC)
    SW-A (Source A)
    SW-B  (Source B)
    SW-A Copy to SW-T without Dependencies --> Error Function Model Undefined
    SW-A Copy to SW-T with Dependecies --> It works correct
    SW-B Copy to SW-T without Dependencies --> It works correct.
    The Strange Thing is, if i Copy SW-A to SW-T without Dependencies i get the Error but a Message Mapping with the Correct Name is created, but it is empty. IT has no content. For me this looks like an Program Error?!??!

Maybe you are looking for

  • How can I delete or reset bookmark data in iCloud?

    How can I delete or re-set bookmark data in iCloud. I have sync'd with blank from safari, then re-loaded safari with new list. Sync to phone works fine. Now everytime I re-enable backup to iCloud 500 duplicates are made and all old folders restored.

  • For plant 1200, material type Hawa is not defined in Table T134W

    Hi Everyone. I am trying to post a goods issue but having an error log. For plant 1200, material type Hawa is not defined in Table T134W. I checked table T134W (se16) - and material Hawa is assigned to plant 1200. However I checked T-code OMS2 and Va

  • Getting an error 150:30 message on CS4 after migration from time capsule to new MacBook Pro

    Getting a constant error message... deleted the files stated in the forum and tried to run the LicenceRepair but nothing is happening... ran the .py file in teminal but still getting the error message... My MacBook is running OSX 10.9.3

  • WiFi syncing / Streaming Audio

    I will be getting a Touch soon, and want to get some things figured out beforehand. WiFi Syncing. I have a non-Apple (2Wire) 802.11g server for my laptops, also wired (ethernet) to my desktop (older iMac, 10.5.X). Desktop has no Airport card. If I wa

  • Cannot Select Paper Type in Photoshop 10

    New Imac, new HP C5280, new copy of Photoshop 10 for Mac. No paper type is offered in print options, (matte, glossy, etc) in Photoshop. Hooked up my older Epson RX620, exactly the same problem, but both work in Win XP ok in Photoshop CS3. Being bounc