Lock for transaction code.

i have created screen executed with Transaction code,having few Controls inside screen.
As soon as I enter action(click push button) inside the screen.(ie Transaction code), this transaction screen should be locked, and other users should not use the transaction simultaneously in the present System.
I have to do it inside the ABAP coding. could you please help me how to do it.
Regards
Chandra

hai
I used below FM with parameter 'ZTRAN$' for TABNAME as u said.my transaction name is ZTRANS.
Now tell me onething, If same user opens the same transaction again(\n) , transaction opens for simultaneous access.
How to deal this case..will this FM cover this function also?
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
  MODE_RSTABLE         = 'E'
   TABNAME              =  'ZTRAN$'
  VARKEY               =
  X_TABNAME            = ' '
  X_VARKEY             = ' '
  _SCOPE               = '2'
  _WAIT                = ' '
  _COLLECT             = ' '
EXCEPTIONS
  FOREIGN_LOCK         = 1
  SYSTEM_FAILURE       = 2
  OTHERS               = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Similar Messages

  • How to lock a transaction code  in a report  ?

    Dear Abapers ,
         i had a requirement to lock a transaction code in my Module pool programming . the requirement goes in this way ..
    " if a  single user is editing a report then that particular report has to be accesseble to only that concerned user , it cant be accessed to any other user who gonna run the report unless the first user exits the report . <removed>.
    Thanks & Regards,
    Sravani . Y .
    Edited by: Thomas Zloch on Apr 5, 2010 8:39 PM

    Hi,
    You have to verify the processes in execution. Here an exaple code:
      DATA: BEGIN OF WP_TABL OCCURS 10.
              INCLUDE STRUCTURE WPINFO.
      DATA: END OF WP_TABL.
      " This CALL verifyes the processes in execution:
      CALL 'ThWpInfo' ID 'OPCODE' FIELD OPCODE ID 'TAB' FIELD
        WP_TABL-SYS ID 'CPU' FIELD WITH_CPU.
        " Now loop at table WP_TABL
        LOOP AT WP_TABL.
           " Inside this loop you have to check if the report field WP_TABL-WP_REPORT is been executed more than one time. The user field WP_BNAME tells you who is executing the program.
        ENDLOOP.
    I suggest you, ask for an ABAPER help with this code example.
    Hope it helps you...
    Alexis Sánchez N.
    SAP ABAP Developer Consultant
    <please no company names in the posts, folks can view your business card if interested>
    Edited by: Thomas Zloch on Apr 12, 2010 4:50 PM

  • Creating of Notes for Transaction Code RECN(Using Classes and Methods)

    Hi Experts,
    I want to Create Notes for Transaction Code RECN, This should not done manually but should be done programatically.
    I had used the Class CL_GOS_SRV_NOTE_CREATE to create the notes.....but here comes the doubt for me.....note will be created by using this class and how this can be created for the Tcode RECN........
    I am using the Real Estate Module.....Plz help me....awaiting for ur helpful answers....
    Thanks in Advance.....!
    Brahma

    Hi kanagaraja,
    Thanks...!
    The BADI which u have given is not existing in my system...i had gone through the se18 and se19 tcodes....
    Awaiting for ur response......!
    Thanks,
    Brahma...

  • LSMW for Transaction Code FB41

    Hi,
    Can any one let me know LSMW - direct input method or BAPI (Bussiness Object) to update data using transaction code FB41.
    I have used direct input method RFBIBL00, but this standard direct input method is not supported for transaction code FB41.
    Thanks and Regards,
    Shravan G.

    BAPIs for FB41:
    BAPI_ACC_DOCUMENT_POST
    BAPI_ACC_INVOICE_RECEIPT_POST,
    BAPI_ACC_GL_POSTING_POST,
    BAPI_ACC_DOCUMENT_POST.
    Regards,
    Nagraj

  • Locking of transaction code

    How can I lock any  transaction code
    Regards
    Amitava

    Hi
    Go to T.Code SMO1.
    enter the t.code that you need to lock in the below tab. and in the screen the t.code will come
    select the lock option and tick over there.
    so that t.code wil be locked . you cannot use the t.code henceforth

  • For transaction code MD61, I want to upload data using BAPI

    Hi,
    for transaction code MD61, I want to upload data using BAPI.
    Which BAPi I ll call ?
    Can anyone suggest me how to do it with any simple example program ?

    Refer the thread for details about coding-
    BAPI_REQUIREMENTS_CREATE
    Reards,
    Amit

  • Writing a Batch Input or Call Transaction program for transaction code MMAM

    Hi All,
    I'm writing a Batch Input or Call Transaction program for transaction code MMAM (Changing Material Type). The program was able to run but somehow I was not able to capture the log of the output after running MMAM. The log was not part of the SY-MESSAGE so adding in MESSTAB into call transaction doesn't help while BDC session logs shows only the transaction was processed.
    Anyone has encounter such problems before?
    Regards,
    Ramu.

    Hi
    Overview of Batch Input Session
    The first batch input method is to create a batch input session. It is the processing of this batch input session that updates the database, not the execution of the batch input program. i am giving you example for Change Vendor you practice for ur tcode
    For our example, we will use the “Change Vendor” transaction (“FK02”) to add a street address to an already existing vendor.
    Step #1
    Use “System&#61664;Status” menu path to determine online program name (SAPMF02K), screen number (0110)
    Step #2
    Use “F1” key and “Technical Info” pushbutton in each screen field to be filled to determine the field name.
    Step #3
    Determine how to proceed in the transaction
    (save the record by clicking on the ‘Save’ pushbutton or pressing the ‘F11’ key).
    The process flow of CALL TRANSACTION
    A program that uses CALL TRANSACTION USING to process legacy data should execute thefollowing steps:
    Prepare a BDCDATA structure for the transaction that you wish to run.
    Prepare a internal table to store error messages Tab_Mess like structure of BDCMSGCOLL.
    With a CALL TRANSACTION USING statement, call the transaction and prepare the BDCDATA structure. For example:
    CALL TRANSACTION ‘MM01' USING BDCDATA MODE 'A' UPDATE 'S'. MESSAGES INTO TAB_MESS.
    IF SY-SUBRC <> 0.
    <Error_handling>.
    ENDIF.
    Overview of Batch Input Session
    The first batch input method is to create a batch input session. It is the processing of this batch input session that updates the database, not the execution of the batch input program

  • BAPI for Transaction Codes FMV1 and FMZ1

    hi,
    is there any bapi for transaction codes FMV1 and FMZ1?!
    please advice!
    thanks JE

    HI,
    For FMZ1
    use this
    FMFR_CREATE_FROM_DATA
    FMFR_CHANGE_FROM_DATA
    FMFR_CHANGE_COMPLETION_FLAG
    Regards
    Hiren K.Chitalia

  • Authorization access Issue for Transaction Codes PA10 to PA40

    Hi Experts,
    I have created Custom role for accessing ALL HR Transaction codes in IDES System and added to the user & Tested.
    All transactions codes are working fine except PA10,PA20,PA30 &PA40
    We have new installation of ECC6.0 (HR) IDES System.
    I am new to HR Security.
    Here anything needs to configure in HR System for accessing transaction code PA10 to PA40.
    Please help me regading this.
    Advance Thanks,
    BBC

    I have checked in SM01, Transaction codes PA10 to PA40 are not locked.
    We are facing two issues
    1) when accessing T- Codes PA10 to PA40, System showing message: You are not authorized to use Transaction code.
    Thatz the reason i suggested you to check with basis consultant. Becuas he is the power user he can only see that from his window all the autharizations
    May be you checked from your user your user might have autharization. that user  might be end user who getting msg might not have authorizatoins.
    2) function module : HR_READ_INFOTYPE.
    When Debuging this, It calls internal FM
    HR_CHECK_AUTHORITY_INFTY and returns exception
    no_authorization=1
    See this means that that user have NO autharizatoins
    Best Regards

  • Unrestricted access for transaction codes

    Hi,
    We had set Production Client settings in SCC4 as "No chnages allowed"
    for client specific objects and
    "No changes to cross client & repository objects" in cross-client
    settings.
    As a part of regular job Finance users needs access to below
    transaction codes when the client is in non modifible Mode.
    I would like to give access to below listed transcation codes for
    selected users Without opening client everytime , I have assigned
    SAP_ALL profile for two users but still they are not able to perform
    their activity using below transcation codes when the client
    is "Nonmodifiable" state
    Transaction Codes List :
    S_BCE_68000174 - Enter Translation Rates
    S_ALR_87003642 - Open and Close Posting Periods
    S_ALR_87002510 - Enter Time Interest Terms
    S_ALR_87002678 - Enter Referance Interest Values
    FTXP - Tax Codes
    Please suggest us how to provide full (display, create, change,
    generate) access to specific listed users for specific transcation
    codes when production client is in "Nonmodifiable" & No changes allowed
    mode.
    Thanku

    Hello,
    Usually it depends on some points of customizing, that allow you to choose how SAP treats those transactions. I mean, you can choose if they should be treated as business transactions or customizing. In your case, the application is configured to use those transactions as customizing. Depending on the business area, you have to ask OSS support to change the configuration of these transactions.
    Hope it helps
    Best Regards
    Francisco

  • How to create varient for transaction code

    hello expert,
    I created one Mod. pool program and transaction code.
    while run this tcode, Save button is disable and unable to create varient.
    could you please guide me hw to enable this save button and create varient. please
    with best regards
    srinivas

    Hi,
    You can create variants for transaction using transaction variants. That is meant to simplify these kinda scenarios.
    The tcode for transaction variants is SHD0. You can create variants as you wish. It is simple only. No coding required. Just take SHD0. Give your transaction name.
    Then press create variant.
    It will guide you.
    Regards,
    Renjith Michael.

  • User exit for transaction code MIGO (Goods Receipt)

    Hi Team,
    Please let me know the <b>name of the user exit</b> for adding a new field in transaction code <b>MIGO</b> (The field is Freight charges ) at header level.
    Would be suitably rewarded.
    Regards
    Badari

    hi,
    Transaction Code - MIGO                     Goods movement
    Exit Name           Description
    MBCF0002            Customer function exit: Segment text in material doc. item
    MBCF0005            Material document item for goods receipt/issue slip
    MBCF0006            Customer function for WBS element
    MBCF0007            Customer function exit: Updating a reservation
    MBCF0009            Filling the storage location field
    MBCF0010            Customer exit: Create reservation BAPI_RESERVATION_CREATE1
    MBCF0011            Read from RESB and RKPF for print list in  MB26
    MB_CF001            Customer Function Exit in the Case of Updating a Mat. Doc.
    Cheers
    Alfred

  • Table for transaction code for creation of process order

    Hi Gurus,
    Please tell me, in which table i can see the transaction code used to create process order.
    regards
    Kaisar

    Hi,
    Table for transactions is TSTC.
    If your looking for t-code for process order - COR1.
    Regards,
    Vivek

  • CATS: Looking for user exit / badi for transaction code CAT4/CATS_APPR_LITE

    Hi,
    I have a task here that needs to send external email to the employee's manager whenever the approver set the status from 'released for approval' to 'approve'.
    which is status 20 to 30 in CATSDB-STATUS thru transaction code CAT4 or
    CATS_APPR_LITE.
    Can anyone give some help here?
    Thanks in advance.

    Hi,
    there are mainly three ways to trigger a workflow:
    - linked to a change document, because in standard function module to write change documents a trigger for a workflow is pre-designed. With workflow-customizing you can activate an active trigger.
    - linked to output messages. There is a medium 9, which is the workflow trigger.
    - linked to status changes. Maybe not all status  change functions include a pre-designed workflow trigger, but at least for status in table JEST it should be possible to make workflow-customizing to activate a trigger.
    - 'manually' with a function module SWE_EVENT_CREATE.
    It's also possible to define filters (e.g. only status = approved), so your example was perfectly fitting workflow possibilities. If no other option is fitting, have a look at above mentioned exit.
    Then you still have the question, should you try to define a workflow or just create a mail by FM. There I can't help you, this depends more on your skills and time.
    Regards,
    Christian

  • Field for transaction code description ?

    Hello,
    I know that the T-code is stored in table BKPF, but what is the table where the transaction code DESCRIPTION is stored ?
    Thanks,
    Julien

    julien,
    tcodes are not stored in BKPF.
    they are stored in TSTC ->tcodes and TSTCT ->text for tcodes.
    and BKPF might be storing the tcode in some field which stores the value of tcode from which the document is being created. but that is not the table which stores TCodes.
    hope this helps

Maybe you are looking for