cancel
Showing results for 
Search instead for 
Did you mean: 

Mark DTP as Red if Zero records are Transferred

alok_jaiswal
Contributor
0 Kudos

Hi All,

In our current process, we have multiple process chains which extracts data from Legacy systems and data is loaded to BI Infocube via DTP.

I wanted to know is there any configuration which will mark DTP as Red or send out any notification if Zero records are transferred by DTP. Basically we have multiple instances where step will complete successfully but No records would be sent to Infocube due to some error either in extraction or at PI end.

So, we would like to notified in such cases as process chain completing successfully gives a false impression that all steps were fine.

Please suggest.

Regards,

Alok

Accepted Solutions (1)

Accepted Solutions (1)

chandan_praharaj
Contributor
0 Kudos

You can use the below pseudo code :

1. RSMONICDP will give you the Records inserted-Request ID-Data Target, find ZERO record update Request ID.

2.  Find the DTP from RSPROCESSLOG , by giving the Request ID.

3. Use the mail sending functionality of ABAP to send the mail to Support team, so that they will take action.

Cheers!

alok_jaiswal
Contributor
0 Kudos

Thanks Chandan for reply.

So, there is no standard configuration as such and need to use custom Z report to achieve this functionality?

Regards,

Alok

0 Kudos

Hi,

Yes, Custom program needed in this case.

Like Chandan replied, you can handle this.

Also the ABAP program can be made to raise an error message, which would turn the CHAIN red.

Thanks

alok_jaiswal
Contributor
0 Kudos

Hi,

So the custom program needs to be added in the expert routine section of the DTP, so that while doing the load, if program finds that 0 records are being loaded, an alert can be sent to Required Team?

Regards,

Alok

RamanKorrapati
Active Contributor
0 Kudos

Hi Alok,

ABAP program can be added after your dtp step in process chain. so that will send alerts or notifications to mentioned recipients.

Thanks

Answers (4)

Answers (4)

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

You can put some ABAP code in the end routine / start routine.

For example in result package.

IF result_package[] is initial.

     raise exception type CX_RSROUT_ABORT.

ENDIF.

In the process chain for the DTP or the local chain include a message for failure. This should trigger the mail when the load is red.

Regards

alok_jaiswal
Contributor
0 Kudos

Hi Jugal,

I tested by writing the code in Start Routine. However it seems that if the source package contains zero records then start routine is not getting executed at all and hence step is not failing.

Is this the expected behavior?

Regards,

Alok

former_member185132
Active Contributor
0 Kudos

Yes, this is expected. The DTP operates in multiple steps, the first of which is extraction of data from the source object. The whole transformation gets executed only after that. It is quite natural that if the extraction yields zero records, the system will not execute the rest of the steps as there is no data for the transformation to process. Your requirement is something that the DTP/Transformation aren't designed to handle.

As others have suggested, add an ABAP step just after the DTP load in the Process Chain. The program should check the table entries given by Nanda and based on that, send out an email if there are zero records.

ccc_ccc
Active Contributor
0 Kudos

Hi Alok,

You can all information in one table.

RSSTATMANPART,

DTA ==> Field give you restrict either infocube/DSO/Infoobject

DTA_TYPE ==> Data target wise, like ODS, Cube , Open hub Etc....

ANZ_RECS ==> No of records transferred

INSERT_RECS ==>No of records inserted

UPDMODE -==> update mode.

lot more.

Please check this table.

Thank you,

Nanda

Former Member
0 Kudos

Hi Alok

if you want the load to fail if there are zero records. Create start routine and check for source_package, if it is initial raise the exception so that load will fail. In the process chain, you can create message for the variant so that if it fails to send email alert.