Skip to Content

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

/wp-content/uploads/2016/05/1_954857.png


Get the VARIANTE name from it TEST_DEMO


/wp-content/uploads/2016/05/2_954858.png


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


  • VARIANTE
  • OBJVERS
  • TYPE


Result:


  • LOW

/wp-content/uploads/2016/05/3_954859.png


Take LOW field value from RSPCVARIANT table.

/wp-content/uploads/2016/05/4_954860.png


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


  • EVENTID
  • OBJVERS


Result:


  • VARIANTE

/wp-content/uploads/2016/05/5_954861.png


Copy the VARIANTE from this.


/wp-content/uploads/2016/05/6_954862.png


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


  • VARIANTE
  • OBJVERS


Result:


  • CHAIN_ID

/wp-content/uploads/2016/05/7_954863.png /wp-content/uploads/2016/05/8_954864.png


Parent chain name: PARENT_CHAIN_TEST


/wp-content/uploads/2016/05/9_954865.png


1.JPG


Child chain name: ZZNNN_TEST & CHIL_3


2.JPG


3.JPG


/wp-content/uploads/2016/05/10_954866.png


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 rspcchainchain_id ,
lv_parent_event_variante
type rspcchainvariante ,
lv_parameter_type
type rspcvariantfnam ,
lv_eventvalue
type rspcvariantlow ,
lv_child_chain_1
type rspcchainchain_id ,
lv_child_chain_2
type rspcchainchain_id ,
lv_child_chain_3
type rspcchainchain_id ,
lv_child_chain_4
type rspcchainchain_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_childlv_parameter_type = ‘EVENT’ .

select * from rspctrigger into table it_rspctrigger
where startdttyp = ‘E’ and objvers = ‘A’ and eventid = wa_childlv_eventvalue .

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

loop at it_rspctrigger into wa_rspctrigger .
if wa_childlv_child_chain_1 is initial .
wa_child
lv_child_chain_1 = wa_rspctriggervariante .
modify t_child from wa_child transporting lv_child_chain_1 .
elseif wa_childlv_child_chain_2 is initial .
wa_child
lv_child_chain_2 = wa_rspctriggervariante .
modify t_child from wa_child transporting lv_child_chain_2 .
elseif wa_childlv_child_chain_3 is initial .
wa_child
lv_child_chain_3 = wa_rspctriggervariante .
modify t_child from wa_child transporting lv_child_chain_3.
elseif wa_childlv_child_chain_4 is initial .
wa_child
lv_child_chain_4 = wa_rspctriggervariante .
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_childlv_parameter_type = ‘PAR’ .

select * from rspctrigger into table it_rspctrigger
where startdttyp = ‘E’ and objvers = ‘A’ and meta <> ‘X’ and eventparm = wa_childlv_eventvalue .

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

loop at it_rspctrigger into wa_rspctrigger .
if wa_childlv_child_chain_1 is initial .
wa_child
lv_child_chain_1 = wa_rspctriggervariante .
modify t_child from wa_child transporting lv_child_chain_1 .
elseif wa_childlv_child_chain_2 is initial .
wa_child
lv_child_chain_2 = wa_rspctriggervariante .
modify t_child from wa_child transporting lv_child_chain_2 .
elseif wa_childlv_child_chain_3 is initial .
wa_child
lv_child_chain_3 = wa_rspctriggervariante .
modify t_child from wa_child transporting lv_child_chain_3.
elseif wa_childlv_child_chain_4 is initial .
wa_child
lv_child_chain_4 = wa_rspctriggervariante .
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_childlv_child_chain_1 is not initial .
read table it_rspcchain with key variante = wa_childlv_child_chain_1 into wa_rspcchain .
wa_child
lv_child_chain_1 = wa_rspcchainchain_id .
modify t_child from wa_child transporting lv_child_chain_1 .
endif .

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

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

if wa_childlv_child_chain_4 is not initial .
read table it_rspcchain with key variante = wa_childlv_child_chain_4 into wa_rspcchain .
wa_child
lv_child_chain_4 = wa_rspcchainchain_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_childlv_parent_chain  , ‘|’, wa_childlv_child_chain_1 , ‘|’, wa_childlv_child_chain_2 , ‘|’,
wa_child
lv_child_chain_3 , ‘|’, wa_childlv_child_chain_4 , ‘|’ , wa_childlv_parent_event_variante , ‘|’ .

uline (174) .

endloop.

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

    1. Manimaran Ayyanar Post author

      Hi Harish,

      Hope in ST13, we can list out all the process chain logs. But I don’t think so we can find “which process chain will trigger which”.

      If you have the procedure, it would be great if you share the details 🙂

      – Mani A

      (0) 

Leave a Reply