cancel
Showing results for 
Search instead for 
Did you mean: 

Calling Javascript from ABAP webdynpro application

Former Member
0 Kudos

Hai All,

I want to call a Javascript from ABAP-Webdynpro application. If anyone has done this. Please let me know.

Thanks & Regards,

H.K.Hayath Basha.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

tes

Former Member
0 Kudos

Hai Abhi,

Thanks for the suggestion.

Regards,

H.K.Hayath Basha.

Former Member
0 Kudos

Hai Abhi,

I want the javascript to set value in a cookie which is at client, which is a client side cookie. That means this approach will not work is it.

Any suggestion to achieve this.

Regards,

H.K.Hayath Basha.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

as i have suggested in my first reply, you can achieve this with BSP.

you can navigate to BSP page which has nothing and after executing the javascript you can call the return URL.

User gets the BSP page and java script gets executed and automatically redirected to WDA page, user can not see this effect as the the page is redirected to WDA as soon as the script gets executed

Abhi

Former Member
0 Kudos

Thanks Abhimanyu.

How can we call the URL from the suspend plug? Do we give the full URL or we give relative URL - something like: \bsp\.... ?

Do you have an example please?

Thanks a lot for your help.

sreehari_vpillai
Active Contributor
0 Kudos

Dead Abhimanyu,

Suppose i have a login button in my WD app. In the login action, i have some processses to do. In between these processes i have to call a BSP and resume the remaining code after i press the backbutton from BSP (or JS Event to press back). Can i achive such a scenario ?

Thanks in Advance

Regards

Sreehari Pillai

Former Member
0 Kudos

Hai Abhi,

Whether the BSP can be launched in background without any user interaction. That is when a user invokes a ABAP-Webdynpro application, webdynpro application should be shown in the screen and in the background BSP should be called which in turn should call java script.

Regards,

H.K.Hayath Basha.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

remember it is the clientside javascript, without loading the BSP you can not call the java script, it is not possible

Abhi

Former Member
0 Kudos

Hai Abhi,

You mean from ABAP-Webdynpro call a BSP and from BSP call a Javascript is it.

Can you let me know how to call a BSP from ABAP webdynpro.

Regards,

H.K.Hayath Basha.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

go to window

create suspend outbound plug and resume inbound type

when create an outbound plug of Suspend type a parameter Url is automatically created,

fire the outbuond plug with the Url to a BSP page where you have JavaScript.

and fromt he BSP navigate back to WDA again which you can do using by reading the url parameter sap-wd-resumeurl, which contains the WDA URL

Abhi

abhimanyu_lagishetti7
Active Contributor
0 Kudos

framework will not allow you to write JavaScript in WDA, however you can navigate to a BSP page and execute and then navigate back

Abhi