How to use If condition for SAP Error in UIPATH

I have been using SAP module for Data Extraction, When there is no data available for the given date , It gives the Status message No Items Selected
Looking out to use an If/Else condition where if any error or No Items Selected status comes up it gets aborted and continue with next , and if there is any data available it proceed with the next steps as exporting the data to specific path.

Please suggest how it can be done .
Error Screenshot has been Uploaded.
errorSap

Hi @mayankjha986 ,

You can use Element exist on Status message.
If element exist is true then use GetText Activity inside then block to get text of status element.

And then use one more if condition as "If (getText = “No Item Selected”)
then assign Boolean value as True

Note: Create separate workflow where just out bool value and use their with if condition As " If (out_IsNoItem=False) then do your task else move to next item

Refer below image

image

@ermanoj3101

Can you please share the .xaml file format for the above answer as i have checked using the above one but its not working.

Please inspect screens accordingly.
Test.xaml (8.2 KB)

@ermanoj3101 Thanks for the Answer.
But why the boolean values has been used in first else condition and again the same boolean been used in second condition ,
However i have been looking to abort the process and move to next if we have the message (No items selected (see long text)) in the bottom left corner. and if have the data present, need to move further with data export.

The bool value will just give you an idea to process ahead or come out.

So when you use it in separate workflow and invoke in main workflow it will return bool value and on the basis of that you can throw exception and come out.

Now it depends if you don’t want to use then don’t use it, just throw exception from if condition.

It depends on you how you want to utilize it.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.