06-04-2014 11:45 AM
Hi Folks,
We are developing an internal tool for developers in our team. The tool will produce output of a technical objects list. It can be program,Function Module,Class methods, DB table,BADI,Exits(pre/post/OVR), Implicit enhancements etc
Is there any way to porgramatically handle the navigation when the user clicks on the object name other than doing recording for and filling BDC tab for each object type.
Regards
Arshad
06-04-2014 12:03 PM
For many workbench objects you can use FM TR_OBJECT_JUMP_TO_TOOL or WB_NEW_WORKBENCH_START .
Regards,
Raymond
06-04-2014 11:54 AM
Sir,
Can you please elaborate the requirement. What I understood is you want to call the transactions regarding different objects (SE37,SE38,SMOD,CMOD etc..) from a single Z programme. Please explain in little more detail.
Thanks,
Viraj.
06-04-2014 12:03 PM
Hi Viraj,
I should be able to navigate to code or DDIC elements just like in SAP tools like SCI,SE30 etc depending on the object (it can be Class methods,Function modules, or table or table type )
Regards
Arshad
06-04-2014 12:12 PM
Ok. So why don't you use CALL TRANSACTION ?
Please explain how this tool will be useful?
06-04-2014 12:03 PM
For many workbench objects you can use FM TR_OBJECT_JUMP_TO_TOOL or WB_NEW_WORKBENCH_START .
Regards,
Raymond
06-06-2014 9:57 AM
Hi Raymond,
Thanks a lot for your reply. As you said this FM TR_OBJECT_JUMP_TO_TOOL works in most of the cases.
In my case, It should also be possible to navigate to Pre/Post/Overwrite exits of method directly.For that I took the ENHINCLUDE field value from table ENHINCINX and passed to FM R3TR PROG parameter it is going to the Enhancement implementation and not to the corresponding Post exit/Pre exit /Overwrite exit method.Is there any way I can navigate to this exit methods directly
One more issue is with the navigation to BADI as well as Enhnacement options as TADIR does not have PGMID OBJECT corresponding to that.
Regards
Arshad
06-06-2014 10:15 AM
Don't limit yourself to values in TADIR, there are also subobjects (not R3TR but LIMU) for some sub-objects,
Execute this snippet to get a list
DATA: gt_types TYPE TABLE OF ko100,
g_disvariant TYPE disvariant.
CALL FUNCTION 'TRINT_OBJECT_TABLE'
EXPORTING
iv_complete = 'X'
TABLES
tt_types_out = gt_types.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_structure_name = 'KO100'
i_save = 'A'
is_variant = g_disvariant
TABLES
t_outtab = gt_types
EXCEPTIONS
OTHERS = 0.
Else, you could try some navigarion in SE80 (with debug or under SAT/SE30 tool) to identify standard tools for those objects. Then you will have to play with classes and FM of the workbench manager from FM WB_NEW_WORKBENCH_START to class cl_enh_tool_hook_impl or to cl_enh_tool_hook_def, (But in this case you will go further than I went)
Regards,
Raymond
06-04-2014 2:54 PM
You can use cl_wb_worklist along with RS_TOOL_ACCESS for this purpose.
This example code, shows how to do this for a program. This can be extended for other objects also.
report navigation_example.
data:lcl_wrklist type ref to cl_wb_worklist,
i_wrklist type wbworklist,
l_wrkitem type wbworkitem.
l_wrkitem-id-type = 'P'.
l_wrkitem-id-name = sy-cprog. "Program name to navigate to
l_wrkitem-state-line = 2. "Navigation position of the program
append l_wrkitem to i_wrklist.
lcl_wrklist = cl_wb_worklist=>get_worklist( sy-uname ).
call method lcl_wrklist->clear.
call method lcl_wrklist->add_objects
exporting
p_objects = i_wrklist.
call method lcl_wrklist->store.
call function 'RS_TOOL_ACCESS'
exporting
operation = 'SHOW'
object_name = sy-cprog
object_type = 'PROG'
with_worklist = 'X'.
call method lcl_wrklist->clear.