Want functionality Like SM30 but record lock instead of table lock

Hi,
Like SM30 (Table maintenance) ,i want to create some ZTcode to mainten Ztable data entry.
In this, can i put lock at record level instead of table table ???
So that user can have access only for Display & New entries & not for changing existing entries.
Can anybody help me.
Thanks
Jaya

Hi,
  Create a Ztcode for the the table in the transaction se93 with option Transaction with parameters.
Tick the check box skip the initial screen.
In Default values ,
Name of the screen field    Value
VIEWNAME                      Ztablename
SHOW                             X
Fill as above.
Regards,
Jyothi

Similar Messages

  • Similar Functionality like SM30

    Hi,
    I created a Z-Table. I don't want to generate Table maintenance. In Production System the Users don't have access to SM30 for insert/delete/modify the records in the table.
    Is there any other way to give some program to the users for similar functionality like SM30?
    anybody written any program on this issue?
    any idea?
    Thanks in advance,
    fractal

    Hi Fractal,
    Follow these steps:
    1. Goto T-code (se93) and create a custom trasaction say ztest.
    2. while creating give some short test and check the radio button  
    <b>Transaction with parameters(parameter transaction)</b>
    3.In the next screen assign these values:
       Transaction --> SM30
       Screen  --> Give the screen number which is seen in the table maintenence
                        screen in system--> status which you can directly go and find
                        through the T-code sm30.
       And in the Name of the Screen field as VIEWNAME and Value as the name of
       your Custom Table.
    Now you can provide this T-Code for users to maintain the table.
    Regards,
    Vinod.
    NOTE: PLZ close the issue if solved.

  • Identifying deadlocked resources in graph with 1 row lock and 1 table lock

    Hi, I have run into repeated occurrences of the deadlock graph at the bottom of this post and have a few questions about it:
    1. It appears that proc 44, session 548 is holding a row lock (X). Is the waiter, proc 30, session 542, trying to acquire a row lock (X) also or an exclusive table lock (X) on the table containing that row?
    2. Under what circumstances would something hold a row exclusive table lock (SX) and want to upgrade that to a share row exclusive table lock (SSX)?
    3. Our table cxml_foldercontent has a column 'structuredDataId' with a FK to cxml_structureddata.id and an ON DELETE SET NULL trigger. Would this help explain why an "update" to one table (i.e.g cxml_foldercontent) would also need to acquire a lock in a foreign table, cxml_structureddata?
    4. What is the difference between "Current SQL statement:" and "Current SQL statement for this session:"? That terminology is confusing. Is session 542 executing the "update" or the "delete"?
    5. In the "Rows waited on:" section is it saying that Session 542 is waiting on on obj - rowid = 0000BE63 - AAAL5jAAGAAA6tZAAK or that it is has the lock on that row and other things are waiting on it?
    A couple of notes:
    - the cxml_foldercontent.structuredDataId FK column has an index on it already
    Deadlock graph:
                           ---------Blocker(s)--------  ---------Waiter(s)---------
    Resource Name                    process session holds waits  process session holds waits
    TX-003a0011-000003d0        44       548     X               30        542             X
    TM-0000be63-00000000       30       542     SX              44        548     SX    SSX
    session 548: DID 0001-002C-000002D9     session 542: DID 0001-001E-00000050
    session 542: DID 0001-001E-00000050     session 548: DID 0001-002C-000002D9
    Rows waited on:
    Session 542: obj - rowid = 0000BE63 - AAAL5jAAGAAA6tZAAK
      (dictionary objn - 48739, file - 6, block - 240473, slot - 10)
    Session 548: no row
    Information on the OTHER waiting sessions:
    Session 542:
      pid=30 serial=63708 audsid=143708731 user: 41/CASCADE
      O/S info: user: cascade, term: unknown, ospid: 1234, machine:
                program: JDBC Thin Client
      application name: JDBC Thin Client, hash value=2546894660
      Current SQL Statement:
    update cascade.cxml_foldercontent set name=:1 , lockId=:2 , isCurrentVersion=:3 , versionDate=:4 , metadataId=:5 , permissionsId=:6 , workflowId=:7 , isWorkingCopy=:8 , parentFolderId=:9 , relativeOrder=:10 , cachePath=:11 , isRecycled=:12 , recycleRecordId=:13 , workflowComment=:14 , draftUserId=:15 , siteId=:16 , prevVersionId=:17 , nextVersionId=:18 , originalCopyId=:19 , workingCopyId=:20 , displayName=:21 , title=:22 , summary=:23 , teaser=:24 , keywords=:25 , description=:26 , author=:27 , startDate=:28 , endDate=:29 , reviewDate=:30 , metadataSetId=:31 , expirationNoticeSent=:32 , firstExpirationWarningSent=:33 , secondExpirationWarningSent=:34 , expirationFolderId=:35 , maintainAbsoluteLinks=:36 , xmlId=:37 , structuredDataDefinitionId=:38 , pageConfigurationSetId=:39 , pageDefaultConfigurationId=:40 , structuredDataId=:41 , pageStructuredDataVersion=:42 , shouldBeIndexed=:43 , shouldBePublished=:44 , lastDatePublished=:45 , lastPublishedBy=:46 , draftOriginalId=:47 , contentTypeId=:48  where id=:49
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    delete from cascade.cxml_structureddata where id=:1

    Mohamed Houri wrote:
    What is important for a foreign key is to be indexed (of course if the parent table is deleted/merged/updated, or if a performance reason imposes it). Wether this index is unique or not doesn't matter (as far as i know).But, you should ask your self the following question : what is the meaning of having a 1 to 1 relationship between a parent and a child table ? if you succeed to create a unique index on your FK then this means that for each PK value corresponds at most one FK value!! Isn't it? is this what you want to have?Thanks, as I mentioned above, cxml_structureddata is actually the child table of cxml_foldercontent with 1 or more records' owningEntityId referring to rows in cxml_foldercontent. The reason for the FK on cxml_foldercontent.structuredDataId is a little ambiguous but it explained above.
    Will a TX-enqueue held on mode X always be waited on by another TX-enqueue row lock X? Or can it be waited on by an Exclusive (X) table lock?Not really clear. Sorry, are you saying my question is unclear or it's not clear why type of eXclusive lock session 542 is trying to acquire in the first line of the trace? Do you think that the exclusive lock being held by session 548 in the first line is on rows in cxml_foldercontent (due to the ON DELETE SET NULL on these child rows) or rows in the cxml_structureddata that it's actually deleting?
    Is there any way for me to tell for certain?
    The first enqueue is a TX (Transaction Enqueue) held by session 548 on mode X (exclusive). This session represents the blocking session. At the same time the locked row is waited on by the blocked session (542) and the wait is on mode X (exclusive). So put it simply, we have here session 542 waiting for session 548 to release it lock (may be by commiting/roll backing). At this step we are not in presence of a deadlock.
    The second line of the deadlock graph shows that session 542 is the blocking session and it is doing a TM enqueue (DML lock) held on SX(Shared eXclusive). While session 548(which is the waiting session) is blocked by session 542 and is waiting on SSX mode.
    Here we see that 548 is blocking session 542 via a TX enqueue and session 542 is blocking session 548 via a TM enqueue ---> That is the deadlock. Oracle will then immediately choose arbitrarlly a victim session (542 or 548) and kill its process letting the remaining session continuing its work.
    That is your situation explained here.Thanks, any idea why session 542 (the DELETE from cxml_structureddata) would be trying to upgrade it's lock to SSX? Is this lock mode required to update a child tables foreign key columns when using an ON DELETE SET NULL trigger? Having read more about SSX, I'm not sure I understand in what cases it's used. Is there a way for me to confirm with 100% certainty specifically which tables in the TM enqueue locks are being held on? Is session 548 definitely trying to acquire an SSX mode on my cxml_foldecontent table or could it be cxml_structureddata table?
    (a) Verify that all your FK are indexed (be carreful that the FK columns should be at the leading edge of the index)Thanks, we've done this already. When you say the "leading edge" you mean for a composite index? These indexes are all single column.
    (b) Verify the logic of the DML against cxml_foldercontentCan you be more specific? Any idea what I'm looking for?

  • [SOLVED] Where are standard library functions like getchar() defined?

    I'm new to programming, and I'm curious about the definitions of standard library functions like getchar(), but when I look in stdio.h, all I see are function prototypes. Where is the actual definition? Is it built into the compiler?
    Thanks for your help.
    Last edited by nbtrap (2012-02-21 17:24:31)

    KingX wrote:That would be in stdio.c, stdio.h is the header file.
    Thank you, I think I understand now. Correct me if I'm wrong: stdio.c is source code for glibc, which is compiled into a shared object file that is distributed with the glibc package. My only question would then be: how does the compiler know to link to the object file when it's not explicitly stated. For example when I compile a program, why do I not have to type:
    gcc program.c /usr/lib/libc.so
    and why does
    gcc program.c
    suffice?

  • Locking the Custom table

    I have a custom tble zcustom_tab. I am modifying the entries in the program .  Right now i am locking the table.
    Now instead of table locking, i want the record level locking.
    How ?

    Hi,
    try if this code helps.
    *& Report  ZLOCKING                                                    *
    REPORT  zlocking                                .
    DATA : tab_emp TYPE TABLE OF zemp_51772,
           wa_emp TYPE zemp_51772.
    wa_emp-emp_no = '102'.
    wa_emp-emp_id = '157'.
    wa_emp-emp_name = 'SIVA'.
    wa_emp-emp_dept = 'SAP'.
    APPEND wa_emp TO tab_emp.
    CLEAR wa_emp.
    wa_emp-emp_no = '128'.
    wa_emp-emp_id = '138'.
    wa_emp-emp_name = 'RAMA'.
    wa_emp-emp_dept = 'SAP'.
    APPEND wa_emp TO tab_emp.
    CLEAR wa_emp.
    wa_emp-emp_no = '133'.
    wa_emp-emp_id = '121'.
    wa_emp-emp_name = 'KRISHNA'.
    wa_emp-emp_dept = 'SAP'.
    APPEND wa_emp TO tab_emp.
    CLEAR wa_emp.
    CALL FUNCTION 'ENQUEUE_E_TABLEE'
    EXPORTING
       mode_rstable         = 'X'
       tabname              = 'ZEMP_51772'
      varkey               =
      X_TABNAME            = ' '
      X_VARKEY             = ' '
      _SCOPE               = '2'
      _WAIT                = ' '
      _COLLECT             = ' '
    EXCEPTIONS
       foreign_lock         = 1
       system_failure       = 2
       OTHERS               = 3
    IF sy-subrc EQ 0.
      INSERT zemp_51772 FROM TABLE tab_emp.
    ENDIF.
    CALL FUNCTION 'DEQUEUE_E_TABLEE'
    EXPORTING
       mode_rstable       = 'X'
       tabname            = 'ZEMP_51772'
      VARKEY             =
      X_TABNAME          = ' '
      X_VARKEY           = ' '
      _SCOPE             = '3'
      _SYNCHRON          = ' '
      _COLLECT           = ' '
    IF sy-subrc EQ 0.
      WRITE:/ 'Unlocked the Table'.
    ENDIF.
    Thanks&regards,
    Sravani.

  • A sample code to check records of a system table?

    hi ABAP4 experts,
    We are pretty new at ABAP4.  We would be appreciated if you can provide a sample code to check how many records and calculate a total amount for a specific field, e.g., DMBTR in a system table, e.g., BSEG.  Note: there is no any selection for this table BSEG, we just want to get the total record count in this table and also the total amount for a specific field e.g. DMBTR in this table.
    Do we have to use an internal table to transfer all the records of BSEG into the internal table to get the result?
    We will give you reward points!

    Hi Kevin,
    Using SUM directly in SQL will NOT work for table BSEG because BSEG is pool table. You will get an ABAP error.
    "Aggregate functions and the addition DISTINCT are not supported in field lists for pooled and cluster tables".
    You need an internal table to transfer all data from BSEG and perform calculation for count and sum.
    Concerning about performance running perhaps you can code something like this.
    REPORT ZZFLTEST NO STANDARD PAGE HEADING.
    TABLES: BSEG.
    DATA: CURS          TYPE CURSOR,
          PACKAGE_SIZE  LIKE RMCS4-MC_CM_PSIZE VALUE '10000'.                                                                               
    DATA: BEGIN OF I_BSEG OCCURS 0,
            BELNR TYPE BSEG-BELNR,
            BURKS TYPE BSEG-BURKS,
            GJAHR TYPE BSEG-GJAHR,       
            BUZEI TYPE BSEG-BUZEI,       
            DMBTR TYPE BSEG-DMBTR,
            SHKZG TYPE BSEG-SHKZG.
    DATA: END OF I_BSEG.
    DATA: TOT_DMBTR TYPE BSEG-DMBTR,
          TOT_REC   TYPE I.
    SELECTION-SCREEN BEGIN OF BLOCK B01 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS: P_SIZE LIKE RMCS4-MC_CM_PSIZE DEFAULT '10000'.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK B01.
    START-OF-SELECTION.
      PACKAGE_SIZE = P_SIZE.
      OPEN CURSOR WITH HOLD CURS FOR
      SELECT BELNR BURKS GJAHR BUZEI DMBTR SHKZG
      FROM BSEG
      WHERE BELNR <> SPACE
        AND BURKS <> SPACE
        AND GJAHR <> SPACE
        AND BUZEI <> SPACE.
    *Fetch internal table I_BSEG for every 10000 records.
      DO.
        FETCH NEXT CURSOR CURS
        INTO TABLE I_BSEG PACKAGE SIZE PACKAGE_SIZE.
        IF SY-SUBRC <> 0.
          EXIT.
        ENDIF.
      ENDDO.
      CLOSE CURSOR CURS.
      LOOP AT I_BSEG.
        TOT_REC = TOT_REC + 1.
        IF I_BSEG-SHKZG = 'S'.
          TOT_DMBTR = TOT_DMBRT + I_BSEG-DMBTR * -1.
        ELSE.
          TOT_DMBTR = TOT_DMBTR + I_BSEG-DMBTR.
        ENDIF.
      ENDLOOP.
      WRITE: / 'TOTAL BSEG-DMBTR:', TOT_DMBTR,
             / 'TOTAL RECORD:    ', TOT_REC.
    END-OF-SELECTION.
    Hope this will help.
    Regards,
    Ferry Lianto

  • How to get the last record of an internall table ....

    Hi All..
    i want to get the last record of an internal table itab, and i want the the value of the last record.

    Hi,
         Use describe statment.
    data: lv_line type i.
        Describe table itab lines lv_line.
        read table itab into wa_itab index lv_line.
    regards,
    Santosh Thorat

  • To count number of records in an internal table for a condition

    Hello All,
            I want to count number of records in an internal table for a condition.
    For e.g. -- I have one internal table IT which having fields F1, F2, F3, F4, F5.
                     Now, I want number of records in itnternal table IT where F1 = 'ABC'.
    Is it possible to do..?? If yes, then how.??
    Thanks in advance...!!
    Regards,
    Poonam.

    Hi,
    If you mean an internal table, there are a few ways to do this.
    1 One would be to loop over the table with a WHERE clause and increment a counter.
    data: lv_counter type i.
    clear lv_counter.
    loop at itab where fld1 = 'ABC'.
    lv_counter = lv_counter + 1.
    endloop.
    lv_counter now has the number of rows per the condiction.
    2  Well, you may want to try this as well, and compare to the LOOP way. Not sure what kind of overhead you may get doing this way. Here ITAB is our main internal table, and ITAB_TMP is a copy of it. Again I think there may be some overhead in doing the copy. Next, delete out all records which are the reverse of your condition. Then whatever is left is the rows that you want to count. Then simply do a LINES operator on the internal table, passing the number of lines to LV_COUNT.
    data: itab type table of ttab.
    data: itab_tmp type table of ttab.
    itab_tmp[] = itab[].
    delete table itab_tmp where fld1  'ABC'.
    lv_count = lines( itab_tmp ).
    Thanks & Regards,
    ShreeMohan

  • BC4J tag - add new record only in child table using join query

    Hi,
    I have developed the struts base jsp for BC4J component application using jdeveloper wizard.
    i have first developed the BC4J component. using emp table and dept table,
    also developed the association between emp and dept , and create view object using created association.
    when i haae developed the the struts base jsp for BC4J applicaion using alerady created view object. it creates automatically DataEditComponent.jsp and DataTableComponent.jsp and etc...
    and when i want to add new row or record it automatically add the entry in both table ,
    in above scenario i have used dept as master and emp as child table.
    what is the solution , if i want to add row or record in only emp table.
    please help me

    Hi Reetesh,
    I have written following code into the ADD ROW button
    System.out.println("Coming in Click Event");
    OAApplicationModuleImpl am = (OAApplicationModuleImpl) pageContext.getApplicationModule(webBean);
    OAWebBean innerTablebean = (OAWebBean)webBean.findChildRecursive("region12");
    OATableBean innerTable = (OATableBean)webBean.findChildRecursive("innerTablebean");
    OAInnerDataObjectEnumerator enum = new OAInnerDataObjectEnumerator(pageContext,innerTablebean);
    while(enum.hasMoreElements())
    RowSet innerRowSet = (RowSet) enum.nextElement();
    Row []rowsInRange = innerRowSet.getAllRowsInRange();
    OARow newRow = (OARow) innerRowSet.createRow();
    OADBTransaction dbt = am.getOADBTransaction();
    Number b = dbt.getSequenceValue("PK_XX_BATCH_PROGRAM_PARAMETERS");
    newRow.setAttribute("ProgramId", b);
    newRow.setAttribute("ProgramParmId",b);
    newRow.setAttribute("ParameterName",new String(""));
    newRow.setAttribute("ParameterDataType",new String(""));
    newRow.setAttribute("ParameterInOutType",new String(""));
    innerRowSet.insertRow(newRow);
    Now the problem occurs only when there are more than one rows in parent table... As many rows are there in parent table that many times the rows are being added.
    With Regards,
    Sandip

  • How to select first several records from a database table by using select?

    Hi,
       I want to select first 100 records from a database table by using select clause. How to write it?
       Thanks a lot!

    hai long!
                 well select statement is used to retrive
    records from the database.
    following is the syntax to be used.
    1) select *  into corresponding fields of itab from basetable where condition.
    endselect.
      ex: select * into corresponding fields of itab from mara
                where matnr >= '1' and  matnr <= '100'.
           append itab.
          endselect.
    select * is a loop statement.it will execute till matnr is less than or equal to 100.
    note: you can also mention the required field names in the select statement otherwise it will select all the field from table mara.
    note: itab means your internal table name.
    hope you got the required thing.if it really solved u r problem then award me the suitable points.<b></b>

  • Disk space transaction  and temp table lock  in oracle

    Hi,
    Today many sessions used to get disk space transaction lock and temp table lock and i am seeing these locks first time in my Production database,
    is there any workaround to avoid this contension.
    Thanks
    Prakash GR

    Post your version (all 3 decimal places).
    Post the SELECT statement and results that have led you to this conclusion.
    Other than the fact that you have seen a number what, precisely, is the issue.

  • I have an original iPhone running version 2.2.1.  I wish to get rid of the phone, but before discarding it I want to remove the email records, phone book information, and photos.  I would like to leave the other apps in place.  Any suggestions?

    I have an original iPhone running version 2.2.1.  I wish to get rid of the phone, but before discarding it I want to remove the email records, phone book information, and photos.  I would like to leave the other apps in place.  Any suggestions?

    Delete you mail account on the phone and disable to sync your mail account in the info pane in iTunes with your phone connected, same for contacts. Also deselect photo syncing in the photo pane. After the following sync, your mail, contact and photos should be gone.
    Photos inside the camera roll have to be deleted on the phone.
    Remember, that apps only can be used with the account they were bought with. If the phone will be set up with a different iTunes account, all of your apps will be removed.
    Message was edited by: Ingo2711

  • I want to be able to use airplay to stream audio to another iOS device, and then use that audio stream to be used when recording video instead of the built in microphone / microphone input. Is this possible?

    I want to be able to use airplay to stream audio to another iOS device, and then use that audio stream to be used when recording video instead of the built in microphone / microphone input. Is this possible?

    A third-party app probably cannot obtain a stream from another app. To the best of my knowledge, such a capability is not provided in the software development kit, apps being "sandboxed" from each other and so allowed to communicate only in very specific and limited ways.
    I'm not completely sure what you mean by "limitations on video capture". An iPhone, to the best of my knowledge, can natively record video only through it's built-in camera, and audio while doing video recording only through the built-in microphone or mic/headphone jack. There might be a video recording app that would allow audio input from an external device connected to the dock connector, but I'm not sure.
    Regards.

  • Want to playback archived webcast recorded using Cisco webex recording. Downloaded Cisco webex meeting software from apple download page but still cannot play recording

    Want to playback archived webcast recorded using Cisco webex recording. Downloaded Cisco webex meeting software from apple download page but still cannot play recording

    You will probably find better support about the features of the Webex app on their support page here: http://www.webex.com/products/web-conferencing/mobile-iphone-ipad-faq.html
    Doesn;t look like it's listed as a feature of the iPad app.

  • How to set video function like a default function when slip "camera" at lock screen ?

    Hi all.
    At lock ccreen:
    - We need to take the picture we turn on screen - slip "camera fuction" at the right bottom and take a shoot.
    - We need to record a video we turn on the screen - slip "camera fuction" at the right bottom and horizontal sliding to "video" function and take a record.
    With "video" fuction, after you record the video, you turn off the screen in one or tow minute, you need to record another video, you turn on the screen and slip camera function, but now it is not in "video function, it come back to "picture" function.
    It is very inconvenient for who need record some video.
    Now what i need:
    How to i can to setup up "video" fuction is a default function ?

    Nevermind I found why this was occuring. Under the same menu, there's an option called "Auto Aspect Ratio" I simply changed it to "off" and it solved the problem.
    Thank you.

Maybe you are looking for

  • Automatic Clearing F.13

    What is the prupose of using F.13 . Is it the same as F-44 if we are using it to clear vendor items. When do we need to do this. Is it after making paying the open items. I went into F.13, then checked all vendors. I got a list of document numbers wi

  • Shared mailbox - send as and auditing Exchange 2007

    Got 3 users A,B,C who all access a shared mailbox X. They have a requirement to be able to answer emails sent to mailbox X BUT the return address to be X (i.e. not their own or send on behalf etc) so any subsequent relies still go to X and not the in

  • I have a nokia E61 on an orange monthly contract caller ID is not working

    Hello all, Yes my trusty old Nokia E61 no longer shows caller ID. When I call a number in my contacts I get the name of the person I am callingText messages have the sender ID attachedIf I put the sim in another phone I get caller IDIf I put the sim

  • Notifications from a shared mailbox calendar to a group of people

    HI When a member of staff books a meeting . They add meeting room support as an attendee of the meeting if they need IT assistance . I would like the meeting room support to be a shared mailbox or calendar that sends notifications to a group of peopl

  • Common Array Management software version 6.10.1 for Linux x86_64 availability?

    My apologies if this is not the right location but I'm trying to find out when the Common Array Management Software 6.10 will be available for Linus/SUSE 64 bit systems if anyone knows. Thank you for your time. G Treadway