Concatente field from table with node keys

HI All
I have table like the following
and i need to concatenate all field names that releated to given
nodekey until i will get to the root
Field names             parent key       node key
COMPLEXNODE1               1               4
COMPLEXNODE2               4               5
COMPLEXNODE3               5               6
NODE1                       1               7
NODE2                       7               8
For instance if the node key that i provided is 6
I will get in value field the following
value_field = COMPLEXNODE1/COMPLEXNODE2/COMPLEXNODE3
if the node key that was provided is 8
i will get
value_field = NODE1/NODE2
The issue here is that the table can have more than 3 levls deep...
Regards
Alex
Edited by: Alex Dean on Dec 1, 2010 1:15 PM

HI Rajasekhar Dinavahi ,
Thanks i try your code but there is a problem with your salution since i get the field route not in the order that i need
/COMPLEXNODE3/ /COMPLEXNODE2/COMPLEXNODE1
insted of
/COMPLEXNODE1/ /COMPLEXNODE2/COMPLEXNODE3
Regards
Alex

Similar Messages

  • Unique data record means you can't  update a record from ECC with same key.

    Unique data record means you can't  update a record from ECC with same key fileds right?
    Details: For example i have two requests Req1 and Req2 in DSO with unique data record setting checked. on day one Req1 has a filed quantity with value 10 in Active data table. On day two Req1 can not be overwitten from ECC with Req2 with the same key fields but different value 20 in the filed quantity because of the Unique data record settings. finally the delta load fails from ECC going to DSO because of this setting. is it right?
    I think we can only use unique record setting going from DSO to cube right?
    Please give me a simple scenario in which we can use this setting.
    I already search the threads and will assign points only to valuable information.
    Thanks in advance.
    York

    Hi Les,
    Unique Data Records:
    With the Unique Data Records indicator, you determine whether only unique data records are to be updated to the ODS object. This means that you cannot load a data record into the ODS object the key combination for which already exists in the system – otherwise a termination occurs. Only use this setting when you are sure that only unique data records are to be loaded into the ODS object (for example, single documents). A typical application of this is in the loading of mass data. It improves the load performance.
    Hope it Helps
    Srini

  • Maintenance View for custom table with foreign key relationship

    Hi Folks,
         I have created a custom table with foreign key relationship with other check tables. I want to create a maintenance view / tablemaintenance generator. What all things I need to take care for the foreign keys related fields while creating the maintenance view / tablemaintenance generator.
    Regards,
      santosh

    Hi,
    You do not have to do anything explicitely for the foreign key relationships in the table maintainance generator.
    Create the table maintainance generator via SE11 and it will take care of all teh foreign key checks by itself.
    Regards,
    Ankur Parab

  • Add Fields from table ADRC (Fields Name 1 to 4) for Open Item Processing

    Hi SAP Expert:
    Our client requires vendor/customer name to be displayed in the open item processing line layout for transaction code f-58, so they can double check if the vendor name is complete as intended. 
    We intend to add fields from table ADRC instead of REGUH since the characters in maintaining vendor/customer name is 40 characters and REGUH - ZNME1s are only 35 characters. 
    We have managed to add fields from ADRC and change the SAPDF05X program and were able to display the names in open item layout, except that the program seems to "automatically" create a generic table which only carries 30 characters of the vendor/customer name.  The source table should be RFOPS_DK but the program automatically looks up from table RFOPS_GEN for the particular fields - Name 1 to 4.  Is there a way to "instruct" the program to use RFOPS_DK instead of RFOPS_GEN?
    Hope this will merit somebody's attention... Thanks !!!

    Thanks,  i have assigned the layout via o7v3,  it is the program that i have a problem with,  actually another program that we change is the program MF05BFPO where it generates data to be displayed in the FBZ4 screen,  though we add a field with 40 characters (ADRC Name 1 to 4)  what the program dispalys is a 30 character Name1 to 4 from structure RFOPS_GEN. 
    My question is can i extend/change the structure RFOP_GEN to 40 characters,  is there any SAP standard program that will aftected if i do so?  thank very much...
    Lorena

  • How do you delete records from table with data in a select option

    how do you delete records from table with relevant to data in a select option..how to write coding

    Hi,
    Try
    if not s_select_option [ ] is initial.
    delete * from table
    where field in s_select_option.
    endif.
    commit work.
    Be careful though. If select option is emty, you will delete the entire table.
    Regards,
    Arek

  • Fetch value from Table with respect to APP_USER.

    Hi,
    i want to fetch value from Table with respect to APP_USER.
    i am using
    SELECT ID,NAME,FILE_OBJ_ID,MIME_TYPE,DOC_SIZE,BLOB_CONTENT,DESCRIPTION,UPLOAD_DATE,'Download' FROM DUMY_FILE where CREATED_BY =:APP_USER;
    Show me error
    failed to parse SQL query:
    ORA-00911: invalid characterThanks
    Edited by: 805629 on Jan 13, 2011 2:09 AM

    Hello,
    I too have the same problem.
    I am using this query:
    select manager from leave_mgmt where support_engg=:APP_USER
    and source type is SQL Query(return single value)
    but nothing is coming up in the text field. Its empty.
    Please advice. Thanks in advance.

  • Update PRODH field from table T179T

    hi,
    i want to update PRODH field from table T179T into table VBRP. for this we
    need to take selection option also.
    selection option will be :
    ·             Sales Organization (field VBRK-VKORG)
    ·       Billing Date Range (VBRK-FKDAT)
    ·       Distribution Channel (Vbrk-vtweg
    while i have done this for one field by using hard code but like:
    TABLES: VBRP.
    CLEAR VBRP.
    UPDATE VBRP SET PRODH = 'PLC01' WHERE VBELN = '0008300051'.
    SELECT SINGLE * FROM VBRP WHERE VBELN = '0008300051'.
    WRITE: VBRP-VBELN,VBRP-PRODH.
    but this is not the right way. please guide me how to solve this.

    TABLES: VBRP.
    CLEAR VBRP.
    UPDATE VBRP SET PRODH = 'PLC01' WHERE VBELN = '0008300051'.
    <b>commit work.</b>
    SELECT SINGLE * FROM VBRP WHERE VBELN = '0008300051'.
    WRITE: VBRP-VBELN,VBRP-PRODH.
    use commit work after update statement.
    But this code would make vbrp-vbeln as plc01 only.
    If you want to get the prodh value from t179t, then write a sleect on t179t and then update.
    TABLES: VBRP.
    CLEAR VBRP.
    select single prodh
      from t179t
    where......
    UPDATE VBRP SET PRODH = t179-prodh WHERE VBELN = '0008300051'.
    commit work.
    SELECT SINGLE * FROM VBRP WHERE VBELN = '0008300051'.
    WRITE: VBRP-VBELN,VBRP-PRODH.

  • How to hide a field from table maintenance view?

    Hi,
    How to hide a field from table maintenance view? 
    The field is used for data created date. I need to hide it from display.
    Thanks

    Chk this link.
    http://help.sap.com/saphelp_nw04/helpdata/en/66/33f52010dd11d6999300508b5d5211/frameset.htm
    Maintenance Attributes
    You can assign a maintenance attribute P to individual fields in the maintenance view definition in the Dictionary (SE11). It can be  H (hidden)
    H (hidden)
    A field flagged H is not displayed on the screen. This field must also be filled in the background by a routine at an event.
    The system writes R and H fields to the database like all other fields when a new data record is saved.

  • How to insert record in child table with foreign key

    Hi,
    I am using Jdeveloper 11.1.2.0. I have two master table one child table.
    How to insert and update a record in child table with foreign key ?
    I have created VO based on three EO(one eo is updatable other two eo are references) by using joined query.
    Thanks in Advance
    Edited by: 890233 on Dec 24, 2011 10:40 PM

    ... And here is the example to insert using sequenceimpl by getting the primary key of the master record and insert master and detail together.
    Re: Unable to insert a new row with a sequence generated column id
    -Arun

  • Lock escalation on table with no key/index

    Hi,
    I've got the table with single column only (int) and no indexes nor pk/uq, just auto-created statistics.
    now, in transaction, there is a command: SELECT <COL> FROM <TABLE> WITH (ROWLOCK UPDLOCK) WHERE <COL>=100
    Table has variable num of records but it doesn't go over 200k, usually below 60k. Column values are mostly unique but can be duplicated in minor portion.
    Question 1: when this select executes, what will be locked - row, page or entire table?
    Question 2: if I have PK/UQ/index and execute same SELECT as above, what will locked then?

    Hi,
    1. Please note that every lock taken by sql server has some memory associated with it so more the number of locks more memory it will use. To avoid this unnecessary usage sql server uses Lock escalation when it deems necessary that it would be better to
    lock whole table instead of locking whole row.
    There is no use here using UPDLOCK with select statement, it would just change locking behavior and would force U lock lets see example
    I have a table having structure as
    CREATE TABLE [dbo].[Logging](
    [Id] [int] IDENTITY(1,1) NOT NULL,
    [c1] [char](50) NOT NULL DEFAULT ('SOME MORE DATA')
    ) ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    it ha some 20 K records now lets concentrate on query which you asked
    begin transaction
    select @@SPID,ID,C1 from dbo.Logging with (ROWLOCK,UPDLOCK) where id=12
    --commit
    To see locks taken by this query we would run below query in other SSMS window
    Select
    resource_type,
    request_mode,
    request_status,
    request_session_id
    from sys.dm_tran_locks
    where resource_database_id=11--databse ID
    below is result
    You can see update lock bein taken on row and IX intent exclusive lock on object that is table and shared lock on database.
    Now if we change the query to scan whole table like below
    Now you can see Only exclusive lock is taken on whole table instead of taking on every row. If you see the query every row has predicate 'some more data' so ultimately a table scan would be required .
    Above is assuming default Isolation level
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Problems with retrieving data from tables with 240 and more records

    Hi,
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.
    I installed Oracle 11.2.0 Client and I started to have problems with retrieving data from tables.
    First I used the same connection string, driver and so on (O10 Oracle 10g) then I tried ORA Oracle but with no luck. The result is like this:
    I'm able to connect to database. I'm able to retrieve data but from small tables (e.g. with 110 records it works perfectly using both O10 and ORA drivers). When I try to retrieve data from tables with like 240 and more records retrieval simply hangs (nothing happens at all - no error, no timeout). Application seems to hang forever.
    I'm using Powerbuilder to connect to Database (either PB10.5 using O10 driver or PB12 using ORA driver). I used DBTrace, so I see that query hangs on the first FETCH.
    So for the retrievals that hang I have something like:
    (3260008): BIND SELECT OUTPUT BUFFER (DataWindow):(DBI_SELBIND) (0.186 MS / 18978.709 MS)
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=1
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): EXECUTE:(DBI_DW_EXECUTE) (192.982 MS / 19171.691 MS)
    (3260008): FETCH NEXT:(DBI_FETCHNEXT)
    and this is the last line,
    while for retrievals that end, I have FETCH producing time, data in buffer and moving to the next Fetch until all data is retrieved
    On the side note, I have no problems with retrieving data either by SQL Developer or DbVisualizer.
    Problems started when I installed 11.2.0 Client. Even if I want to use 10.0.1 Client, the same problem occurs. So I guess something from 11.2.0 overrides 10.0.1 settings.
    I will appreciate any comments/hints/help.
    Thank you very much.

    pgoel wrote:
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.Earlier (before installing new stuff) did you ever try retrieving data from big tables (like 240 and more records), if yes, was it working?Yes, with Oracle 10g client (before installing 11g) I was able to retrieve any data, either it was 10k+ records or 100 records. Installing 11g client changed something that even using old 10g client (which I still have installed) fails to work. The same problem occur no matter I'm using 10g or 11g client now. Powerbuilder hangs on retrieving tables with more than like 240 records.
    Thanks.

  • Data from two tables with no key fields

    Hi Friends,
    I want to retrieve data from mara and mseg tables,matnr from mara and menge from mseg but problem is there is no key fields
    from these two tables how can i retrieve the data from these two tables?
    regards,
    bikash

    Hi,
    You need to have a common field between 2 tables if you want to put a join between them.
    Or otherwise,
    Find the check table of the primary keys of the tables.
    Try to find the common fields from one of the check tables of the primary keys.
    Example,
    If you want to join tables A and B.
    Both tables don't contain common fields.
    A has primary key fields X and Y.
    go to check table of X or Y.
    Let check table of X is C.
    check any field in C which are exist in table B.
    Join tables A and C.
    Based on this pick the data from B.
    Regards,
    Prashant

  • Multiple entries in a Z table with same key fields

    Hi
    I do have a ZTABLE, with 3 key fields defined earlier. It consists of around 1 lakh records. Later onwards, two of the non keyfields have been made to key fields.
    This table is being populated with records at the time of saving a ztransaction.
    But some times, the system is updating the same records, some times twice, sometimes thrice, etc. I got to know that all fields (both key fields and non-key fields) of the record are same. That is, records are being updated in to the database table n number of times may be depending of some false logic in the program.
    If I tried to enter the same using SM30, it is showing me an error message stating that the record is already existing.
    What can be the reson?

    Hi,
    It seems there is some kind of data inconsistency..try to get all the records and then delete the duplicate entries through program....Now once u r done , from now onwards there won't be any duplicate entiers.,also before updating table use filters to avoid the duplication..
    Regards,
    Nagaraj

  • Select from 2 tables with common key and than left join(unique result)

    Hi,
    I have 2 tables that have a common id (Customer_id) and I have a third table which contain her key consist of 3 column ( Customer_id , rms_customer_id,billind_tree_id) and have the manager_name field
    I am using a left join because not all the customers have a manager.
    I need to take only the manager_name field from the left join but the problem is that I am not getting a unique name results because the customer_id is not the primary key(only part of )
    so I have use the following :
    left join
    ( select * from ACCOUNT_Manager am where
    rms_customer_id <= all (select rms_customer_id from ACCOUNT_Manager am2 where
    am2.customer_id = am.customer_id )) am
    on c.ID = am.CUSTOMER_ID (C is one of the first 2 tables with the ID as key)
    Is there anyway more efficient of doing it ?
    Thanks

    Please consider the following when you post a question. This would help us help you better
    1. New features keep coming in every oracle version so please provide Your Oracle DB Version to get the best possible answer.
    You can use the following query and do a copy past of the output.
    select * from v$version 2. This forum has a very good Search Feature. Please use that before posting your question. Because for most of the questions
    that are asked the answer is already there.
    3. We dont know your DB structure or How your Data is. So you need to let us know. The best way would be to give some sample data like this.
    I have the following table called sales
    with sales
    as
          select 1 sales_id, 1 prod_id, 1001 inv_num, 120 qty from dual
          union all
          select 2 sales_id, 1 prod_id, 1002 inv_num, 25 qty from dual
    select *
      from sales 4. Rather than telling what you want in words its more easier when you give your expected output.
    For example in the above sales table, I want to know the total quantity and number of invoice for each product.
    The output should look like this
    Prod_id   sum_qty   count_inv
    1         145       2 5. When ever you get an error message post the entire error message. With the Error Number, The message and the Line number.
    6. Next thing is a very important thing to remember. Please post only well formatted code. Unformatted code is very hard to read.
    Your code format gets lost when you post it in the Oracle Forum. So in order to preserve it you need to
    use the {noformat}{noformat} tags.
    The usage of the tag is like this.
    <place your code here>\
    7. If you are posting a *Performance Related Question*. Please read
       {thread:id=501834} and {thread:id=863295}.
       Following those guide will be very helpful.
    8. Please keep in mind that this is a public forum. Here No question is URGENT.
       So use of words like *URGENT* or *ASAP* (As Soon As Possible) are considered to be rude.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Remove fields from table key

    I define a customize table (maintenance only by cust., not SAP import).
    5 of the fields are the table keys.
    When I remove 2 fields from the key and adjust the table I get the following errors
    “Primary key change not permitted for value table ZT7IL60”
    “Activation of Table ZT7IL60 not possible (please check)”
    Any clue why and how to remove some fields from the key?

    hi there,
    the reason for  this error can be any....
    may be you are using that field in the foreign key reference of another table. thats y it is not allowing the change option as it will affect other table's values.
    another thing can be the one suggested in the above post.
    do reply if any of the methods mentioned helps.
    Do reward if helpful./

Maybe you are looking for

  • ITunes match and time machine

    I just got iTunes match... Will time machine automatically keep on backing up all my iTunes library too? Thanks!

  • This Apple ID has not yet been used with the iTunes Store.

    Hello. I want to download and install Xcode 4 in my new Mac Book Pro from Apple Store. I did the following: 1. I tried to sign in using the Apple Store application. 2. After provinding my Apple ID and my password I got the awful message "This Apple I

  • IMac online retailers

    I am looking to purchase a new iMac 27". 3.06 ghz, 4 gb ram, 1 tb drive, with an upgrade to the HD 4850 graphics card. Any suggestions of online retailers that may have this product? If I buy it from the Apple Store I pay Wisconsin sales tax of an ad

  • Saving a image without a background

    I did the tutorial on Removing Image Backgrounds with Fireworks. That works great, but I don't know how to save a image without a background. I am trying to save it for a website. I have Fireworks 8.0. I tried to save it as a Alpha Transparency GIF f

  • Spectrum Expert can't detect Wireless network and show SNR info

    Hello, We are using the version 3.2.163 of the Spectrum Expert on a shared laptop. I was able to see SSIDs under Active Devices and get display in SNR chart before. But recently for some reason, I can can't get SSIDs and only get interfering devices