Expression logic for qualified tables

Hello Experts.
I am searching for an expression that can manage the following requirements:
Different records of a qualified table belong to one record of the main table. One value that belongs to a certain combination in the qualified table should be automatically transferred to a field in the main table. For example there is one main table (MAIN) and a qualified table (QT) with at least two fields.
Main table (MAIN) with some fields
Qualified table (QT) with Field 1 and Field 2
I tried following expression: IF(QT.Field 1 = ‘NAME’, QT.Field 2). But the expression doesn't’t work.
How can an expression work with a certain combination of a qualified table? Has anybody an idea how to solve such a mystery?
Thank you in advanced,
Anja

Hi Anita.
I have the answer: You need an additional field in qualified table. This field is filled during import with the concatenation of all field values of the QT record.
Qualified table with field 1 and field 2 look then like this
Field 1: Name
Field 2: Anita
Field Conca:Name.Anita
Now it is possible to build expression that can evaluate the string of the concatenation field.
Thanks for your help,
Anja

Similar Messages

  • Case statement logic for External Tables

    Hi All,
    Is there anyway I can perform a CASE logic in External table creation script?
    I have a column which is supposed to receive only Numbers. But if i inadvertently receive a String, i want to insert NULL for that instance.
    My table has the following creation syntax: ( I have to make a check for the NumValue column - althought I am using VARCHAR2(50) I have the transformation stage where the NumValue column has a CASE logic ; my entire file is getting rejected just because a single row in the input dat file is coming as a String)
    CREATE TABLE XYZ_TABLE
         LineNumber NUMBER(20),
         NumValue VARCHAR2(50 BYTE)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY "EXT_TAB_DIR"
    ACCESS PARAMETERS
    ( RECORDS DELIMITED BY NEWLINE
    BADFILE 'EXT_TAB_DIR_LOG':'FILE1.BAD'
    LOGFILE 'EXT_TAB_DIR_LOG':'FILE1.LOG'
    DISCARDFILE 'EXT_TAB_DIR_LOG':'FILE1.DSC'
    FIELDS TERMINATED BY '#|#'
    OPTIONALLY ENCLOSED BY '#$' and '$#'
    MISSING FIELD VALUES ARE NULL(
    LINENUMBER,
         NUMVALUE
    LOCATION
    ( 'FILE1.dat'
    REJECT LIMIT UNLIMITED;
    Thank you,
    Chaitanya

    Chaitanya wrote:
    So here, in the CASE logic, can i perform a check for validating if the value received for NumValue is only number and not some Varchar2 value (which I am currently receiving for some rows)Assuming "is only number" means NumValue column can containg digits only:
    insert
      into TableABC(
                    linenumber,
                    nuvalue
      select  linenumber,
              NumValue
        from  TABLEXYZ
        where regexp_like(NumValue,'^\d+$')
    /SY.
    P.S. If NULL column NumValue is allowed, add OR NumValue IS NULL

  • Unique key for Qualified tables

    Hello Experts,
    We are currently facing an issue with qualified tables. We need to retain existing system keys as below:
    Item (Main table)
    Item_Id, Item_Number
    Item_Price (Qualified Table)
    Item_Price_Id, Item_Id, Price_Type_Id, Price
    E.g.
    1, Pencil
    2, Pen
    3, Notepad
    1, 1, Retail_Price, $10
    2, 1, Wholesale_Price, $5
    3, 2, Retail_Price, $15
    4, 2, Wholesale_Price, $10
    We need to migrate the existing ids (Item_Price_Id) in MDM qualified table and need to maintain the same as max(Item_Price_Id) + 1 for all future records.
    Is there a way we can achieve this?
    Your help is greatly appreciated.
    Thanks in advance,
    Vinay

    Hi Karol,
    The Interface Iprinciple has this function as it:
    Gets the unique identifier which unambiguously identifies the object's <b>principal type and principal's data record</b>(s) in the data store (e.g. a relational database).
    <b>Note: the unique ID is a case sensitive string</b>
    Use this identifier to keep and persist references to principals. As this identifier contains internal information and is usually not readable, it should not be displayed in user interfaces.
    UME implementation guarantees to return Strings which are not longer than 255 characters.
    <b>Returns:</b>
    a non-null String identifying this principal
    I hope this helps you.
    Regards
    Pravesh

  • XML for Qualified tables (SP05)

    Hi all
    I have a xml file like this
    <?xml version="1.0" encoding="UTF-8"?>
    <od:schema xmlns:od="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <od:element name="Test">
      <od:complexType>
       <od:sequence>
              <od:element name="Material_Number_R3"/>
              <od:element name="ST_Code"/>
              <od:element name="Family"/>
              <od:element name="Line"/>
              <od:element name="Category"/>
              <od:element name="Ginco_R3_Code"/>
              <od:element name="Material_Type"/>
              <od:element name="Material_Group"/>
              <od:element name="Division"/>
       </od:sequence>
      </od:complexType>
    </od:element>
    </od:schema>
    And when i load it in the syndicator manager i can do the mapping, but i want to add some field of a qualified table: what should i change in my xml?
    BR
    PP

    Hi Jose,
    when you look at the delivered xsd-structures for the material master, you can see, taht Q-Lookup tables are already mirrored in these strcutres. so this could be used as a template.
    You simply would define a complex type structure for the Q-lookup-table fields (I call it MFGDATA). This complex type would then be referred to in your main strucutre (I call it MFGInfo).
    It would have the following for :
    <?xml version="1.0" encoding="UTF-8"?>
    <od:schema xmlns:od="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <od:element name="Test">
    <od:complexType>
    <od:sequence>
    <od:element name="Material_Number_R3"/>
    <od:element name="ST_Code"/>
    <od:element name="Family"/>
    <od:element name="Line"/>
    <od:element name="Category"/>
    <od:element name="Ginco_R3_Code"/>
    <od:element name="Material_Type"/>
    <od:element name="Material_Group"/>
    <od:element name="Division"/>
    <xsd:element name="MFGInfo" type="MFGDATA" maxOccurs="unbounded" />
    </od:sequence>
    </od:complexType>
    </od:element>
    <xsd:complexType name="MFGDATA">
    ######here you define all the fields of the Q-lookup tabel #####
    </xsd:complexType>
    </od:schema>
    Regards Klaus

  • Need a logic for Internal table processing

    Hi,
    I have a requirement...an internal table contains three fields material no, bin no, and Quantity
    Mat. No    |         Bin No        |              Quantity
    a              |              x1         |                   10
    a              |              x1         |                   10
    a              |              x2         |                   20
    b              |              x3         |                   10 
    c              |              x3         |                   20
    c              |              x4         |                   30
    c              |              x4         |                   40
    In this I need to append the records to new internal table say itab1 where multiple entries exist for some material no like mat no 'a' and 'c'  and
    if the material no. exist only once in the table, it has to be moved to another new internal table say itab2.
    Pls suggest some logic that does not have performance issues.
    Thanks in advance
    Saravana

    Hi there,
    a solution in brief...
    data: wa_itab1_a like itab1,
             wa_itab2_b like itab1,
             lv_tabix       type sytabix.
    sort itab1 by matnr.
    loop at itab1.
      wa_itab1_a = itab1.
      at new matnr.
        lv_tabix = sy-tabix + 1.
        clear wa_itab2_b.
        READ TABLE itab1 into wa_itab2_b
                            INDEX lv_tabix.
        if wa_itab2_b-matnr ne wa_itab1_a-matnr.
          append wa_itab1_a to itab2.
          delete itab1 where matnr = wa_itab1_a-matnr.
        endif.
      endat.
    endloop.
    Regards
    George Zervas
    Edited by: gzervas on Oct 20, 2010 12:08 PM

  • Logic for internal table

    Hi,
    I have an internal table with the following structure.
    PO Number     PO Line Number     Quantity     ETA
    PO_1     001     10     10 Aug 2009
    PO_1     002     12     11 Aug 2009
    PO_2     001     5     10 Aug 2009
    PO_1     001     13     10 Aug 2009
    PO_1     001     7     11 Aug 2009
    Now I want to sum up quantity based on ETA dates so that the structure will look like as below:
    PO Number     PO Line Number     Quantity     ETA
    PO_1     001     23     10 Aug 2009
    PO_1     001     7     11 Aug 2009
    PO_1     002     12     11 Aug 2009
    PO_2     001     5     10 Aug 2009
    Collect statement will not work as the checking is on date but not  on po no and line item.
    Regards,
    Abhi...

    Use SUM statement for adding the quantity fields.
    Sample code :
    LOOP AT T INTO WA_T.
    WA_N = WA_T
        SUM.
    WA_N-QUANTITY = WA_T-QUANTITY.
    APPEND WA_N TO ITAB_N.
    ENDLOOP.

  • Logic for MVER table update

    Hi Experts,
    Can anyone let me know how this table MVER updates. What are all the mvt type it will consider for updation. Your fast reply is appreciated.
    Thanks,
    Suresh

    Hi Suresh,
    The following are the various mvmt types that are used for consumption.
    201
    221
    231
    241
    251
    261
    281
    291
    331
    333
    335
    551
    553
    555
    557
    These values are updated in the MVER table. For eg. V06, V08 fields of MVER are updated with 261 and 201 Mvmt types.
    Reward if cleared and close the thread.

  • Mass Update of date in Qualified  table

    I having problem in updating End availability date in Partner Specific Data (which is a qualified table). How can do a mass update of selected records. I have written an assignment expression which has no error but it is not doing the update.
    Regards,
    Marcel

    Hi Marcel
    Assignment and validation does not work well for qualified table. It will work for only first qualified linked record and not all.
    for mass update you can use import manager map the date qualifier field and select replcae action for qualified update in the destination item.
    best regards
    ravi

  • How to add record in Qualified table using MDM Java API

    Hi experts,
    I am trying to add a record into a Table.
    but I am facing the problem in setFieldValue method.
    //Getting Field-ID to pass in setFieldValue() method.
    FieldId[] fields = new FieldId[6];
              fields[0] = repSchema.getFieldId("GTINs", "Description");
              fields[1] = repSchema.getFieldId("GTINs", "Unit_Descriptor");
              fields[2] = repSchema.getFieldId("GTINs", "GTIN");
              fields[3] = repSchema.getFieldId("GTINs", "Alternate_Item_Classifications");
              fields[4] = repSchema.getFieldId("GTINs", "Country_Of_Origin");
              fields[5] = repSchema.getFieldId("GTINs", "Bar_Coded");
    Record rec = RecordFactory.createEmptyRecord(mainTableId);
    rec.setFieldValue(fields, );
    but I am not getting how to assign the value to these fields using MDMvalue Interface.
    Can anyone provide me the code sample or Code flow so that I can do this.
    Plz help me it'll be great help for me.
    Thanks
    Tarun
    Edited by: Tarun Sharma on Feb 4, 2008 11:39 AM
    ==========================================================================================
    Hi Gurus
    I found the way to add the MDMValue in setFieldValue Method.
    we can set like this:
    setFieldValue(<fieldId object like fieldId[], <MdmValue like this> new StringValue("ABC"));
    Now I am facing problem in adding value to lookup flat table.
    According to the setFieldValue method we can assign the loookup like this:
    setFieldValue(<fieldId[0]>, new LookpValue(<here we have to pass the recordID of lookup table>);
    so I want to know how I can pass the recordId of lookup table here.
    Please suggest.
    Thanks
    Tarun Sharma
    Edited by: Tarun Sharma on Feb 4, 2008 3:15 PM
    Edited by: Tarun Sharma on Feb 4, 2008 3:25 PM
    Edited by: Tarun Sharma on Feb 8, 2008 6:58 PM

    Hi Andrea,
    I tried your suggestion but now i am getting Type Mismatch Error.
    Please suggest me what I can do?
    //TableId for Lookup[Flat].
    TableId lookupTableId = repSchema.getTableId("Return_Goods_Policies");
    FieldId[] ReturnGoodsPolicyTableIdFields = new FieldId[1];
    ReturnGoodsPolicyTableIdFields[0] = repSchema.getFieldId("Return_Goods_Policies", "Name");               
    Record recLookup = RecordFactory.createEmptyRecord(lookupTableId);
    try{
    recLookup.setFieldValue(ReturnGoodsPolicyTableIdFields[0], new StringValue("New_Brand"));
    }catch(Exception ex){
    System.out.println(ex);
    //Creating Record in Qualified Table - Request Details
    CreateRecordCommand createLookupcommand = new CreateRecordCommand(simpleConnection);
    createLookupcommand.setSession(session);
    createLookupcommand.setRecord(recLookup);
    createLookupcommand.execute();     
    //Getting the recordId of Lookup record.
    RecordId lookupRecordId = createLookupcommand.getRecord().getId();
    //Table Id for Qualified table.
    TableId  qualifiedTableId = repSchema.getTableId("Ext_Hardlines");
    FieldId[] ExtHardlinesFields = new FieldId[3];
    ExtHardlinesFields[0] = repSchema.getFieldId("Ext_Hardlines", "Name");//Text
    ExtHardlinesFields[1] = repSchema.getFieldId("Ext_Hardlines", "Pieces_Per_Trade_item");//Integer
    ExtHardlinesFields[2] = repSchema.getFieldId("Ext_Hardlines","Return_Goods_Policy");
    Record recQualified = RecordFactory.createEmptyRecord(qualifiedTableId);
    try{
    recQualified.setFieldValue(ExtHardlinesFields[0], new StringValue("Qualified Value"));
    recQualified.setFieldValue(ExtHardlinesFields[1], new StringValue("Qualified Description"));
    recQualified.setFieldValue(ExtHardlinesFields[2], new LookupValue(lookupRecordId));
    }catch(Exception ex){
    System.out.println(ex);
    //Creating Record in Qualified Table - Request Details
    CreateRecordCommand createQualifiedCommand = new CreateRecordCommand(simpleConnection);
    createQualifiedCommand.setSession(session);
    createQualifiedCommand.setRecord(recQualified);
    createQualifiedCommand.execute(); I am getting this Type match here, but i m not getting what mistake i did.     
    RecordId qualifiedRecordId = createQualifiedCommand.getRecord().getId();
    //Adding to Main Table
    TableId  mainTableId = repSchema.getTableId("GTINs");
    FieldId[] gtinsFields = new FieldId[1];
    gtinsFields[0] = repSchema.getFieldId("GTINs","Ext_Hardlines");
    Record recMain = RecordFactory.createEmptyRecord(mainTableId);
    //Adding the new record to Qualifed Lookup value and setting the Yes Qualifiers
    QualifiedLookupValue qualifiedLookupValue = new QualifiedLookupValue();
    qualifiedLookupValue.createQualifiedLink(qualifiedRecordId);
    try{
    recMain.setFieldValue(gtinsFields[0], new QualifiedLookupValue(qualifiedLookupValue));
    }catch(Exception ex){
    System.out.println(ex);
    CreateRecordCommand createCmd = new CreateRecordCommand(simpleConnection);
    createCmd.setSession(session);
    createCmd.setRecord(recMain);
    createCmd.execute();
    Could you help me out?
    Thanks
    Tarun

  • Issue creating qualified tables in MDM 5.5 SP04 Console

    Try the following:
    1) Make sure you are using SP04 Patch 1 (Build 5.5.33.13)
    2) Unarchieve one of the supplied business content repositories (Eg. Customer, Material, etc).
    3) Create a flat lookup table
    4) Create a qualified table with only one field: Field type lookup flat referencing the flat lookup table created in step 3, non-qualifier, display field.
    5) Create a new field in main table, type qualified multi-value, referencing the qualified table created in step 4.
    6) Load the repository
    7) Login to repository with data manager
    8) Create 1 entry in lookup table created in step 3
    9) Create 1 entry in main table, also creating 1 sub-entry in qualified table, save the record with SHIFT-ENTER
    10) Make sure the record was saved, including qualified table entry
    11) Close data manager
    12) Open data manager again
    13) Select your record and try to go in to the qualified sub-entry
    In my case this produces data manager to crash.
    This does not happen for qualified tables created in SP03 and updated to SP04, only for tables created directly in the SP04 console.
    Please let me know if everybody is having the same problem.

    Hi, Jorge,
    I have MDM5.5 SP4 P1 HF1 and followed your steps (except in step 4 (THANK YOU for numbering them), I have more than one field.) At step 13, I selected my record and to my amazement the record was there but my qualified table data was gone. And I then performed your step 14, and opened the qualified lookup table, and again to my amazement the console crashed.
    This definitely appears to be a bug and you should report it. I will also see if I can ask around for other solutions.
    Kristin

  • Loading main tables or Qualified tables first recommended??

    Hi All,
    Is the loading data for  Qualified tables first recommended before we load the main table data??
    Could I find any SAP recommeded quotes regarding this??
    thanks

    Hi Arvind,
    First Qualified Table data is uploaded and the Main Table data .
    FOLLOW THE LINKS.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1012f58f-a6e6-2a10-7caf-a46b7ad0f299
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/abe914fa-0301-0010-7bb1-d25c2a4bb655
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30380d0e-2f23-2a10-8f9d-da55511adbd8
    Reward if Useful.
    Regards,
    Vinay Yadav

  • Qualified Tables - Loop with Expression

    Hi Experts,
    Is there any way to setup a validation to loop over qualified links and check if a specific field has a value (not being NULL)?
    For example I have the following qualified links of qualified table Location Data for a Main Table Record (Material), with two fields Plant and Purchasing Group. Plant is Non-Qualifier and Purchasing Group is Qualifier and a lookup field into the table Purchasing Group.
    Plant: 3100
    Purchasing Group: NULL
    Plant: 2100
    Purchasing Group: 12
    I want to set up a validation to loop over all qualified links and check wether Purchasing Group is set. If one of them is not set I want to display a warning on record save.
    Anybody know if this is supported?
    Thanks,
    Ingo

    Hi Ingo,
    I am assuming the following requirement:
    You want to throw a validation error when your qualifier(Purchasing Group) is NULL.
    If this the case then we can have a validation as described below for the qualified link.
    Step1. In Data Manager select Main Table as  Current table and go to Validations Tab.
    Step2. Create a validation expression by Using Function IS_NOT_NULL() and then Go to Fields drop down and select the Qualified Table --> Qualifier (Purchasing Group).
    Suppose if your Qualified table is "Test" and Qualifier is "Purchasing Group" then the expression will look like IS_NOT_NULL(Test.Purchasing Group).
    The other properties like "Error Message", "Automatic Execution" will vary as per your requirement
    Try this out and let me know.
    Thanks and Regards,
    Sagar Sonje
    Mark Helpful Answers

  • Expression with qualified table fields

    Hi all!
    I have 2 doubts concerning the free-form search and expressions using qualified table.
    We're implementing SRM-MDM Catalog. Here is the scenario
    The search is done in the Main Table (Products). The qualified table (Contract) has the following fields:
    Contract ID: Non-Qualifier
    Contract Item: Non-Qualifier
    Contract Category: Non-Qualifier
    Lower Bound: Non-Qualifier
    Amount: Qualifier
    Currency: Qualifier
    Obsolete: Qualifier
    There are 2 records in the Contract table assigned to the Product in main table:
    123-1-Normal-1-100-BRL-False
    456-1-Normal-1-250-BRL-True
    1st doubt:
    Using the free-form search, if I set the field Contract-Amount to be less than 150, only the record 123-1-Normal-1-100-BRL is listed in the result, which is ok. But if I enter in the expression option the formula Contract.AMOUNT<150, both records are listed:
    123-1-Normal-1-100-BRL
    456-1-Normal-1-250-BRL ???
    Is this formula wrong?
    2nd doubt:
    The Contract info isn't a mandatory information. It's ok to have a product in the main table without a contract assigned to it. This can happen for example if all contracts for a product are obsolete. In the named search, if I select all products where obsolete equals to 'FALSE', only the records of the main table that have at least one valid contract are listed. As the contract info isn't mandatory, I was expecting a different behavior. Also the records that don't have a valid contract should be listed, but the contract information should be blank. Is there a way to do that?
    Thanks!

    check out these tables,
    VBAK Header Data
    VBAP Item Data
    VBAG Release Data by Schedule Line in Sch.Agrmt.
    VBUK Header Status and Administrative Data
    VBUP Item Status
    VBRL SD Document: Invoice List
    VBPA Partner
    VBKD Business Data
    VBKA Sales activities
    VBEP Schedule Line Data
    VBRK Billing: Header Data (invoice)
    VBRP Billing: Item Data (invoice)
    VBFA Sales Document Flow
    VTTP Shipment item
    regards,
    seenu

  • Need Logic for Inserting data into table from another table

    Hi,
    Could you please give me some logic on below:
    TABLE_A has columns A,B,C,D
    What i did
    ==========
    Created new table
    TABLE_1_A with columns A1,A2,B1,B2,B3
    Requirement
    ===========
    I should populate columns A1,A2 (table TABLE_1_A) with the data from column A (table TABLE_A)
    & simillarly populate columns B1,B2 with the data from B.
    the data is huge in the table_a.
    Database: 10g
    Thanks.

    Hi,
    Here's one way:
    INSERT INTO  table_1_a
            (a1, a2, b1, b2)
    SELECT      a,  a,  b,  b
    FROM      table_a
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    If you're asking about a DML statement, such as INSERT, the sample data will be the contents of the table before the DML, and the results will be state of the changed table(s) when everything is finished.
    Explain, using specific examples, how you get those results from that data.
    See the forum FAQ {message:id=9360002}

  • Incorrectly defined logical table source (for fact table X

    Hi!
    Imagine the following Physical Diagram:
    - Dim A
    - Dim B
    - Fact A
    - Fact B
    Joins:
    - Dim A is parent of Dim B
    - Fact B has a FK to Dim B
    - Fact A has a FK to Dim A
    Business Layer:
    - Logical Table Dim A
    - Logical Table Dim B
    - Logical Table Fact A
    - Logical Table Fact B
    Joins:
    - same joins (not FK Joins) that Physical Layer
    When we build a report that only has one column of Dim A and one column of Dim B (A is parent of B), the following error appears:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 15018] Incorrectly defined logical table source (for fact table "Fact A") does not contain mapping for [Dim A.col1, Dim B.col1]. (HY000)
    What is wrong?
    Help!
    Thanks.

    Hi,
    The joins of dimensions go via a fact table. In your case there is no common fact table.
    You can solve this by drag/drop a field from the physical table Dim B on the displayed logical table source of the logical table Dim A.
    Now the BI Server knows that Dim A and B have a physical relationship.
    Regards

Maybe you are looking for

  • SCCM 2007 R3 - 0x80004005 - Expand a string: %_SMSTSMDataPath%\Logs

    i'm still a noob to sccm, but here is my problem.  i'm trying to build and cap a win7x64 eprise image.  it gets to the setup win & sccm client then dies.  i had this exact same problem a couple of weeks ago but cannot remember how i fixed it.  i'm 90

  • Loading multiple swfs

    I need to have many movieClips and load them from an external swf. I can make that work using a movieClipLoader, but I need to gotoAndStop on a different part of the loaded movieClip timeline for each loaded instance. What's the best approach? Multip

  • SQL Developer Data Modeler notation

    Hi, I want to create a diagram for a database. While Data Modeler is very useful for generating DDL, I don't like that the only notation type you can choose from are Crows Notations and BachMan. I would like to use the Min-Max ISO notation but I don'

  • Why when I switch between a centre-aligned stroke and fill do my anchor points move?

    Hi there, I've been using Illustrator for many years and never noticed this happen before when I fill a shape - can anyone explain why this is happening? I'm drawing a logo using a centre-aligned stroke, rounded rectangle and another stroked path mer

  • How to turn off annoying ad sound/music on firefox whenever I open a website

    Hello I was hoping that I could get help with ad music that play whenever I open a new webside. It happens if I want to open a new website after being on the previous website after about a minute. I identify the source, I believe thanks to internet d