on 11-16-2007 4:27 PM
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...
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sam,
Try this
IF COMM_STRUCTURE-DIVISION = 20.
IF COMM_STRUCTURE-MATERIAL+0(5) ='SPARE' OR COMM_STRUCTURE-MATERIAL+0(10) = 'INNERCASE' OR COMM_STRUCTURE-MATERIAL+0(4) = 'TEST'.
do process....
ENDIF.
ENDIF.
<b>Reward if this helps,</b>
Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sam,
In BI 7.0 you have to use SOURCE_FIELDS instead of COMM_STRUCTURE.
- Ram.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ram I KNOW ,
But am asking about the logic why its showing error here ...
here in this scenerio we are using Update rules so I need to use COMM_STRUCTURE only...Do you know why the code is giving wrong and also let me know the exact logic in performance point of view as well..
Thanks inadvacne and points will be assigned...
Hi,
Do you have syntax error or execution of this code gives you wrong results ?
If this code is copied/pasted from you update rules then it is not correct because you omitted some spaces before and after parenthesis...
And you also check ten chars in COMM_STRUCTURE-MATERIAL+0(10) but string 'INNERCASE' has only 9...
regards
Krzys
User | Count |
---|---|
81 | |
10 | |
10 | |
8 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.