cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence change in the Collection

AsitabhaDeb
Level 6

HI Experts,

As per the screenshots left side image is from SAP and right one is from collection, both are same data.

I read the data from SAP and convert it to the collection but the problem is sequence of the no has changed.

Sequence of 2nd no in the SAP become 1st in the collection. 

Is there are any way I can fix this? because  I need to run the script in the SAP but as sequence of the no has changed how BOT will click on the correct line? How I tell BOT which particular line should click.

Please give me the solution. It's urgent.

BR/Deb



------------------------------
Asitabha Deb
------------------------------

3 REPLIES 3

NicholasZejdlik
Level 9

If I understand correctly, you're reading the data from SAP, then doing some kind of conversion to get the collection on the right in the image.

Is the data in the correct order when you first retrieve it from SAP? If so, then the issue would likely be with building that collection. What kind of actions are you using to build the collection?

If the data is incorrectly ordered after retrieving it out of SAP, you'll want to dig into that a bit. I'm not familiar with SAP myself, but if that were the case, I would guess there's some sort of ordering mechanism going on when you retrieve the data that is causing the difference between what you see and what the robot has.

Depending on your situation, you might be able to write the bot in such a way that the order of items doesn't matter. Sorry I'm not more familiar with SAP; I couldn't really help you on that point.


------------------------------
Nicholas Zejdlik
RPA Developer
------------------------------

HI Nicholas,

Thanks for reply.

I have attached two image where you can see left side image in from SAP and right side is from collection. After taking in to collection the sequence of the no has changed.

In this process first I have compare two collection one is excel collection and second one is the SAP data collection and when one component

is match in both the collection BOT again go to SAP and click on the matching component.

But over here as sequence is changing, I am confused a bit how BOT will click on correct line. In SAP matching component is showing on 2nd place but in collection it is 1st place.

I hope I am able to make you understand.

Thanks/Deb



------------------------------
Asitabha Deb
------------------------------

Have you tried setting a dynamic value on the element when you spy it in SAP? For example, if this were a web page and I were looking for a button with a value that could change at run-time, I would set the Value field as dynamic in Application Modeler.

31108.png

If that doesn't help or doesn't work in your case, then I'd try to find out where exactly the collection is becoming unordered. If you can get the correctly ordered collection from SAP, then somewhere along the way in the comparison you're doing with Excel, it's likely changing the collection such that it loses the original order from SAP.



------------------------------
Nicholas Zejdlik
RPA Developer
------------------------------