cancel
Showing results for 
Search instead for 
Did you mean: 

Find inherited data/substances by substance

0 Kudos

Dear community,

I am developing a software dealing with substances and their dependent data/substances. The report C100_QUERY_USAGE_GET helps a great deal with references and components, but I could not find a way to search for inherited relations between substances.

In other words: If in cg02 the icon "data record was passed on to other records" appears (screenshot) or passes values on (screenshot), I want to know which substances are using it.

Is there any report that could do that for me?

Every direction and hint is highly appreciated.

Thanks in advance, cheers

Julian

Accepted Solutions (1)

Accepted Solutions (1)

Ralph_P
Advisor
Advisor
0 Kudos

Hi Julian,

you can do that directly in CG02 (depending on your version). If you search for a specification(s), use the option "Substance is included in relationship". You can then either enter the inheritance template used or the specification that is included in the relationship.

Ralph

0 Kudos

Dear Ralph,

thank you for your reply! However, I do not want to use the CG02 and the GUI, but I want to use it in my own ABAP report, just calling its functionality.

So far, I did not get lucky by debugging your mentioned search. Any ideas?

thanks, cheers,
Julian

Ralph_P
Advisor
Advisor
0 Kudos

Hi Julian,

This functionality is using a user exit. I don't know which one, but maybe this information helps you to find the FM behind it and then its code.

Ralph

Former Member
0 Kudos

HI Julian,

You can try with the function module, BAPI_BUS1077_GETDETAIL

for using the above FM, the object keys can be selected using BAPI_BUS1077_GETLIST.

Most of the header data covered in above FM. it will suits for your custom report.

Regards

kamal

0 Kudos

Hi Kamal,

thanks for your reply. The BAPI you mentioned do not seem to get called in cg02 when I am searching for inherited relations. Going through the code I do not see any search for relations between substances either... do I miss something?

cheers,

J

0 Kudos

But C1H0_SUB_FIND_BY_REL looks quite good.

0 Kudos

Update: The simplest way to get all relations - also within an OO context - is to use function C1R2_REL_READ. It is hidden within the before mentioned function module.

DATA lt_rel TYPE STANDARD TABLE OF rcgtplreliot.

CALL FUNCTION 'C1R2_REL_READ'

       EXPORTING

         i_sub_recn                = ls_data-recn

         i_flg_source_view         = 'X'

       TABLES

         e_reliot_tab              = lt_rel.

You find inherited substance recn in column RECNROOT_DEST of lt_rel.

ADDITION: the function (and cg02 as well) gives you only the direct child or parent. If you want the complete tree of inheritance, the function has to be called recursively, where the recursion depth is giving you the inheritance distance of two substances.

Thanks to everybody for their support!

cheers,

j

Answers (0)