cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify if the components of a standard package are used in custom code.

former_member563268
Participant

Hello,

I was working on the custom code analysis, and came across a case where in the package EC_PORTAL that would be decommissioned (Subcontracting portal wont be available in S/4 HANA). I want to identify the cases in custom code (Z Packages) wherein the components from this package EC_PORTAL is in use in custom code. I could check it manually for each of the components, but that would take a lot of time to complete the analysis. Is there an automated way, a program or so which would help me expedite the process.

Regards

Accepted Solutions (0)

Answers (3)

Answers (3)

michael_piesche
Active Contributor

>> Is there an automated way, a program or so which would help me expedite the process.

No there isnt, at least not one I am aware of. You will have to write your own programm, which will only pay off in the end, if you continuously have a lot of packages and objects within these packages to be analyzed whether these are used by other objects in e.g. custom Y- or Z- packages.

What you would have to do is the following though:

  1. Find all the objects within a (standard) package
    In SAP table 'TADIR', you will find all the objects that belong to a package by the attribute 'DEVCLASS'. Your program would either select have a single or multiple packages as input select option and from TADIR you would get all the included objects, or filter them either hard-coded or by (default) select options by certain relevant types (PGMID & OBJECT, e.g. 'R3TR FUGR' for Function Groups, 'R3TR PROG' for reports, 'R3TR DOMA' for domains, 'R3TR DTEL' for data elements, etc.). Most likely you will filter the list of possible objects within a package, as there are many objects that are of little or no relevance to your task.
  2. Find further objects within a package indirectly linked to the package
    For some objects, e.g. Function Modules, you will have to look also in table 'TFDIR' to get from the TADIR entry of the function group (R3TR FUGR), to the included Function modules. To do so, you will have to add 'SAPL' to the object name of the function group and search for that reference in table TFDIR by program name (PNAME) to find all the function modules. Function Modules have the object type FUNC.
  3. Get Where-Used-List of objects from (standard) package in custom Y- or Z-packages
    You can use FM 'RS_EU_CROSSREF' to search for a where used list of objects and the FM returns an internal table of findings.
  CALL FUNCTION 'RS_EU_CROSSREF'
    EXPORTING
      i_find_obj_cls           = object_type " e.g. DTEL, FUNC, CLAS, ...
      no_dialog                = 'X'
    TABLES
      i_findstrings            = i_findstrings " the object name(s) for the above object type
      i_scope_devclass         = i_scope_devclass " only z-packages (I,CP,Z*)
      o_founds                 = o_founds " the returned where used list
    EXCEPTIONS
      OTHERS                   = 9

If this is how you want to continue with your task, let me know if you need further help.

michael_piesche
Active Contributor
0 Kudos

j.igg, were you able to make any progress on your requirement? Did you solve it or still have the same or new issues?

matt
Active Contributor
0 Kudos

Not really. It turns out that standard packages aren't standard. I've had to deal with the migration of what is essentially a basis application to BW from ERP, but the developers had used so much that was actually only standard SAP, not standard SAP. That covers only BW and Basis.

I've even seen it where a SAP employed consultant advised the use of a FM that two releases later didn't exist...

jj
Active Contributor
0 Kudos

not sure whether RPR_ABAP_SOURCE_SCAN helps