Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

How to identify “Parent-Child” relationship process chain details in SAP BW

      

1.    Introduction:


In SAP BW, we could see there will be so many dependency between master date & transaction data, between different targets. Also it’s important to deliver the report on time. In order to reduce idle time, event trigger has been implemented.Sometime, we might be struggling to identify parent chain for a child chain and vice versa. So in order to get the process chain names, here I have illustrate the procedure.This document will give you step by step instruction how to identify parent-child relationships.


2.    Tables & t-code used


  • RSPCCHAIN
  • RSPCVARIANT
  • RSPCTRIGGER


  T-Code:


  • SE16 or YCAGRID


3.    Step by Step procedure to identify the relationships:


In the below given example I have used PARENT_CHAIN_TEST chains as parent and ZZNNN_TEST & CHIL_3 as child chains.


Step 1: Go to SE16 and execute RSPCCHAIN Enter the parent chain name with TYPE as ZEVENT as mentioned below.


Filter condition:


  • CHAIN_ID
  • OBJVERS
  • TYPE


Result:


  • VARIANTE


Get the VARIANTE name from it TEST_DEMO



Step 2: Using the VARIANT name from RSPCCHAIN and put it in VARIANTE in RSPCVARIANT table Filter condition:


  • VARIANTE
  • OBJVERS
  • TYPE


Result:


  • LOW


Take LOW field value from RSPCVARIANT table.


Step 3: Go to table RSPCTRIGGER & use this LOW filed value from RSPCVARIANT table. Filter condition:


  • EVENTID
  • OBJVERS


Result:


  • VARIANTE


Copy the VARIANTE from this.



Step 4: Go to table RSPCCHAIN once again & use VARIANTE filed value from RSPCTRIGGER table. Filter condition:


  • VARIANTE
  • OBJVERS


Result:


  • CHAIN_ID


Parent chain name: PARENT_CHAIN_TEST





Child chain name: ZZNNN_TEST & CHIL_3






Program:


  • Will show maximum 4 child process chain for a single parent chain

tables: RSPCVARIANTATTR , RSPCVARIANT , RSPCTRIGGER , RSPCCHAIN , TBTCO .

“Local variable and table declaration

types: begin of lt_child ,
lv_parent_chain
type rspcchain-chain_id ,
lv_parent_event_variante
type rspcchain-variante ,
lv_parameter_type
type rspcvariant-fnam ,
lv_eventvalue
type rspcvariant-low ,
lv_child_chain_1
type rspcchain-chain_id ,
lv_child_chain_2
type rspcchain-chain_id ,
lv_child_chain_3
type rspcchain-chain_id ,
lv_child_chain_4
type rspcchain-chain_id ,
end of lt_child .

data: t_child type standard table of lt_child ,
wa_child
type lt_child .

“Get the list of process chain to be processed

select  a~chain_id a~variante b~fnam b~low
into wa_child from
( rspcchain as a inner join rspcvariant as b
on a~variante = b~variante
and a~type = b~type )
where a~type = 'ZEVENT' and a~objvers = 'A'
and b~type = 'ZEVENT' and b~objvers = 'A' .

append wa_child to t_child .
endselect .

delete t_child where lv_eventvalue = '' .

data: it_rspctrigger type standard table of rspctrigger ,
temp_table
type standard table of rspctrigger ,
wa_rspctrigger
type rspctrigger .

data: count type i .

loop at t_child into wa_child .
if wa_child-lv_parameter_type = 'EVENT' .

select * from rspctrigger into table it_rspctrigger
where startdttyp = 'E' and objvers = 'A' and eventid = wa_child-lv_eventvalue .

“Remove meta selection to show all the process chain used the events before

loop at it_rspctrigger into wa_rspctrigger .
if wa_child-lv_child_chain_1 is initial .
wa_child
-lv_child_chain_1 = wa_rspctrigger-variante .
modify t_child from wa_child transporting lv_child_chain_1 .
elseif wa_child-lv_child_chain_2 is initial .
wa_child
-lv_child_chain_2 = wa_rspctrigger-variante .
modify t_child from wa_child transporting lv_child_chain_2 .
elseif wa_child-lv_child_chain_3 is initial .
wa_child
-lv_child_chain_3 = wa_rspctrigger-variante .
modify t_child from wa_child transporting lv_child_chain_3.
elseif wa_child-lv_child_chain_4 is initial .
wa_child
-lv_child_chain_4 = wa_rspctrigger-variante .
modify t_child from wa_child transporting lv_child_chain_4.
endif.
endloop.
endif.

endloop.

sort t_child descending by lv_parent_chain lv_parent_event_variante lv_parameter_type.

loop at t_child into wa_child .

if wa_child-lv_parameter_type = 'PAR' .

select * from rspctrigger into table it_rspctrigger
where startdttyp = 'E' and objvers = 'A' and meta <> 'X' and eventparm = wa_child-lv_eventvalue .

" Remove meta selection to show all the process chain used the events before

loop at it_rspctrigger into wa_rspctrigger .
if wa_child-lv_child_chain_1 is initial .
wa_child
-lv_child_chain_1 = wa_rspctrigger-variante .
modify t_child from wa_child transporting lv_child_chain_1 .
elseif wa_child-lv_child_chain_2 is initial .
wa_child
-lv_child_chain_2 = wa_rspctrigger-variante .
modify t_child from wa_child transporting lv_child_chain_2 .
elseif wa_child-lv_child_chain_3 is initial .
wa_child
-lv_child_chain_3 = wa_rspctrigger-variante .
modify t_child from wa_child transporting lv_child_chain_3.
elseif wa_child-lv_child_chain_4 is initial .
wa_child
-lv_child_chain_4 = wa_rspctrigger-variante .
modify t_child from wa_child transporting lv_child_chain_4.
endif.
endloop.
endif.

endloop.

delete adjacent duplicates from t_child comparing lv_parent_chain lv_parent_event_variante .

data: it_rspcchain type standard table of rspcchain ,
wa_rspcchain
type rspcchain .

select * from rspcchain into table it_rspcchain
where type = 'TRIGGER' and objvers = 'A' .

loop at t_child into wa_child .
if wa_child-lv_child_chain_1 is not initial .
read table it_rspcchain with key variante = wa_child-lv_child_chain_1 into wa_rspcchain .
wa_child
-lv_child_chain_1 = wa_rspcchain-chain_id .
modify t_child from wa_child transporting lv_child_chain_1 .
endif .

if wa_child-lv_child_chain_2 is not initial .
read table it_rspcchain with key variante = wa_child-lv_child_chain_2 into wa_rspcchain .
wa_child
-lv_child_chain_2 = wa_rspcchain-chain_id .
modify t_child from wa_child transporting lv_child_chain_2 .
endif.

if wa_child-lv_child_chain_3 is not initial .
read table it_rspcchain with key variante = wa_child-lv_child_chain_3 into wa_rspcchain .
wa_child
-lv_child_chain_3 = wa_rspcchain-chain_id .
modify t_child from wa_child transporting lv_child_chain_3 .
endif .

if wa_child-lv_child_chain_4 is not initial .
read table it_rspcchain with key variante = wa_child-lv_child_chain_4 into wa_rspcchain .
wa_child
-lv_child_chain_4 = wa_rspcchain-chain_id .
modify t_child from wa_child transporting lv_child_chain_4 .
endif.

endloop .

sort t_child ascending by lv_parent_event_variante .

write: / 'Event Triggered Process chain list:' .
new-line .
uline (36) .

uline (174) .

write : / '|', 'Parent Chain Name        ' , '|''Child Chain Name  1      ' , '|', 'Child Chain Name 2      ' , '|',
'Child Chain Name 3      ' , '|', 'Child Chain Name 4      ' , '|' , 'Event Variable Used          ' , '|' .

uline (174) .

loop at t_child into wa_child .

write : / '|', wa_child-lv_parent_chain  , '|', wa_child-lv_child_chain_1 , '|', wa_child-lv_child_chain_2 , '|',
wa_child
-lv_child_chain_3 , '|', wa_child-lv_child_chain_4 , '|' , wa_child-lv_parent_event_variante , '|' .

uline (174) .

endloop.

3 Comments
Labels in this area