01-14-2015 4:21 AM
Hi Experts,
Is it possible to know programatically if a transaction code is in edit mode/display mode?
Please help me if anyone knows.
Regards,
Kasi.
01-14-2015 5:24 AM
May i know which transaction are you looking for ?
In SD, it can be found using variable T180-AKTYP.
V = Change
H = Create
01-14-2015 5:24 AM
May i know which transaction are you looking for ?
In SD, it can be found using variable T180-AKTYP.
V = Change
H = Create
01-14-2015 6:33 AM
Hi Niyaz,
I am looking for the Tcodes OX02 , OX16, OB62, OB37 AND OBC5.
Regards,
Kasi.
01-14-2015 6:48 AM
All these are maintenance transactions. May I know why do you need to find out display mode? what is the requirement?
01-14-2015 6:59 AM
Yes these are maintainance Tcodes. i have requirement to create a company code by using Ecatt script and then Assign it to company and COA and Fiscal year and ....
i have developed script and running succesfully and able to do all these tasks.
But i just want to validate before executing the Ecatt scripts. If the Tcodes is in change mode by any of the user in the same system i want to dispaly popup before script execution.
otherwise my program executing the scripts and throwing error like " Error in executing the Ecatt script".
Regards,
kasi.
01-14-2015 7:19 AM
Display mode is possible when
1. Someone else is locking the table. You can find whether the table is locked or not before calling your script.
2. User doesnt have change access to the mentioned table. You could look at authorization object and do a pre-check. Run ST01 trace to find the authorization objects
01-14-2015 7:25 AM
I want to get the details of the user who is opened the Tcode. And want to popup message like in standard way.
My requirement is from where i can extract those details programatically.
01-14-2015 7:37 AM
You could use FM VIEW_ENQUEUE to find out whether the table is locked. Pass the table name. For example, for transaction OBC5 the sample code would be.
CALL FUNCTION 'VIEW_ENQUEUE'
EXPORTING
view_name = 'V_001_P'
action = 'E'
enqueue_mode = 'E'
You can find the view name from SE93 of respective tcode.
01-14-2015 9:05 AM
Hi Niyaz,
Thanks for the reply, i have implemented the same logic for all tcode, giving whether the tcode locked or not . But i also want to get the user who is locked the Tcode.
Regards,
Kasi.
01-14-2015 9:30 AM
01-14-2015 9:53 AM
01-14-2015 6:04 AM
Hi Prakasareddy,
Which transaction code are you talking about in specific?
You can refer the thread-
http://scn.sap.com/thread/2088066
Also,
Lock is placed in the edit mode on the objects in Transactions like VL02/VL03/VT02/VT03 etc, which can we checked using SM12 or the lock objects with function ENQUEUE/DEQUEUE.
Depending on the lock probably you can export/import a Memory Variable which can be further used in your program.
But i doubt if there is any system variable giving out this information since the transaction codes itself for change and display are totally different in most of the cases (02-change and 03-display).
And if you check this change of mode happening by activating a debugger, you will notice that this change takes place through variables local to the program.
Regards,
Gayatri Gadre
01-14-2015 6:33 AM
Hi Gayatri,
I am looking for the Tcodes OX02 , OX16, OB62, OB37 AND OBC5.
Regards,
Kasi.
01-14-2015 9:18 AM
Hi,
Can you use this?
call function 'VIEW_MAINTENANCE_CALL'
exporting
action = 'U'
show_selection_popup = range_limits_input
view_name = <viewname>
variant_for_selection = variant
check_ddic_mainflag = 'X' "MF 081100
tables
dba_sellist = rangetab
excl_cua_funct = fu_to_excl
exceptions
foreign_lock = 2
no_tvdir_entry = 8.
It automatically shows who has locked the particular view i.e the data is locked by which user...
Thanks
KH