abap Program in rotuine help
I need to write a routine in the update rule for a KF with the following Logic:
IF COMM_STRUCTURE-DIVISION = 20 AND (COMM_STRUCTURE-MATERIAL0(5) ='SPARE' OR COMM_STRUCTURE-MATERIAL0(10) = 'INNERCASE' OR COMM_STRUCTURE-MATERIAL+0(4) = 'TEST').
Its giving me error when I check it..Can any one tell me ASAP how write this logic please...
Jerome Fenelon replied
The syntax error is because there is no space between '(' & 'COMM_STRUCTURE-MATERIAL' as well as 'TEST' & ')'. Likewise ='SPARE', should be as = 'SPARE'.
Try below code...
IF COMM_STRUCTURE-DIVISION = '20'.
IF COMM_STRUCTURE-MATERIAL+0(5) ='SPARE'.
ELSEIF COMM_STRUCTURE-MATERIAL+0(9) = 'INNERCASE'
ELSEIF COMM_STRUCTURE-MATERIAL+0(4) = 'TEST'.