Conditional Interface Determination with Flat Files

Hello,
I have one sender interface (dummy) which could either hold a flat file or an XML file. On receiver side there is one system with two receiver interfaces, one should be used for the XML structure and one for the flat structure.
My requirement is to have a conditional interface determination with an (exclusive) OR logic. Pseudo code:
The XML structure has "submission" as root node. So I use the condition (/submissioin) EX to determine whether it is an XML file and I check with not(/submission) EX to determine whether it is a flat file. However the condition does not work using a flat file ("Unable to find an inbound interface"). Could it be, that the conditional expression never is true in case a flat file arrives? How can I achieve this requirement?
What I additionally do with the flat file is just calling a Java Mapping that sets dynamic attributes for a file receiver, the flatfile itself is dumped on a file system without any addtional conversion logic.
Thank you for your advice.

How can I ingnore a message in case a condition applies? I am just aware of the fact that you can ignore messages in case NO condition applies.
Couldn't you simply reverse the logic and use "not equals"? Or perhaps you can use the EX operator to alter your conditions... here is more info on the EX (exists) operator
Re: ConditionEditor: Check if element is empty
What is best practice in this case? Should I use a "dummy receiver"? However if I use a dummy receiver I think I would receive a "interface determination not found" error. How would you do that?
I've never found the need to work with dummy receivers so I cannot comment there.

Similar Messages

  • Regarding Conditional Interface Determination

    Hi All,
    I need small confirmation on behavior of conditional interface determination,
    My source message is like below
    <?xml version="1.0" encoding="UTF-8"?>
    <PROS_CustInfo><Structure>
                                      <name>ABC</name>
                                       <data>100</data>
                                 </Structure>
                                 <Structure>
                                      <name>XYZ</name>
                                       <data>101</data>
                                 </Structure>
    </PROS_CustInfo>
    I am having 2 Receiver  RFC messages for same receiver.
    If name=ABC then i need to send this data(ABC, 100) to first RFC by using 1st mapping  else
    if name=XYZ then i need to send that data(XYZ,101) to second RFC by using 2nd mapping.
    But in my message name contains ABC and XYZ also. Now how conditional interface determination bahaves. Will it execute 1st mapping or 2nd mapping or both.
    If you find any related post please share.
    Thanks,
    Madhusudhan

    Hi Madhusudhana,
    because of the problem, that only one condition can ever be true at runtime, you can avoid this by using count function. Because you can't build a Statement like count(xy) > 1 with ExpressionEditor of SAP PI, you have to use this expression with SAP PI:
    /PROS_CustInfo[count(Structure[name='XYZ'])>=1]  EX
    This condition works on whole document.
    Regards,
    Alex
    Edited by: Alexander Kirsch on Feb 16, 2010 4:43 PM
    Edited by: Alexander Kirsch on Feb 16, 2010 4:45 PM

  • Working with flat file as source in owb 10.2

    Hi,
    I am working with flat file as source . While validating the mapping i am getting the following error like
    " to specify a data file configure the mapping , add a node under ' Source data file', type in the file name
    and select the file location."
    Please give me the suggestion . It is very urgent.

    Hi Venkat,
    I tried the following stepts.
    1. in Design Center select your mapping and right click and select configure
    2. select sql loader data files and select create
    3. On right hand side data file Name : enter your source file name (ex : source.csv)
    4. click ok button.
    5. open mapping and validate.
    The mapping is validating. After validating I deployed the mapping. Up to this the mapping is working fine.
    But when I start the mapping, It has completed with errors.
    The error message is:
    Status
    Error Log
    RPE-01013: SQL Loader reported error condition, number 1.
    LRM-00112: multiple values not allowed for parameter 'control'
    Job Summary
    Updated : 2009-02-24 15:32:43.0 Job Final Status : Completed with errors Job Processed Count : 1 Job Error Count : 1 Job Warning Count : 0
    Please give me the suggestions.
    Thanks,
    Venkat

  • How to built a hierarchy with flat file?

    Hi Experts,
    for a better representation of the report, i need to built a hierarchy with flat file.
    The Data load is via Flat file.
    Do you have some documentation about that?
    Thanks
    Cheers
    Gilo

    Hi Gilo,
       Check these docs...
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb">How to… Download a Hierarchy to a Flat File</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/fa/e92637c2cbf357e10000009b38f936/content.htm">Uploading Hierarchies from Flat Files</a>
    <a href="http://sapbwneelam.blogspot.com">More Docs...</a>
    Hope it Helps
    Srini

  • Enhanced  and conditional interface determination, :

    Experts ,
               can you giv me some link/ examples  of Conditional interface determination and Enhanced  Interface determination.
      Pls dont send me teh below link!
    http://help.sap.com/saphelp_nw04s/helpdata/en/42/ed364cf8593eebe10000000a1553f7/frameset.htm
    many Thanks
    Arnab Mondal

    HI,
    U can refer this threads of same discussion:
    Re: Condition In Receiver Determination Not Working
    purpose of Enhanced Receiver Determination
    Then refer this blogs:
    Illustration of Enhanced Receiver Determination - SP16
    SAP NetWeaver Process Integration: Enhanced Receiver Determination for Synchronous Scenarios

  • Plz send simple bdc  code with flat file which is executable

    plz send a simple code for upload bdc with flat file which is executable.

    plz send a simple code for upload bdc with flat file which is executable.

  • Key Range with Flat File

    Hi people, Anybody has a example how it works Key range with Flat file ? Tks

    Hi All,  I have one scenario to read the source file . The file delimiter is '|' . The no of pipeline for each line is 17. So if a line containing more than 17 , send an error email. For this first i am printing tota pipeline in ecah line to afile called pipelinecount.txt . Then i will read this file and send each value to while loop /for loop , where it will get > 17 , it will exit the process and send an email.  But here in script i am getting error at while line. Could anyone help.   #! /bin/kshset -x SOURCE_DIR=/vp01/SrcFilessed 's/[^|]//g' /vp01/SrcFiles/Test.txt | awk '{ print length }'> /vp01/SrcFiles/pipelinecount.txtcd $SOURCE_DIRwhile line in `cat pipelinecount.txt`; do if [ $line -eq 17 ];thenecho "No issue in pipeline"exit 0;fiif [ $line -gt 17 ];thenecho "No of pipelines exceeded the expected. Please verify the source file." | mailx -s "WKFS Load: Failed" [email protected]

  • Conditional Interface determination

    Hi All,
    I had a requirement for conditional interface determination...
    Im using this blog
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414900)ID0462124050DB00225564311988524100End?blog=/pub/wlg/2973
    In ID under interface determination...when I begin to add another interface..I do not get the condition tab??
    Any idea y?..has ne one experienced such a strange scenario?

    Hi Ravindra,
    Even I face the same issue.
    But I always save the interface determination after adding the second row, and then only I will be able to see the condition column for the two rows added.
    Regards,
    Supriya.

  • Is a database table required for temporary interfaces with flat file data set source ?

    Folks,  this is the situation I have in ODI 11.1.1.7
    I have a temporary interface (yellow), called MJ_TEMP_INT,  that pulls data from TWO data sets in the source into a temporary target (TEMP_TARG). The catch is one data set pulls from a from a table whereas the other data set pulls from a flat file.  A union is done on the data sets.
    I then create another interface, called MJ_INT, that uses the MJ_TEMP_INT as a source and the target is a real db. table called "REAL_TARGET"
    Two questions:
    When I execute my second interface  (MJ_INT), I get a message "ORA-00942: table or view does not exist" because it is looking for a real db table TEMP_TARG. Why must I have one ? because I am pulling from a flat file ?
    On my second interface (MJ_INT) when I look at the property sheet of my source interface MJ_TEMP_INT (yellow), the checkbox next to "Use temporary interface as Derived table" is DISABLED.  Why ? Is is also because my temporary interface is pulling from a flat file ?
    I have attached a file that shows a screen shot of my ODI studio.
    By the way,  IF my temporary interface source has only one data set pulling from a db. table into a temporary target table, say called MJ_TEMP2_TARG,  and then when I use this temporary interface as a source to another other real db. target table (REAL2_TARGET),  THEN, every thing works.  ODI does not require me to have a real db. table MJ_TEMP2_TARG and the checkbox for "Use temporary interface as Derived table" is NOT DISABLED and my REAL2_TARGET table gets populated.
    Thank you in advance.
    M. Jamal.

    Thanks SH. I thought so. 
    Though I understand the reason to materialize the file in a staging area, but that almost defeats the purpose of having a temporary interface in this case if we have to save the data in a permanent db. table first.  I assume the db. table sticks around and is not automatically dropped once the interface executing ends.  If the db. table sticks around then I also must truncate it first before executing the temporary interface each time. Right ?

  • Dynamic interface determination based on file content

    Dear all,
    I am trying for a while to solve my issue, but wasn't able to find the answer. Maybe you could point me in the right direction whether using standard or BPM...
    I've got one file with multiple entries. Dependend on a field value, I would like to call the right interface and Idoc.
    Sample message:
    <customers>
         <customer>
              <name>ABC</name>
              <city>XYZ</city>
              <trigger>A</trigger>
         </customer>
         <customer>
              <name>DEF</name>
              <city>QRT</city>
              <trigger>A</trigger>
         </customer>
         <customer>
              <name>GHI</name>
              <city>JKL</city>
              <trigger>B</trigger>
         </customer>
         <customer>
              <name>MKN</name>
              <city>TZG</city>
              <trigger>A</trigger>
         </customer>
    </customers>
    Dependend on the content of field "trigger" I would like to send the message to the correct interface (Idoc). I was able to trigger the interface selection in my interface determination based on a condition. So I am looking for field trigger and if = A -> Interface A is called and if = B -> interface B is called. However, it seems it is only checking for the first entry of my payload and then sending all customers to the same interface, no matter what I've got in the trigger field. What I would need is a message split and then only posting the correct rows to the selected interface.
    Any ideas would be highly appreciated.
    Thanks a lot,
    Jens

    Hi Jens,
    I can think of two options:
    1) The logical expression (condition) in the Interface Determination can hold a XPath expression. In your case, it could be complex, as one single XPath has to loop at all the line times for an occurrance.
    Some XPath help is available at: http://www.w3schools.com/xpath/xpath_functions.asp#sequence
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
    The objective will be to remove the contexts on the trigger node to get a sequence consisting only of the trigger values, and then performing an 'index-of' function on value 'A'. If the result is a null value, then that trigger does not exist and the interface determination will not pass for 'A'. Similar condition can be used for other values of trigger.
    2) Create a separate receiver system / service for each interface A, B etc. Then you can use the enhanced Receiver Determination feature in the IR itself if you are on SP16. Check this:
    /people/venkataramanan.parameswaran/blog/2006/03/17/illustration-of-enhanced-receiver-determination--sp16
    Good luck,
    Bhanu

  • Interface Determination for source file without namespace definition

    Hi,
    I have the following problem:
    I am developing a file to IDoc scenario in AEX 7.31. All design objects in ESR and configuration objects in ID are created and the sender communication channel is running. Now I got a test file. It starts directly with the data elements but does not contain the root element as defined in my data type. To make it clear:
    Data Type in ESR:
    DT_DatatypeA
    -- Record [1..unbounded]
    ---- Field1
    ---- Field2
    The File looks as follows (it lacks the root element 'DT_Datatype_A'):
    <Record>
      <Field1>...</Field1>
      <Field2>...</Field2>
    </Record>
    <Record>
      <Field1>...</Field1>
      <Field2>...</Field2>
    </Record>
    When I try to send it via PI I get the following error:
    When I add the XML root element <ns0:DT_DatatypeA ns="..."> manually to the file (and the corresponding end tag), the message is processed correctly.
    How can I solve this issue? The file is created by a legacy system which does not know anything about my PI namespaces.
    Thanks in advance!

    i am bit confused here.
    how does your input look like? i.e when sender generates the files..
    is that like below xml?
    <Record>
      <Field1>...</Field1>
      <Field2>...</Field2>
    </Record>
    <Record>
      <Field1>...</Field1>
      <Field2>...</Field2>
    </Record>
    or
    is it a flat file? and you use FCC in the sender adapter to convert it into xml?
    Field1,Field2
    Field1,Field2

  • Issue with flat file loading timing out

    Hello
    I have a scenario, where I am loading a flat file with 65k records into a cube. The problem is, in the loading process, I have to look up the 0Material table which has a million records.
    I do have an internal table in the program, where I select a subset of the Material table ie around 20k to 30k records. But my extraction process takes more than 1 1/2 hrs and is failing (timed out).
    How can i address this issue? I tried building indexes on the Material table and its not helping.
    Thanks,
    Srinivas.

    Unfortunately, this is BW 3.5, so there is no END routine option here. And I tried both .csv and notepad file methods, and both are creating problems for us.
    This is the total code, do you guyz see any potential issues:
    Start Routine (main code)
    refresh i_oldmats.
    refresh ZI_MATL.
    data: wa_datapak type transfer_structure.
    loop at datapak into wa_datapak. (** I collect all the old material numbers from my flat file into an internal table i_oldmats**)
       i_oldmats-/BIC/ZZOLDMATL = wa_datapak-/BIC/ZZOLDMATL.
       collect i_oldmats.
    endloop.
    sort i_oldmats.
      SELECT /BIC/ZZOLDMATL MATERIAL (** ZI_MATL only has recs. where old materials exist, this gets about 300k records out of 1M**)
             FROM /BI0/PMATERIAL
             INTO ZI_MATL FOR ALL
             ENTRIES in i_oldmats WHERE
              /BIC/ZZOLDMATL = i_oldmats-/BIC/ZZOLDMATL .
                collect    ZI_MATL.
      Endselect.
      Sort ZI_MATL.
    Transfer rule routine (main code)
    IF TRAN_STRUCTURE-MATERIAL = 'NA'.
        READ TABLE ZI_MATL INTO ZW_MATL
        WITH KEY /BIC/ZZOLDMATL = TRAN_STRUCTURE-/BIC/ZZOLDMATL
        BINARY SEARCH.
        IF SY-SUBRC = 0.
          RESULT = ZW_MATL-MATERIAL.
        ENDIF.
      ELSE.
        RESULT = TRAN_STRUCTURE-MATERIAL.
      ENDIF.
    Regards,
    Srinivas.

  • Validation Event Handler Not working with Flat File GTC Trusted Recon

    We are created Event Handler for checking special characters in Telephone field.Its working fine when the user is created through Admin Console.but the event handler is not triggering while doing GTC Flat File Trusted recon.
    Version: OIM 11.1.1.5.0
    Can someone please help me out with this.
    Thanks
    Edited by: 790561 on 17-Feb-2013 09:01
    Edited by: 790561 on Feb 17, 2013 9:35 PM
    Edited by: 790561 on Feb 18, 2013 12:38 AM

    Validation Event handlers will not work with your trusted recon. You can use the GTC Validation provider, it is nothing but the plugins which you can insert with in your source field in GTC. I think you can easily get the steps for how to create a custom GTC Providers.
    Edited by: iam37 on Feb 16, 2013 4:09 PM

  • Problem with flat-file to oracle

    Hi all,
    Flat-file has 7 columns , all are varchar
    SALE_2007
    C1 VARCHAR2(255),
    C2 VARCHAR2(255),
    C3 VARCHAR2(255),
    C4 VARCHAR2(255),
    C5 VARCHAR2(255),
    C6 VARCHAR2(255),
    C7 VARCHAR2(255)
    target also has 7 columns , first four column were varchar and the last 3 columns were numeric(20,2).
    SALE
    TIMECODE VARCHAR2(255),
    CUSTCODE VARCHAR2(255),
    SALECODE VARCHAR2(255),
    PRODUCTCODE VARCHAR2(255),
    AMOUNT NUMERIC(20,2),
    COST NUMERIC(20,2),
    SALEAMOUNT NUMERIC(20,2)
    I have mapping the transformation on the staging with these function (ordering by order as above)
    SALE_2007.C1
    SALE_2007.C2
    SALE_2007.C3
    SALE_2007.C4
    TO_NUMBER(REPLACE(SALE_2007.C5,',',''))
    TO_NUMBER(REPLACE(SALE_2007.C6,',',''))
    TO_NUMBER(REPLACE(SALE_2007.C7,',',''))
    I have to use replace function because in the text file there is a comma in the data eg. 1,400.35
    and the ODI will error in the step insert into flow table with error
    +1722 : 42000 : java.sql.SQLException: ORA-01722: invalid number+
    java.sql.SQLException: ORA-01722: invalid number*
    Please advise
    Thank you all

    Hi-
    It seems like there is non-numeric characters present in your C5-C7 columns. Please check your source data for these columns.
    Thanks,
    Saravanan Rajavel

  • Ragged right with Flat file in SSIS for last column

    When I am importing from Flat file to OLEDB using DATA flow in SSIS,
    It has fixed length  for each column
    but last column had length of 20
    So I used for last column as {LF} and input width 0 & output width 20
    but facing problem of last column has showing more data in preview so I am missing some some records
    May I get any  solution
    Thanks

    Hi Madhu,
    I totally agree with Visakh. If your row delimiter is {CR}{LF}, you need to consider the two placeholders for the delimiter when defining the column length, that is to say you need to set the length of the last column to 22.
    Regards,
    Mike Yin
    TechNet Community Support

Maybe you are looking for

  • Sync no longer works with new AppleTV update

    Since upgrading to the latest AppleTV software, I can no longer sync to my AppleTV (1st gen). I can now only stream content to the AppleTV. There is still content on the AppleTV, but I can no longer manage that content.

  • New iTunes takes up my whole screen. How do I reduce the window size?

    Hi, The newest version of iTunes is taking up my whole screen but I can no longer find the little red/green buttons to make it smaller. I can't even minimize it with Command-M. I tried a force quit and restart of iTunes, but same thing. Help! Thanks!

  • Client export request will not be imported

    Hi, I have run a client export via SCC8. In the transport log there is 1 error and the message 'EETP200 export with errors, request will not be imported'. Status is 12. I have checked the log and the failure was due to a rollback segment not being la

  • Billing Variant and Billing Schemas

    Hi Gurus, I have  to create some custom billing variant. Can somebody share some cookbook or manual regarding billing variants & billing Schemas. Thanks in advance.

  • (Help) After Effect 7.0 error 5027 :: 12

    My After Effect can't render into mpeg2, it always return this error message even if it's just a one empty 30 second composition. After Effects: AEGP Plugin Media IO Plugin There is a mismatch between Output Module settings and Transcode Settings. Pl