0% found this document useful (0 votes)
53 views3 pages

Case When Read Into With KEY: Logic For Category 1 Complaints

The document contains logic for categorizing customer complaints based on the number of days since the complaint and service level thresholds. It reads data from a table to determine the service level thresholds for different complaint categories and service levels. Based on the number of days since the complaint, it assigns variables to indicate if the complaint is within the green, amber, or red service level thresholds. This logic is repeated for complaint categories 0 through 4.

Uploaded by

solankikavita
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views3 pages

Case When Read Into With KEY: Logic For Category 1 Complaints

The document contains logic for categorizing customer complaints based on the number of days since the complaint and service level thresholds. It reads data from a table to determine the service level thresholds for different complaint categories and service levels. Based on the number of days since the complaint, it assigns variables to indicate if the complaint is within the green, amber, or red service level thresholds. This logic is repeated for complaint categories 0 through 4.

Uploaded by

solankikavita
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 3

CASE <crm_cct>.

WHEN '0'.
READ TABLE it_time INTO wa_time WITH KEY
zcategory = '0' zelevel = '0'
zdept = 'CMP'.
IF wa_time-zhrs_days_flag = 'H'.
w_local = wa_time-zeend_time / 24.
wa_time-zeend_time = w_local.
ENDIF.
READ TABLE it_time INTO wa_time1 WITH KEY
zcategory = '0' zelevel = '1'
zdept = 'CMP'.
IF wa_time-zhrs_days_flag = 'H'.
w_local1 = wa_time-zeend_time / 24.
wa_time1-zeend_time = w_local1.
ENDIF.
IF w_days LE wa_time-zeend_time.
<wfs_gc0> = 1.
ELSEIF ( w_days GT wa_time-zeend_time )
AND ( w_days LE wa_time1-zeend_time ).
<wfs_ac0> = 1.
ELSEIF w_days GT wa_time1-zeend_time.
<wfs_rc0> = 1.
ENDIF.
*********
** logic for category 1 complaints **
WHEN '1'.
READ TABLE it_time INTO wa_time WITH KEY
zcategory = '1' zelevel = '0'
zdept = 'CMP'.
IF wa_time-zhrs_days_flag = 'H'.
w_local = wa_time-zeend_time / 24.
wa_time-zeend_time = w_local.
ENDIF.
READ TABLE it_time INTO wa_time1 WITH KEY
zcategory = '1' zelevel = '1'
zdept = 'CMP'.
IF wa_time-zhrs_days_flag = 'H'.
w_local1 = wa_time-zeend_time / 24.
wa_time1-zeend_time = w_local1.
ENDIF.
IF w_days LE wa_time-zeend_time.
<wfs_gc1> = 1.
ELSEIF ( w_days GT wa_time-zeend_time )
AND ( w_days LE wa_time1-zeend_time ).
<wfs_ac1> = 1.

ELSEIF w_days GT wa_time1-zeend_time.


<wfs_rc1> = 1.
ENDIF.
*********
** logic for category 2 complaints **
WHEN '2'.
READ TABLE it_time INTO wa_time WITH KEY
zcategory = '2' zelevel = '0'
zdept = 'CMP'.
IF wa_time-zhrs_days_flag = 'H'.
w_local = wa_time-zeend_time / 24.
wa_time-zeend_time = w_local.
ENDIF.
READ TABLE it_time INTO wa_time1 WITH KEY
zcategory = '2' zelevel = '1'
zdept = 'CMP'.
IF wa_time-zhrs_days_flag = 'H'.
w_local1 = wa_time-zeend_time / 24.
wa_time1-zeend_time = w_local1.
ENDIF.
IF w_days LE wa_time-zeend_time.
<wfs_gc2> = 1.
ELSEIF ( w_days GT wa_time-zeend_time )
AND ( w_days LE wa_time1-zeend_time ).
<wfs_ac2> = 1.
ELSEIF w_days GT wa_time1-zeend_time.
<wfs_rc2> = 1.
ENDIF.
*********
** logic for category 3 complaints **
WHEN '3'.
READ TABLE it_time INTO wa_time WITH KEY
zcategory = '3' zelevel = '0'
zdept = 'CMP'.
IF wa_time-zhrs_days_flag = 'H'.
w_local = wa_time-zeend_time / 24.
wa_time-zeend_time = w_local.
ENDIF.
READ TABLE it_time INTO wa_time1 WITH KEY
zcategory = '3' zelevel = '1'
zdept = 'CMP'.
IF wa_time-zhrs_days_flag = 'H'.
w_local1 = wa_time-zeend_time / 24.

wa_time1-zeend_time = w_local1.
ENDIF.
IF w_days LE wa_time-zeend_time.
<wfs_gc3> = 1.
ELSEIF ( w_days GT wa_time-zeend_time )
AND ( w_days LE wa_time1-zeend_time ).
<wfs_ac3> = 1.
ELSEIF w_days GT wa_time1-zeend_time.
<wfs_rc3> = 1.
ENDIF.
*********
** logic for category 4 complaints **
WHEN '4'.
READ TABLE it_time INTO wa_time WITH KEY
zcategory = '4' zelevel = '0'
zdept = 'CMP'.
IF wa_time-zhrs_days_flag = 'H'.
w_local = wa_time-zeend_time / 24.
wa_time-zeend_time = w_local.
ENDIF.
READ TABLE it_time INTO wa_time1 WITH KEY
zcategory = '4' zelevel = '1'
zdept = 'CMP'.
IF wa_time-zhrs_days_flag = 'H'.
w_local1 = wa_time-zeend_time / 24.
wa_time1-zeend_time = w_local1.
ENDIF.
IF w_days LE wa_time-zeend_time.
<wfs_gc4> = 1.
ELSEIF ( w_days GT wa_time-zeend_time )
AND ( w_days LE wa_time1-zeend_time ).
<wfs_ac4> = 1.
ELSEIF w_days GT wa_time1-zeend_time.
<wfs_rc4> = 1.
ENDIF.

You might also like