Quantcast
Channel: SCN: Message List - Data Warehousing
Viewing all articles
Browse latest Browse all 3366

Re: Process chain time stamp

$
0
0

Hi

 

we will achive your requirement using  RSPCLOGCHAIN,RSPCPROCESSLOG ,tables

 

please write a program like as a below

 

 

 

 

types: begin of ty_rspc,

       log_id
type rspc_logid,

       starttimestamp
type rstimestmpl,

       endtimestamp
type rstimestmpl,

      
end of ty_rspc.

 

Data: lt_pclog type standard table of rspclogchain,

      wa_pclog
like line of lt_pclog,

 

 

     rspc type table of ty_rspc,

 

 

       wa_rspc type ty_rspc,

 

 

       e_status1 type char10,

       i_chain1
type rspc_chain,

       logid
type rspc_logid.

 

 

parameters: chain type rspc_chain.

 

select-options : dat for date  no intervals ,

 

select * from rspclogchain

              
into table  lt_pclog

             
where chain_id = CHAIN

               
and datum in dat.

 

if sy-subrc = 0.

       
sort lt_pclog by datum zeit.



       
loop at lt_pclog into wa_pclog.

         
if sy-subrc eq 0.

            logid = wa_pclog-log_id.

            i_chain = wa_pclog-chain_id.

          endif.



         
select log_id  min( starttimestamp ) max( endtimestamp )

           
from  rspcprocesslog

           
into table rspc

          
where log_id = logid group by log_id .

 



         
if logid is not initial and i_chain is not initial.


           
call function 'RSPC_API_CHAIN_GET_STATUS'

             
exporting

                i_chain  = i_chain

                i_logid  = logid

             
importing

                e_status = e_status.

          endif.



         
if e_status = 'G' ....... R ,J, X,A,F

 

   *we have to calculate the start date&time and enddate& time


loop at rspc into wa_rspc .
             
if sy-tabix = 1.

                time_end = wa_rspc-endtimestamp.

                exit.

              endif.

            endloop.



           
loop at rspc into wa_rspc .



              time_start = wa_rspc-starttimestamp.



            endloop.

 

           hh = time_end+10(2).

           
min = time_end+12(2).

            ss = time_end+14(2).

           
concatenate hh min ss into  time_e .

           
concatenate hh min ss into  time_ed separated by ':'.



            hh = time_start+10(2).

           
min = time_start+12(2).

            ss = time_start+14(2).

           
concatenate   hh min ss into time_s .

           
concatenate hh min ss into time_st separated by ':' .



            date_end = time_end+2(8).

            date_start = time_start+2(8).

 

 

i have write some idea program , ask ur ABAper to fine tune .

 

Regrds,

polu.

 




 

 


Viewing all articles
Browse latest Browse all 3366

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>