Execute script on a...
 
Notifications
Clear all

Execute script on a button after the screen has refreshed.  

  RSS

Sathish Kumar
(@sathish)
Member Moderator
Joined: 4 months ago
Posts: 1203
07/04/2021 10:34 am  

In transaction ME52N at the Item Detail level on the Contact Person tab there is a field for Requisitioner or Requester. I have added two additional fields on my personas flavor to display the users full name and telephone number based on this requisitioner field being passed through an RFC. I have added a script to the up and down arrows for the item level and this script will check to see if the Contact Person tab is selected and if so then take the value in the Requisitioner field and pass that info to the RFC and in return paste the two values to the custom fields. My problem is that when this script is executed (user clicks the up or down arrow to navigate to the previous/next line item) the system is capturing the value in the requisitioner field before the screen refreshes with the new line item information. Is it possible to execute this script AFTER the screen refreshes without actually using the screen event onAfterRefresh?


Quote
Sathish Kumar
(@sathish)
Member Moderator
Joined: 4 months ago
Posts: 1203
07/04/2021 10:34 am  

try to do a screen refresh before reading the new values. Perhaps this helps...

sap.personas.scripting.executeScriptInternal({src:''}); 

ReplyQuote
Share: