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

Similar Messages

  • 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

  • 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

  • Data lookup in R/3 database from message mapping

    Hi,
    I am trying to lookup R/3 database from Message mapping.
    Instead of creating Java class outside XI and then importing into Integration Repository, I have defined an advanced function in message mapping and trying to connect to R/3 using JCo API. But System is giving syntax errors as listed below:
    Check Result for Object CustomerDetailsMap Source code has syntax error:
    F:/usr/sap/C03/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapc1513850c14511d985d5001143eb68b9/source/com/sap/xi/tf/_CustomerDetailsMap_.java:58: illegal character: 160 Â Â Â Â Â Â Â Â // Change the logon information to your own system/user
    F:/usr/sap/C03/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapc1513850c14511d985d5001143eb68b9/source/com/sap/xi/tf/_CustomerDetailsMap_.java:60: illegal character: 160             "DEV18" ,    // userid
    Can somebody help in rectifying the problem?
    Thanks and Regards,
    Nitin.

    Hi,
    can u post the java code which u have used in mapping.
    There is a doc in XI-Articles. "How to Perform SAP Data Lookups Within XI Mappings" By Jerome Delune 16 October, 2003. Try looking at this article and do ur mapping.
    Hope this helps you.
    Cheers,
    Siva Maranani.

  • Calling graphical mapping from XSLT mapping Prog

    hi guys;
    can anyone tell me that weather we can call graphical mapping  from XSLT mapping prog.If this is possible then can anyone guide me through the steps

    Mudit
    Can you go through the links which might be useful to you:
    Use of XSLT mapping?
    Re: Java Mapping  and Graphical Mapping
    ---Mohan

  • JCO from Message Mapping in XI

    I'm trying to create a function in XI Message Mapping that saves some information in a XI DB table using JCO.
    I've created DB table ZEDI with Fields A,B,C,D. My function is following:
    imports:java.lang.String;java.io.ByteArrayInputStream;java.io.InputStream;com.sap.mw.jco.*;
    public String WriteTable(String ISA,String GS,Container container){
    //write your code here
    String DBTABLE = "ZEDI";
    String sapClient = "200";
    String hostName = "10.1.10.81";
    String systemNumber = "00";
    String userName = "DBuser";
    String password = "DBpass";
    String language = "EN";
    int i     = 0;
    JCO.Repository mRepository;
    JCO.Client mConnection = JCO.createClient(
                   sapClient,
                   userName,
                   password,
                   language,
                   hostName,
                   systemNumber );
    // connect to SAP
    mConnection.connect();
    // create repository
    mRepository = new JCO.Repository( "GenericLookup", mConnection );
    // create function template to select data from any table
    JCO.Function function = null;
    IFunctionTemplate ft = mRepository.getFunctionTemplate("ZEDI");
    function = ft.getFunction();
    //JCO.ParameterList lookupFieldPos  = function.getImportParameterList();
    JCO.Table FieldPos = function.getTableParameterList().getTable("ZEDI");
    // Pass function parameters
    FieldPos.setValue(ISA,"A");
    FieldPos.setValue(GS,"B");
    mConnection.execute(function );
    mConnection.disconnect();
    return ISA;
    Message Mapping test returns Exception:[java.lang.NullPointerException].
    Do you have any idea what do I need to change to make it working?
    Thanks!
    Naycho

    Hi Naycho
    You have created a SAP table, but you have to create ABAP Function Module (RFC) with import /export parameters to access tables via JCO.
    The null pointer exception is because - IFunctionTemplate ft = mRepository.getFunctionTemplate("ZEDI");
    is searching for a function not table name.
    hope this helps
    Regards
    Prahllad

  • Alert from Message Mapping Response

    Hi All,
    I am working on a scenario wherein I am using BAPI Request & Response Messages in my mapping. I am receiving a no. from Bapi Response if the request i successful. If the number returned from BAPI is null or '', then an alert has to be thrown and send an email to support, otherwise normal processing of message.
    My question is how can I raise an alert from BAPI return Variable Value without using BPM or JAVA UDF.

    Hi,
    Alert Configuration
    http://help.sap.com/saphelp_nw04/helpdata/en/80/942f3ffed33d67e10000000a114084/frameset.htm
    Alert Inbox
    http://help.sap.com/saphelp_nw04/helpdata/en/80/942f3ffed33d67e10000000a114084/frameset.htm
    Alert Notification Step-by-Step
    http://help.sap.com/saphelp_nw04/helpdata/en/49/cbfb40f17af66fe10000000a1550b0/frameset.htm
    Defining Alert Classifications
    http://help.sap.com/saphelp_nw04/helpdata/en/49/cbfb40f17af66fe10000000a1550b0/frameset.htm
    Triggering Alerts
    http://help.sap.com/saphelp_nw04/helpdata/en/49/cbfb40f17af66fe10000000a1550b0/frameset.htm
    Setting up alerts
    Setting up alerts in RZ20
    Alert Management
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e04141e8-0f11-2a10-adaa-9d97b062c2df
    Alert Notification
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/90f449a8-a6db-2910-a386-d2b5999f5751
    Regards,
    Phani

  • Error while extracting values from SOAP Body using XPath (Retrieve from Message filter)

    Hi,
    I am using 'Retrieve from Message' filter to extract element value from the following SOAP response envelope:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:math="http://example.com/math.xsd">
    <soapenv:Header/>
    <soapenv:Body>
    <math:DivideResponse>
    <iResult>10</iResult>
    </math:DivideResponse>
    </soapenv:Body>
    </soapenv:Envelope>
    I am using the XPath expression - /soapenv:Envelope/soapenv:Body/math:AddResponse/iResult
    soapenv = http://example.com/math.xsd
    math = http://schemas.xmlsoap.org/soap/envelope/
    ERROR
    4/19/15, 19:29:03.016
    Empty attribute retrieved from message via XPath
    ERROR
    4/19/15, 19:29:03.016
    The message [Id-59643455b76a00000000000045edd6a6] logged Failure at 04.19.2015 19:29:03,015 with log description: Failed to extract attributes via XPath
    ERROR
    4/19/15, 19:29:03.017
    Retrieve math result from SOAP response
    Could you please help me resolve it?
    Thanks,
    Aneesh.

    Hi Aneesh,
    XPath Expression: /soapenv:Envelope/soapenv:Body/math:DivideResponse/iResult
    You are using AddResponse in your XPath there is no element named like that.
    Cheers,
    Stefan

  • How to use node functions in Message mapping !!

    Hi  Gurus,
    I have got one issue in message mapping, please can any one put some ideas on this !!
    Source Structure
    <Group_ZA>  0..unbound
         <D02_ZA>           0.. unbound
             ZA_01             0..1   - QA
             ZA_02             0..1      20
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1     QD
             ZA_02             0..1     40
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1    QN
             ZA_02             0..1     12
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1    QP
             ZA_02             0..1    60
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
          iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
         <D02_ZA>          
             ZA_01             0..1     QA
             ZA_02             0..1      20
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1     QD
             ZA_02             0..1     40
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1    QN
             ZA_02             0..1     12
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1    QP
             ZA_02             0..1    60
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
    iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
    <D02_ZA>          
             ZA_01             0..1    QN
             ZA_02             0..1     12
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1    QP
             ZA_02             0..1    60
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
    iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
    <D02_ZA>          
             ZA_01             0..1     QA
             ZA_02             0..1      20
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1     QD
             ZA_02             0..1     40
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1    QN
             ZA_02             0..1     12
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1    QP
             ZA_02             0..1    60
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
    </Group_ZA>
    Target Structure
    ProductActivityNotification                                                       0..unbound
                          ProductActivity                                                             1..1
                                        Item                                                                 1..unbound
                                              Inventory                                                   0..1
                                                     UnrestrictedUseQuantity                    0..1
    The Group_ZA comes 'n' number of times and D02_ZA comes sometimes 5 times and sometimes 6 times etc.,
    ZA_01 field can come with 5 to 6 different values like 'QA','QD','QN' etc., sometimes ZA_01 comes only 3 times QA,QD,QN.
    if ZA_01 = 'QA' then only  we need to pass   ZA_02 value on to ''UnrestictedUseQuantity'' (target side),
    I mapped the fields, the vlaue ZA_02  passing properly on to 'UnrestictedUseQuantity' when D02_ZA comes 5 or 6 times, all the times 'QA'  value comes into ZA_01 field. In case if QA value missed or doesn't come from source, the Target side ' 'UnrestictedUseQuantity' field last value comes into last but one.
    Ex: QA value is in 3 times, but I have 4 source message on top. values comes into target side like
    20
    20
    20
    suppose to come like
    20
    20
    -- (Space)
    20
    Please required your valuable inputs in bit urget !!
    how to map field level please?
    Many Thanks in Advance
    Kind Regards
    San

    Petre:
    If you want to use standard functions then you try this:
    If-->currentdate -OR- Constant(01.02)
    currentdate -OR- Constant(02.02)   --> OR -->
    currentdate -OR- Constant(03.02)
    Then give some output
    Else give some output
    So give the output for the first two conditions to another OR and the result of the third to the same OR. So whenever the condition is true in any of the condition you will get the THEN value else you will get the ELSE value.
    ---Satish

  • XSLT using Java function from graphical mapping (RFClookup)

    Hi,
    I was wondering if it is possible to use the standard Java functions of the graphical mapping (RFCLookup, Datetrans, ...) or from my own UDF inside an xslt mapping. Does anyone have every tried this or is an example available ?
    Regards Bernd

    Hi Bernd,
    here you can find an example how to use RFC lookup from an XSLT Mapping:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14?quicklink=index&overridelayout=true
    Is this what you're looking for?
    Regards,
    Gábor

  • Error when testing from Message mapping test tab

    Hi Experts,
    I am wondering that when i test the message in the MM test tab its giving error and target message is not generating. I am not testing end to end then why it is triggering communication channel?
    I can see that the 'RFC_Alert_Service_RFC_Receive' communication channel is in Red color RWB--> communication channel monitoring. I even even refreshed the cache and also activated the RFC channel but no use.
    Below are the error details:
    Error when testing message from test tab of mapping -->
    java.lang.RuntimeException: Exception during processing the payload.Problem when calling an adapter by using communication channel RFC_Alert_Service_RFC_Receiver (Party: , Service: RFC_Alert_Service, XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: RfcAdapter: receiver channel has static errors: can not instantiate RfcPool caused by: com.sap.aii.af.rfc.RfcAdapterException: error initializing
    Error in Communication channel monitoring -->
    Receiver channel 'RFC_Alert_Service_RFC_Receiver' for party '', service 'RFC_Alert_Service'
    Error can not instantiate RfcPool caused by:
    com.sap.aii.af.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.af.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (103) RFC_ERROR_LOGON_FAILURE: Password logon no longer possible - too many failed attempts.
    Please help me how can i resolve this issue to successfully test the message in mapping-test tab.
    Regards,
    Suresh.

    > Error in Communication channel monitoring -->
    > Receiver channel 'RFC_Alert_Service_RFC_Receiver' for party '', service 'RFC_Alert_Service'
    > Error can not instantiate RfcPool caused by:
    > com.sap.aii.af.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.af.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (103) RFC_ERROR_LOGON_FAILURE: Password logon no longer possible - too many failed attempts.
    Unlock the user you are using in the RFC channel and provide the correct password in the channel configuration. Once the channel error is resolved you would be able to test the Mapping sucessfully...
    >>why it is triggering communication channel?
    You would be using RFC lookup in the mapping....
    ~SaNv...
    Edited by: Santhosh Kumar V on Jul 8, 2009 5:48 PM

  • Badi without export parameter for messages

    Hi Guru's
    I am using a HR related badi for one validation. As per my requirement, In BADI "HRECM00_CONSISTENCY" i need to perform validations.
    If some mismatch in the condition, then i will pass error message and warning messages.
    But in BADI there is no export parameter to give the error message to Portal.
    This messages should be displayed in HR MSS tab in compensation tool managed. I have one parameter in Import with  "TYPE REF"(message handler). I am not sure whether that field will help or not.
    Please clarify this.
    If it is not could you please suggest any alternate way to populate the message to portal.
    Thanks & Regards,
    Ganesh R K

    Hello Ganesh,
    try to call this FM to Added Messages.
    call function 'HR_ECM_ADD_MESSAGE'
          exporting
            message_handler = message_handler
            msgty           = 'E'
            msgid           = 'messageid'
            msgno           = 'Message No'
            msgv1           = 'Prabhu' .
    regards
    Prabhu

  • Using useOneAsMany function in Message Mapping if subtree is optional

    Hi,
    I am trying to develop a message mapping for the following case:
    In the source message, there is a value "Value1" which is on the same level as a subtree "Struct2" which can occur 0..unbound times
    In the target message the value "Value1" has to be part of that subtree, so it has to be copied for each occurence of "Struct2" in the source message
    For the case that the subtree has cardinality 1..n there are some examples on the web, e.g. useOneAsMany (SAP-Bibliothek - Partner Connectivity Kit). But that does not fit my case. The subtree in the source message is optional here.
    See a screenshot of the message mapping and my solution for the mapping of "Value1" below:
    All other values are mapped 1:1.
    Sadly, this solution does not work when "Struct2" has cardinality 0..unbound, for 1..unbound it works perfectly. Here is my example:
    When I try the mapping, I get the following error message:
    That is true. The first queue of the useOneAsMany function has more values than the second. But I don't know how I can fix it, so that it works for my example. Can anyone give me a hint please?
    Setup is AEX 7.31.

    Hi Stefan,
    You can use this mapping.
    And for Struct2-Value1
    Result:
    Hope this helps,
    Mark

Maybe you are looking for