0% found this document useful (0 votes)
80 views10 pages

Lock Object in Abap Sap 110627083230 Phpapp01 PDF

The document describes how to create a lock object in SE11 for a custom table field and use it in a custom ABAP report to lock and unlock that field. It explains generating the lock object, calling the generated lock and unlock function modules in the report's status and user command modules, and testing that it prevents concurrent access by running the report twice simultaneously.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views10 pages

Lock Object in Abap Sap 110627083230 Phpapp01 PDF

The document describes how to create a lock object in SE11 for a custom table field and use it in a custom ABAP report to lock and unlock that field. It explains generating the lock object, calling the generated lock and unlock function modules in the report's status and user command modules, and testing that it prevents concurrent access by running the report twice simultaneously.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Creating a Lock Object For WRITE Mode :-

Custom Table By using SE11

Its Data

Go to SE11> Select Radio Button Lock Object > Provide Lock Object Name (Starting Letter Should Start with E only) > Create..

Click on Lock Parameter Tab

It will come Automatically

After activating the Lock Object Automatically Two Function Modules will Generate.. One for Lock an object Another for Unlock an object Those will show below

We can see by.. GOTO > Lock Modules in the Lock Object Screen

.Upto now just we Created Lock Object for Kunnr Field in ZLCK Table

Now we are going to use this lock object in a Custom Program

Custom Report By Using SE38

*&---------------------------------------------------------------------* *& Report ZAN_L_REPORT *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT ZAN_L_REPORT.

TABLES ZLCK. parameters P_KUNNR type KUNNR. start-of-selection. call screen 100. *&---------------------------------------------------------------------* *& Module STATUS_0100 OUTPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* MODULE STATUS_0100 OUTPUT. SET PF-STATUS 'BACK'. * SET TITLEBAR 'xxx'. SELECT SINGLE * FROM ZLCK INTO ZLCK WHERE KUNNR = P_KUNNR.

CALL FUNCTION 'ENQUEUE_EZCUST_INFO' EXPORTING MODE_ZLCK = 'X' MANDT = SY-MANDT KUNNR = P_KUNNR X_KUNNR = '' _SCOPE = '2' _WAIT = ' ' _COLLECT = ' ' EXCEPTIONS FOREIGN_LOCK = 1 SYSTEM_FAILURE = 2 OTHERS = 3 . ** IF SY-SUBRC <> 0. IF sy-subrc = 1.

data lv_msg type string.

CONCATENATE 'This Record is Currently Using by another User' sy-uname into lv_msg separated by space. MESSAGE : ENDIF. * lv_msg type 'S' display like 'E'.

ENDMODULE. " STATUS_0100 OUTPUT *&---------------------------------------------------------------------* *& Module USER_COMMAND_0100 INPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* MODULE USER_COMMAND_0100 INPUT. case sy-ucomm. when 'BACK'. leave to screen 0. endcase. CALL FUNCTION 'DEQUEUE_EZCUST_INFO' EXPORTING MODE_ZLCK = 'E' MANDT = SY-MANDT KUNNR = p_kunnr X_KUNNR = ' ' _SCOPE = '3' _SYNCHRON = ' ' _COLLECT = ' ' . ENDMODULE. " USER_COMMAND_0100 INPUT

Flow Logic of Screen 100 GUI BACK PROCESS BEFORE OUTPUT. MODULE STATUS_0100. *

PROCESS AFTER INPUT. MODULE USER_COMMAND_0100.

Output : If we want to check any lock object we have to execute the same program two times at once.. So here first I am executing first time First Time Output :

This above screen is Selection Screen

This below screen will come after executing the above screen

Keep this window in open.. And execute This same Program in second time(Without Closing the above window) U will Get this below one..

Enjoy Folks BY

Anil

anil.neegineni@gmail.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy