Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

abap Program in rotuine help

Hi Guys,

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...

Thanks...

Former Member
Former Member 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'.

ENDIF.

ENDIF.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question