This content has been marked as final. Show 3 replies
IDOC script is a server side script and Java script is a client side script.
The normal flow of execution is first service side script (IDOC) gets executed and then client side script (Java Script) is executed.
So by the time Java script starts its execution, IDOC is complete and is out of bound.
So in the same request we can not pass value of java script variable to IDOC. However you can create a new request and sent the value to IDOC but in that case the page will get refreshed.
The basic question, why do you want to do this? What is the business case scenario?
Just guessing at what you are trying to do...
Are you aware there is already an IDOC HTTP_USER_AGENT variable?
Try adding the tag
<!--$HTTP_USER_AGENT--> to an hcsp page and see what you get.
Why don't you see if you can use that server side.
Hope that helps