cancel
Showing results for 
Search instead for 
Did you mean: 

How to add IF condition in sap standard task description

former_member507885
Participant
0 Kudos

Hi All,

I tried to add IF - END IF condition in editor like below

/: IF &container[]& EQ &container[]&.

/: &contiainer1[]& = ' '

/: ENDIF.

But it's not working...what is missing or i'm using wrong syntax.

Could you please let me know.

Thanks,

Satish

Accepted Solutions (0)

Answers (1)

Answers (1)

david_flad3
Explorer
0 Kudos

it looks like you are trying to compare the entire content in one container with another container, much in the same way you'd use ABAP to try and compare content between two internal tables. The code shows container1 on the second line, but the first line appears to show the same container reference -- so you're not checking equality between contain and container1. Is that what you intended?

former_member507885
Participant
0 Kudos

Hi David,

Thanks for you response!!

it's typo error should be like below...yeah i'm trying to compare complete container and want to clear the container when condition is True.

/: IF &container 1[]& EQ &container 2[]&.

/: &contiainer1[]& = ' '

/: ENDIF.

david_flad3
Explorer
0 Kudos

I might be mistaken, but since the container is a set of referenced objects, you'd need to compare the objects specifically in a loop, rather than a typical ABAP type of table-compare.

I would have to ask whether or not there are just a few key fields in each container, that if a value is present, would be sufficient for the compare, as opposed to every single object. I.e. just compare the few key objects in the container, instead of the entire container.

Can you share some more on your use case scenario? Might be something that would warrant a lsightly different design approach to avoid the need for the compare.