Hello Lim,
thanks for your reply.
Now we know that between SAP_BASIS release 740 PL3 and 751 PL19 a change has been made to the dialog for XML export in ALV whether SAP GUI Scripting is used or not. This is a very important insight @LevKushnir.
How many records do you want to export from your table?
I tried the same approach as you and it works so far, as long as the dialog appears within the timeout of 30 seconds. The Save as… dialog is a normal window and can also be treated with the same automatisms. The only difference here is that the SAP backend prepares the data for export. If you have a lot of data, this also takes a lot of time. If you exceed the timeout, the error message will appear.
So I assume you want to export a larger amount of data and you are reaching the timeout before the SAP backend prepared the data. If this is the case you can find a great discussion, to handle this kind of requirement, here: How to Pause Automation Until Required Window Appears.
@bingshui-hl could that also been the reason for you?
Let us know your results.
Best regards
Stefan