cancel
Showing results for 
Search instead for 
Did you mean: 

Test against transaction data values in Logic Script

trond_valldal
Explorer
0 Kudos

Hello everybody

does anyone have any experience with, or know if it's possible, to test against transaction data/values in Logic Script?

I have an example where I need to test against a flag (created as an account), and depending on the value (they can be 1, 2, or 3), different outcomes are possible.

Here's a little snipped of the script:

*WHEN A1_ACCOUNT
*IS 1

....which of course doesn't work, since there is no account member = 1 -- it's the transaction data value I'm referring. So I tried

*WHEN A1_ACCOUNT.SIGNEDDATA
*IS 1

*WHEN A1_ACCOUNT./CPMB/SDATA
*IS 1

*WHEN A1_ACCOUNT.%VALUE%
*IS 1

etc. but none of these work.

Appreciate any help here!

Thanks and regards

Trond

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Have you tried to use ternary operator: %VALUE% == 1? Expression A : (%VALUE% == 2? Expression B : (%VALUE% == 3?Expression C : Expression D))

former_member186338
Active Contributor
0 Kudos

First - strange idea to answer 3 year old question.

Second - nested ternary operator is not supported with ABAP script engine, it's valid only for JavaScript. Can be done without nested ternary operator.

0 Kudos

Didn't notice the post time. I saw this question on the first page without any comments/answers when I entered the community this morning.

former_member186338
Active Contributor
0 Kudos

Just retagging activity of moderator...