cancel
Showing results for 
Search instead for 
Did you mean: 

Call a URL which is a Javascript

Former Member
0 Kudos

Hi All.

I know we CANNOT call javascript in Web dynpro abap.

I also know we can call a URL via calling external window and passing the URL.

We needed a functionality which requires a small piece of javascript code to be executed on click of any button. I have placed a javascript code in the portal server.

I was wondering if there could be a way to call a URL WITHOUT the external window - this would mean that I call my javascript URL whenever I want.

Thanks in adv for your patience.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>I was wondering if there could be a way to call a URL WITHOUT the external window

No. This doesn't really make sense. You can call URL via the linkToURL, Exit Plug or the open External Window - but all of these approaches are designed to support navigation not find a hack to execute JavaScript.

Answers (8)

Answers (8)

Former Member
0 Kudos

Hi, i try to be more civil...I dont have good day today

Well Business client does not work at all yet (very many bugs and documentation mismatch, but this is another issue) and portal is not so used end user system. Abap web dynpro is VERY good tool, i have to say best that i have seen (11 years).

It was quite nice feature that you could show dynamicly companys extranet solutions using iframe in awd.

Well i just have to live with it...

Thank you!

KK

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>It was quite nice feature that you could show dynamicly companys extranet solutions using iframe in awd

That was never intended to be a feature of Web Dynpro. Web Dynpro has always been designed to run within Portal or NetWeaver Business Client and not to be a "portal frame" of its own.

>Well Business client does not work at all yet (very many bugs and documentation mismatch, but this is another issue)

Does not work at all? It is a released and offically supported product. If you are having issues I suggest that you open a support ticket rather than just claiming publically that hte product "does not work at all". These are serious claims.

>portal is not so used end user system

At your company or in general? This is not a correct statement if you are refering to the entire SAP customer base. It is actually quite widely used and a technical requirement for many solutions.

Former Member
0 Kudos

Ok, i will create ticket for that (issue is very real).

People likes "old gui" because of rich features (not beacuse flexible navigation tree ). Portal is not so flexible as gui is and therefore they use litle bit portal (when have to) and lot of gui.

Im quite sure than gui is most used SAP ui in world...

End user do not like to jump system to system. That's why Business client is (to be) very needed ui in future. That im sure.

Meanwhile we have to feed customers with something...

KK

Former Member
0 Kudos

Hmm, have to find other forum where i could say my honest opinion then...

Customers pays quite a lot of using SAP products...Somebody have to speak up sometimes

It is not any personal!

Back to issue then. How i open another web page via office control?

"Use OfficeControl or InteractiveForm for Office and PDF documents"

KK

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hmm, have to find other forum where i could say my honest opinion then...

> Customers pays quite a lot of using SAP products...Somebody have to speak up sometimes

> It is not any personal!

> Back to issue then. How i open another web page via office control?

> "Use OfficeControl or InteractiveForm for Office and PDF documents"

> KK

Did I ever say you can't express your opinion? I said you must remain civil. Saying that SAP doesn't have "common sence" is not being civil. You can claim that there is no use of Adobe PDF online (which I don't agree with at all), but don't insult our developers/product designers.

Who said you should be able to open another web page via office control. As stated in the help OfficeControl is for opening Office documents. InteractiveForm is for opening PDF documents. We never said anything about opening just any web page via these UI elements. We are just stating that if you have office or PDF documents you don't use the iFrame to open them - you should use their respective UI elements.

If you want to open another web page, the recommended solution is another iView within a Portal or NetWeaver Business Client page. This way the two technologies are clear separated and there is less expectation that all parts should meet the same standards for theming, accessibility, personalization, etc. You can still communicate events between the two iViews using Portal eventing if necessary.

Former Member
0 Kudos

"RAISE methods of IF_WD_MESSAGE_MANAGER"

"Use OfficeControl or InteractiveForm for Office and PDF documents."

So all message handling have to change?

Office control could not show url of some web page -> you could not add external html ui.s.

Why o why i add PDF to abap web dynpro at any case? There is no smart scenario for that. Offline scenario via PDF/mail and workflow is ok but why create form and then add it to screen? Why dont just create screen with all inputs and outputs?

Sometimes i wonder is there any how think these via "common sence"...

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Sometimes i wonder is there any how think these via "common sence"...

Look, if you can't be civil I will lock this thread. Personally if you are going to be rude then I have no desire to engage in a conversation with you.

Former Member
0 Kudos

So it comes from ehp then....no need to activate it

I hope that you develop then something else to do what iframe does...Just wondering why SAP could not fix iframe bugs?

It is quite hard to explain to customers that they have to buy expensive corrections/changes because sap does not support that anymore...

Where i get list of things that is now available and tommorow not?

KK

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>So it comes from ehp then....no need to activate it

Wrong on both counts. The iFrame was depreciated before 7.0 Enhancement Package 1. The listing of depreciated UI elements that I linked to was comprehensive and includes all items pre-EnhP1 and with EnhP1.

Even if it was only depreciated with 7.0 EnhP1, there is no activation option for NetWeaver Enhancement Packages. NetWeaver Enhancement Packages are delivered with all new functionality immediately activated. NetWeaver Enhancement Packages don't use the Switch Framework. You can imagine what kind of mess we would have if we deliver new ABAP language constructs and new UI elements and made them optional - but then delivered applications that depend upon this new functionality. Even if we made the technology components switchable, they would almost certainly all have to be switch on at the first application that you activate. The dependencies would become a nightmare.

>Just wondering why SAP could not fix iframe bugs?

Just so we are clear - there are differences between bugs (defects in the product - not doing what it was designed or advertised to do) and simply not having certain functionality that you might want. There are no bugs in the iFrame UI. We have alternative solutions already - in the form of items I listed.

>Where i get list of things that is now available and tommorow not?

I supplied the official link of depreciated items from the online help.

Former Member
0 Kudos

WHY??!! It is most needed UI element to build up visually good end user ui!

And what about all development that is done via iframe? Will SAP develop all that again to my customers?

Yes i know WD Adobe stuff but like Business client (muse) we have to wait long time to get i bug free..

KK

Edited by: kanki kovana on Nov 27, 2008 9:46 AM

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Why?

Because the content in the iFrame is not session managed or delta handled. The offical suggestions is that you use the OfficeControl, the InteractiveForm, or the FlashIsland UI element for such areas embedded within WD. For other content you should use the Portal or NetWeaver Business Client and create separate iViews for the two areas.

>And what about all development that is done via iframe?

That is why we give depreciated notice before actually removing the UI element from the framework, so that customers have quite some time to rework solutions and so that developers don't create new solutions that rely on this approach.

> Will SAP develop all that again to my customers?

Of course not. You are are responsible for custom development that you create. SAP has the right to depreciate UI elements that are delivered by the framework with due notice to the customer. As of 7.01 there are actually quite a few depreciated UI elements and properties:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/44/e92dbd779b41aae10000000a114a6b/frameset.htm

Former Member
0 Kudos

We need calculator into awd-screen so i put calulator html code (use google to find) into mime and then i show it in iframe dynamicly (using button).

So it is possible to run javascript in awd whenever you want .

Former Member
0 Kudos

Just put html to mime and call it from abap web dynpr using iframe...easy

KK

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

The iFrame is depreciated and no longer supported. You can expect that it might be removed as a UI element at some point in the future. You should avoid its usage.

Former Member
0 Kudos

Hi Aishi Sharma,

if your WD app is running in a portal, maybe raising a portal event in the handler method of the WD button is an option. The receiver might well be a hidden iView. Just an idea.

Silke

Former Member
0 Kudos

Thanks for the comments everyone.

SIlke, you said I could raise a portal event - that would be very nice if I could do it, only problem being I don't know how to do it. Can you send a code snippet please or some example on how it could be achieved?

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Abhi

Former Member
0 Kudos

Hi Aishi,

a portal event is raised in WDA like this:

DATA lr_api_component  TYPE REF TO if_wd_component.
  DATA lr_portal_manager TYPE REF TO if_wd_portal_integration.
  DATA lv_event_parameter TYPE string.

  lr_api_component = wd_this->wd_get_api( ).
  lr_portal_manager = lr_api_component->get_portal_manager( ).
  IF lr_portal_manager IS NOT BOUND.
    RETURN.
  ENDIF.

  lv_event_parameter = 'somethingThatMakesSenseForTheEventReceiver'.

  lr_portal_manager->fire(
      portal_event_namespace = 'com.yournamesapce.etc.etc'
      portal_event_name      = 'yourEventName'
      portal_event_parameter = lv_event_parameter
  ).

The Link provided by Abhimanyu will provide you with the big picture. Have fun.

Silke