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

Similar Messages

  • Accessing container variables from ccBPM in Message Mapping?

    Hello Friends,
    I have created a ccBPM and require to send response messages to the sending system at different points as the message proceeds from one state to another. I do not want to create multiple message mapping stating different status in every message mapping. The message mapping remains the same only the status is changing. So I am thinking if I can access container elements in ccBPM at message mapping then I should be able to use only one message mapping.  Is it possible at all?
    Let me know if you have other solutions. Let me know if I am not clear?
    Thanks & Regards,
    Anand Patil

    Hi Abhishek,
    Your suggestion to use Parameterized Mapping did solve my issue. I was looking something like this. Thanks.
    Now I have only one Message Mapping and it is used in multiple places. Thanks a lot
    Best regards,
    Anand Patil

  • How to Access a BPM container variable in XI graphical  message mapping

    Hello XI BPM and Mapping experts,
    is it possible to access a BPM container variable from an graphical mapping?
    If yes, how ?
    We need this for the following scenario:
    IDOC to BPM.
    BPM  transforms and sends transformed IDOC to fileadapter
    If both steps are successful  a STATUS.SYSTAT01 IDOC should be send back to SAP-ISU with status 06.
    If one of these steps fails  the status in the SYSTAT01 should be set to 05. (Exception branch of block)
    We want to avoid to write 2 mapping programs for mapping the SYSTAT01.
    Instead we would like to use a BPM Container Variable which contains the status.
    In the mapping for the SYSTAT01 we want to use this Container Variable.
    Is this possible?
    Thanks for soon answers.
    Regards Marlies

    Hi Marlies,
       Is not possible to acces a BPM container variable from graphical mapping. For other hand, you can to use runtime variables for this purpose.
       You could create an abstract interface with a message type having a single node with the required value and using this message in other mapping.
    Best regards
    Ivá

  • CPU time of BPM or message mapping?

    Hi all,
    is there a way to find out how much CPU time is spent by a certain BPM instance (or message mapping instance)?
    It would be sufficient to get that value per BPM type / message mapping type.
    So far, I've found the following sources, which all won't work, unfortunately:
    - table SWWWIHEAD: No CPU time information (as far as I see)
    - transaction STAD: I don't see a way to connect an entry to the resp. BPM. There is a Transaction-ID, but I can't find it in the BPM...
    - transaction ST03N: Only aggregated values for user WF_BATCH, not detailed statistics
    - several places, which only show clock time, but not CPU time
    Thanks in advance!
    Kind regards,
    Dennis

    Hi Michal,
    Thanks a lot for your info.
    Too bad that there is no other possibility yet.
    I'm not completely sure whether the result is worth the effort, though, as there will probably be a lot of different BPM types on this system, so benchmarking each is quite some work (and requires an otherwise idle test system during this time).
    In addition, it could be difficult to generate test data that will most likely represent the expected data during production use. Especially for BPMs with many conditional tasks (branches, loops, ...), this can be a mess...
    But I will propose it anyway. If it gets accepted, I'll post the gained experience with this approach here. Maybe it works better than my pessimistic expection.
    Hopefully, SAP will integrate this functionality somewhen. I guess I set up some customer feedback.
    Kind regards,
    Dennis

  • Reg:Container variables in BPM

    Hi...
        I have done one scenario with BPM.
    In that i have  used the below steps.
    1. Fork with  2 receive steps.
    2. and two container steps for the 2 recieve steps ( vara= "I" for the first recieve step, and varb= "S" for the second receive step)
    3.wait -- for 1 min
    4. switch (if  vara ="I" and varb="S", then branch 1 should execute, if vara="I",then branch 2should execute else we need to cancel the process)
    the above steps i have used and executed the scenario. It is working fine. BUt i am having problem with the containers.
    I am not able to satisfy the condition for [if  vara="I" and varb="S",]
    The switch is not going to check the above conditon because whenever the file is recieved the container variable will get updated and wait for 1 min and will go for  switch contion. So here i can check only for single condition at a time.
    Can you please help me how to check the both the container variables at an time..?
    Regards,
    Leela

    Can you please help me how to check the both the container variables at an time..?
    So when the Switch Step is executed are both the variables filled with the required values (I am not able to understand your query clearly)....if both the variables are filled then in the condition editor you can define the condition based on both the values (use And...it will be Insert Expression ...for executing Branch 1)
    It will be something like var1 = I And var2 = S .....while selcting the left operand select the appropriate message.
    If you are on 7.1 then create two condition variables representing var1 and var2.
    Similarly when defing condition for Branch2 it will be only var1 to be used.
    Regards,
    Abhishek.

  • How to use the variables used in the message mapping

    Hi ,
    In the message mapping we can declare variables in the JAVA section , these variables could be used across the mapping .
    I have tried using it but I am unable to retrieve the values assigned to the variables in one UDF into the another UDF .
    Please guide me how to use the variables declared in the JAVA section in the message mapping .
    Thanks
    Anita Yadav

    Anita,
    I have worked on the Global variables and i found no issues. Make sure that the variable is declared in the Declaration Section and then initlaized in the Initialization section.
    If you declare a variable in the Declaration Section ,
    int i;
    then in any udf you can use if directly. No need to re declare  the variable in the UDF. If you do this, then it becomes a local variable.
    Regards,
    Bhavesh

  • Can we set a default value for the container variable in BPM?

    Can we set a default value for the container variable.?
    Suppose if i have a loop step and i have given a container variable i=5 as end condition.What value will it take during its first execution?Can we set the value for container before a recieve step?

    Hi
    Define Container Variable of Type integer and Category Simple Type .Use Condtion in Loop.
    In Container Operation Step Assign value and Use Expression to
    Increase or Decrease Valus according to your operation.
    look Pattern 4 in this blog to understand Container Operation
    /people/sharathchandra.girmaji/blog/2008/09/11/bpm-with-patterns-explained-part-1

  • What is a container variable in BPM (Exchange Infrastructure)?

    In BPM scenario with Exchange Infrastructure, I have come across container variable. What is this container variable? How it is used in BPM?
    In another instance I read that to trigger a alert in BPM I have to create a container variable. So I have another question, What steps I have to follow to create a container variable and trigger alert?

    Hi,
    To create alerts in XI , check this blog,
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    ALso, if you are on SP14 and above, check this note 913858.
    The container variables that are accepted while createing Alerts in XI are available on this link,
    http://help.sap.com/saphelp_nw04/helpdata/en/d0/d4b54020c6792ae10000000a155106/content.htm
    Regards,
    Bhavesh

  • 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

  • Cannot use Toolbar in message mapping function

    In my SAP XI, tool bar is disable even in edit mode. See example in <a href="http://tubeimage.com/viewer.php?file=le1mkpxecuxuwlzxjzol-SAP-XI-.png">http://tubeimage.com/viewer.php?file=le1mkpxecuxuwlzxjzol-SAP-XI-.png</a>  ( in red box )
    How to make it enable? Any help would be grateful.
    Best regards

    Hii Pavin !!
    Revert back your client system JAVA version. It happens due to latest Java version...R u using java 1.4.2 version check ur java version form IR>Help>information
    if its not java 1.4.2 then installl that from sun website.
    Cheers !!

  • Checking Multiline Container Value in BPM

    Hi ,
    We have scenario where we need to check the container value in BPM.
    Could you please anybody let me know how we check the conditions for a conatiner.
    Madhu

    Hi Madhusudhan,
    You can use the following threads and see if it helps:
    Accessing container variable of BPM in Message Mapping function
    Copy value of container (abstract interface) to an other container
    Container object in Message Mapping
    Specially check out the Michal's blog mentioned in the last thread. It might be useful.
    PS : Please reward points if useful.
    Thanks and Regards,
    Sanjeev.

  • Accessing Element's name in Message mapping

    Hi,
       I need to Access the Element's name in Message mapping (Using graphical tool or in user defined function).
    For Example:
    Element: <Company_Name>XYZ Co </Company_Name>
    I need to access the Element's name(i.e.)<b>"Company_Name"</b>. So that I can map it as
    <Element>Company_Name</Element>
    <Element_Value>XYZ Co </Element_Value>
    in the target message.
    Kindly provide your inputs.

    Hi Santhosh,
    I am not sure if this can be done using your Graphical Mapping, but this is possible using JAVA mapping. Your SAX and DOM parsers for JAVA mapping provides methods like getChildNodes, getElementName using which you can get the name of the element.
    Check this link for the methods available for Java Mapping,
    http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/package-summary.html
    I think the same can also be done using XSL mapping. Though, I am not sure what method should be used for the same.
    Hope this helps,
    Regards,
    Bhavesh

  • Container Variable in Alert Cat

    Hi,
    I have a FTP To FTP scenario, where I have to handle alerts if any error occurs in PI. For Example FTP Password is changed in the Target system and not updated in the Receiver Channel. Obviously the Adapter throws an error saying the Password is wrong.
    My motto is to send an alert mail to External ID with the details of the Error occurred in the XI and the name of the file for which this error occurred.
    As the Container Variable are limited in the Alert Category, how can I catch the file name for which the error occurred.
    Could some throw light on it.
    Thanks
    Azias

    You can use this link to see How to raise Alerts with variables from the messages payload XI:
    /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    USE THE FOLLOWING UDF TO GET THE VALUE OF THE SOURCE FILENAME AND STORE THE VALUE OF THIS SOURCE FILENAME IN AN EXPORT PARAMETER NAMED "exportParam" declared under the Signature tab of message mapping:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    GlobalContainer gc = container.getGlobalContainer();
    OutputParameters params= gc.getOutputParameters();
    if(params.exists("exportParam") == true)
              params.setString("exportParam", ourSourceFileName);
    return ourSourceFileName;
    Then use the value of this export parameter exportParam to raise an alert in BPM control step where you can easily use the value of this parameter in the short or long text of alert.
    For this, you need to create a container variable in BPM of category SimpleType and Type as xsd:string  with some name say "param".
    Then in the alert text, you can make use of this parameter as &param& to get its value in alert short or long  text.
    Thanks
    Biswajit
    Edited by: 007biswa on Feb 12, 2011 11:07 AM

  • Manipulate Dates in XI Message Mapping

    Hello all,
    I have a problem in which I need to take a  date from my source file and manipulate this date to help produce my target structure.
    <i><b>This is not my actual XML</b></i>
    <source root>
      <field 1>A</field 1>
      <field 2>Any value</field 2>
      <field 3>Next value</field 3>
      <field 4>20070201</field4>
    </source root>
    Consider the above XML as my source.  I would like to have logic in the message mapping that will check the value of a field (field 1) and based on it's value add or subtract days from the date value provided.
    This would be my output for adding ten (10) days if '<b>field 1</b>' has a value of '<b>A</b>'
    <target root>
      <target 1>A</target 1>
      <target 2>Any Value</target 2>
      <target 3>Next Value</target 3>
      <target 4>20070211</target 4>
    </target root>
    This would be my output for subtracting five (5) days if '<b>field 1</b>' has a value of '<b>B</b>' (Same source file)
    <target root>
      <target 1>B</target 1>
      <target 2>Any Value</target 2>
      <target 3>Next Value</target 3>
      <target 4>20070127</target 4>
    </target root>
    As you can see there is a field in my source system that will tell me what type of logic to perform.  The problem that I am having now is that the message mapping functions that currently exist are not helping me satisfy this requirement.  I have viewed several forums and tried several of the suggestions given but nothing seems to help.  Does anyone know how to solve this problem?  Is there a UDF that anyone has used that would help me in solving this requirement?  The solution should be dynamic to account for leap years as well as for the different days that each month has.
    Answers received will be rewarded with points.
    Thanks in advance for the help that you provide.

    Hi,
    Here i am sending UDF code,which takes date(format:yyyyMMdd) as input and does addition or subtraction operations based on <field 1> value,return the result date(format:yyyyMMdd) as string value.
    public String GenerateDate(String date_input, String field1,Container container){
    //Here "date_input" and "field1" are inputs for this UDF
    int date = Integer.parseInt(date_input);
    Calendar cal;
    int day = date % 100;
    int month = (date/100) % 100 - 1;
    int year = date / 10000;
    cal = Calendar.getInstance();
    cal.set(year, month, day);
    /implement addition or subtraction logic here as your needs/
    if (field1 == "A")          
      cal.add(Calendar.DATE, 10);
    else if(field == "B")
      cal.add(Calendar.DATE, -5);
    day = cal.get(Calendar.DATE);
    month = cal.get(Calendar.MONTH)+ 1;
    year = cal.get(Calendar.YEAR);
    date = year * 10000 + month * 100 + day;
    return (""+date);
    if you need any other details regarding this UDF, plz let me know.
    Cheers,
    Jag

  • Message Mapping Design Question

    I have to parse from a source field (x) and map to this structure:
    <Line>
      <Number\>
      <Descr\>
      <Code\>
    </Line>
    The source field is a string that contains newline characters (just a blob of text).  Example:
    ABC\nLine 1,widget, 123A\nXYZ\nLine 2,gadget,123B
    I need to get at the line number, description, and code mapping values by parsing at newlines and then parse into the "Line" records.  I want my result to look like this:
    <Line>
      <Number>1</Number>
      <Descr>widget</Descr>
      <Code>123A</Code>
    </Line>
    <Line>
      <Number>2</Number>
      <Descr>gadget</Descr>
      <Code>123B</Code>
    </Line>
    Is there a way to chain message mapping functions and/or UDFs and do something like this?  In addition, I don't see how I can specify multiple target fields in one mapping.  Any suggestions would be appreciated.  Thanks!

    Raj,
    Unfortunately, the source structure is not well structured.  It contains lines of data, of which some begin with "Line", and then a line number and other fields separated by commas.  It also contains unused lines.
    Production example of source data (with breaks at each newline character):
    APPROVED
    Tracking Reference: 20070629063604.1
    Process Date: 06-29-2007 07:38:59
    Listed below are the following items listed for review:
    Contract: ABC Delivery Order Number: HTCH
    Items reviewed:
    Line 1, 10 EA, 000000000099784711, S01-004, 20070629063604.1_1
    Line 2, 10 EA, 000000000088078625, 03356.63.04, 20070629063604.1_2
    ..where "1" maps to <Number>, "S01-004" maps to <Descr> and "20070629063604.1_1" maps to <Code>.

Maybe you are looking for

  • How do i redeem itunes gift card online using linux

    I have bought my daughter a gift card but there appears to be no way to redeem this for her without installing itunes.  Next problem is that I would never install such software even if it worked in linux.  So where can I redeem it online for her usin

  • How to show customers and vendors in balance sheet

    hi guru, i want to show my customer and vendor balances individually under head debtors and creditors in the balance sheet. that in balance sheet report when i click on debtors or creditors it should be expand and system should show the individually

  • Last physical inventory report

    Is there a report that we can run by plant to show materials and the date of their last physical inventory count?  Thanks in advance for your help.

  • Database error number 17003 has occured

    we are using oracle 9.2.0.1.0 database . on top of that we are usinm maximo 5.1 application . but when we try to do insert or select action we will get this error. database error number 17003 has occure.please contact your system administrator for ad

  • How do you share code across projects?

    I'm a newbie to Java and am wondering how best to do this: I've created a Java class that implements javax.faces.validator.Validator to do email address validation. It needs to be shared with other projects so they, too, can validate emails. Should t