Clear context in Web Dynpro View
Hi,
I have created a table based on search crieteria.
The scenario is first time e.g user has given some selection, it will return 5 records. These 5 records will be displayed in the table.
Now, if user enter some selection, which does not return any record, in that case i'm displaying the error message.
For displaying the message, i'm using get_element_count method, if it's > 0, then it displays the table else display the error message. But the problem is even in second time, if there is no record return, get_element_count mehtod return 5 records of the first search.
How to clear the context, or how to proceed. I can change my condition for a temp solution, but pls let me know what is the best way to do this.
Thanks,
Hi
you can use the method invalidate method of interface if_wd_context_node to clear all the elements of a node.
Regards
Naresh
Similar Messages
-
Clearing Context in Web Dynpro applications
Hi All,
I am using a view that is called from multiple places based on different criteria. This view has a table that is fed from the custom controller. Some of the context data for this custom controller are being set from the other views. I need to clear the resultset of the custom controller and retain the input data from the other views. Is there any simple way of clearing data in the context node? I tried invalidating the node, context but nothing seems to work. Any suggestion what I might be doing wrong?
Thanks and regards,
Hemanthhi Hemanth,
Where are u trying to invalidate the node. What is the exact scenario.If u want the custom controller to be updated in different views... u can say
wdThis.wdGet<contr name>Controller().wdGetContext().node<name>().invalidate();
in the init of the view where the value of the custom controller is updated.
Is the problem with invalidate or with the updation in values.Invalidate will always work if u set the lead selection properly.
If u cud elobarate more on the problem someone could really help u out...
Regards
Bharathwaj -
Hi,
I have created a table based on search crieteria.
The scenario is first time e.g user has given some selection, it will return 5 records. These 5 records will be displayed in the table.
Now, if user enter some selection, which does not return any record, in that case i'm displaying the error message.
For displaying the message, i'm using get_element_count method, if it's > 0, then it displays the table else display the error message. But the problem is even in second time, if there is no record return, get_element_count mehtod return 5 records of the first search.
How to clear the context, or how to proceed. I can change my condition for a temp solution, but pls let me know what is the best way to do this.
Thanks,HI,
remove context function removes all the contexts and gives the value under main nide.
where are change context we can explicitly specify under which context should the value should be...
Your problem will solve here
Context Handling and User defined Functions
http://help.sap.com/saphelp_nw04/helpdata/en/ea/c1f1c4f47011d19a600000e8a4b41d/frameset.htm
For more information...
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0f6991e5-0901-0010-e0b0-dc2a26cc0389
Just check this one also...good blog on context handling...
Introduction to Context Handling in Message Mapping
Introduction to Context Handling in Message Mapping
Remove context is different from the Context change.
Remove context does, it removes all the upper nodes of that particular node
where as Context change is used to set the context for that particular fields to satisfy the conditions
Context Change
http://help.sap.com/saphelp_nw04s/helpdata/en/35/fb8c4057d5701de10000000a1550b0/frameset.htm
Remove Context
http://help.sap.com/saphelp_nw04/helpdata/en/1f/ea0fb12403844bbb6c4cbc8a00cda9/content.htm
else use the Invalidate() function
Thanks
Suresh -
Incorporating web service in an ABAP web dynpro view
Hi,
I am trying to call an external web service to have its results displayed in an ABAP web dynpro view. I've seen various threads that are dealing with the same issue, but none of them seemed to have helped me (I am quite new at this so maybe I'm just having a slow beginning, please bear with me)
I'm interested in extracting information from a simple web service online. To this end, I went on www.xmethods.net and found a "quote of the day" service, which is practical because it doesn't even need input.
I am writing down all the steps I've taken, even if they seem trivial, because maybe my problem is the result of a silly mistake I'm not yet capable of noticing...
I am mostly following the instruction from here:
<a href="/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap:///people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
The SAP I use is the one on the SC7 system, seems to be ECC 6.0
After I created my package, I go on to create a Proxy Object, and when prompted for a WSDL source, I give the URL destination I got from xmethods.net: <a href="http://www.swanandmokashi.com/HomePage/WebServices/QuoteOfTheDay.asmx?WSDL">http://www.swanandmokashi.com/HomePage/WebServices/QuoteOfTheDay.asmx?WSDL</a>
Doing this I get an HTTP error (return code 400, message "ICM_HTTP_CONNECTION_FAILED") (others have had this problem, e.g. Calling Web Services from ABAP, but the answers offered haven't been much help to me)
and having no idea what to change or not change in SICF and other settings, I decided to save the file locally, and so I then created a Proxy Object by choosing the WSDL source as the local file I saved.
Telling me that multiple port types exist (SOAP, httpGet and httpPost) I picked SOAP. I can then see the properties of my Client Proxy Object, its structure with the classes and methods etc.
Then, following Thomas Jung's procedure, I went to create a logial port which I named QUOTE_PORT. When I do the F8 test he suggests to do, I get an error: SRT: Processing error in Internet Communication Framework: ("ICF Error when receiving the response: ICM_HTTP_CONNECTION_FAILED") which was predictable since I still haven't resolved that same problem above.
I then proceed to create a Web Dynpro Component. In that component, in the component controller's context, I created a simple node into which I added attributes which I created using the wizard -> Attributes from components of structure, and there I picked the structures that had just been created in my proxy object, each in its own node
I have three proxy structures generated: GET_QUOTE_SOAP_IN, GET_QUOTE_SOAP_OUT and QUOTES. This last one has two attributes which are STRINGs, the quote of the day and its author.
I then create a rather trivial view, whose context I have mapped to the component controller's context so as to have access to those "quote" and "author" attributes I just mentioned. The layout is simplistic at best, containing only two textviews, each one bound to its respective attribute.
Once the application has been done and tested, the output is a blank page. I'm hoping that this is only because of that ICM_HTTP_CONNECTION_FAILED error. Has anyone else had these problems when calling external web services? Is this the right procedure for displaying output?
Thanks and Regards,
MicolHi, sorry for the long reply time.
from work I do have proxy settings:
automatic configuration script: http://proxy:8083
proxy server for LAN: proxy / 8080
from home it's a proxy free connection.
In both cases I tried changing the settings in the SICF transaction, but it hasn't changed much.
With the HTTP error that I get, I get a long text on how to maybe solve it,
<b>No connection to Integration Builder (only generic data visible)
Message no. SPRX081</b>
In this long text, I have four tests to do in order to check the connection (as far as I can understand)
1. The address of the Integration Builder must be stored in the SAP system
=>Check/maintain with report SPROX_CHECK_IFR_ADDRESS
2. The HTTP connection of the ERP application server must function correctly
=>Check with report SPROX_CHECK_HTTP_COMMUNICATION
3. The Integration Builder server must be running correctly
=>Check with report SPROX_CHECK_IFR_RESPONSE
4. Proxy generation must interpret the data of the Integration Builder correctly
==>Check with report SPROX_CHECK_IFR_CONNECTION
The checks for 1&2 work okay, but I get errors for checks 3&4
"Integration Builder data not understood"
How can I go on from here?
Thx -
Context from Web-Dynpro-Component-Interface & Customer Extention Fields
Hello all,
A main component uses a Web-Dynpro-Component-Interface and defines an external maping to it. Web-Dynpro-Component-Interface has a context and a window. At runtime implementaion of Web-Dynpro-Component-Interface is provided.
All works fine, but how can i create an implementation with view which contains customer extention fields? Unfortunately only fields from context of Web-Dynpro-Component-Interface are visible. I can not even extend the context of Web-Dynpro-Component-Interface via enchancement framework.
I assume, it is possible with dynamic programming, but why is it not possible in declarative way?
thanks
regards
PaulHello,
I found this documentation:
Implementation of Interfaces for Customer Developments
Using interfaces in a Web Dynpro component benefits customers by giving them a clean basis for their own further developments. When creating a local development, you can implement a used interface in a separate component and add your own aspects to an application delivered by SAP.
http://help.sap.com/saphelp_nw70/helpdata/en/a9/19eebc1e2943dbb2d443095d017ae9/content.htm.
I think it must be a correct way to extend SAP programms with customer fields. Please reply, issue is very important.
Regards
Paul -
Is it possible to change the background of Web Dynpro Views in MDE apps ?
Hi Team,
Is it possible to change the Background color of Web Dynpro Views in Mobile Device applications ?
I have been able to change the cellBackgroundDesign from Transparent o fill1 etc and this change is visible in the desktop application.
But whenever; I am running this application in Mobile Device, the color change is not visible.
Also, there is an earlier post given by me for changing the color of rows in Table UI in SAP SRS Mobile Device Enabled.
Color code logic not feasible in Pocket Browser
Our Mobile Devices are:
http://emobilescan.co.uk/downloads/manuals/ppt8800.pdf
The OS is: Windows 2003
and the Browser is: Pocket Browser.
Please give me in any suggestion which I can implement to see the background color change w.r.t, Mobile Devices.
Thanks & Regards
Kaushik Banerjee
SAP PortalHi,
Have you uploaded your Photobook to Kodak Gallery or Shutterfly? -
Embed website in Web Dynpro View
Hi all,
I am trying to embed a website in a Web Dynpro View. I am not sure about it how to get this.
I have created a ViewContainerUIElement on the view and the website should be placed in this element.
My code for creating the website looks like following:
DATA: lo_window_manager TYPE REF TO if_wd_window_manager.
DATA: lo_api_component TYPE REF TO if_wd_component.
DATA: lo_window TYPE REF TO if_wd_window.
DATA: ld_url TYPE string.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
ld_url = 'http://www.google.de'.
CALL METHOD lo_window_manager->create_external_window
EXPORTING
url = ld_url
RECEIVING
window = lo_window.
lo_window->open( ).
But how can I integrated the website in my ViewContainerUIElement or isn't it possible?
Thanks for you help
PeterHi,
You can try using UI element Iframe.
URL can be mentioned in source property of Iframe as http://www.google.com.
Re: How to Add URL in a view .
Regards
Manas Dua -
Calling an ABAP report from a web-dynpro view
Hi,
I have a web dynpro view that i would like to call an ABAP program from. Any ideas how i can do this? Thanks,
Samir
Edited by: Samir Vora on Feb 18, 2008 11:12 AMHello Samir,
that would mean mixing two different ui technologies and hence it not possible. You can start the report in background though. Please refer to [this list of restrictions and limitations|http://help.sap.com/saphelp_nw70/helpdata/en/46/82091e304559dbe10000000a1553f6/content.htm] regarding the usage of certain ABAP statements.
Best regards,
Thomas -
Web Dynpro Views As Callable Objects in GP
I would like to know how to setup a sequence web dynpro views off a common WD component as a callable object. In particular, my GP will use View1, View2, .. View n all based on a common web dynpro DC and same single WD component. How should this be configured in GP that each View refers to the same WD instance? Where is state stored in such a scenario? Does the GP framework instantiated the WD component and maintain it for the entire lifecycle of the process? Thanks.
hi
check out this link. Refer page 14
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0c7b2f25-0c01-0010-f2a2-f8a65a9dcad9">Defining Several iViews based on one Web Dynpro application</a>
Other link that can be helpful is
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e3f07a7a-0601-0010-ebbd-b9cfb445b814
Thanks & Regards
Harsimran -
请问: 怎么改web dynpro view 的背景色。
推荐几个有关的资料:
Note: 1088717
SAP Library:
http://help.sap.com/saphelp_nw04s/helpdata/en/46/89af7fbe4d429ee10000000a1553f7/content.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/79/affe402a5ff223e10000000a155106/frameset.htm
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/e86de5008b4d9ae10000000a155369/content.htm -
ADT: Web Dynpro view/window error "Failed to create the part's controls"
Hi, all
Most of the things in my ADT work fine (e.g. programs, structures, domains), even the Web Dynpro Componentcontroller can be edited.
However, with Web Dynpro view and window I get this error message: "Failed to create the part's controls".
In SAP GUI everything works fine.
Why could this happen and what can I do?
My system details:
32-bit Windows 7
Eclipse Luna Release (4.4.0)
ADT from https://tools.hana.ondemand.com/kepler, according to these instructions: SAP Development Tools for Eclipse.
SAP GUI 7.30, patch level 9.
SAP_ALL authorizations
Java: SE, version 7 update 60
Activated services (SICF): wdy_aie_vd_preview, toolsdocu, docu
The Java error log in Eclipse is quite long. It starts with:
java.lang.IllegalStateException: java.lang.IllegalArgumentException: No enum constant com.sap.adt.wda.controller.semanticfs.common.ControllerFileServices.ControllerObjectTypeEnum.WDYNWZ
at com.sap.adt.tools.core.ui.editors.AdtFormEditor.addPages(AdtFormEditor.java:222)
at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:138)
at com.sap.adt.tools.core.ui.editors.AdtFormEditor.createPages(AdtFormEditor.java:1251)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:362)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:140)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:99)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:321)
at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
As it is not popular to post long logs unnecessarily, I will skip the rest of it for the moment - let me know if it could help and I will post it.
Thanks for help!
KR,
IgorHi Ponraj,
note applied without any problem.
I'm still facing some difficulties accessing a WD component, maybe you could suggest me how to solve/proceed:
in Eclipse Luna, I can access now a WD but "Layout" tab doesn't work - HTTP 403 Forbidden - Service cannot be reached. I guess it's a missing configuration, could you help me out on this?
EDIT: This one is solved; I just missed to activate a service in SICF (WDY_AIE_VD_PREVIEW).
That Eclipse module however seems not to be very stable; I tried to open a standard SRM WD view (wd component /SAPSRM/WDC_DO_SOCO_GAF_1, view V_AO_SOCO_GAF_1) and that resulted in the message:
500 SAP Internal Server Error
ERROR: Conversion of type C LENGTH 255 to type TABLE OF DEEP_STRUCTURE not supported. (termination: RABAX_STATE)"
is there a way, from the Methods tab, to access directly to a particular method's implementation? The only way I found is going manually under the IMPLEMENTATION tab and CTRL+F with the method's name.
is there any way to access to a particular enhancement made on the WD? Using SapGUI, there's a special "vortex" button to switch on a specific enhancement, but under Eclipse I can't find the alternative command.
I know we're getting a bit OT with respect to the topic, anyway if there's a guide that could help clarifying my doubts please, share that documentation
BR,
M. -
To trigger event or action on "TAB" key press on web dynpro view
Hi, I need to trigger event on "TAB" key press on web dynpro view , is it possible?How?
Hi Dipak
What Madhu said is correct. Tab key is pre-configured to move cursor from 1 field to next field. we can not create an event on tab key press.
Regards
Gaurav -
Linking IFrame with Web dynpro Views
Hi All,
How can I link IFrame of webdynpro (where I created one html page) with web dynpro views.What my requirement is when I clicks a button in the html page of the IFrame, it should pass the values from this html pages to Web dynpro views.
Thanks
Fahad HamsaHi
Try This
http://help.sap.com/saphelp_nw2004s/helpdata/en/e9/7652a84fada444bd11ca73670ce7dc/frameset.htm
Resize IFrame
Kind Regards
Mukesh -
Exiting a Web Dynpro Application by pressing a button on a Web Dynpro View
Hi all,
I want to exit a Web Dynpro application when the user presses an Exit button on the screen. Is there an API for closing the current browser window and exiting the application?Thanks.
Sukruhi,
For closing Main Window, use Exit Plug in Windows:
Do the following steps :
-> Make an Outbound Plug to the Window.
->Make the type of Outbound plug to Exit Type.
->Add CLOSE_WINDOW of type wdy_boolean as a parameter to the outbound plug of Window.
->Do remember to add Component Name in the Properties Tab of View ( othervs Calling Outbound plug of window from view wont be possible ).
->Fire the outbound plug with close_window as X in the onAction of Exit Button .
Refer SAP online help on using Exit plug to close a window:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/content.htm
method ONACTIONGO_EXIT .
data: L_REF_MAIN_WINDOW type ref to IG_MAIN_WINDOW .
L_REF_MAIN_WINDOW = WD_THIS->GET_MAIN_WINDOW_CTR( ).
L_REF_MAIN_WINDOW->FIRE_MY_EXIT_PLUG_PLG( CLOSE_WINDOW = 'X' ).
endmethod.
here Main_window is the window which needs to be closed.
I hope it is clear. -
Web Dynpro view data to PDF creation issue
Hi ,
I am passing data from Web Dynpro iView to genrated PDF using url link, pdf generation is done using iText java class.
outputPDFData is the method to which i need to pass the data to but this is where i failed.
Can someone please identify error or suggest how i move from here?
Till now we completed storing test data in a temporary location using ByteArrayOutputStream but to show the data on screen??????
ByteArrayOutputStream os = new ByteArrayOutputStream);
List data = new ArrayList();
data.add("Test Data1");
data.add("Test Data2");
data.add("Test Data3");
PDFTestTemplate PDFTest = new PDFTestTemplate();
PDFTest._outputPDFData_(os,data);
final IWDCachedWebResource resource = WDWebResource.getWebResource(os.toByteArray().toString().getBytes("UTF-8"), WDWebResourceType.PDF);
wdContext.currentContextElement().setPdfURL(resource.getURL());
os.close();
P.S.
I have also referred to this blog by Prakash Singh but wasnt very helpful in my case.
Create a PDF file using JAVAMartin is right,
Any data context node on the next view should also be mapped to the component controller, so when you are changing views you just have to use your material number to invoke the method of the component controller that gets your detailed data, its as easy as this:
before you fire you plug you can use the following:
wd_comp_controller->get_material_details( matnr = lv_matnr ).
Inside your component controller you should have a method called "get_material_details" and an importing parameter called matnr.
once the logic is run to get the details, bind your data to the component controllers Material details context node, this node should also be mapped to the view of the second screen.
So now when the second view opens the data will magically be there
Good luck,
Shaunny B
Maybe you are looking for
-
Designer 2010 - how to add a custom or calculated field ?
Hello I have a list like this: [name][course][date][result] John Smith, Windows beginners, 01-01-2014, 10 John Smith, Windows advanced, 02-01-2014, 7 Jane Doe, Windows beginners, 01-01-2014, 5 Wanted: A list that shows all the people that attended 2
-
I need help: Newbiee!
I bought an Apple ipod Video yesterday and appear to be having technical problems with it already. I have looked through the entire site for troubleshoot purposes but have not found what I was looking for. The problem with my ipod Video is my itunes
-
Several reconciliation accounts possible for one customer/vendor
Dear experts, I am starting with FI-CO module. I have a question regarding G/L reconciliation accounts -Are they only linked to subledgers AP-AR in the customers/vendors master data? I mean for one customer i only have 1 reconciliation account (rece
-
From a designer's point of view...
This hasn't seemed to be talked about much so I thought I would see if I could get some dialogue generated on the subject. When it comes to my graphic designers in the Flex workflow: 1. should I keep them in the Flash environment or move them to the
-
Windows Native .ico JNLP icons
I'm having trouble passing a Windows native .ico file as the shortcut icon for my JWS app. From http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4625362 and the release notes for JRE 1.6 it appears that native .ico files are supported. I tried ever