How to lock a table in a report program

Hi all,
     I have a requirement inwhich if i have selected one radio button  the table should locked .
   and the i need to check wether the table is locked or not by checking the condition.if locked continue else i need to stop.
can any one help me doing this.

Hi,
Hope this information will be useful for you.....
The description of an SAP lock to a table is made via the lock condition and the lock mode.
The lock condition is a logical condition for the lines of the table to be locked. It describes the area of the table which the lock is to protect from competitive access. To avoid the administration of the lock becoming complicated, the lock condition can not be formulated as freely as the WHERE clauses:  only fully qualified key fields related by AND may appear in the condition.
Via the lock mode you define which operations on the table are to be protected by the lock. The lock modes available are:
Read lock (shared lock)
protects read access to an object. The read lock allows other transactions read access but not write access to the locked area of the table.
Write lock (exclusive lock)
protects write access to an object. The write lock allows other transactions neither read nor write access to the locked area of the table.
Enhanced write lock (exclusive lock without cumulation)
works like a write lock except that the enhanced write lock also protects from further accesses from the same transaction.
In order to be able to define SAP locks for a table, you must first create a lock object for the table via Development->Dictionary.
If the data for an application object is distributed among several database tables, it is often necessary to be able to lock these tables simultaneously. It is therefore possible to include several tables in a lock object, althought they must be related via appropriate foreign key relationships. The tables involved in a lock object are also known as its base tables.
Thanks
NITESH

Similar Messages

  • How to lock a table when i insert a row

    hi, friends,
    how to lock a table when i insert a row, then unlock the table

    If you want to lock the whole table so that no-one else can do DML then you go LOCK TABLE <table> IN EXCLUSIVE MODE. This lock remains in force until you commit or rollback.
    There are less powerful locking modes available, but you can look those up in the OTN online documentation.
    APC

  • How do we find tables for standard SAP programs?

    Dear Friends!
    I have received a project in which I have to create a report on the employees skill-sets(qualifications). Qualifications we can see in in the Transaction PA30 in the form of infotypes. But infotype tables are not sufficient itself. So do you guys have any idea that where else do we maintain records like this moreover how do we find tables in standard SAP Programs.
    Please reply!!

    Whats up Guys...??
    Gave up??
    I have found a table for position but not really for Qualifications.. (Not in terms of Infotypes..)
    Tables ARE
    HRPY_WPBP
    -  PERNR
    -  PLANS
    T528T
    -  PLANS
    -  PLSTX
    See if you guys can do something more about it.

  • How to use a parameter of a report program in a dialog program

    how to use a parameter of a report program in a dialog program.
    I have to fetch the value entered in the parameter of report program and display it in a dialog program

    Hi Aasim,
    Just mention like below in your ABAP report.
       PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
    and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro

  • How to use a parameter in a report program in a dialog program

    how to use a parameter in a report program in a dialog program

    Hi Shaikh,
    Post it in http://scn.sap.com/community/abap
    "ABAP Development".
    sree

  • How can i use bapi in my report program

    hi
    am new to this forum , i have doubt in bapi's how can i call bapi into my report program and what is the difference between normal function module and bapi, and bdc plz clear my doubts
    Moderator message: please search for available information/documentation.
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    Edited by: Thomas Zloch on Apr 12, 2011 7:12 PM

    i have the same problem...
    anybody can help us??
    it`s urgent...
    thanks

  • TABLES statement in report program

    Hi,
    Is there any performance issue in using TABLES statement in report program? Because I have got an review point from QA insisting me to avoid TABLES statement. Is it recommended by SAP to avoid TABLES statement in report program?
    Thanks in advance.
    Regards,
    Balaji Viswanath.

    Balaji,
    If you use TABLE statement it will provide the work area of the given table.
    EX: Decalre  any fields of table in slection scereen
    without declarin g the tabel name in TAble statement.It will give error.
    This will give error.
    SELECT-OPTIONS : s_matnr LIKE MARA-matnr.
    This will work.
    TABLES: mara.
    SELECT-OPTIONS : s_matnr LIKE MARA-matnr.
    It means it will occupy some area.
    Don't forget to reward if useful.

  • How to lock a table

    Hi all,
    When I insert a record to a table , how to lock it for
    preventing others write the table at the same time?
    Thanks.

    If you want to use online documentation, go to
    http://tahiti.oracle.com
    and search for "lock table"

  • How to create PLD_Items table for Crystal Reports

    Hi experts,
    Im trying to use the variable 130 for a report but in crystal reports, in some SAP Standard Reports the table PLD_Items appears, my question is how to create this structure for my report, i know that is an ADO.NET connection based on an XML file, but i dont know from where i can take this value can any one help me please?
    Best Regards
    Dave

    If this is CR for B1, please post to SAP Business One Application
    Alternatively see the SCN Site Index for the correct SCN Space for your product / component.
    - Ludek
    SCN Moderator

  • How to LOCK a table in SAP?

    Hi,
    Just wondering is there a way we can lock a table in SAP?
    tcode or something?
    ex. there a tcode to lock tcodes (SM01)
    so wondering if there is a tcode or another method?
    Thanks!

    Hi,
    These are application locks not the database tables lock.
    If you use this function modules (enqeue and dequeue)
    then only it works the concept of locking.If you dont use this fms then you can directly access the table.
    If I am the developer and I dont implement the  locks then no locking concept would happen.
    Regards,
    Vamshi.

  • How to Link Organizational Structure to a report program

    Hi All,
              Can anyone pls help me out with my requirement. How can we link a organizational structure created in transaction PPOMW to a report program. Basically i want to send the report output as an XLS attachment to an external email id. For that i need to link Organizational Structure to the report program.
          There are many ways of doing it but i want it to be done by linking Organization structure to the report program. Pls help me as soon as possible as its a bit urgent for me.

    Hi,
    Please follow the below function modules and the paramters for reading archived data:
    CALL FUNCTION 'ARCHIVE_OPEN_FOR_READ'
      EXPORTING
        OBJECT                   = archiving object name
    IMPORTING
       ARCHIVE_HANDLE           = archive read handle
    Then in the loop(DO-ENDDO), use this FM:
    DO.
      CALL FUNCTION 'ARCHIVE_GET_NEXT_OBJECT'
           EXPORTING
                archive_handle          = archive read handle
    Then records from the data objects using this FM:
      CALL FUNCTION 'ARCHIVE_GET_TABLE'
           EXPORTING
                archive_handle        = archive read handle
                record_structure      = 'TABLENAME'
                all_records_of_object = 'X'
                automatic_conversion  = 'X'
           TABLES
                table                 = internal table for which you want to retrieve records.
    ENDDO.
    Then close the archive file using this FM:
    CALL FUNCTION 'ARCHIVE_CLOSE_FILE'
         EXPORTING
              archive_handle = archive read handle
    This will help u in reading archived data from archive file.
    may give some idea also on how to code the read prgram.
    Thanks,
    Shamim

  • Table control in report program

    Hi all...
    Please help me to create a table control in my report program. my requirement is to enable the user to enter two fields (company code and cost center) on the selection screen. I wish to do this using table control..
    example codes will be extremely helpful..
    Thanks in advance..
    -Pranati.

    Hi,
    We can not do the Table control on the selection screen, but we can do the Tab strip control.
    To define a tabstrip area with tab pages, use the following statements in your selection screen definition:
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK <tab_area> FOR <n> LINES,
                      TAB (<len>) <tab1> USER-COMMAND <ucom1>
                                  [DEFAULT [PROGRAM <prog>] SCREEN <scrn>],
                      TAB (<len>) <tab2> USER-COMMAND <ucom2>
                                  [DEFAULT [PROGRAM <prog>] SCREEN <scrn>],
                      END OF BLOCK <tab_area>.
    See the below SAP link for the sample programs
    http://help.sap.com/saphelp_46c/helpdata/EN/00/deb23789e95378e10000009b38f8cf/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/content.htm
    See the example code
    REPORT   znr1 NO STANDARD PAGE HEADING
                LINE-SIZE 80 LINE-COUNT 60.
    TABLES : sscrfields.
    DATA  activetab(6) TYPE c .
    DATA  mat_des TYPE makt-maktx.
    DATA  pl_des  TYPE t001w-name1 .
    SELECTION-SCREEN BEGIN OF SCREEN 001 AS SUBSCREEN NO INTERVALS.
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-002 NO
    INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 14(18) text-002 FOR FIELD matnr.
    PARAMETERS matnr TYPE mara-matnr.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN END OF SCREEN 001.
    SELECTION-SCREEN BEGIN OF SCREEN 002 AS SUBSCREEN NO INTERVALS.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-003 NO
    INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 14(18) text-003 FOR FIELD matnr.
    PARAMETERS werks TYPE t001w-werks.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block2.
    SELECTION-SCREEN END OF SCREEN 002.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 5 LINES NO INTERVALS.
    SELECTION-SCREEN TAB (15) tabs1 USER-COMMAND ucomm1
                         DEFAULT SCREEN 001.
    SELECTION-SCREEN TAB (15) tabs2 USER-COMMAND ucomm2.
    *                     DEFAULT SCREEN 002   .
    SELECTION-SCREEN END OF BLOCK tabb1.
    INITIALIZATION.
      tabs1 = text-002.
      tabs2 = text-003.
      activetab = 'TABS1'.
    AT SELECTION-SCREEN .
      CASE sscrfields-ucomm.
        WHEN 'UCOMM1'.
          tabb1-prog = sy-repid.
          tabb1-dynnr   = 001.
          tabb1-activetab = 'TABS1'.
          activetab = 'TABS1' .
        WHEN 'UCOMM2'.
          tabb1-prog = sy-repid.
          tabb1-dynnr   = 002.
          tabb1-activetab = 'TABS2'.
          activetab = 'TABS2'.
      ENDCASE.
    START-OF-SELECTION.
      CASE activetab.
        WHEN 'TABS1'.
          SELECT SINGLE maktx  FROM makt INTO pl_des WHERE matnr = matnr.
          WRITE: 'Material ' , matnr , mat_des .
        WHEN 'TABS2'.
          SELECT SINGLE name1  FROM t001w INTO pl_des WHERE werks = werks.
          WRITE: 'Plant ' , werks ,pl_des.
    Regards
    Sudheer

  • How to use a parameter  of a report program from selection screen in a dialog program

    how to use a parameter value(entered ) of a report program from a selection screen in a dialog program.
    I have to fetch the value entered in the parameter of report program and display it in a dialog program

    Hi Aasim,
    Just mention like below in your ABAP report.
       PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
    and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro

  • How to remove the buttons coming from report program?

    Hi All,
    I need to remove the buttons from an iview which is a sap transaction. when i execute the  report program which uses a ldb (PCH) shows a selection screen having all the buttons.
    We have created variants for this.Now i want to remove the buttons which are coming from the report program.how to do this ?
    Lakshmi.

    Goto sicf ->sap->bc->gui->sap->its->                              
    open Webgui application                              
    in the GUI Config enter the following parameters.                              
    ~noHeaderOkCode = 1                              
    ~webTransactionType = EWT.                              
    All buttons can also be removed by ~webgui_simple_toolbar =0 ..                              
    Also now open the trancsaction of the program form SE93 for which you want to hide                               
    the Menu bar, in its properties select the EASY WEB TRANSACTION radio button.

  • How to call a badi implementaion from report program

    Hi ABAP Guru,
    I have ZBADI_FALLBACK_DEF new badi created by me and there two implementation ZBADI_FALLBACK_IMP and ZBADI_FALLBACK_IMP1
    Now I am calling this badi from report program
    DATA:
       W_HANDLE TYPE REF TO ZBADI_FALLBACK_DEF.
    * GET BADI - for getting objects..................
    GET BADI W_HANDLE.
    * CALL BADI - for calling interface methods.
    CALL BADI W_HANDLE->ADD.
    This is fine,,,
    But I want to call only one implementaion ZBADI_FALLBACK_IMP.But here two implementaion is called.Please help....

    Hi Palash,
    Then you create filter BADI  and  use filter in implementation.
    While getting BADI reference use filter
    GET BADI W_HANDLE FILTERS
    Thanks & Regards,
    Arun

Maybe you are looking for