Export parameter REALLY work in message mapping???????

I wrote a java version transformation and it worked good with export parameter.
However I can not work it out in graphical message mapping. I refered http://help.sap.com/saphelp_nwpi71/helpdata/en/43/c3e1fa6c31599ee10000000a1553f6/frameset.htm.
In PI7.1, I add an export parameter "EXPORT_PARA" in the "Signature" tab. Are there any special step to assign this parameter to an UDF? I did not find a way to do it.
And then I define an UDF,
    public String SetExportPara(String sss, Container container) throws StreamTransformationException{
     String str = "GOOD";
     GlobalContainer gc = container.getGlobalContainer();
     OutputParameters paras= gc.getOutputParameters();
if(paras.exists("EXPORT_PARA ") == true) {
     paras.setString("EXPORT_PARA ", str);
}else {
  str = "NOT FOUND EXPORT_PARA";
return str;
And I assign this UDF to one element of my output XML, I tried to run it in IE, it always output "NOT FOUND EXPORT_PARA.
why?????
I searched the forum, no answer found.

I hope you are referring to Parameterized mapping concept of SAP PI7.1
To have this in Message Mapping you dont need any UDF/ JAVA code!
Just follow this blog and you should be done: /people/jin.shin/blog/2008/02/14/sap-pi-71-mapping-enhancements-series-parameterized-message-mappings
Regards,
Abhishek

Similar Messages

  • UDF works in Message Mapping but not in Interface Mapping

    Hello,
    I have encountered a very strange problem. I use a simple UDF in a message mappings which imports a class that has been imported as "imported archive".
    This works perfectly fine when testing the message mapping itself.
    However when I execute the message mapping within a interface mapping I get a Java Error indicating that resources are missing (com.sap.aii.ib.core.mapping.ResourceNotFoundException) This error refers to a missing class.
    How can this be? Message mapping works but not when using it in a interface mapping.
    Do you have any idea?

    Hello,
    this is what I have already tried, with the same result. But now I have come to a conclusion. It is a little bit tricky, but maybe also helpful for others:
    A method of a class (part of the imported archived) itself calls a class which throws an exception. This exception however is handled by the method itself and does not affect the overall outcome.
    In the message mapping itself you do not see the error message, only in the interface mapping. Result however is the same.
    Maybe the trace level is set different for mesage and interface mapping.....

  • Export Parameters in Parameterized Message Mapping does not work.

    Hello, XI-Gurus!
    I have a question: how to use an EXPORT parameter in Parameterized Message Mapping? seems it does not work...
    (I use XI / PI 7.1)
    For example, I have a follow scenario: a large message comes to XI from one BS (message contains a lot of rows), then this large message splits to some small messages (something about 1000 rows in one small message), and send small messaeg one by one from XI to second BS. So, after receive step I use a transformation step with Parameterized Message Mapping to get a total amount of rows in large message (it needs for making condition for loop in IP, for example). I want to use an EXPORT parameter to pass this number from Parameterized Message Mapping to Integration Process. How can I do it?
    Of course, I know the way to how to make this scenario without any parameterizing, but I want to use exactly "Parameterized Message Mapping" like it writes in this help:
    http://help.sap.com/saphelp_nwpi71/helpdata/en/43/c3e1fa6c31599ee10000000a1553f6/frameset.htm
    This topic contains something about procedure how to use an EXPORT parameter, but this procedure does not work. I don't understand how to write this UserDefined Function, which I can set any export parameters.
    I read this blog:
    /people/jin.shin/blog/2008/02/14/sap-pi-71-mapping-enhancements-series-parameterized-message-mappings
    this blog has NO solutions about EXPORT parameters. about IMPORT parameters - everything OK.
    Some topics about how to use export parameters in MM in this forum marked as "answered", but this is not true.
    How to export parameters from Message Mapping
    Export parameter REALLY work in message mapping???????
    Export parameter in Message mapping UDF
    WBR,
    Vsevolod

    Hi Rudolf,
    It still does not works.
    Great thanks for all your answers! If your advice works on your PI-server, it means that my problem not in UDF.
    Step by step:
    1) I create in "Signature" tab two parameters: FILE_NAME, FILE_TYPE (of course, they both Export and xsd:string type)
    2) Then, I goes to "Functions" tab and create new function "testUDF" with one argument var1.
    3) In body of this UDF insert 2 strings:
       getOutputParameters.setString("FILE_NAME" , "Order");
       getOutputParameters.setString("FILE_TYPE" , "PDF");
    4) in "Definition" tab I bind function "Local.testUDF" with one field in my input message and goes to "Test" tab for testing.
    5) And then I have a message window "Problems While Testing":
    Source text of object Message Mapping: mm_ParamMap | urn:****.*.:****:TEST has syntax errors:
    Function testUDF, Line 1:
    cannot find symbol
    symbol  : variable getOutputParameters
    location: class com.sap.xi.tf._mm_ParamMap_
    getOutputParameters.setString("FILE_NAME" , "Order");
    ^
    Function testUDF, Line 2:
    cannot find symbol
    symbol  : variable getOutputParameters
    location: class com.sap.xi.tf._mm_ParamMap_
    getOutputParameters.setString("FILE_TYPE" , "PDF");
    ^
    Note: /usr/sap/PID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapb1562570ca9e11deb3fe00237d301cd6/source/com/sap/xi/tf/_mm_ParamMap_.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details. Note: /usr/sap/PID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapb1562570ca9e11deb3fe00237d301cd6/source/com/sap/xi/tf/_mm_ParamMap_.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    2 errors
    Look at this notes, first writes that I use a deprecated API, second - about unchecked or unsafe operations.
    And I have no idea what's wrong... Can you help me?
    Thanks!
    WBR,
    Vsevolod

  • 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

  • Message mapping - need Enlightening

    Hi Guys,
    I was actually looking into the message mapping blog of sravya.Link below:
    [http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414800)ID0086183650DB11663053995735659636End?blog=/pub/wlg/2792]
    Was just reading the blog and a lot of questions came through my mind.In the end I figured out that first, I have to understand how the parsing works.
    So for example,If we have 2 message structures(source & target).At run time the dom or sax parser parses through the source xml document.
    If we do a source to target mapping
    as in the example
    Matgroup --> RemoveContext -->MatGroup.
    So my question is what does the parser do in the above example.
    Does it read the source xml,change the source XML AND start to build the target xml from scratch by adding nodes.
    How does the parsing work & internally what are the steps the parser do to create the target XML.
    [2]
    In her example,She mapps the item node to the header target node.
    what happends then or what does the parser do & what are the elements which will be coming under the target header node.
    What are the conditions for mapping 2 fields or nodes(Both should have same level & occurance - Is that so?)
    Iam confused.Please Enlighten me...:)
    Thanks
    P
    Edited by: pazzuzu on Oct 17, 2009 2:40 PM

    Hi ,
      Parsing is the mechanism to trasform the structure in to other format,Nomally PI uses Dom parsing mechanism to process.
      Suppose if you working one message mapping source is on XML Structure and you want to map this structure to the Taget structre,most of cases taget structre is not same as Source.
    You used some mapping function provided by SAP,every Graphical  standard function has some source java code inside it.
    the functions also uses parcing mechnism like reading doucmnet and changing structure.If youw ant to know more about parcers google it.
    every parcer has some predrefind methodsto read the documents child elemnts too..
    Regards,
    Raj

  • Get the mapping values from one message mapping into another message mappin

    Hi All,
    I created two graphical message mappings. In first message mapping i created one user defined function and set one global container parameter and I need to use this parameter in my second message mapping user defined function. But the global container parameters can be used in different user defined functions in same message mapping. So is there any way to use the values which are set in one message mapping into another message mapping. If yes, please help me how to get?

    Hi Koteswara rao,
      As you said global container parameters from first message mapping are not accessible from second message mapping program.
    i haven't faced situation like this.but, if you have some unmapped field in target message in first message mapping,you can put global variables data in that unmapped field.
    anyway the output of first message mapping would be input for 2nd messages mapping,so you can access global data(unmapped field filled with global data in 1st MM) from 2nd mapping program..
    Cheers,
    Jag

  • About message queue in message mapping?

    Hi SDNer,
    I have been read help.sap.com and sdn threads about message queue
    I hope this thread should be help for all like me.
    thank you
    Sha

    Hi Shankar,
           XI uses Queue's to store messages, If you worked on message mapping you can see the how queue look like,
    Every queue having context ,it separate the values,it store the messages in highrarchy manner.
    Using Context Handling we resoleve context issues.
    Using node functions we aceive Context Handling.
    Search in SDN there is some good blogs abt Node Functions, if you understand nodefunction you wil understand the Queue concepts.
    Regards,
    Raj

  • How to set EXPORT parameter from message mapping

    Again, ask the question of export parameter.
    I wrote a java version transformation and it worked good with export parameter.
    However I can not work it out in graphical message mapping. I refered http://help.sap.com/saphelp_nwpi71/helpdata/en/43/c3e1fa6c31599ee10000000a1553f6/frameset.htm.
    In PI7.1, I add an export parameter "EXPORT_PARA" in the "Signature" tab. Are there any special step to assign this parameter to an UDF? I did not find a way to do it.
    And then I define an UDF,
    public String SetExportPara(String sss, Container container) throws StreamTransformationException{
    String str = "GOOD";
    GlobalContainer gc = container.getGlobalContainer();
    OutputParameters paras= gc.getOutputParameters();
    if(paras.exists("EXPORT_PARA ") == true) {
    paras.setString("EXPORT_PARA ", str);
    }else {
    str = "NOT FOUND EXPORT_PARA";
    return str;
    And I assign this UDF to one element of my output XML, I tried to run it in IE, it always output "NOT FOUND EXPORT_PARA.
    why?????
    I know there is a blog : https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8654. [original link is broken] [original link is broken] [original link is broken]
    But it did not talk how to set export parameters.

    Hi,
    i read thread
    How to export parameters from Message Mapping
    and blog
    /people/jin.shin/blog/2008/02/14/sap-pi-71-mapping-enhancements-series-parameterized-message-mappings
    but not found issue
    in this topic
    http://help.sap.com/saphelp_nwpi71/helpdata/en/43/c3e1fa6c31599ee10000000a1553f6/frameset.htm.
    if i writting this code in UDF, i getting an error.
    If use this code:
    GlobalContainer gc = container.getGlobalContainer();
    OutputParameters paras= gc.getOutputParameters();
    paras.setString("EXPORT_PARA ", str);
    the export parameter is defined locally (in transformation step area). In integration process area parameter is equal to NULL.
    How send export parameter to Integration Process? For exapmple, i wanna send parameter to other transformation step in my integration process.
    thx.

  • Export parameter in Message mapping UDF

    Hi, I use PI7.1.
    I defined an Export parameter in Message mapping "Signature" tab.
    And as http://help.sap.com/saphelp_nwpi71/helpdata/en/43/c3e1fa6c31599ee10000000a1553f6/frameset.htm,
    I wrote in my UDF as follows:
    public String myudf(int var1) {
    String str="test";
    if(exists("MY_PARA") == true) {
    getOutputParameters.setString("MY_PARA", str);
      return str;
    However when I ran the test, it said there is "syntax error".
    I guess the reason is not found the method exitst() or getOutputParameters. Anybody can help? thanks

    Here is a valid sample for a Java Mapping program working with Parameterized Mappings - taken from help.sap.com::
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    import com.sap.aii.mapping.lookup.Channel;
    public class Parametrization_Java
       extends AbstractTransformation {
          public void transform(
             TransformationInput in,
             TransformationOutput out)
          throws StreamTransformationException {
             try {
    // Read Import Parameters
                String paramS =
                   in.getInputParameters().getString(u201CPARAM_Su201D);
                int paramI =
                   in.getInputParameters().getInt(u201CPARAM_Iu201D);
                Channel paramC =
                   in.getInputParameters().getChannel(u201CPARAM_Cu201D);
    // Use Parameters during Mapping
    // Set Export Parameters
                   out.getOutputParameters()
                      .setString(u201CPARAM_ESu201D, [String-Wert]);
                   out.getOutputParameters()
                      .setInt(u201CPARAM_EIu201D, [Integer-Wert]);
                   out.getOutputParameters()
                      .setValue(u201CPARAM_ECu201D, [java.lang.Object]);
             } catch (Exception e) {
                // Exception Handling
    Regards,
    Volker

  • Use exported parameter from message mapping (via UDF) in next mapping prog

    Is there any chance to assign an exported parameter from one message mapping to another mapping program within an operation mapping?

    Hi,
    Try using  dynamic configuration
    1. Set value in message mapping and
    2. Get value in java mapping
    Refer this link http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
    Regards
    Suraj

  • Exporting Graphical Message Mapping in PI 7.1

    Hi All,
    In XI3.0 there was an option to export graphical message mapping by using ctrl+shift on the data flow editor window. Can't find the same in PI7.1.
    Have SAP removed this feature with PI 71 or provided another way of doing it or simply my system is acting wierd?
    Regards,
    Rahul

    It worked when I did Ctrl+Shift and numerical 0 from horizontal numbers of my keyboard, some how doesn't work with numbers on right  side of the keyboard(Numlock was On)
    It is wierd.

  • Export parameter in elementary search help not working.

    I have created an elementary search help that will display all sold-tos for entered ship-to(s).  Everything works fine except that the sold-to that is selected from the hit list is not being entered into the customer field on the selection screen.
    eg transaction VD03, F4 on Customer, enter import parameters VKORG VTWEG SPART and KUNN2, hit list is displayed correctly and one line selected.  I expect that my export parameter KUNNR should now appear in the Customer field of VD03 but its not.
    This is my elementary search help definition:
    Elementary srch hlp  ZDEBIC                         Active
    Short description    Customers for Ship-to
      Selection method   Z_DEBIC            Dialog type
      Text table                            Hot key         2
    Search help exit    Z_SHIP_TO_SEARCH_HELP_EXIT
    Parameter  IMP  EXP  LPos  SPos  Data Element  Default Value
    SORT1                       1                  AD_SORT1                         
    SORT2                       2                  AD_SORT2                         
    MCOD1                      4                  MCDD1                         
    MCOD3                      5                  MCDD3                         
    PSTLZ                        6                  PSTLZ                         
    KTOKD                       7                  KTOKD                         
    VKORG     x       x       8        1        VKORG         VKO
    VTWEG     x       x       9        2        VTWEG        VTW
    SPART      x       x      10       3        SPART          SPA
    KUNN2      x               11       4        KUNN2          KUN
    KUNNR              x       3                  KUNNR                         
    I suspect the problem may be with default value KUN against KUNN2, but if I put it against KUNNR, I get a message "No values for this selection" instead of my hit list.
    Can anybody give me a clue as to the problem?
    Thanks,
    Brigitte

    I just found out - I had asked my fellow ABAPer to have a look at it and he just told me that he had changed the Parameter Assignment of the Collective Search Help from the proposed one of KUNN2 C KUNNR to KUNNR C KUNNR.  It seems that was necessary as well so I'm putting this in for future reference of anybody with the same problem.

  • How to export parameters from Message Mapping

    You can make use of this export parameter only in transformation step of Integration Process. You may use the following "Parameterized Mapping Programs"
    http://help.sap.com/saphelp_nwpi71/helpdata/en/27/db283fd0ca8443e10000000a114084/content.htm
    Regards,
    Prateek

    If you have defined the signature of your UDF then the return value of the UDF must be assigned to the Export paramter of message mapping.
    Basically import parametrs represents the inputs to be passed for that function(message mapping here)
    and export represents the output of that function.
    so in your case if you want toassign the value to Export parameter (ERROR_TEXT) in UDF catch block
    assign the error returned to the ERROR_TEXT field
    http://help.sap.com/saphelp_nwpi71/helpdata/en/43/c3e1fa6c31599ee10000000a1553f6/frameset.htm
    Check this link
    Hope this is clear
    Rajesh
    Edited by: Rajesh on Mar 13, 2009 5:31 PM

  • Error exporting XIM file from message mapping

    Hi.
    We are trying to export XIM files from message mapping with CTRL + SHIFT + 0 but is not working. Iu2019ve tried to solve it with this link:
    [http://support.microsoft.com/kb/967893]
    but is still not working.
    We are with SAP PI 7.11 SP 07. Is there any SP level prerequisite to be able to export message mappings in xim files?
    Thanks a lot.
    Edited by: Christian  Abad Chico on Feb 28, 2012 11:15 AM

    I think you can't use 1.4 in SAP PI 7.1.
    I've downlaned the JDK 5 and I've associated it to enviroment variables PATH and JAVA_PATH but the application is still opening with JAVA 6.....
    Any idea?
    Regards.
    Edited by: Christian  Abad Chico on Feb 28, 2012 1:18 PM
    Edited by: Christian  Abad Chico on Feb 28, 2012 1:19 PM

  • Message mapping tab works fine ,runtime exception

    Hi ,
    Need some advice... I get a runtime messge mapping error ( system error) failing the substring logic although when i download the same payload and run in test tab it works fine. Has anyone encountered similar issue ?
    Thank you.

    objects are active.Your second point is good ,but this error only happens when a load test is done , partciular messages throw runtime exception and fail in mapping on substring logic but when the same payload is downloaded and run via message mapping tabl it runs through. i will try disabling the substring logic nodes.
    Secondly when i get a runtime exception ,i try to restart the same message and it goes thorugh successfully. So restarting in moni helps.... but does not explain why....
    Thanks
    Edited by: xi project on May 18, 2010 12:28 AM

Maybe you are looking for

  • Problem while executing WAD report

    Hi, When i save an existing WAD report with a new name and execute it, am getting some kind of chinese language instead of the variable screen. Please let me know what might me the issue and how to resolve it. Thanks & Regards, Srinivas

  • Site created on Mac not loading correctly in Internet Explorer or Firefox

    I am having HUGE problems getting a site to view properly in IE or Firefox. It works just fine in Safari and I am using Dreamweaver on a MAC to create the site. Can anyone PLEASE help???

  • Hiding Java Console

    I've written a java application that communicates with an XML server via TCP/IP. The Java application acts as a communications proxy for a user interface written in C++ and running on a Windows client. I'd like to remove the user's ability to interfe

  • Satellite L - Small green dot on the screen

    I have just started up my new computer and on the start up loading screen (the black screen) there appears to be a small dot (possibly green) that is in the upper part of my screen and only noticable when the screen is black. Will this become more se

  • Remove all of one color, is this possible?

    I have a photo of an army battalion from 1980 and it has little orange spots in random places all over the photo. It looks like it got sprayed with orange soda. Is there a way to remove the orange without removing each one one at a time? Any suggesti