Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I face the following problem.
I get error for following:
SAP System:
// if([Billing Type]=('F2' or 'ZDOM' or'ZTRD' or'ZTRM' or'ZDEP' or 'ZEOU' or 'ZDEX' or 'ZSEZ' or'ZCON' or 'ZJBW'or 'JOB' or 'ZDR' or'ZPWR' or 'ZSTM'),Domestic,
// if([Billing Type]=('ZEXP' or 'ZSEA' or 'ZQT'),Exports)) as Type,
Can someone let me know the syntax for writing OR inside If statement.
Thanks,
Saurabh.
Try the following:
If(Match([Billing Type],'ZEXP','ZSEA','ZQT')> 0,'Export',
If(Match([Billing Type],'F2','ZDOM','ZTRD','ZTRM','ZDEP','ZEOU','ZDEX','ZSES','ZCON','ZJBW','JOB','ZDR','ZPWR','
ZSTM')>0,'Domestic','Unknown'))
if([Billing Type]='F2' or [Billing Type]='ZDOM' or [Billing Type]='ZTRD' or [Billing Type]='ZTRM' or [Billing Type]='ZDEP' or [Billing Type]='ZEOU' or [Billing Type]='ZDEX' or [Billing Type]='ZSEZ' or [Billing Type]='ZCON' or [Billing Type]='ZJBW' or [Billing Type]='JOB' or [Billing Type]='ZDR' or [Billing Type]='ZPWR' or [Billing Type]='ZSTM','Domestic',if([Billing Type]='ZEXP' or [Billing Type]='ZSEA' or [Billing Type]='ZQT', 'Exports'))
Do max calculation parts in Edit script.
You can use a match statement for multiple expected values of the same field.
if(match([Billing Type],'F2','ZDOM','ZTRD','ZTRM','ZDEP','ZEOU','ZDEX','ZSEZ','ZCON','ZJBW','JOB','ZDR','ZPWR','ZSTM',Domestic,
if(match([Billing Type],'ZEXP','ZSEA','ZQT'),Exports)) as Type
the above assumes you wanted to have a nested if statement and that Domestic and Exports are field names. If instead you want to have the words Domestic or Exports, encose in single quotes.
Jonathan
Hello,
Try this
if([Billing Type]= 'F2' or [Billing Type]='ZDOM' or [Billing Type] ='ZTRD' or [Billing Type] = 'ZTRM' or [Billing Type] ='ZDEP' or [Billing Type] = 'ZEOU' or [Billing Type] = 'ZDEX' or [Billing Type] = 'ZSEZ' or [Billing Type] ='ZCON' or [Billing Type] = 'ZJBW'or [Billing Type] ='JOB' or [Billing Type] = 'ZDR' or [Billing Type] = 'ZPWR' or [Billing Type] ='ZSTM',Domestic) as Colname,
if([Billing Type]='ZEXP' or [Billing Type]= 'ZSEA' or [Billing Type]= 'ZQT',Exports) as Type,
Cheers!!
Jagan
Thanks.
They are Words so I will enclose in single quotes.
Try the following:
If(Match([Billing Type],'ZEXP','ZSEA','ZQT')> 0,'Export',
If(Match([Billing Type],'F2','ZDOM','ZTRD','ZTRM','ZDEP','ZEOU','ZDEX','ZSES','ZCON','ZJBW','JOB','ZDR','ZPWR','
ZSTM')>0,'Domestic','Unknown'))
Thanks guys for all the replies.
Thanks for the multiple OR but what I was looking for is that match function.
Thanks jonbroughavone