Multiple records using switch in BPM

Hi,
Below is the input file i am having.
<?xml version="1.0" encoding="utf-8" ?>
-<ns2:MT_Receiver xmlns:ns2="File2RFC">
<Details>
<Availability>5000.000</Availability>
<Message />
</Details>
<Details>
<Availability>1000.000</Availability>
<Message />
</Details>
<Details>
<Availability>0</Availability>
<Message>Material Test not maintained in plant 1100</Message>
</Details>
</ns2:MT_Receiver>
I want to divide this input file into two parts based on one condition. If the Availability!=0, then it should display the available quantity. or else, it should get suppliers from the webservice.
For this reqiurement, i have used the switch case. but it is not working. It is considering only the last record, For eg, in this input file the last record is having Availabilty=0. So it should go to webservice and display the suppliers. But all the 3 records are going to the else branch and giving the supplier details.
Could you please tell how to resolve the issue.the Availability which is present should go to one branch and the remaining records should go to the else branch. Please help me in this regard.

Hi, Leelaratnam:
What Anand mentioned is to split the message based on your node of "Details":
Each "Details" node will generate new message which only have one <Availability> elements (u will need another message type)
Then you can pass to your webservice, avoid your problem that only last <Availability> passed to webserivce.
You will have a multi-mapping (1:n)
in you BPM, you will have transformation step, then a block (ForEach) to process your splitted message one by one.
Yes, this is one solution.
Check my previous response, you will just need one mapping program, one transformation step, you can also achieve your purpose. However, in your mapping program, you need to code a UDF to do a lookup.
Regards.
Liang

Similar Messages

  • Multiple records using switch case

    Hi...
         I am having input file like
      <?xml version="1.0" encoding="utf-8" ?>
    - <ns1:mt_out xmlns:ns1="http://Block">
    - <Material>
      <Item>0</Item>
      <ItemName />
      <ReqQty>0</ReqQty>
      <AvailQty>0</AvailQty>
      <Cost>0</Cost>
      <suppid />
      <suppname />
      <leadtime>0</leadtime>
      <matname>Y-351</matname>
      <plantloc>2222</plantloc>
      <date>2008-09-30T00:00:00</date>
      <orderqty />
      <warehouseloc />
      <unit>KG</unit>
      </Material>
    - <Material>
      <Item />
      <ItemName />
      <ReqQty>0</ReqQty>
      <AvailQty>0</AvailQty>
      <Cost>0</Cost>
      <suppid />
      <suppname />
      <leadtime>0</leadtime>
      <matname>Y-355</matname>
      <plantloc>1111</plantloc>
      <date>2008-09-30T00:00:00</date>
      <orderqty />
      <warehouseloc />
      <unit>KG</unit>
      </Material>
    - <Material>
      <Item />
      <ItemName />
      <ReqQty>0</ReqQty>
      <AvailQty>1000.000</AvailQty>
      <Cost>0</Cost>
      <suppid />
      <suppname />
      <leadtime>0</leadtime>
      <matname>Y-352</matname>
      <plantloc>1100</plantloc>
      <date>2008-09-30T00:00:00</date>
      <orderqty />
      <warehouseloc />
      <unit>KG</unit>
      </Material>
      </ns1:mt_out>
      In this input file it is having multiple records. Based on the AvailQty, the input file should go to the webservice. If the condition AvailQty is !=0, the the input file should go to the java webservice or else it should go to the .net webservice. In BPM i have used switch step for this. if i give the input file structure like above it is going to the java webservice only. It is not entering to the esle part.
    Could you please help me out in this issue.
    Thanks & Regards,
    Leela

    Hi,
    Having had a look at these blogs:
    Illustration of Multi-Mapping and Message Split using BPM in SAP Exchange Infrastructure
    How to Split Message through BPM in 1:n scenario
    Transformation Step to Implement 1:n Splitting
    I think the best solution for your scenario is the following:
    In your BPM use a TransformationStep that does the multimapping N:1
    And then send the messages individually. You don`t need a Switch Step.
    You should have two Receiver determination.
    1.- File_server --> Integration Process.
    2.- Integration Process --> WebService.
    In the second RD, add two receiver Services (e.g. JAVA_WebService and NET_WebService) and
    use routing roules that checks if AvailQty is !=0. And depending on this condition,
    the message should be sent either JAVA_WebService or NET_WebService.
    Hope this helps you.
    Carlos

  • BPM with multiple records using switch

    Hi..
          I have done a scenario like,
    Receive--Transformation1Send1Transformation2-Block(ForEach)-Send3(synchronous)-Container-----EndBlock-Transformation3--Send4.
    In Send 4 i am having multiple responses.
    Now i need to check if the Availability field is !=0, it should go to the Java webserice or else it should go to .net webservice and calculate the cost. Finally i need to get the all records as output. Both material which is present and not present. Switch case is not working.
    Could you please help me out in this.
    I was raising this question from past 1 week.

    Hi,
    If switch case is not working then you can also go ahead with specifying the necessary condition in Receiver Determination.
    Regards,
    Abhishek.

  • File to RFC with multiple records using BPM Scenario Error...!!!

    Hello Guru's,
      I have done the File to RFC with multiple records using BPM scenario as per the Materiel available in the sdn.sap. This involves BAPI (BAPI_MATERIEL_AVAILABILITY). I have done exactly the same what is their in the materiel. SXI_CACHE is also giving return value " 0 ". File is getting deleted from the source directory, but no file in target directory. SXMB_MONI is also showing no error (black Flag). BPM is also error free. Checked the interfaces also.
    Can any one tell me what mistake would i have done.
    Thanks in advance.

    Hi,
    There is one similar discussion I found,
    FTP TO RFC using BPM
    Thanks
    Swarup

  • How to get multiple records using fn-bea:execute-sql()

    Hi,
    I created Proxy service(ALSB3.0) to get records from DB table. I have used Xquery function(fn-bea:execute-sql()). Using simple SQL query I got single record, but my table having multiple records. Please suggest how to get multiple records using fn-bea:execute-sql() and how to assign them in ALSB variable.
    Regards,
    Nagaraju
    Edited by: user10373980 on Sep 29, 2008 6:11 AM

    Hi,
    Am facing the same issue stated above that I couldnt get all the records in the table that am querying in the Proxyservice.
    For example:
    fn-bea:execute-sql('EsbDataSource', 'student', 'select Name from StudentList' ) is the query that am using to fetch the records from the table called StudentList which contains more than one records like
    Id Name
    01 XXX
    02 YYY
    03 ZZZ
    I tried to assign the result of the above query in a variable and while trying to log the variable, I can see the below
    <student>
    <Name>XXX</Name>
    </student>
    I want to have all the records from my table in xml format but it's not coming up. I get the value only from the first row of my table.
    Please suggest.
    regards,
    Venkat

  • How to Delete Multiple Records using selectbox in jsf

    Hi!
    My Senario is I want to delete multiple records using checkbox. After selecting multiple records when i click the delete button the selected
    rows shuld be deleted.if am doing like this but the edit ,delete for each row functionality is not working.
    <h:selectBooleanCheckbox id ="bcb" value="#{item.empno}">
    </h:selectBooleanCheckbox>
    But other functionality is not wokring.
    Can any one plz tell how to select the multiple records and how to send the id to the serverside.
    I want code code for jsp and as well as backingBean how to accaess .
    Any Reply shuld be apreciated

    You may find this article useful as well: http://balusc.blogspot.com/2006/06/using-datatables.html
    Check the chapter "Select multiple rows" for two generic ways to select multiple rows in a datatable.

  • Need to update multiple records using store procedure

    Hi i am trying to update multiple records using store procedure but failed to achieve pls help me with this
    for example my source is
    emp_name sal
    abhi 2000
    arti 1500
    priya 1700
    i want to increase salary of emp whose salary is less than 2000 it means rest two salary should get update..using stored procedure only
    i have tried following code
    create or replace procedure upt_sal(p_sal out emp.sal%type, p_cursor out sys_refcursor)
    is
    begin
    open p_cursor for
    select sal into p_sal from emp;
    if sal<2000 then
    update emp set sal= sal+200;
    end i;f
    end;
    and i have called the procedure using following codes
    set serveroutput on
    declare
    p_sal emp.sal%type;
    v_cursor sys_refcursor;
    begin
    upt_sal(p_sal,v_cursor);
    fetch v_cursor into p_sal;
    dbms_output.put_line(p_sal);
    end;
    the program is executing but i should get o/p like this after updating
    1700
    1900
    but i am getting first row only
    2000
    and record is not upsating...please help me with this
    thanks

    Hi Alberto,
    thanx for your valuable suggestion. but still i have doubt. the code which i have mentioned above might be simple but what if i have big requirement where i need update the data by using loops and conditional statement.
    and i have similar kind of requirement where i need to deal with procedure which returns more than one row
    my source is
    empno ename salary
    111,abhi,300
    112,arti,200
    111,naveen,600
    here i need to write a store procedure which accepts the empno (111) as input para and display ename and salary
    here i have written store procedure like this
    create or replace procedure show_emp_det(p_empno in emp.empno%type, p_ename out emp.ename%type,p_salary out emp.salary%type, p_cursor out sys_refcursor)
    is
    begin
    open p_cursor for
    select ename,salary into p_ename,p_salary from emp where empno=p_empno;
    end;
    and i have called this by using
    declare
    p_salary emp.salary%type;
    p_ename emp.ename%type
    v_cursor sys_refcursor;
    begin
    show_emp_det(111,p_ename,p_salary,v_cursor);
    fetch v_cursor into p_ename,p_salary;
    dbms_output.put_line(p_ename);
    dbms_output.put_line(p_salary);
    end;
    here i should get
    abhi,300
    naveen,600
    but i am getting first row only
    abhi,300
    but i want to fetch both rows...pls help me to find the solution

  • Getting Error while trying to enter multiple records using PA70

    Hi all,
    While trying to enter multiple records for a custom infotype using transaction PA70,
    the system asked to provide details of the custom infotype in T588Q and T588r tables after giving the details i'm able to enter into the custom infotype screen but the Personnel number is defaultly taken as
    zero and im not able to change the value and if i click save after entering the other details it is throwing an error telling that Infotype doesnt exist.
    Please Help..
    Thanks & Regards,
    Kumar Madduru

    Hi,
    Let us know the detailed error text. Probably you haven't included the infotype to maintain in Fast Entry or doesn't have the authorization.
    Good Luck
    Om

  • Insert Multiple records using Database adapter with Stored procedure func

    Hi All,
    I want to insert multiple records on a database using a stored procedure. I wanted to insert those records using a Database Adapter and the Database adapter should be invoked by a Mediator.
    Can somebody suggest me with ideas whether it can be acheived with OOB capabtilities in SOA suite or not?
    Thanks for your help in advance.
    Thanks,
    Shiv

    The use case you want to achieve is feature supported by the DBAdapter and it is possible to invoke the same from mediator.
    Please have a look at the oracle documentation and you should be able to get the necessary information.
    The below links should help you as well:
    http://download.oracle.com/docs/cd/E15523_01/integration.1111/e10231/adptr_db.htm
    http://blogs.oracle.com/ajaysharma/2011/03/using_file_adapter_database_adapter_and_mediator_component_in_soa_11g.html
    There are some video tutorials as well :)
    http://www.youtube.com/watch?v=dFldS-fDx70 This should also help
    Thanks,
    Patrick

  • Update Multiple records using NW CE WebDyn Pro 7.2 interface ITEMDETAILS

    We are trying to use SAP Netweaver CE 7.2 and NetWeaver Design Studio 7.2 with the Web Dynpro application interfaces configured to connect to our MDM 7.1 SP06 repositories to develop web screens that allow our end users the ability to maintain MDM repository data without the use of DataManager.
         Our first application was to be a simple one to show the business the benefit of SAP Netweaver. Itu2019s very easy to use the interfaces for SEARCH, RESULTSET, ITEMDETAILS, MATCH and MERGE if you plan to maintain one record at a time. We would like to update many records at the same time.
    Using the configuration described previously, I find that I am able to select multiple records at one time using the RESULTSET interface and the Context folder of u201CSelectedRecordsu201D but I am not able to pass multiple records at one time to the context u201CIODatau201D used by the ITEMDETAILS interface and allow my end users to see and update multiple records at one time.
    If I can pass multiple records from RESULTSET to ITEMDETAILS for display and update would you please provide me with an example of how I would do this in NetWeaver Design Studio for NW CE 7.2..
    If I can NOT pass multiple records from RESULTSET to ITEMDETAILS for display and update, Would I then have to write my own wrapper application to read multiple records selected using the RESULTSET interface and the develop my own UPDATE view to display and update more than one record at a time. This would be time consuming since I would also have to write my own back out procedures and validation of update procedures that already happen within ITEMDETAILS.  Do you happen to have any CE application examples that show how this is done for a NW CE MDM repository that I can see? The current documentation u201CHow to Build Web Applications Using MDM Web Dynpro Components. pdfu201D falls short in the area of updating multiple records.
    Thank you in Advance

    Bugs aside, if it's VERY noisy, that might just be the out-of-sync problem (something I'm very familiar with now).
    Search the forum for "aggregate sync" and you should get some clues, if this is indeed the problem.
    Short of it is, you need to sync the two devices together. Easiest way seems to be to connect the two devices via S/PDIF and set Clock Source to S/PDIF for the "slave" device (set in Audio Midi).
    You can also just set the Clock Source as the "master" device in the drop down, bypassing the need for the S/PDIF cable altogether, but I haven't tried this myself.
    Macbook Pro CD / iMac C2D   Mac OS X (10.4.8)  

  • Update multiple records using checkbox

    Hi All,
    I have one requirement related to multiple record update using checkbox.
    HTML form has 6 columns and many rows.
    Now i want to update all 6 columns in the table for selected checkbox.
    Can any body give me some idea/code about this.
    Thanks in advance.
    Ravi

    I did not understand your idea.
    multiple columns can be updated as follows...
    update table set col1=value,col2=value,col3=value where conditions;
    We are using adodb driver in our environment. So I will explain concern to it. Store all the form new values in $var array and you can pass this $var to query execution.
    A vague idea
    $rs = $conn->Execute($update_sql,$var);     
    if ($rs===false) die('DB Error: '. $conn->ErrorMsg() );

  • Update Multiple Records Using ASPVBscript

    I am trying to display multiple records on a page with a
    checkbox for each record, the checked value = Y. Then select
    multiple checkboxes and update each record at one time. I am using
    MS SQL as my DB. Is there an extention or command that I can use to
    accomplish this. Can anyone help.
    Thanks

    You need to give distinct values to your checkboxes and value
    fields. This
    can be done inside the DW Repeat Region loop code as it
    generates the rows.
    You then set another loop for the update. It is quite
    straightforward
    really.
    Have a look at Julian's site, here:
    http://www.charon.co.uk/content.aspx?CategoryID=27&ArticleID=41
    Also, there are a couple of links at the bottom of the above
    page. They use
    slightly different approaches and are usefull too.
    "StarM3d" <[email protected]> wrote in
    message
    news:f470in$p4v$[email protected]..
    >I am trying to display multiple records on a page with a
    checkbox for each
    > record, the checked value = Y. Then select multiple
    checkboxes and
    > update
    > each record at one time. I am using MS SQL as my DB. Is
    there an
    > extention or
    > command that I can use to accomplish this. Can anyone
    help.
    >
    > Thanks
    >
    >

  • How to create multiple records using ADF

    Currently working on my first ADF BC and UIX project, and I basically want to create multiple records after a user makes a choice on the screen. I would like to know at what layer should this functionality be implemented?
    Would this be more at the Struts/Controller level, where I have a java class to perform the creation as part of a data action? I ask because, I am not sure if this is feasible at the ADF BC level (View objects and Entity Objects) via some sort of customization, and i am new to the different possibilies avail as part of the ADF framework
    Regards
    Anora
    (Jdeveloper 10.1.2.1 build 1913, Oracle DB 10.1.2)

    I'd put it into the application module. You then can call the method from the controller layer or from an other application module. This way you put it into the business logic, which helps if you ever decide to use a different client approach (like swing).

  • Deleting multiple records using ibatis framework

    The code i am using is
    String deleteArray[ ] = request.getParameterValues("sel");
    String selected= " " ;
    if(deleteArray ! = null){
    for(int i = 0; i < deleteArray.length ; i++){
    selected += deleteArray [ i ];
    if( i < deleteArray.length - 1){
    selected += "," ;
    I am using sqlMapClient of ibatis for connecting to database
    sqlMapClient.delete("deleteMultipleRecords",selected);
    In my xml file i use
    <delete id="deleteMultipleRecords" parameterClass="java.lang.String">
    delete from ADDRESS where id in (#value#)
    </delete>
    When i execute the above code , the delete query is not executing.Can anyone help me out.

    I dont think so u can delete multiple recods with a sing line of querey.
    Why dont u use a for loop in DAO file and call the query with a single value ....

  • Fetch multiple records using Native SQL

    Hello All,
    I am trying to fetch data from an external database which is an oracle sysrtem.
    I am currenty using cursor method to fetch the data.
    The "fetch next cursor1" only bring 1 record at a time. And it is taking more than 20 mins to bring 1 record, it seems the table i am fetching has more than 12 million records.
    Can someone please answer these 2 questions:
    1) If is have oracle commands to query their tables, can i use them directly between the EXEC SQL   and  ENDEXEC.
       When i put a semicolon its giving error. Oracle statements end with semicolon.
    2) There must be a way of fetching a set of records at one go from external system. Does anyone know the technique.
    I appreciate your help.

    Hi,
    Check if this is useful in your case.
    See here SDB_ADBC - the program
    I am using there:
    cl_sql_connection
    cl_sql_statement
    cl_sql_result_set
    cx_sql_exception
    Regards.

Maybe you are looking for

  • Vendor invoice Management (VIM)

    I am trying to learn VIM, can someone please explain briefly what is Vendor invoice managment (VIM) what are the Tcodes and the process flow. Thanks in advance.

  • The lease timeout between avaiability group and the Windows Server Failover Cluster has expired

    Hi, I am having some issues where I get a lease timeout from time to time.  I have a Windows 2012 Failover Cluster with 2 nodes and 2 SQL 2012 Always-on Availability Groups.  Both nodes are a physical machines and each node is the primary for an AG. 

  • Importing Flash buttons into Flash

    I've created a nice button as a movie clip in Flash 10 CS4 Actionscript 3 so that the button changes with mouse_over and it all works fine, both with Test Movie and separately playing the swf file. The problem is I want to use this button in a variet

  • Replace each 0 and 1 in an array with n number of 0s and 1s

    Hi , could you please help me with this. Lets say I have this array 01001 and I want to replace each 1 and 0 with 2  ( might be 10000)  number of0s and 1s. so the result is 0011000011 Could you please help me to implement this in LV . As mentioend I

  • ITunes cuts out

    Hi... I just had to replace my base station and 2 airport expresses (along with ethernet card, modem, etc.) due to a lightening strike. I got my airport base station up and running as well as one airport express. When playing ITunes (I have it stream