Using variable in many steps in KM

Hi
I want to use Java Beans variable (<@=var1@>) in Java Code (ODI Tools).
var1: file1|file2
The code in the script should be:
load file 1;
load file2;
statements:
<% String [] tab = new String(<@=var1@>).split("[|]") %>
<% for (int i=1; i < tab.length; i++) %>
don't work because the variable var1 is replaced after the script is generated and I need to loop depending on the content of the variable.
How can I achieve it?
Thanks for help
Marcin

Using <?=var1?> didn't help.
The problem is that var1 is filled from ODI Variable and this is replaced during the creation of the script
Marcin

Similar Messages

  • A running count of how many steps processed?

    Hi, I'm using labview to monitor where I'm at in my teststand sequence. I have several goto statements in TS, meaning that certain steps are executed several times. I'm already using the Step.Index to find out which step I'm on, however I need to keep track of how many times that step has been called(goto loops). Is there a count index that increments for each step processed, regardless of goto loops? I've tried, the Loop.Index however it does not keep track of the Goto loops. Thanks for any help.
    Joe

    Joe,
    Teststand does not expose a variable that keeps track of how many times a current step has been executed in a Goto Loop. However, it keeps track of how many steps have been executed so far. This information is store in the property RunState.NumStepsExecuted. If you now how many steps are included in your loop, and if you also know the number of steps executed so far, then you can calculate the current iteration of your goto loop.
    Hope this helps,
    Alejandro del Castillo
    Ni

  • Use of Receiver determination step in BPM

    Hi,
    I am not clear about the exact use of Receiver determination step in BPM. From my understanding, it is used for synchronous communication with many receivers configured, for eg. Multicast etc. Can anybody explain the use of receiver determination with any specific requirement example.
    Regards,
    Santosh

    HI,
    The usage of Receiver Determination depends on how you have designed your BPM. You can have the mapping getting executed in your BPM itself using a TRANSFORM step or you can do it in your Inteface Determination if you are not doing it in your BPM.
    If you do the mapping inside the BPM using Transformation step, then you need to send the Message i.e. Mapped message . In this case, your Interface determination will only determine the Receiver Interface, and it will not execute the interface mapping . (if you are not providing the Interface mapping in the Interface determination).
    Example is given here-
    http://help.sap.com/saphelp_nw2004s/helpdata/en/14/d5283fd0ca8443e10000000a114084/content.htm
    Thanks
    Swarup

  • Context Problem when using Use One As Many

    Hi SapGuru's.
    i have got a requirement in an IDOC To File Interface where the segments in the IDOC are like E1LFA1M->E1LFM1M->E1WYT3M
    THE Test data is like below
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:IDOC_Test_Mt xmlns:ns0="urn:sap.shoprite.co.za:ecc.md">
       <ZCREMAS>
          <IDOC>
             <E1LFA1M>
                <LIFNR>0000641065</LIFNR>
                <E1LFM1M>
                   <EKORG>1001</EKORG>
                   <E1WYT3M>
                      <PARVW>BA</PARVW>
                   </E1WYT3M>
                   <E1WYT3M>
                      <PARVW>LF</PARVW>
                   </E1WYT3M>
                   <E1WYT3M>
                      <PARVW>RS</PARVW>
                   </E1WYT3M>
                </E1LFM1M>
             </E1LFA1M>
             <E1LFA1M>
                <LIFNR>0000641065</LIFNR>
                <E1LFM1M>
                   <EKORG>1002</EKORG>
                   <E1WYT3M>
                      <PARVW>BA</PARVW>
                   </E1WYT3M>
                   <E1WYT3M>
                      <PARVW>RS</PARVW>
                   </E1WYT3M>
                </E1LFM1M>
             </E1LFA1M>
             <E1LFA1M>
                <LIFNR>0000641065</LIFNR>
                1002
             </E1LFA1M>
             <E1LFA1M>
                <LIFNR>0000641065</LIFNR>
                <E1LFM1M>
                   <EKORG>1004</EKORG>
                   <E1WYT3M>
                      <PARVW>BA</PARVW>
                   </E1WYT3M>
                   <E1WYT3M>
                      <PARVW>LF</PARVW>
                   </E1WYT3M>
                   <E1WYT3M>
                      <PARVW>RS</PARVW>
                   </E1WYT3M>
                </E1LFM1M>
                <E1LFM1M>
                   <EKORG>1005</EKORG>
                   <E1WYT3M>
                      <PARVW>BA</PARVW>
                   </E1WYT3M>
                   <E1WYT3M>
                      <PARVW>LF</PARVW>
                   </E1WYT3M>
                   <E1WYT3M>
                      <PARVW>RS</PARVW>
                   </E1WYT3M>
                </E1LFM1M>
             </E1LFA1M>
          </IDOC>
       </ZCREMAS>
    </ns0:IDOC_Test_Mt>
    the Target xsd is like below :
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="urn:sap.shoprite.co.za:demo.trans" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:sap.shoprite.co.za:demo.trans" xmlns:p1="urn:sap.shoprite.co.za:bluecube">
       <xsd:import namespace="urn:sap.shoprite.co.za:bluecube"/>
       <xsd:element name="Vendor_masterTest1" type="p1:Vendor_masterTest"/>
    </xsd:schema>
    the EKORG Field from source is mapping to Purchase Organisation(field) in target file .
    so here when i use one as many and iam mapping EKORG->MAP WITH DEFAULT ->USE ONE AS MANY and as in the above test data if there are multiple E1LFM1M's the first paramter of Use one as many is getting 2 ekorg's in only one context but here i want them to be created on separate context(please have a look at 4th E1LFA1M in the test data to get clear idea.
    can any of you help me in this.
    regards.
    Varma

    Hi,
    Try this.
    Source Code:
    IDOC
    --->E1LFA1M
                    -->E1LFM1M
                          --> EKORG = 1000
                          --> E1WYT3M
                          --> E1WYT3M
                    -->E1LFM1M
                    -->E1LFM1M
                          --> EKORG = 1001
                          --> E1WYT3M
                          --> E1WYT3M
                    -->E1LFM1M
                          --> EKORG = 1006
                          --> E1WYT3M
                          --> E1WYT3M
    Output:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:target xmlns:ns0="http://test">
    <Data>
       <M>1000</M>
    </Data>
    <Data>
       <M>1000</M>
    </Data>
    <Data>
       <M></M>
    </Data>
    <Data>
       <M>1001</M>
    </Data>
    <Data>
       <M>1001</M>
    </Data>
    <Data>
       <M>1006</M>
    </Data>
    <Data>
       <M>1006</M>
    </Data>
    </ns0:target>
    Use below Mapping:
    Use If then Else Function.
    1. If condition: E1WYT3M Exists
    2. Then pass E1WYT3M
    3. Else Pass E1LFM1M with "Map with Default"
    Lets Consider Output of this step as "A".
    Use One As Many.
    First Input: E1LFM1M to exists to Split By Each Value
    Second and Third Input will be Out Put of "A" (Above Step).
    Lets Consider Out put of this Step as "B"
    Use If without Else.
    If "B" is true then pass "A"  to exists.
    Out put  of this to Remove context to Target Vendor Master Node. In my sample it will be Node "Data"
    Now for Mapping of Field Purch Org/In my case field "M"
    Use If without Else.
    If "B" is true then Pass "C". Output of this to Split by each value to target.
    For C:
    Use if then else
    if E1WYT3M exists then pass EKORG else pass constant blank.
    Hope its clear!!
    -Gouri

  • Add 2 container variables in control step BPM

    Hi All,
    I have a scenario where I need to add 2 container variables in control step under AlertMessage and I am using under exception branch
    Control Step
    StepName: XXXX
    Action      : XXXX
    AlertCategory: XXXX
    AlertMessage: ?
    I am successful putting one container variable in alert message with &AAAA& but I want to add another variable values &BBBB& as well.
    When I tried to keep variables as &AAAA& and &BBBB&..I can return code 99 in sxi_cache.
    How can I achieve this with BPM..I am using sap pi 7.0

    may be i need to explain more clearly..
    I have 2 container variables with simple type which holds 2 different payload values.
    Under exception branch I have a control step to throw alert. In this I need to pass alert messages with these 2 varaibles.
    As I said earlier I am able to pass successfully one container variable value but when I insert the second variable it is not picking up and when I check sxi_cache the IP return was 99 which means some error occured while assiging these values.( I tried in different ways)
    But when I inserted has &AAAA& and &BBBB& then reuton code was 0 but whn I run scenario it is not populating both values
    Can anyone please help me how I can populate 2 variable values in alert message under control step.

  • Using Variable in place of property name in set_item_property procedure.

    Hello,
    I need to change the item properties dynamically by using variables for both properties names and their values.But during compilation its showing me error "Too many declrations".Kindly suggest me any best way.

    You already have the answer to that one in the posting above.
    Your table would presumable include rows HEIGHT, WIDTH etc.. as text columns
    So you'd cross reference as above.
    Alternatively you could find out what the numerical values are for HEIGHT (1509) and WIDTH (1508) are and store them in your master table alongside the description that your user will see. Then you can simply do the set_item_property.
    This relies heavily on Oracle not changing the values for these constants. Even if they did you would just have to change your table. Then your solution is generic and future proof.
    Built in for all properties: Not that I know of. But you could sort of use your table as above to help. Simply loop through the constants, do a get_item_property, and show that to the user.
    You'll have to be careful about maybe classifying the things in your table to ensure you don't try to get an inappropriate property for the type of item.
    With a little effort this will all definitely be possible.
    I saw a thread the other day where someone had created a form called "props.fmb" which showed the item properties in a tree style. See if you can find that. This was fairly hard coded compared to what you want, but it would be pretty good as a basis.

  • Using variables in shape's coordinates - urgent

    Hi,
    how can i draw using a variable to set the shapes coordinates ?
    i need to increment this variable to continue drawing in the panel
    at the last position.
    LIKE THIS:
    g.fillRect(490,210,300,100); ==> it works
    g.fillRect(x+100,y+100,150,150); ==> it doesn't
    x=x+100;
    y=y+100;
    when i scroll the panel and back to see the shape, it disappears.
    This happens because I am using variables in the coordinates of the shapes. Then, when the variable is incremented, the shapes lose its initial position.
    how can i do it ??? PLEASE HELP ME.
    THANKS.
    here is the code to execute. its very simple.
    import java.awt.*;
    import java.awt.event.*;
    public class SamS extends Frame
    public SamS()
    addWindowListener(new WindowAdapter()
    public void windowClosing(WindowEvent ev)
    dispose();
    System.exit(0);
    ScrollPane sp = new ScrollPane();
    Board pan = new Board();
    sp.add(pan);
    add(sp);
    setSize(700,500);
    setVisible(true);
    public class Board extends Panel
    int x=20;
    int y=20;
    public Board()
    super();
    setLayout(null);
    setSize(2400,2400);
    setBackground(Color.white);
    public void paint(Graphics g)
    g.setColor(Color.black);
    g.fillRect(10,10,100,100);
    g.setColor(Color.red);
    g.fillRect(410,410,100,200);
    g.setColor(Color.orange);
    g.fillRect(490,210,300,100);
    g.setColor(Color.blue);
    g.fillRect(x+100,y+100,150,150);
    x=x+100;
    y=y+100;
    public void update(Graphics g)
    paint(g);
    public static void main(String args[])
    new SamS();

    Your incremented values (x and y) are out of the visible area as the repaint method will be called many times while scrolling. Increment your x and y to lesser value (say 1 or 2).

  • Using variables: Statement must appear within on handler

    I would like to use variables in my flash app. The app is quite simple, has many buttons, and on each of those buttons I have a simple script: on-rollover and on-release. For both actions I use the same value, which I want to put in a variable. The following script results in an error message: Statement must appear within on handler. When I have to declare the variable inside the on-handler, I have to declare it twice, which makes it useless as I have to enter the value twice. How can I get this working?
    country = "uk"
    on (rollOver)
        gotoAndPlay(country)
    on (release)
        getURL("/"+country+"/", "_self");

    try:
    Select a frame on the timeline where your buttons live and then move the buttons handlers there:
    e.g.
    myButton1.onPress = onPressFunction
    myButton2.onPress = onPressFunction
    myButton3.onPress = onPressFunction
    etc.etc.
    myButton1.onRelease = onReleaseFunction
    myButton2.onRelease = onReleaseFunction
    myButton3.onRelease = onReleaseFunction
    etc.etc.
    country = "uk"
    function onPressFunction(){
         this.gotoAndPlay(country)
    function onReleaseFunction(){
        getURL("/"+country+"/", "_self");
    If you use this approach you MUST remove the scripts from buttons themselves.
    I hope this helps.

  • How to use variable in topology

    Hi every one..
    how to use variable in topology

    The normal way you use in interface or procedure. But the package you are executing should have the variable in 1st step with set or refresh mode.

  • GP with variable amount of steps

    Dear,
    What I'd like to have is a GP with a variable number of steps. How this is realised is of little importance, but what is most important is that we can (using the Webservice to start the GP) dynamically give for example 5 users, and then 5 steps will be ready in the GP.
    I know it's possible to 'skip' steps, so what I had in mind was creating a GP with a max of 20 steps, and then when calling the GP with 5 users, I'd 'allow' the first 5 steps, and 'disable' the other 15. Ending in a 21st, final step.
    Or I could give a parameter for the fifth step (when I give the user) and then a check that if parameter = x, it would go immediately to the last step.
    This is possible, right?
    Are there perchance any examples of something similar?
    Kind regards,
    Frederik-Jan.

    Configure ur BPM as payload dependent or message-dependent. In payload dependent, u will have to specify the no of messages. In message dependent, u ll have to specify the indicator in message indicating the end of messages.
    http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/content.htm
    Regards,
    Prateek

  • Maxl - can you use variables in iferror statements

    hi guys,
    A quick one:
    Can you use variables when doing error handling? I assume the answer is yes, but just wanted to make sure.
    example:
    set app1 = Test;
    set app1_db1 = Test;
    alter database $app1.$app1_db1 force archive to file "C:\\EssbaseBackup\\$app1\\$app1_db1\\$app1_db1.arc";
    iferror 'Bk_$app1.$app1_db1_Error';
    define label 'Bk_$app1.$app1_db1_Error';
    exit 10;
    I am putting error handling into my script and want to double check before I go about making the alterations.
    Many thanks,
    Russell
    Edited by: RussellH-C on 26-Apr-2013 04:45

    You don't need to split the files. Create a Maxl with parameters and then call it in a bat file.
    In the bat you can then check for Error.
    essmsh -D "%HYP_MONTH_SCRIPTS_DIR%\Maxl_Files\HYP_ESS_Archive.msh" %DECRYPTKEY% Appname1 Dbname1
    call :archiveerrcheck
    essmsh -D "%HYP_MONTH_SCRIPTS_DIR%\Maxl_Files\HYP_ESS_Archive.msh" %DECRYPTKEY% Appname2 Dbname2
    call :archiveerrcheck
    archiveerrcheck:
         SET FILE=%MAXLLOG_DIR%\Archive.log
         findstr /R "\<ERROR" %FILE% > ESSErrCheck
          for /F %%A in ("ESSErrCheck") do If %%~zA NEQ 0 (
            call :datestamp
            echo  Error in Archive Process......................... > %ESSLOG%
            copy %FILE% %HYP_MONTH_ERR_DIR%\Essbase\MaxL\Maxl_Error.log
            DEL /Q ESSErrCheck
            call :exit_process
           ) else (
                   echo  %DTSTMP%  Log Out Process was successfull......................... >> %ESSLOG%
                   call :remove_file ESSErrCheck
    GOTO EOF
    :EOFRegards
    Celvin
    http://www.orahyplabs.com

  • InfoSpoke data selection using variables in BW 3.5?

    Hi Gang!
    Can InfoSpokes select data using variables in BW 3.5?
    I would like create a "functional" delta process using an Full mode load and a variable to select "yesterday" from a date field. My ETL and external database partners would prefer to not deal with multiple before and after images from a single document item from a ODS. I was hoping I could use a variable selection against a date-time stamp, but I don't see how.
    AM I be forced to use a BADI?
    Thanks,
    John Hawk
    [email protected]

    One crude option would be to add an ABAP step prior to the infospoke execution, in this step code can be added to modify the corresponding record in table RSBSPOKESELSET (for selection values on date/time characteristics).

  • Where is loop status stored during runtime using "loop on selected steps"

    I am trying to write a custom report that allow a technician to loop on an arbitrary set of steps and receive the results in a csv file or equivalent (without having the techs trying to change parts of the sequence, since that would violate quality controls on manufacturing testers). 
    I was hoping to be able to read a variable in the poststepcallback that shows whether the step was tested using "loop on selected steps" and having a custom output for that case.  If anyone knows how I can detect looping I would appreciate the help.
    Thanks,
    Sean

    Hey s.cooper,
    This may be a bit more tricky than it seems.  Only because the reporting, as you are aware, is, or at least should be, taken care of by the process model.  Therefore you cannot use the default reporting because you have your own process model.  Since the default reporting is part of the Sequential, Batch or Parallel process models that ship with TS then you would have to use one of those process models to get the default reporting. 
    Concerning the looping-
    Will the ops and techs be selecting to loop on a particular set of steps interactively (i.e. Execute>>Loop on selected steps)?  If you used the default sequential model you'll notice that you can Loop on Selected Steps Using the SinglePass entry point.  This does use the process model to loop on the selected steps a certain number of times.  However, Execute>>Loop On Selected Steps...  does not use the process model and just loops on the selected steps.  If you did write your own process model then you can select your entry point to Allow Interactive Execution of Entry Point.  This option is in the entry point sequence properties.  Right click the entry point and select properties.  On the Model tab you will see that option. 
    OR
    Will the ops and techs have the option set forth by your process model to select which steps to loop on?  If so then how would you loop on those steps?  Have a GoTo step that loops back to the beginning?  Have something that sets each step to loop a fixed number of loops?  There is a Step.LoopType API property that returns the Looping property for a given step as a string.  NoLooping means that the step has no looping properties set for it.  This could be used somewhere in a condition to determine which type of reporting to do.
    Hope this helps you some,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Error-Receiver File Adapter using Variable substitution when file is empty

    XI Experts,
    We are on PI 7.0, SP14.
    We are using variable subtitution to get the filename from source message. This works fine as long as we have data in the payload for filename element. But we have a scenario where we don't have to create file when certain condition does not exists in source message so in the message payload filename element will not exists in such condition and file will be empty and we should not create file.
    Parameter in the communication channel for Handling empty message is "Ignore".
    Does anyone knows how to handle this scneario. We don't want to default any file name in the message mapping if source file name element does not exists.
    We are following getting error in the Adapter engine.
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: file: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: file
    Thanks
    MP

    You can implement this by writing the module to throw an exception or whatever method you want to execute.
    If you don't want to receive an error message then module is suitable for you.
    Gaurav Jain

  • I used to open many tabs in the same page and i move from one to other by mouse but since3 two days the tabs open in the same page normaly but i can't move from one to other when i clik with mouse on any tab it don't open/ do u have any solve for this?

    i used to open many tabs in the same page and i move from one to other by mouse but since3 two days the tabs open in the same page normaly but i can't move from one to other when i clik with mouse on any tab it don't open/ do u have any solve for this

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for

  • How can i change an existing JPanel from a JFrame after an event happens?

    Good day! i'm new in java programing and im trying to build a GUI for a for a small inventory system. here's a part of my code............ if(e.getSource()==invButton){                if(username.equals(storekeeper)){                     cont.add(new

  • Issue with SSRS Expression

    Hi all,  I am facing some issue with ssrs expression.  I used below expression to show sum of budget.  =Sum(  CDbl(Fields!Budget.Value)) When I preview the report it shows #Error in that textbox.  Please help me to fix this one , I am not getting whe

  • Print PO item text in different language

    Hi, We have a global vendor whose communication language is maintained as PL in vendor master while our logon language is EN.  The text therefore is maintained in PL language.  It seems the output program only picks the text in logon language (EN) an

  • Mapping Roles/Groups between OBIEE 11g and Oracle EBS R12

    Hi, We are implementing OBIEE 11g with Oracle EBS R12 as source system. Also we are using Out of the box RPD for Oracle EBS R12. But we are facing lot of challenges to map OBIEE 11g groups and EBS roles and responsibilities. We do not have prior expe

  • Step by Step Screen Saver using GPO

    Hi Guys, Can you please provide a step by step on how to deploy ScreenSaver using GPO to our Client users? Thanks in advance!!