Different receivers based on a condition

Hello experts,
I have a scenario File to IDOC . The file has the structure : Many transactions( codes starting from 111 to 999)and one Footer record. The footer record will have the total number of lines, and the total number of 111 codes .
The file has to be read by XI and if the total number of lines or the total number of 111 trasactions does not match with that of the numbers in the footer record, then an email has to be sent to a distribution list (external partners) saying that the bumner of lines or the number of 111 trnsactions do not match with that of the numbers mentioned in the footer record.
If the numbers match , then the file has to be mapped to idoc .
This is kind of one file to multple receivers but not exactly multiple recievers, of the mail adapter s triggered, then the idoc adapter should not be triggered.
I tried it with multimapping: 1 message for Mail and the other for IDOC, and tried giving the condition createif  for mail node but it is throws out error:
Cannot produce target element /ns0:Messages/ns0:Message1/ns2:Mail.
Can you please help me in acheiving this scenario.
thank you.

Hello all,
thank you for your replies.
I have tried the option of enhanced receiver determination.
There is no need of multimapping. Here are the steps that i followed to achieve the required result:
Used the Receviver determination as my message interface  and in the mapping of the Server,
the Message type -->Receivers -->http://sap.com/xi/XI/System
the Message Interface --> ReceiverDetermination -->http://sap.com/xi/XI/System of swcv SAP BASIS 7.00
I have given the condition for the Receiver Services for the Field Service.
and in the configuration part there is no change in the usual Sender agreements, Recevier agreemants and Interface determinations. But in the receiver determination , i have selected the Enhanced radio button and selected the interface mapping for the receiver determiantion .
This works.
Regards,
Lakshmi.

Similar Messages

  • IDOC -XI-SOAP one sender different  receivers based on condition

    Hi All,
    I have an IDOC to SOAP scenario.
    For each record based on the input flag XI has to send the  any one of the request ...like either create or update or delete request. All these message types are a part of single WSDL.
    How can i do it?
    Thanks in Advance
    Jyothsna

    hi There are two ways you can do this:
    1. Without BPM - Since you have to create all the target messages adn you want either the 1st and second, or the first and third: create two multi-mapping with one and two, and one and three. In the receiver determination check the condtion based on which you decide the second or the third message has to be created and route it to the correct mapping accordingly.
    2. with BPM, create all the target mapping. In the BPM check the condtion in the switch and do a send accordingly.
    You can do this either on Receievr Determination or on Interface Determination.
    Add multiple Receievrs/ Interfaces and then add the conditons on which the target should be choosen
    to use Xpath for your receiver det. ref these blogs;
    a combination of logics should help you in this case ...
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
    /people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers
    pls reward points if solution found helpfull
    regards
    chandra.k

  • Selecting a value to a column from a different table based on a condition

    I apologize for the confusing title.
    I have to select values from Table_1. 2 of those columns needs to be checked for values in Table_2 based on the ID and if values are present, then those values should be taken, if not the values from Table_1 should be taken. How can I achieve this?
    e.g.
    table_1
    date
    id
    fact1
    fact2
    type
    table_2
    id
    fact1
    fact2
    select date,id,type, (Need to check the condition for fact1 and fact 2, if present in table_2, then that value should be used, if not table_1 values should be used) from table_1 and table_2.
    I need to use this condition in another big query. Any help/suggestions appreciated.
    Thanks.

    Thanks Tubby,
    It worked and I incorporated with the master query too.
    Thanks a lot.
    EDIT
    Thanks for all the replies> I just saw your answers after I finished and posted the reply.
    hoek, I am not a DB person, I used to write some SQLs, but not in the last 3 years or so. I am trying to work on some reports, hence some trivial questions.
    Edited by: vj on Aug 7, 2010 5:48 PM

  • Joins on different fields based on a condition

    Hi,
    I have 2 tables, each consists of 5 fields, based on Field3's data, I want to join either F1 & F2 or F4 & F5.
    I have given below the field creation and sample data for your reference. When I run the SQL with "case when .."
    statement, it gives "ORA-00905: missing keyword" error.
    I can do this by splitting into 2 separate SQL statements one for F1 & F2 and the other for F4 and F5.
    Is there any other better way of doing it in a single SELECT statement?
    Please share your views, thank you.
    create table tmp_a
    (f1 varchar2(50),
    f2 varchar2(50),
    f3 char(1),
    f4 varchar2(50),
    f5 varchar2(50))
    create table tmp_b
    (f1 varchar2(50),
    f2 varchar2(50),
    f3 char(1),
    f4 varchar2(50),
    f5 varchar2(50))
    begin
         insert into tmp_a
         values('R1', 'abc', 'L', 'A1', 'B1');
         insert into tmp_a
         values('R2', 'lkj', 'L', 'A2', 'B2');
         insert into tmp_a
         values('R3', 'qwe', 'M', 'A3', 'B3');
         insert into tmp_a
         values('R4', '123', 'M', 'A4', 'B4');
         insert into tmp_b
         values('R3', 'qwe', 'L', 'A1', 'B1');
         insert into tmp_b
         values('R2', 'lkj', 'L', 'A2', 'B2');
         insert into tmp_b
         values('R4', '123', 'M', 'A3', 'B3');
         insert into tmp_b
         values('R1', 'abc', 'M', 'A3', 'B3');
         commit;
    end;
    select * from tmp_a;
    select * from tmp_b;
    select a.*, b.*
    from tmp_a a, tmp_b b
    where a.f1 = b.f1 and a.f2 = b.f2;
    select a.*, b.*
    from tmp_a a, tmp_b b
    where a.f4 = b.f4 and a.f5 = b.f5;
    select a.*, b.*
    from tmp_a a, tmp_b b
    where case when a.f3 = 'L' then
              a.f4 = b.f4 and a.f5 = b.f5
         else
              a.f1 = b.f1 and a.f2 = b.f2
    end;

    Maybe something like:
    SQL> SELECT a.*, b.*
      2    FROM tmp_a a, tmp_b b
      3   WHERE CASE
      4            WHEN a.f3 = 'L'
      5               THEN a.f4
      6            ELSE a.f1
      7         END = CASE
      8                 WHEN a.f3 = 'L'
      9                    THEN b.f4
    10                 ELSE b.f1
    11              END
    12     AND CASE
    13            WHEN a.f3 = 'L'
    14               THEN a.f5
    15            ELSE a.f2
    16         END = CASE
    17                 WHEN a.f3 = 'L'
    18                    THEN b.f5
    19                 ELSE b.f2
    20              END
    21  /
    F1         F2         F F4         F5         F1         F2         F F4         F5
    R1         abc        L A1         B1         R3         qwe        L A1         B1
    R2         lkj        L A2         B2         R2         lkj        L A2         B2
    R3         qwe        M A3         B3         R3         qwe        L A1         B1
    R4         123        M A4         B4         R4         123        M A3         B3
    4 rows selected.Regards,
    Jo
    Edited by: Joice John on Jul 17, 2009 4:30 AM
    Sigh!!! Sean you are too fast for me.... ;)

  • Print Adobe form pages on different printers based on the condition

    Hi All,
    I am new in Adobe forms. We have requirement to print first 5 line items in adobe form (which are printing on first page) on one printer and remaining pages on another printer.
    What solution I was thinking was, in print program call the adobe form twice with flag as a importing parameter. For the first call the flag value will be set and for second run a blank value will be passed in flag.
    If flag is set then call make the first page "visible" and if flag is cleared then "hide" the first page and make the remaining pages "visible".
    But as its an item data which is designed on "Design" view I am not able to write a script to hide the page. Any suggestion you can give to resolve this issue.
    Thanks,
    Mihika.

    If it is OK to have the default printer defined/maintained in the user master (like tcode Su01 or System > User profile > Own data, Then the standard logic may suit your needs. I think you will need to undo some config for the whs. Te standard logic works as detailed below. the system needs to get to #4 below, then the SAP userid printer will be selected.
    the system proceeds with automatic printer determination as described below Config Tcode is OMLV.
    1) First the system checks whether a printer is set in the configuration "Printer-Movement". If so, the printer determination is complete at  this point.                                                         
    2) If not, the system uses the parameter "PriSrcTyp" defined in the configuration "Printer-Movement" to decide how it will proceed.  If the parameter is set here, the system checks if a printer is defined in the setting "Printer Picking Area" and then proposes this printer.                                                            
    3) If the system finds no printer, it searches in the setting "Printer - Storage Type" and uses this, if a printer is set.                   
    4) If the system cannot find a printer using the methods described above it selects the printer defined in the user master of the user currently logged on.                                                
    5) If no printer is defined here, the system automatically proposes LP01
    This writes the data to the spool file.

  • Mailing from XI to different groups based on Condition

    Hi Experts,
    I have a scenario where i have an incoming XML Invoice document which i need to map with Invoic02 idoc and to send to R/3.
    While sending it to R/3 i also need to put conditions on certain special links,when fails sends out mails to a
    respective mail group .
    When i get a wrong field/condition the map fails.Based on the condition which failed the map,XI should be mailing to
    the respective group .
    I will be having around 4-5 mailing groups in the single map .
    Please suggest me some helpful blogs and inputs for this scenario.
    Thanks,
    Sudhansu

    B'cos you are failgn the mapping at deisgn time (by various conditions), you can configure diff ALERTCategories & invoke them appropriately from your UDF.
    /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    For each of these AlertCategories, you will configure your respective recepients.
    Regards,
    siva Maranani

  • 1:N mapping without using BPM , based on segment conditions

    Hi All,
    I have to send 3 different files from source based on some conditions
    1) for the first file to be sent is okay
    2) But for second file and third file i need to check some conditions
    the conditions are
    If E1EDL44 case detail fields exists   i should generate second file and i should not create any third file  (it's one or the other, not both).
    If E1EDL44 case details doesnot exist i should generate third file and not second file...
    So My confusion is how to send either second or third file (any one only)
    If i do mapping  is it sufficient or also should i use condition editor in Receiver Determination...
    Please suggest u r valuable help..
    Thanks and Regards,
    sridhar

    Hi Sridhar,
    Make ur second interface Occurence as Optional 0:1 in ur Interfaec Mapping.
    In ur Multi-mapping (Message Mapping) also make ur  message type corresponding to ur second file as Optional.
    In ur mapping check the condition and if doesnot satisfy dont populate the second message type. Check this option.
    Regards,
    Sudharshan

  • Drop the files into different directories based on the filename

    Hi,
    I had a reqiuirement based on the file name, i should drop the files in to different directories.
    I can get the filename through variable substitution in receiver file communication channel, now i want to drop the file into different folders based on conditions.
    suppose, if the file name is DDDX234
    i should do substring of filename0+(4), if the value is L then i should drop in X directory
    suppose, if the file name is DDDY234
    i should do substring of filename0+(4), if the value is L then i should drop in Y directory.
    How can i drop the file into differnent directories based on filename.
    Thanks
    Srinivas

    Thanks Michal,
    I mapped the directory and filename to the target header in the mapping
    Filename --> UDF --> Header(target)
    and in the receiver channel checked the ASMA and given * in the filename and directory name.
    But in runtime iam getting the error as
    Attempt to process file failed with com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header
    MY UDF is
    public String Directory(String a,Container container){
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key  = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "Directory");
    String FileName = conf.get(key);
    FileName = a;
    conf.put(key, FileName);
    %%%based on filename the directory should change
    String Directory = conf.get(key1);
    Directory = "/SAPInterface/XI/PPD/DHX/out";
    conf.put(key1, Directory);
    return "";
    Help me in correcting this error.
    Thanks
    Srinivas

  • Text Entry Box - Different Results based on Different Entries?

    Hello,
    I'm trying to figure out a way to use the Text-Entry Box (if there's a better tool to go about this, let me know) in order to bring up a particular caption box with a particular response. So for example, in a standard text-entry box, I have listed 4 possible "correct" answers, and for this example, I'll just say answer 1, answer 2, answer 3, and answer 4. I would like each answer to bring up a different caption box with a different statement based on which answer they type in. Basically:
    Answer one -> Caption 1
    Answer two -> Caption 2
    etc.
    All I can ever get is for each answer to just respond to the same standard buttons, Success, Failure, etc. I can't seem to add a new button that would pop up like the standard ones, or, as I would like better, Captions instead. Any ideas?

    Hello,
    Perhaps it is a problem with terminology, but as the 'proclaimed' advanced actions freak I have to ask what you mean by your latest answer 'captions did not come as variables to use'. A button is not a variable in my mind, but you mean perhaps the object ID? Which statement did you use in the advanced actions where the object ID of the captions do not show? AFAIK that is only the case with the statements Assign and Expression if you use variables, but there the button will not be in the list as well.
    Do you understand why I'm puzzled?
    My work flow would be this one:
    Create the Text captions TC_one, TC_two... and set them to invisible
    Create the Advanced conditional action that checks which (correct) answer was chosen, this action will have one decision for each correct answer; the action to be executed is to show TC_one in case answer1 was chose, TC_two for answer2 etc. If you allow the user to change his answer, hide at the same time the other captions
    Attach this action as Success action to the TEB, and have a shortcut or the Submit button like you wish.
    In case you allow also a Retake functionality, where the user returns to this slide, you'll need sort of a Reset that hides all Text Captions when entering the slide
    Please, I hope you'll take the time to answer my question in the first paragraph.
    Lilybiri

  • JDBC to IDOC Scenario - select data in jdbc based on multiple conditions

    Hello
         I have a JDBC to IDOC Scenario. I have to select the records in JDBC based on different conditions each time. For example I have to select based on company code '1000' and Employee claasification 'E1' and date range. After I post these records in SAP again I want to select other records for some other company code '2000' and different business area and different dates. Basically I want to extract data multiple times based on different conditions.
    Hiow do I achieve this?
    Another question is in the JDBC to IDOC scenario since the sender adapter is JDBC and the sender adapter polls depending on the duration of time ( say 60 secs ) in the adapter once after I extract the data based on a condition how do I control in such a way that the same data is not extracted again.
    Thanks
    Naga

    Hi Naga,
    I have to select the records in JDBC based on different conditions each time. For example I have to select based on company code '1000' and Employee claasification 'E1' and date range. After I post these records in SAP again I want to select other records for some other company code '2000' and different business area and different dates. Basically I want to extract data multiple times based on different conditions.
    -->
    Such requirements cant be handle through select query of the sender...but you can handle this in the message mapping area.....you can fire a select query in the database to pick up records in a batch of 10K (do not keep any condition on this except for sorting). After the records come into PI you can send the message to your target based on the unique combination of "Company code+ Employee clasification + date range" handling this in the message mapping.
    Another question is in the JDBC to IDOC scenario since the sender adapter is JDBC and the sender adapter polls depending on the duration of time ( say 60 secs ) in the adapter once after I extract the data based on a condition how do I control in such a way that the same data is not extracted again.
    You can use the N--> C logic
    The data records that you pick have a corresponding control table i assume. There should be a field STATUS where the initial status of record should be N.
    After you pick the records this status should be made C so that only those records present in the database with status = N are picked up.
    Mention the condition Status = N in the select query.
    Thanks
    Dhwani

  • Need to show the images in calculated column based on the condition in sharepoint 2013.

    Hi ,
    I'm working in sharepoint 2013, In this i want to show an image in calculated column based on the condition, but image is not showing .
    In sharepoint 2010 its working with help of javascript in content editor on the same page. Same thing i tried in SP 2013. but doesn't work.
    Could any one please give proper solution for this?
    Thanks in advance.
    by,
    Siva.

    Hi please provide the JS you have used in the content editor as well as the calculation for the column so we can better understand what's maybe differs?
    Blog: chrisstahl.wordpress.com Twitter:
    @Cstahl

  • EDI Mapping based on a condition

    Hi All,
    Can we use some condition to differentiate different mappings based on the source feild?
    My scenario is the invoice from R/3 is imported into XI and based on a feild Receiver company code&Company name  , different mappings needs to be executed and please keep in mind (different mappings include include verisons like EDIFACT, TRADACOM etc)
    Please guide me!!
    Thanks,
    Smith

    Hi Peter,
    Thanks for your reply. As per my understanding,
    If we have 4 customers whom we need to send invoices based on the company code and description,
    The following needs to be created:
    one outbound interface in PI(Idoc from R/3 )
    Four inbound interfaces from PI to EDI
    Four different mappings
    In receiver determination based on the condition the message mapping is selected and delivered .
    Please confirm
    Thanks,
    Smith

  • Dynamic insertion of elements based on dynamic condition

    I need to achieve the following:
    Input:
    <Customer>
         <name>Name1</name>
         <email>Email1</email>
         <phone>Phone1</phone>
         <Number>Num1</Number>
    <Customer>     
    Output:
    <Customer>
         <name>Name1</name>
         <email>Email1</email>
         <phone>Phone1</phone>
         <Number>Num1</Number>
         <Addresses>
              <Address>add1</Address>
              <Address>add1</Address>
              <Address>add1</Address>
         </Addresses>
    <Customer>
    Based on the number of Addresses that exist for the customer, multiple <Address> elements should be added.
    I can't determine number of Addresses at the beginning. It is deterrmined dynamically based on certain condition.
    So each time when the condition is met, I need to get the count of <Address> elements that exist and insert the new one last.
    My logic:
         Switch (case)     ==> Add <Address> only if condition is met
              count ==> count(bpws:getVariableData('outputVariable','payload','/ns1:Customer/ns1:Addresses')) ==> 0 first time
              <Addresses>
                   <Address>add1</Address> ===> Now I need to insert this.
              </Addresses>
    I have the following in my bpel:
    <assign name="AssignInsertAfterExisting">
    <copy>
    <from expression="count(bpws:getVariableData('outputVariable','payload','/ns1:Customer/ns1:Addresses'))"/>
    <to variable="NumberOfAds"/>
    </copy>
    <copy>
    <from expression="'123 street'"/>
    <to variable="nextAddress"/>
    </copy>
    <bpelx:insertAfter>
    <bpelx:from variable="nextAddress"/>
    <bpelx:to variable="outputVariable" part="payload"
    query="/ns1:Customer/ns1:Addresses/ns1:Address squareBrakets NumberOfAds squareBrakets"/>
    </bpelx:insertAfter>
    </assign>
    But with the above I am receiving the folllowing error:
         Assign Operation Misuse.
         The to-spec does not yield any data; insertAfter operation cannot be performed.
    Please check the BPEL source at line number ..
    I can I insert dynamically insert elements into array. I have seen the example provided in samples, but my problem is little different than that.
    Edited by: user10367892 on Aug 4, 2009 3:16 AM

    append is appending value of variable to existing element, instead of creating a new element in the array:
    For Eg:
    Input:
    <bpelx:append>
    <bpelx:from variable="nextAddress"/>
    <bpelx:to variable="outputVariable" part="payload" query="/ns1:Customer/ns1:Addresses/ns1:Address"/>
    </bpelx:append>
    Output if nextAddress = Address2 and if <Address>Address1</Address> already exists
    <Customer>
         <Addresses>
              <Address>Address1Address2</Address>
         </Addresses>
    </Customer>

  • Single iDOc to multiple files based on a condition

    Hi Friends
    need your help in one scenario which is something like this:
    there is one iDOC as the sender and this iDOC has to be mapped to files based on a condition means let us say if there is a particular field "R" in iDOC(WPDBBYY01) than it should go and create the file "ABC"
    and if the particlar field is P or G or M than it should create another 2 files named "XYZ" and "WUV" .
    Please guide me how can i put this condition ?
    Any help would be rewarded with points
    Thanks

    Have a single receiver and 2 inbound interfaces.
    So you will have 2 different mappings. In the first mappng source is IDOC and the target is file ABC.
    In the second mappping the source is IDOC and the target is 2 files XYZ and WUV.
    In Interface determination, add both the inbound interfaces and put the condition for each interface.
    Regards,
    Jaishankar

  • Differance betwwen alternative calculation type & condition base value.

    dear expert
    wats the differance betwwen alternative calculation type & condition base value in pricing.
    vicky

    Hi,
    AltCty - Condition formula for alternative calculation type:
    It is an alternative formula for the condition type that can be used instead of standard formulas.
    For example, let us take the Profit Margin which can be both + / - , so here this routine will help us in generating the value which can be either + or -. Profit margin is not a condition type so it cannot be classified as +ve or -ve in the V/06.Ex.: 950 0 Profit Margin 11. So we assign 11 - Profit Margin.
    AltCBV - Alternative formula for condition base value:
    Formula for determining the condition basis as an alternative to the standard.
    It is used as a basis to calculate value of the condition type instead of using it from the "FROM" column.
    Ex.: Freight - KF00. Freight is calculated based on weight, volume etc. and not on the base price. In pricing there is no entry of weight from which the value can be referred like we do for discounts using base price. We have to get the value from the Material master. In this column we can mention the value as 12 - Gross Weight or 13 - Net Weight.
    During pricing, the system will consider the value that is mentioned in this column and determine the freight based on this value.
    Suppose we have Net weight: 100 kgs and Gross Weight: 150 kgs. And if we mention 13 in this column then the Freight condition KF00 will be calculated using the weight as 100 kgs.
    And both of them are routines written by APABers in VOFM.
    Reg,
    JJ

Maybe you are looking for

  • Colum headers  in SAP script

    Hi All,      i have a requirement like this. in a SAP Script. i have a Column(Table) headers in one Text element. now it is displaying in first page. the requirement is the column header has to be  displayed on top of the subsequent pages also. The p

  • Whenever I make a track there is like a minute of track left that I can't get rid of.

    I am making a track for a podcast, and whenever I export there is like a minute or little less of track that I can't get rid of. I even used fade out, and it still exports it the same length. Is there a way to make the track end on a certain measure?

  • Multiple photos trying to crop at the same size... Advice please....

    Hello out there... I am working on a web page... We have multiple images that need to be cropped at the same size ( resolution and image) ... Is there an easy way to do this?  Please Advise... all the best, Robinpress..

  • How to serve runtime generated file on WAS?

    Hi, In short: where (local path on application server) should I store a file (generated at runtime) in order to be able to offer it for downloading (via WAS)? Context: I have a BSP application and I want to generate a PDF file (in the BSP app) and st

  • KT3 Ultra2 R & memory question

    I wanted to get some PC3200 memory for this motherboard. I was looking at Crucial PC3200 modules which are all rated CL3. However, the bios settings for the KT3 Ultra2 only shows CL settings of either 2 or 2.5. Of course I am aware that this board wi