09-18-2021 6:33 PM
Hello all,
I have a query that I would like to seek help for from you all as an expert.
In E071, for a method, the Object Type 'METH', Object Name is generally the Class Name concatenated with Method Name.
Example:
for CL_ABC_TESTCL_PROPOSAL_DPC_EXT and method GET_DATA, it would be CL_ABC_TESTCL_PROPOSAL_DPC_EXTGET_DATA.
My requirement is to split it down to the individual Class and Method Name at runtime after getting this object name.
Obviously there are length and Class name considerations and there are multiple scenario's as Class name would not necessarily start with CL every time and length of 30 for a Class name might not be fully occupied.
Any solution to split that Object Name in case of Object Type 'METH' into its corresponding Class and Method name ?
09-18-2021 7:01 PM
CASE e071-object.
WHEN 'METH'.
class = e071-obj_name(30).
method = e071-obj_name+30.
I don't think it will ever change and I don't understand your doubts about "there are multiple scenario's as Class name would not necessarily start with CL every time and length of 30 for a Class name might not be fully occupied."
09-18-2021 7:01 PM
CASE e071-object.
WHEN 'METH'.
class = e071-obj_name(30).
method = e071-obj_name+30.
I don't think it will ever change and I don't understand your doubts about "there are multiple scenario's as Class name would not necessarily start with CL every time and length of 30 for a Class name might not be fully occupied."
03-05-2022 4:13 PM
09-18-2021 7:02 PM
Hi Subhajit,
There are multiple ways of achieving it. One can be to use the static method CONVERT_E071_TO_PAK_OBJECT_KEY of class CL_CLS_TRANSPORT_QUERIES (or CL_CLS_HELPER).
There, you just need to pass PGMID, OBJECT and OBJ_NAME in the IM_E071 parameter and you'll get the data you're looking for in the corresponding exporting parameter.
See if that helps a little more.
Kind regards,
Garcia
03-05-2022 4:14 PM
09-20-2021 9:56 AM
Look at source of FM TR_OBJECT_JUMP_TO_TOOL for 'METH'
(The FM used for navigation from TR to Workbench Editor)
* Code for METH
ELSEIF iv_pgmid = 'LIMU' AND iv_object = 'METH'.
lv_obj_type = 'METH'.
lv_obj_name = iv_obj_name+gc_clas(gc_meth).
lv_encl_obj = iv_obj_name(gc_clas).
" Navigate from constant to include TTYPLENG
*** constants for OO transport objects (ABAP class etc.) **************
gc_clas TYPE i VALUE '30',
gc_meth TYPE i VALUE '61',
You could also use a where-used search from the constants to find relevant method/FM.
03-05-2022 4:14 PM