cancel
Showing results for 
Search instead for 
Did you mean: 

Abap program in PC to alert 0 records in DSO

dinesh_smhdr
Participant
0 Kudos

Hi Folks,

I need to write an abap program in process chain which will alert with an email whenever there are 0 records in DSO. Kindly assist.

1. Fetch the latest request from the table RSSTATMANPART for the particular DSO,

2. Check if it has zero records

3. If it has records then activate it using RSDODSACT1 program

4. If it has zero records, then end.

Accepted Solutions (1)

Accepted Solutions (1)

ccc_ccc
Active Contributor
0 Kudos

Hi Dinesh,

Here code .

REPORT zods_lat_req.

PARAMETERS: dta TYPE RSINFOCUBE OBLIGATORY.

DATA: w_date      TYPE sy-datum,

       partnr      TYPE numc10,

       insert_recs TYPE rsnumrecord.

DATA: wjob(50) TYPE c.

CLEAR: w_date, partnr,insert_recs, wjob.

SELECT MAX( datum_anf ) FROM rsstatmanpart INTO w_date WHERE

   dta EQ dta.

IF sy-subrc EQ 0.

   SELECT partnr insert_recs FROM rsstatmanpart INTO (partnr, insert_recs)

     WHERE dta EQ dta AND

       datum_anf EQ w_date.

   ENDSELECT.

   IF sy-subrc EQ 0.

     IF insert_recs >= 0.

* RSDODSACT1 program not available in my system, you may use alternative

*

     ELSE.

       EXIT.

     ENDIF.

   ENDIF.


Thank you,

Nanda


ENDIF.

Answers (1)

Answers (1)

ccc_ccc
Active Contributor
0 Kudos

Hi Dinesh,

Please check below code and let me know.

Thank you,

Nanda