Kolkata, India.
Step: 1
Create a report and insert the code block given below.
* Type pools
TYPE-POOLS: tumls. " LSM Workbench: Type-Pool
* Data declaration
DATA: project TYPE tumls_project, " Project
subproj TYPE tumls_subproj, " Subproject
object TYPE tumls_objectnew. " Object
START-OF-SELECTION.
* Store project
project = 'TPISP - DC'.
* Store subproject
subproj = 'VARIANT_MAT'.
* Store object
object = '6GSC022_TS3'.
* Call the function module to display object (LSMW) maintenance screen
CALL FUNCTION '/SAPDMC/LSM_OBJ_STARTER'
EXPORTING
project = project
subproj = subproj
object = object
EXCEPTIONS
no_such_object = 1
OTHERS = 2.
Basically from LSMW’s initial screen whenever you press enter or continue button it calls the FM /SAPDMC/LSM_OBJ_STARTER and there is no authorisation check prior to do this, only LSMW checks for authorisation when you press Administration from GOTO menu using the FM /SAPDMC/LSM_AUTHORIZATN_CHECK. That means any body can access any object and can do any unwanted change. And it is really hard to track the changes as LSMW does not have any inbuilt version management. So to avoid this before calling the FM we can do the authorisation check based on certain conditions (not necessary to do authority check, but can be achieved by maintaining parameter ID in the user profile or through maintaining custom table) and by this way we can restrict unwanted user access.
Step: 2
Create a transaction for the report from SE93.
Now execute the program or the transaction. It will show you the maintenance screen of the LSMW object.
No comments:
Post a Comment