Record level restriction in Main Table

Hi Forum,
I have a scenario where in we are maintaining master records related to multiple regions.
We have created users of a particular role to mainitain master records for each region.
Now what I want is when a regional user accesses the master records, I want the user to access records to his region.
I tried using Masks, but this can be set at role level. In my scenario all the regional users are with the same role.
All your suggestions and ideas are highly appreciated.
Regards
Madan

Hi Madan,
In console, for  every user/role there is tables and fields options.
Select the region as restriction value.
This will solve the problem.
If you have problem in doing this as I dont have console access now, I will try to send you the screenshots tomorrow.
Hope it will solve,
+ An
Pls close your questions if answered

Similar Messages

  • Applying Row level restrictions on a Table and Contexts

    Hi Techies,
    Here I have a question in applying the row level restrictions on a columns.
    Let me explain some more about the same,....
    I am working on Designer ( SAP BO XI3.1)
    In my universe, I have 6 Contexts , I have one main table in each context and I want to apply row level restriction on a column from each table involved in the context.
    When I am doing this only I am able to add the restriction on only one table from a context. and the rest other contexts are missing.
    here I want to apply the restrictions on all 6 tables in a single restriction to the group.
    Please help me on this....

    I think if you are applying row level restrictions on each tables that are being used in universe then u must be adding all the context in your webi reports.
    So I think you need to add tables and apply where condition on each tables and your restriction will work.
    I will create one demo universe and try to apply the same and revert you asap.

  • Creating record on second main table during import

    Hello all,
    I am importing data to a main table (materials), and I have a second main table linked to the materials main table to store supporting data.  Assuming I have a new record being imported that contains an entity that doesn't exist in that second main table, is it possible to create a record inside the second main table?  This functionality exists for lookup tables, if the lookup record doesn't exist you can configure the map to create the record in the lookup table.  Can the same thing be accomplished with multiple main tables?  I'm having trouble with this because I can't get any field aside from the primary key on the second main table to show up in the destination fields in the import manager.

    Hi,
    As you said, Assuming I have a new record being imported that contains an entity that doesn't exist in that second main table, is it possible to create a record inside the second main table?
    This scenario is quite possible.
    I have a Work Around and it should work according to me...
    See, In this case you have to create two maps, one for Main table (Primary) Import and another for Second Main table(Secondary).
    Before Importing Main table(Import) this file should be Imported to Second Main table import(Secondary) by putting that file to ready inbound port of Second Main table.
    So, Records entities that do not exist in secondary main table will get created and for existing records will get updated.
    Now when the same Source file import for Main table, that record entity would be already there in Secondary main table and as such you would not face any issue while importing through main table.
    Kindly let me know if you face any issue.
    Thanks and Regards,
    Mandeep Saini

  • Multiple Main Table Question

    I am new to MDM 7.1 & Multiple Main Tables. I have a very basic questionu2019
    My Requirement is that I have to keep Two Main Tables,
    1.      Manufacturer Parts Master Table and the key is Manufacturer Name + Manufacturer Part No (Two fields)
    2.      I  have another Main Table  called Manufacturer Parts Table and key will be Manufacturer Name + Manufacturer Part No (Two fields)
    My requirement is  that when I load data in to the 2nd Main table (Manufacturer parts Table) I have to validate against the Master table (Manufacturer Parts  Master Table) with the key combination of Manufacturer Name + Manufacturer Part No  and that this key combination must exists in the 1st table.( Manufacturer Parts Master Table.). If  not then it is an error.
    I know we can use the 1st table as lookup main table for the 2nd table but do we need to combine the key fields Manufacturer Name + Manufacturer Part No for both the tables to validate against the Manufacturer Parts Master table with the same key combination?.
    Anyone explains how I can do this?
    Also, Qualified tables still exits in MDM 7.1? OR we have to use  Tuples?

    Hi,
    1. Manufacturer Parts Master Table and the key is Manufacturer Name + Manufacturer Part No (Two fields)
    In Console: Say your 1st main table has Manufacturer Name + Manufacturer Part. No two fields which are Display fields. For this 1st Main table you should have your Edit Key mapping = Yes.
    In Import Manager: Your Remote Key in your MDM import Manager should be mapped with combination of these two fields using Partition Concept with some delimiter say ,
    e.g. for 1 record in your 1st main table when you right click on your Edit key mapping using MDM data Manager it has values as:
    RemoteSystem Key
    ABC MANF1,123
    So here Key is combination of Manufacturer Name + Manufacturer Part No (MANF1,123) which has delimiter ,
    2. I have another Main Table called Manufacturer Parts Table.
    In Console: For this 2nd Main table first of all, you will create a Field of type Lookup Main which is lookup to 1st main table say X. You will have some other field too in 2nd main table which is Display field and using it you can import data.
    In Import Manager: For 2nd Main table, your source fields again should be combination of Manufacturer Name + Manufacturer Part No using partition field concept with delimiter say , and map this Partition field here with field X which is lookup to main table. when you will do this you will see all your source values for this partition field gets mapped automatically for the records which are present in 1st main table and if there is any value which is not mapped it means that that manufacturer name + manufacturer Part no does not exist in 1st main table.
    You must set this property in Import Map, if you are importing data through Import server by right clicking on target mapped field X Set MDIS Unmapped Value handling = Fail which will take care if record exists in 1st main table then only record imported in 2nd main table else give error. As if record exists in 1st main table then while importing data through 2nd main table his value automatically gets mapped.
    Also, Qualified tables still exits in MDM 7.1? OR we have to use Tuples?
    For most of standard Master's e.g. Material SAP Note 1355137, Customer SAP Note 1412742: Tuple has been replaced using  Qualified table. But if you want, you can model data as per your requirement. You can still use Qualified table if business demands.
    Regards,
    Mandeep Saini

  • Record level lock on SAP ABAP table editing

    Hello All,
    I have a requirement wherein I need to give users ability to be able to update contents of a table. Currently, there are using maintenance view on the table for adding/editing contents of this table. However, this prevents other users from being able to enter the table and edit contents of other records within the table.
    Can anybody please guide me how do I go about giving record level edit lock on the table instead of entire table edit lock.
    Appreciate all responses.
    Thanks and Regards,
    Samta.

    Ok
    I  have had a request like yours, i.e the users could manage the same table in the same time.
    The standard behavior avoids it, because a lock of entire table is set.
    This was my solution:
    A) I've created a maintenance view for my table, and I set the attibute S (for subset) for all fields will be the key I want to lock.
    B) I've generated the maintenance table program for the view above.
    In this way if it try to manage the view by SM30, it'll be possible only to indicate the  values of the fields for the subset, so not all data of the table will be loaded, but only the records satisfying  the key.
    C) I've created a program to run SM30 for my view, using the fm VIEW_MAINTENANCE_CALL:
    .CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
           EXPORTING
                action      = 'S'  "Display mode
                view_name   = <table name>
           TABLES
                dba_sellist = tb_sellist
           EXCEPTIONS
                OTHERS      = 14.
    As you can see above, the SM30 is always called for DISPLAY only, in this way no standard lock is set
    D) I've use the event 19 in order to change the mode and set my lock:
    DATA: BEGIN OF MY_LOCK,
              MANDT       TYPE ZPPTA019-MANDT,
              WERKS       TYPE ZPPTA019-WERKS,
              /TRILOG/SE  TYPE ZPPTA019-/TRILOG/SE,
              COD_MOD_TAG TYPE ZPPTA019-COD_MOD_TAG,
            END OF MY_LOCK.
      DATA: W_SEL_LIST TYPE VIMSELLIST.
      DATA: VARKEY TYPE RSTABLE-VARKEY.
      FIELD-SYMBOLS: <MY_KEY> TYPE ANY.
      LOOP AT DBA_SELLIST INTO W_SEL_LIST
        WHERE VIEWFIELD = 'WERKS'
          OR  VIEWFIELD = '/TRILOG/SE'
          OR  VIEWFIELD = 'COD_MOD_TAG'.
        ASSIGN COMPONENT W_SEL_LIST-VIEWFIELD
           OF STRUCTURE MY_LOCK TO <MY_KEY>.
        IF SY-SUBRC = 0.
          MOVE W_SEL_LIST-VALUE TO <MY_KEY>.
        ENDIF.
      ENDLOOP.
      IF SY-SUBRC = 0.
        IF NOT MY_LOCK IS INITIAL.
          MY_LOCK-MANDT = SY-MANDT.
          VARKEY = MY_LOCK.
          CALL FUNCTION 'ENQUEUE_E_TABLEE'
            EXPORTING
              MODE_RSTABLE   = 'E'
              TABNAME        = 'ZPPTA019'
              VARKEY         = VARKEY
            EXCEPTIONS
              FOREIGN_LOCK   = 1
              SYSTEM_FAILURE = 2
              OTHERS         = 3.
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ELSE.
            MAINT_MODE = VIEW_ACTION = 'U'.
          ENDIF.
        ENDIF.
      ENDIF.
      CLEAR OLD_019.
    I hope it can help you
    Max

  • Any option to restrict SE16 record level access based on company code?

    Hi All,
    I have a requirement to restrict record level access in SE16 based on company code.
    Our SAP system has two company codes. The requirement is that users of one company code should not be able to see records of other company code in SE16.
    Is it possible through some exits/badis/other methods?
    Thanks in advance.
    Regards,
    Arun Mohan

    You could write a small front end that accepts the company code, applies custom authorization code for each value and retains or removes, then calls the transaction and enters the selections the user requested and that your authorization check resulting in "passing"....  Of course, you'd have to block those users from "pure" SE16...   I once worked in situation similar, users in one country couldn't see USA data, etc. I think someone wrote an entire new program, called by ZSE16, for that.

  • In an SAP Table is to possible to perfrom lock at the record level?

    Hi All,
      In an SAP Table/Ztable is to possible to perfrom lock at the record level?
    Is it possible to increease the size of the sap table or z-table to insert more records.
    For example I want to insert 50000 records into a z-table and the size category I have given as 0 means which can hold some 15thousand records.
    then what abt the remaining recors?
    how can I inser tthem?
    do I need to increase the manually or it will be done automatically?
    Could any one please explain this?
    Thanks in Advance.
    Regards.
    Abhilash.

    hi,
    u can insert no of  records into table based on ur size category.
    check these.
    0                0   to         1,200
    1            1,200 to         4,900
    2            4,900 to        19,000
    3           19,000 to        78,000
    4           78,000 to       310,000
    5          310,000 to       620,000
    6          620,000 to    25,000,000
    to lock records check this data.
    Lock mode
    Defines how to synchronize table record access by several users.
    The following modes exist:
    Exclusive lock
    The locked data can be read or processed by one user only. A request for another exclusive lock or for a shared lock is rejected.
    Shared lock
    Several users can read the same data at the same time, but as soon as a user edits the data, a second user can no longer access this data. Requests for further shared locks are accepted, even if they are issued by different users, but exclusive locks are rejected.
    Exclusive but not cumulative lock
    Exclusive locks can be requested by the same transaction more than once and handled successively, but an exclusive but not cumulative lock can only be requested once by a given transaction. All other lock requests are rejected.
    reward points if hlpful.

  • Filters at record level and filters restrictions at cell level

    Hello Crystal Report friends:
    We are aware that we can apply filters globally (record Level). We need to add additional filters(Restrictions) at cell level.How do we apply filters at a cell Level?
    Regards,
    Joe Gonzales

    And along with what Ian said be careful when exporting also, some suppressed fields may export even though you have supressed them, so you are not removing the data, just hiding it. If the user has rights to edit the report they could "unhide" the info.
    Depending on the version of CR you are using depends on the output, our export formats tend to change on how they work and what is exported etc.
    There are Various DB tools from SAP Enterprise that has the ability to do row level filtering if that is an option for you.
    Don

  • MultiValue LookUp Record Save in Main Table MDM

    Hello all,
                I am using SAP MDM Java API (5.5).
    I am trying to insert records into my Main Table.
    One of the fields of the Main Table is a Flat LookUp Table which is also a multi value.
    Can you kindly guide me how records will be inserted for the MultiValue table conceptually? Meaning how and what or whether record ids will be used? Kindly give me the code example also.
    Thanks in advance.
    Regards,
    Yogesh Bhatia

    Yogesh, for MVLookups, instead of the record Ids, a link is stored in the main table.
    Let me grab some piece of code for you. You can write to my communication id in my business card. I'll nevertheless post it here also.
    Regards,
    Nitin

  • Restricting at field/table level

    Hi all
    requiremnet is to restrict users of Role1 to make any changes in some fields in MDM. IS this Possible?
    For these fields I changed the access from execute to Read only in Role but still the user is able to make changes for that field.
    Is this a bug? I am on Sp6.
    regards-
    Ravi Kumar

    Hi Ravi,
    This is possible and its working fine with SP06 in the similar way you have stated.Now you have to check few things in your case.
    1. You are logging into data manager with the user of the role that has field level restrictions.
    2. Check the user for the roles in the Console i.e. User should have only one role on which restrictions are imposed.
    3. Load the Repository with Update Indives.
    Regards,
    Jitesh Talreja

  • How to map lookup main table field in another main table using MDM 7.1?

    We created a new SAP MDM 7.1 repository with multiple main tables.  The first main table is called ProductMaster table which contains Products information.  The ProductCode is the primary key and the only display field for the table during data loading process. The second main table is ProductByRegion table which has a main table lookup field ProductCode and a RegionId field.  These two fields (ProductCode and RegionId) combine as the PK for this main table.  Both main tables have key mapping enabled. 
    I was able to load ProductMaster table using Import Manager.  But Iu2019m having trouble to load data into ProductByRegion table using MDM Import Manager.  Although I have met all the 5 requirements below (excerpted from MDM Import Manager Reference Guide P.222), the ProductCode wonu2019t show up on the destination value pane.  If I mapped all productCode to NULL field, ProductCode wonu2019t load.  If I u2018Addu2019 all ProductCode to Destination Value pane, the Import Manager added duplicated rows to Product Master table while only loading 1 record to ProductByRegion table.  I canu2019t get ProductCode show up in Matching Destination Field list.  When I checked ProductMaster records in MDM Data Manager, I right-clicked on one of records, chose Edit Key Mappings, it didnu2019t show anything.  However, if I right-clicked on one of those duplicated rows, Edit Key Mapping shows remote system and key correctly.
    Where did I do wrong?  How can I fix the problem?
    Thank you for help in advance.
    From: SAP MDM Import Manager Reference Guide:
    Mapping to Main Table Lookup Destination Fields
    Import Manager handles main table lookup fields (Lookup [Main])
    differently than other MDM lookup fields. Specifically, Import Manager
    does not display the complete set of display field values of the records
    of the underlying lookup table. Instead, the values it displays for a main
    table lookup field are limited by both the key mappings for the lookup
    table and the values in the source file.
    Also, Import Manager does not automatically display the values of a
    Lookup [Main] destination field in the Destination Values grid when you
    select the field in the Destination Fields grid. Instead, for a main table
    lookup field value to appear in the Destination Values grid, all of the
    following conditions must be met:
    u2022 The lookup table must have key mapping enabled
    u2022 The lookup field must be mapped to a source field
    u2022 The source field must contain key values for the lookup table
    u2022 The destination value must have a key on the current remote system
    u2022 The destination valueu2019s key must match a source field value
    NOTE ►► The current remote system is the remote system that was
    selected in Import Manageru2019s Connect to Source dialog (see
    u201CConnecting to a Remote Systemu201D on page 416 for more information).
    Vicky

    Hi Michael,
    Thank you very much for your response.  I'm new to SAP MDM, I need some clarification and help regarding your solution. 
    I did use two maps to load ProductMaster and ProductByRegion separately.  Here were my steps:
    1. create main table ProductMaster with key mapping enabled at the table level and set ProductCode as unique and writable once (primary key).
    2. create a map to load ProductMaster record from a staging table located an oracle database.  But Key mapping didn't show anything when I looked at them using Data Manager.
    3. create main table ProductByRegion with a lookup field looking at ProductMaster table.  This field and RegionId combines as a unique field for ProductByRegion table. 
    4. create a map to load ProductByRegion table.  But ProductCode records only shows on the source pane not destination pane and can't be mapped properly.
    My questions:
    1. How can I "Ensure that you add key mapping info for all ProductMaster records" besides enabling Key Mapping on the table level?
    2. How can I define a concatenation of ProductCode and RegionId as a REMOTE KEY"?
    Thanks a lot for your help!
    Vicky

  • How to find the level of each child table in a relational model?

    Earthlings,
    I need your help and I know that, 'yes, we can change'. Change this thread to a answered question.
    So: How to find the level of each child table in a relational model?
    I have a relacional database (9.2), all right?!
         O /* This is a child who makes N references to each of the follow N parent tables (here: three), and so on. */
        /↑\ Fks
       O"O O" <-- level 2 for first table (circle)
      /↑\ Fks
    "o"o"o" <-- level 1 for middle table (circle)
       ↑ Fk
      "º"Tips:
    - each circle represents a table;
    - red tables no have foreign key
    - the table in first line of tree, for example, has level 3, but when 3 becomes N? How much is N? This's the question.
    I started thinking about the following:
    First I have to know how to take the children:
    select distinct child.table_name child
      from all_cons_columns father
      join all_cons_columns child
    using (owner, position)
      join (select child.owner,
                   child.constraint_name fk,
                   child.table_name child,
                   child.r_constraint_name pk,
                   father.table_name father
              from all_constraints father, all_constraints child
             where child.r_owner = father.owner
               and child.r_constraint_name = father.constraint_name
               and father.constraint_type in ('P', 'U')
               and child.constraint_type = 'R'
               and child.owner = 'OWNER') aux
    using (owner)
    where child.constraint_name = aux.fk
       and child.table_name = aux.child
       and father.constraint_name = aux.pk
       and father.table_name = aux.father;Thinking...
    Let's Share!
    My thanks in advance,
    Philips
    Edited by: BluShadow on 01-Apr-2011 15:08
    formatted the code and the hierarchy for readbility

    Justin,
    Understood.
    Nocycle not work in 9.2 and, even that would work, would not be appropriate.
    With your help, I decided a much simpler way (but there is still a small problem, <font color=red>IN RED</font>):
    -- 1
    declare
      type udt_roles is table of varchar2(30) index by pls_integer;
      cRoles udt_roles;
    begin
      execute immediate 'create user philips
        identified by philips';
      select granted_role bulk collect
        into cRoles
        from user_role_privs
       where username = user;
      for i in cRoles.first .. cRoles.count loop
        execute immediate 'grant ' || cRoles(i) || ' to philips';
      end loop;
    end;
    -- 2
    create table philips.root1(root1_id number,
                               constraint root1_id_pk primary key(root1_id)
                               enable);
    grant all on philips.root1 to philips;
    create or replace trigger philips.tgr_root1
       before delete or insert or update on philips.root1
       begin
         null;
       end;
    create table philips.root2(root2_id number,
                               constraint root2_id_pk primary key(root2_id)
                               enable);
    grant all on philips.root2 to philips;
    create or replace trigger philips.tgr_root2
       before delete or insert or update on philips.root2
       begin
         null;
       end;
    create table philips.node1(node1_id number,
                               root1_id number,
                               node2_id number,
                               node4_id number,
                               constraint node1_id_pk primary key(node1_id)
                               enable,
                               constraint n1_r1_id_fk foreign key(root1_id)
                               references philips.root1(root1_id) enable,
                               constraint n1_n2_id_fk foreign key(node2_id)
                               references philips.node2(node2_id) enable,
                               constraint n1_n4_id_fk foreign key(node4_id)
                               references philips.node4(node4_id) enable);
    grant all on philips.node1 to philips;
    create or replace trigger philips.tgr_node1
       before delete or insert or update on philips.node1
       begin
         null;
       end;
    create table philips.node2(node2_id number,
                               root1_id number,
                               node3_id number,
                               constraint node2_id_pk primary key(node2_id)
                               enable,
                               constraint n2_r1_id_fk foreign key(root1_id)
                               references philips.root1(root1_id) enable,
                               constraint n2_n3_id_fk foreign key(node3_id)
                               references philips.node3(node3_id) enable);
    grant all on philips.node2 to philips;
    create or replace trigger philips.tgr_node2
       before delete or insert or update on philips.node2
       begin
         null;
       end;                          
    create table philips.node3(node3_id number,
                               root2_id number,
                               constraint node3_id_pk primary key(node3_id)
                               enable,
                               constraint n3_r2_id_fk foreign key(root2_id)
                               references philips.root2(root2_id) enable);
    grant all on philips.node3 to philips;
    create or replace trigger philips.tgr_node3
       before delete or insert or update on philips.node3
       begin
         null;
       end;                          
    create table philips.node4(node4_id number,
                               node2_id number,
                               constraint node4_id_pk primary key(node4_id)
                               enable,
                               constraint n4_n2_id_fk foreign key(node2_id)
                               references philips.node2(node2_id) enable);
    grant all on philips.node4 to philips;
    create or replace trigger philips.tgr_node4
       before delete or insert or update on philips.node4
       begin
         null;
       end;                          
    -- out of the relational model
    create table philips.node5(node5_id number,
                               constraint node5_id_pk primary key(node5_id)
                               enable);
    grant all on philips.node5 to philips;
    create or replace trigger philips.tgr_node5
       before delete or insert or update on philips.node5
       begin
         null;
       end;
    -- 3
    create table philips.dictionary(table_name varchar2(30));
    insert into philips.dictionary values ('ROOT1');
    insert into philips.dictionary values ('ROOT2');
    insert into philips.dictionary values ('NODE1');
    insert into philips.dictionary values ('NODE2');
    insert into philips.dictionary values ('NODE3');
    insert into philips.dictionary values ('NODE4');
    insert into philips.dictionary values ('NODE5');
    --4
    create or replace package body philips.pck_restore_philips as
      procedure sp_select_tables is
        aExportTablesPhilips     utl_file.file_type := null; -- file to write DDL of tables   
        aExportReferencesPhilips utl_file.file_type := null; -- file to write DDL of references
        aExportIndexesPhilips    utl_file.file_type := null; -- file to write DDL of indexes
        aExportGrantsPhilips     utl_file.file_type := null; -- file to write DDL of grants
        aExportTriggersPhilips   utl_file.file_type := null; -- file to write DDL of triggers
        sDirectory               varchar2(100) := '/app/oracle/admin/tace/utlfile'; -- directory \\bmduhom01or02 
        cTables                  udt_tables; -- collection to store table names for the relational depth
      begin
        -- omits all referential constraints:
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'REF_CONSTRAINTS', false);
        -- omits segment attributes (physical attributes, storage attributes, tablespace, logging):
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SEGMENT_ATTRIBUTES', false);
        -- append a SQL terminator (; or /) to each DDL statement:
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SQLTERMINATOR', true);
        -- create/open files for export DDL:
        aExportTablesPhilips := utl_file.fopen(sDirectory, 'DDLTablesPhilips.pdc', 'w', 32767);
        aExportReferencesPhilips := utl_file.fopen(sDirectory, 'DDLReferencesPhilips.pdc', 'w', 32767);
        aExportIndexesPhilips := utl_file.fopen(sDirectory, 'DDLIndexesPhilips.pdc', 'w', 32767);
        aExportGrantsPhilips := utl_file.fopen(sDirectory, 'DDLGrantsPhilips.pdc', 'w', 32767);
        aExportTriggersPhilips := utl_file.fopen(sDirectory, 'DDLTriggersPhilips.pdc', 'w', 32767);
        select d.table_name bulk collect
          into cTables -- collection with the names of tables in the schema philips
          from all_tables t, philips.dictionary d
         where owner = 'PHILIPS'
           and t.table_name = d.table_name;
        -- execution
        sp_seeks_ddl(aExportTablesPhilips,
                     aExportReferencesPhilips,
                     aExportIndexesPhilips,
                     aExportGrantsPhilips,
                     aExportTriggersPhilips,
                     cTables);
        -- closes all files
        utl_file.fclose_all;
      end sp_select_tables;
      procedure sp_seeks_ddl(aExportTablesPhilips     in utl_file.file_type,
                             aExportReferencesPhilips in utl_file.file_type,
                             aExportIndexesPhilips    in utl_file.file_type,
                             aExportGrantsPhilips     in utl_file.file_type,
                             aExportTriggersPhilips   in utl_file.file_type,
                             cTables                  in out nocopy udt_tables) is
        cDDL       clob := null; -- colletion to save DDL
        plIndex    pls_integer := null;
        sTableName varchar(30) := null;
      begin
        for i in cTables.first .. cTables.count loop
          plIndex    := i;
          sTableName := cTables(plIndex);
           * Retrieves the DDL and the dependent DDL into cDDL clob       *      
          * for the selected table in the collection, and writes to file.*
          begin
            cDDL := dbms_metadata.get_ddl('TABLE', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportTablesPHILIPS, cDDL);
          exception
            when dbms_metadata.object_not_found then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('REF_CONSTRAINT', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportReferencesPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('INDEX', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportIndexesPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('OBJECT_GRANT', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportGrantsPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('TRIGGER', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportTriggersPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
        end loop;
      end sp_seeks_ddl;
      procedure sp_writes_ddl(aExport in utl_file.file_type,
                              cDDL    in out nocopy clob) is
        pLengthDDL  pls_integer := length(cDDL);
        plQuotient  pls_integer := null;
        plRemainder pls_integer := null;
      begin
          * Register variables to control the amount of lines needed   *
         * for each DDL and the remaining characters to the last row. *
        select trunc(pLengthDDL / 32766), mod(pLengthDDL, 32766)
          into plQuotient, plRemainder
          from dual;
          * Join DDL in the export file.                            *
         * ps. 32766 characters + 1 character for each line break. *
        -- if the size of the DDL is greater than or equal to limit the line ...
        if plQuotient >= 1 then
          -- loops for substring (lines of 32766 characters + 1 break character):
          for i in 1 .. plQuotient loop
            utl_file.put_line(aExport, substr(cDDL, 1, 32766));
            -- removes the last line, of clob, recorded in the buffer:
            cDDL := substr(cDDL, 32767, length(cDDL) - 32766);
          end loop;
        end if;
          * If any remains or the number of characters is less than the threshold (quotient = 0), *
         * no need to substring.                                                                 *
        if plRemainder > 0 then
          utl_file.put_line(aExport, cDDL);
        end if;
        -- record DDL buffered in the export file:
        utl_file.fflush(aExport);
      end sp_writes_ddl;
    begin
      -- executes main procedure:
      sp_select_tables;
    end pck_restore_philips;<font color="red">The problem is that I still have ...
    When creating the primary key index is created and this is repeated in the file indexes.
    How to avoid?</font>

  • Doubt on record level validation, pl. help

    Hi,
    I have base table block with 5 records displayed with a scroll bar but number of records not fixed depends up on requiremnet.. looks like,
    Main A/C Cd Sub A/C Cd Amount
    I want to have a validation which should not allow users to enter same combination of Main A/C Cd and Sub A/C Cd,
    For Ex:
    Main A/C Cd Sub A/C Cd Amount
    100181 CM0003 200.00
    100181 HK0001 100.00
    100181 HK0001 200.00
    In this example second and third records are having same
    Main A/C Cd and Sub A/C Cd which shd allow. As soon as they enter Main A/C Cd, Sub A/C Cd and enter or move to Amount field alert should be displayed.
    Hope it is a very clear example
    please help as soon as possible.
    Thanks in advance

    Thanks to every one for the help.
    let me make it clear, I want validation at form level only i.e. while entering records. Normally users enter at a time more than one record and finally after entering some transactions they save to database.
    So what I want is as soon as they enter a duplicate of combination of MAIN A/C CD and SUB A/C CD, when they leave SUB A/C CD field there should be a alert saying that you entered a duplicate record and raise form trigger failure.
    So in this way user immediately correct his mistake rather after entering all aound 20 records.
    basically it has to store MAIN A/C CD and SUB A/C CD either cancating both into a single variable for each record and after entering second record it should check with first record, is that enetered values are same, if same then raise alert else next record.
    Hope it is clear. but i am not able store into variable and check. I never used PL/SQL table or any arrays. please give me some idea on this.
    once again thanks for spending time...

  • Page and Record level Authentication / Access control.

    Hi,
    I hope some of you might have come across this kind of issues. I am trying to setup page level authentication and record level access control. Please see below for the detailed description.
    1. Does APEX have any functionality where I can implement my page level authentication schemes.
    Say there are 5 pages/tabs and 10 users, and I want to restrict access as follows.
    All users can read the data in all the pages.
    User 1 thru 8 can read all the pages and edit page 1 and 2
    User 9 and 10 can read and delete the records inside the page.
    2. Is there any mechanism, that supports record level access control.
    Example : There is a page, it shows a product information of all the products. Is there a mecanism inside APEX wherein this page shows only the products created by it's creater (any end user)
    Is there a way in APEX, we can implement this functionality without having user information stored in the DB. ?
    Thanx in advannce.
    Vijay.

    Vijay,
    When a user creates the product why not store the user who created it in a column in the same table. That way you can write something like this:<BR>
    CREATE TABLE products_tab
      productid NUMBER PRIMARY KEY,
      product_name VARCHAR2(200),
      user_created VARCHAR2(30)
    );<br>
    SELECT
      productid,
      product_name,
      ( CASE
          WHEN user_created = :F_USER THEN
            --link to edit page goes here
          ELSE '<nbsp>'
        END ) edit_link,
      ( CASE
         WHEN user_created = :F_USER THEN
           --link to delete page goes here
         ELSE '<nbsp>'
        END ) delete_link
    FROM products_tab<br>
    I don't believe you can use an authorization scheme on a button the way you desired. It either displays the column or it doesn't.<br><br>
    Hope this helps.<br><br>
    chet<br><br>

  • Limit on number of Main tables in a repository

    Hi experts,
    Is there any limit on number of main tables being maintained  in a repository? Do we face any performance issue or any such issue if we maintain 20-30 or more main tables in data model? Please share your experience or any documentation link if any.
    Thanks,
    Vineet

    Hi Vineet,
    In Latest version of SAP MDM which is 7.1 we have the liberty to use multiple Main tables so answer to your question is yes we can use 20-30 main tables, now the question is that what type of data model you are prepairing this question is just to understand your entire structure and may be suggest some thing at higher level on which you can think and then take corrective action as per your thoughts.
    Generally even if you are integrating Customer/Products in single repository and then designing the main table you wont have to prepare such huge number of main tables you can have these two main tables and then rest of then as sub tables and refer it to each other also you need to know what imapct it will have on system performance becuase they would be referring to each other and also if you are creating some thousands of records in each repository then it is more advisable to use limited number of main tables and use MDM to it's fullest capability by designing such model that we have best utlisation of server performance.
    Hope it helped a bit.
    Let me know if you need any further information on same.
    Thanks and Regards
    Praful.

Maybe you are looking for

  • I am having a problem connecting 2 PC's at once.

    Ok, we just bought a new PC, which is running Win7 our other PC is running Vista. We are trying to connect both of them to the internet at once, but it is not working. Both can access the internet just fine, just not at the same time. The Vista PC's

  • New message and bbm notifications have disappeared

    Hi, im on a blackberry curve 8520 and am having problems with the new message, bbm and facebook notifications. they were all working fine and suddenly the phone froze, now that it has recovered none of these unread message indicators are appearing ev

  • ABT1N Error - Transfer to Non Affiliated Company with Manual Revenue

    Posting with transaction type 210 is not possible here, see long text Message no. AAPO177 Diagnosis Transaction type 210 has a depreciation area limitation, although posting is not mandatory in all of the depreciation areas entered. However, it is no

  • Can't remove proxy

    I'm having trouble removing the proxy from the patching setup. I'm using GC 10g R3. Every time I try to set it back to direct Internet connection, it gives me a Error: "Proxy Test resulted in Exception" when I click on the apply button. I need to rem

  • TS1424 I only got part of a song, how do I get the whole song?

    I bought a song and only got part of it, how do I get the entire song?