Element locator 'not found' in SAP apps

Hello, I’m new to Robot Framework,
I’m trying to automate data input in a SAP program, but I’ve run into an issue where elements in the main area can’t be located, while there’s no problem with the elements in the menu (navbar). The elements are unique, and I’ve even tried using nested locators, but nothing seems to work.
Do you have any suggestions?

Here’s the exception I’m getting:
Exception has occurred.
Suspended due to logged failure: Element with locator ‘xpath=//table/tbody/tr/td/div/table/tbody/tr/td/div/table/tbody/tr[1]/td/table/tbody/tr/td/div/table/tbody/tr[3]/td/table/tbody/tr/td/div/table/tbody/tr[1]/td/table/tbody/tr/td/div/div/div/div/div/table/tbody/tr[1]/td/div/div/table/tbody/tr/td[2]/span/span[@id=“WD4B-btn”]’ not found.

i has attach image, the red area is the element i cant locate, the wording with red underline is the element i want to click. after click will reveal 2 choice i need to click (functional location, equipment).

Thanks before

please provide us some detail, maybe what kind and version of SAP is this. for me is quite surprising the xpath, there should be an ID, at least which I used has it…
for that there is a quite good program: scripting tracker, it can reverse engineer the ID for you.
other thing is:

  • this: //table/tbody/tr/td/div/table/tbody/tr/td/div/table/tbody/tr[1]/td/table/tbody/tr/td/div/table/tbody/tr[3]/td/table/tbody/tr/td/div/table/tbody/tr[1]/td/table/tbody/tr/td/div/div/div/div/div/table/tbody/tr[1]/td/div/div/table/tbody/tr/td[2]/span/span[@id=“WD4B-btn”]
  • could be just: //span[@id=“WD4B-btn”]
    really no need to the longer one, it just hard to maintain.
    and one more thing: kind of weird that a table has dropdown as td