Trace the value in which table

Hi,
i have 3 tables
T1
node_id
T2
node_id, object_type
T3
node_id, object_type
my requirement is T1 node_id exists in which table(T2 or T3). If T1 node_id exists in T2 then return T2 object_type else return T3 object_type
can you please help me to achieve this.
i tried like this
SELECT DECODE (match_flag, 'Match', object_type, NULL)
  FROM (SELECT u1.node_id AS t1_column, u2.node_id AS t2_column,
               CASE
                  WHEN u1.node_id IS NULL OR u2.node_id IS NULL
                     THEN 'No Match'
                  ELSE 'Match'
               END match_flag,
               u2.object_type
          FROM (SELECT node_id
                  FROM t1) u1
               FULL OUTER JOIN
               (SELECT node_id, object_type
                  FROM t2) u2 ON u1.node_id = u2.node_id
WHERE ROWNUM <= 1;

This?
select t1.node_id,nvl(t2.object_type,t3.object_type) object_type
from t1
           left outer join t2
    on (t1.node_id = t2.node_id)
           left outer join t3
    on (t1.node_id = t3.node_id)

Similar Messages

  • Fetch the values from internal table inside an internal table (urgent!!)

    data : BEGIN OF PITB2_ZLINFO occurs 0,
             BEGDA LIKE SY-DATUM,
             ENDDA LIKE SY-DATUM,
             PABRJ(4) TYPE N,                       "Payroll Year
             PABRP(2) TYPE N,                       "Pay. Period
             ZL LIKE PC2BF OCCURS 0,
           END OF PITB2_ZLINFO.
    I have a internal table like this,
    How to Fetch the values from internal table inside an internal table.
    Kindly Help me on this..
    Regards,
    Ram.

    Hi,
    Try this....
    Loop at PITB2_ZLINF0.
    Loop at PITB2_ZLINF0-ZL.
    endloop.
    Endloop.
    Thanks...
    Preetham S

  • How to retrieve the values from a table if they differ in Unit of Measure

    How to retrieve the values from a table if they differ in Unit of Measure?

    If no data is read
    - Insure that you use internal code in SELECT statement, check via SE16 desactivating conversion exit on table T006A. ([ref|http://help.sap.com/saphelp_nw70/helpdata/en/2a/fa0122493111d182b70000e829fbfe/frameset.htm])
    If no quanity in result internal table
    - There is no adqntp field in the internal table, so no quantity is copied in itab ([ref|http://help.sap.com /abapdocu_70/en/ABAPINTO_CLAUSE.htm#&ABAP_ALTERNATIVE_1@1@]).
    - - Remove the CORRESPONDING, so quantity will fill the first field adqntp1.  ([ref|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm])
    - - Then loop at the internal table and move the quantity when necessary to the 2 other fields.
    * Fill the internal table
    SELECT msehi adqntp
      INTO TABLE internal table
      FROM lipso2
      WHERE vbeln = wrk_doc1
        AND msehi IN ('KL','K15','MT').
    * If required move the read quantity in the appropriate column.
    LOOP AT internal_table ASSIGNING <fs>.
      CASE <fs>-msehi.
        WHEN 'K15'.
          <fs>-adqnt2 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
        WHEN 'MT'.
          <fs>-adqnt3 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
      ENDCASE.
    ENDLOOP.
    - You could also create another table with only fields msehi and adqntp and then collect ([ref|http://help.sap.com/abapdocu_70/en/ABAPCOLLECT.htm]) the data to another table.
    Regards,
    Raymond

  • Can we trace the values in  a cursor if we debug the package?

    Can we trace the values in a cursor if we debug the package having a cursor?
    Does it shows cursor attributes like %rowcount,%notfound,%found etc?
    Because i am debugging a pachage , and I am getting the exception.
    And its after the fetching of a cursor I am hitting on the exception.
    If I click the profilier after I debug, its showing the error ora 1775::looping chain of synonyms.
    The scenario is after the fetching of cursor, i am hitting the exception and after debug If i see the profilier I am getting the error 1775::looping chain of synonyms.

    Firslty, thanks for your time.
    I am using the PLSQL developer.
    The select command in the cursor picks tha value but when it fetches, it is showing the error.
    Any idea what could be the reason.?
    FETCH get_notices ----would show ( rowcount =0,%open,first iteration), does that mean cursor is not picking any value?
    Because i have checked the select statement and it picks the value.

  • How enter the values in to table when create entries option is not working

    hi everyone,
         can u please tell me How enter the values in to table when create entries option is not working.
    it's urgent.
    thanking u all

    Hi Shree,
    how many entries u want to insert ,,
    is it a ztable or custom table ..
    just tell me ur clear requirement ..
    clarify the same ..
    if no options avaliable then if its less entries or some value u can do it through debugging ..
    if its bulk entries then u can write a program ..
    just let me know ..
    regards,
    VIjay

  • How to trace the value passed by select list

    Hi,
    Is it possible to know what value is passed by the select list.
    eg:
    :p1_testid -- is the select list name .
    if select list contains 3 values ... value1, value2, and value3. and I select value2 from the select list.
    I want to confirm it that the value I selected is the same value passed to the query.
    - select * from Test where Testid=:p1_testid;
    How to trace the value of :p1_testid before query execution.
    Thanks.

    check your session state to see what value the select list has..
    From developer tools at bottom of running page, select session, then look for the value associated with your select list..
    Thank you,
    Tony Miller
    UTMB/EHN

  • LOV Data will render dynamically based on the value in adv table

    Hi Friends,
    am wokring on the requirement of iprocuremnt
    1) in iprocurement checkout page we have option called edit lines , when i click edit lines , the lines items will show catalog items and non catalog items.
    2)if item should be non catalog delevere to location lov data should be restrict
    3)if item should be catalog delevere to location lov data should be all locations
    means dynamically how to restrict the lov data in line level advance table
    can you help me on how to achieve this requirement
    Thanks
    krish.

    If you are using messageLovInput you can try this approach.
    1. In your CO catch 'lovPrepare' event [this event is triggered when user clicks on the magnifying icon besids the lov]
    2. Extract the values based on which you want to filter the LOV data
    3. Call VO's initQuery method to modify the Where clause of VO related to this LOV.
    Code...
    String eventActionParameter = pageContext.getParameter(EVENT_PARAM);
    if(eventActionParameter.equals("lovPrepare")) {
    //Extract the values
    //Call a AM method to very the Where clause
    }

  • Query based report to pick up the value from differences table

    Hi,
    I am trying to pick up the value from change log differences feild but since it is system variable i am unable to pick it.which table i should pick up to get that .
    Regards-
    Monica.

    Hi Monica,
    This would be a tough job if you know the structure of the historical record tables.  You need to familiar with all those A tables first.  Any changes to one of the record would create a instance of the record before change.  AITM is for OITM, AIT1 is for ITM1 etc.  Which tables are you looking for?
    Thanks,
    Gordon

  • How to trace the message in which line of program used?

    Dear fellows,
           Many times when we run a t-code (especially standard t-code), it will return many message log. but when we debug the t-code to trace the error message, it is difficult to find why raise this error message. Even we can not find in which line of program. We can not use the where-to-used list in SE91 to trace, because it is not written like this:       message 033(FD) TYPE E.
           For example in validation(GGB0)  we use some message, but when this message come out, we didn't know this message in which program raise.  And it also can not be traced using message at in debug mode.
           In many case, the way of using message is not easy to be trace , but if we can find which line of program to raise this message, would help a lot for finding the cause problem.
           Is there any tool for us to trace message ?
           Thanks for your sincerely answer!

    Hello All,
    If the message log is filled like this
      L_S_MSG-MSGTY     = 'E'.
      L_S_MSG-MSGID     = 'BL'.
      L_S_MSG-MSGNO     = '303'.
      L_S_MSG-MSGV1     = '007'.
    Can you trace this message by putting a watch-point/break point? I guess no! If some has YES as answer, please feel free to correct me.
    That is why whenever filling a message log/return table it is important that we ensure that the message can be traced back using "where-used". Hence the usage of MESSAGE...INTO (or the pre-historic, IF 1 = 2 ... MESSAGE ... ENDIF) construct.
    BR,
    Suhas

  • How do I use the value of a table attribute outside the table?

    I have two tables that are master detail. But it might not be so obvious to the user before he knows how the page works that they are master detail. The tables are in separate showDetailItems in a panelAccordion and what I was thinking of was to show the value of one coloum in the selected row in the master in the text in the showdetail item that contains the detail table. But I can´t find the right expression to put into the accordion. How should the expression look like to get the value of an attribute in a table for use outside the table?

    Thanks for the suggestion but it doesn´t work. The first problem is that the page turns blank when I use that expression for the text in the showDetailItem and the second problem is that I don´t seem to be able to use the master table as a partial trigger. When I click edit in the partial trigger property I can´t shuttle the master table over to be a partial trigger to the showDetailItem even if the table has an id.
    Edited by: Atlantic Viking on Apr 2, 2009 6:24 AM
    Well I figured out how to come half way. I did the following things:
    1) Created an attribute value binding to the attribute I wanted to be shown in the showDetailItem
    2) Set the text property in the showDetailItem to this attribute value like this #{binding.attributeValue}
    To solve the problem I had with the partial triggers I continued like this
    3) Gave other components on the path from the showDetailItem to the master table id´s
    4) Clicked edit on the partial trigger property on the showDetailItem and was now able to shuttle the master table over to be a partial trigger.
    But I now got an other problem which looks like a bug. At first when I enter the page it looks fine but when I change focus in the master table to another row part of the showDetailItem containing the detail table disapears. The detail table still remains and works as it should but the part containing the text I tried to set above disapears and the text in the showDetailItem containing the master gets replaced by the text that was supposed to be in the showDetailItem containing the detail table. Any suggestions how to correct this are very welcome.
    Edited by: Atlantic Viking on Apr 2, 2009 6:59 AM

  • How to set the value of the column as the value of other table coulmn.

    dear friends
    i have a table SO_D having coulm (so_no,item_cd,qty,rate,unit)
    and anather table so_tax(so_no,tax_code,tax_percent,tax_amt,item_cd,flag)
    now i have ALL VALUES in the first table i.e so_d
    but in table so_tax i have all values except item_cd.
    the values in the so_tax table comes from so_d by the formula ((qty*rate)*percent(which in so_tax table))/100) corresponding to each item_cd
    here so_no and item_cd are primary key in so_d and foreign key in the so_tax.
    and for each so_no the item_Cd is unique and my repeat for new so_no in the table so_d.
    now i have the problem that in the table so_tax the value in the coulmn item_cd is blank .
    but the tax amount is calculated for each item_cd .
    now i want to update the table with the item_Cd values ad they are in the so_d table according to the tax amount calculated by using above formula.
    please suggest the solution..
    any query please ask
    i can provide values for the each table..
    thanks in advance

    Data sample for the table so_d is
    SO_NO ITEM_CD QTY RATE UNIT
    AT0064 12000135 15 22163 NOS
    AT0064 12000136 15 20337.82 NOS
    AT0064 12000137 15 21902.27 NOS
    AT0064 12000138 15 20337.82 NOS
    AT0064 12000139 15 20337.82 NOS
    AT0149 CO000109 2 20755 NOS
    AT0149 CO000110 1 2502 NOS
    AT0149 CO000111 1 2502 NOS
    AT0149 CO000112 1 2502 NOS
    AT0149 CO000113 1 9328 NOS
    AT0149 CO000114 1 15476 NOS
    AT0149 CO000115 1 82150 NOS
    AT0149 CO000116 1 2915 NOS
    AT0149 CO000117 1 11766 NOS
    AT0149 CO000118 1 2968 NOS
    AT0149 CO000119 1 2968 NOS
    AT0149 CO000120 1 3286 NOS
    AT0149 CO000121 1 7950 NOS
    AT0149 CO000122 1 1908 NOS
    SAMPLE DATA FOR SO_TAX
    SO_NO TAX_CODE PERCENT AMT ITEM_cD FLAG
    AT0064 X02 4 13297 Y
    AT0064 X02 4 12203 Y
    AT0064 X02 4 13141 Y
    AT0064 X02 4 12203 Y
    AT0064 X02 4 12203 Y
    AT0149 V16 14.5 6018 Y
    AT0149 V16 14.5 363 Y
    AT0149 V16 14.5 363 Y
    AT0149 V16 14.5 363 Y
    AT0149 V16 14.5 1353 Y
    AT0149 V16 14.5 2244 Y
    AT0149 V16 14.5 11912 Y
    AT0149 V16 14.5 423 Y
    AT0149 V16 14.5 1706 Y
    AT0149 V16 14.5 430 Y
    AT0149 V16 14.5 430 Y
    AT0149 V16 14.5 476 Y
    AT0149 V16 14.5 1153 Y
    AT0149 V16 14.5 277 Y
    HERE ITE_CD IS BLANK

  • Color the value in Advanced Table

    Hi,
    I have got a requirement to color value in advanced table based on condition.
    I have written a code in PR and it is working fine in jdeveloper and modified custom.xss file in $OA_HTML\cabo/styles folder.
    runtime i am setting a attribute value 'RedColor' in my attribute of a view object.
    when i deploy my code onto the server and copy custom.xss file into $OA_HTML\cabo/styles folder, bounce apache , clear browser cache. it is not working on instanace.
    below code which i have written in my processRequest of a controller.
    OAAdvancedTableBean tb = (OAAdvancedTableBean)webBean.findChildRecursive("RInstTable");
    OAColumnBean l_dueDateColumn = (OAColumnBean)tb.findChildRecursive("DueDatecol");
    OAMessageStyledTextBean dueDate = (OAMessageStyledTextBean)l_dueDateColumn.findIndexedChildRecursive("RDueDate"); //Job is the ID of column in table
    OADataBoundValueViewObject cssDueDate = new OADataBoundValueViewObject(dueDate,"DueDateColor");
    dueDate.setAttributeValue(UIConstants.STYLE_CLASS_ATTR, cssDueDate); //Setting Custom CSS
    below code whiich i have written in custom.xss file.
    <style selector=".RedColor">
    <includeStyle name="DefaultFontFamily"/>
    <property name="font-size">9pt</property>
    <property name="font-weight">Bolder</property>
    <property name="color">#FF0000</property>
    <property name="text-indent">3px</property>
    </style>
    Can any one throw some points on this.
    Regards
    Hitesh

    Hi,
    Did you check that the data Bound Value returned the object as 'RedColor'.Since You are using OADataBoundValueViewObject,check what the value is returned?
    In Mozilla, there is a tool called firebug, You can install that plugin and check if the className is properly assigned to the styled text and the CSS definition of the same is present in the CSS tab of firebug.
    Regards,
    Guru Krishnan V.

  • Eliminate the values from internal table

    I have an internal table with fields..
    begin of it occurs 0,
    ebeln
    matkl
    werks
    end of it.
    its filled with values..
    ebeln |  matkl | werks |
    12111 |   A123 | LK
    12111 |   A123 | LK
    12111 |   A123 | LK
    12111 |   A123 | LK
    12111 |   A123 | LK
    12111 |   A123 | LN
    12121 |   A124 | LK
    12121 |   A124 | LK
    12121 |   A124 | LK
    12122 |   A125 | LK
    12122 |   A125 | LK
    12122 |   A125 | LK
    12123 |   A126 | LN
    12123 |   A126 | LN
    Now I want to eliminate the values from the internal table where all ebeln and werks are different..for example..all 12111's should be eliminated from the internal table as the it has different werks assighned to one of the ebeln's..and I need only ebeln's with 12121 and 12123.
    Any suggention would be helpful..
    Thanks,
    M/

    Hi,
    DATA : v_ebeln LIKE  table name-ebeln,
                v_werks LIKE table name--werks.
    SORT itab BY ebeln werks .
    LOOP AT ITAB.
      ON CHANGE OF  itab-ebeln.
          Move : itab-ebeln TO v_ebeln,
                    itab-werks TO v_werks.
       ENDON.  
       IF ITAB-ebeln  NE  v_ebeln OR
          ITAB-werks NE v_werks.
       DELETE ITAB WHERE ebeln EQ ITAB-ebeln .
        clear  : v_ebeln , v_werks.
    ENDIF.
    ENDLOOP.

  • How to extract the values from WPBP table

    Hi experts,
    We are in preparation of a custom report.
    In the report we want to have a  value from WPBP table.
    We want to extract the value of Capacity utilization level from WPBP table.
    Could you please let me know the way to extract the value.
    Please advice.
    Regards,
    Sairam.

    Hi Sairam,
    Why do you try to get capacity utilization level from WBPB. Even if there is split in payroll capacity utilizatian level in WPBP shows the value in IT0008 basic pay.
    So instead you can get the required information from table PA0008 Field for capacity utilization level is BSGRD
    Regards;
    Okan

  • The position of the worker, from which table can I get?

    Hi,
    Whether a person with a given pernr, how can I know whether he is a manager or an employee etc.
    Which table and which field of this table.
    Thanks.

    Hi,
    To get the position for a person you need to go to table PA0001 table (PLANS field).
    Once you get the position, to check whether that position is Manager's position
    You need to go to table HRP1001 and check whether is there any entry exist for the position with relationship 'B002' (SUBTY field), if entry exists then the position is manager's position. The all the entries in SOBID fields are subordinate position to the managers position.
    Hope this helps,
    Shrinivas

Maybe you are looking for