Map context node web dynpro to context DATA of interface controller ALV
Hi Experts,
I have started creating simple ALV by following the example in the below mentioned link.
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3439404a-0801-0010-dda5-8c14514d690d
I have completed 95% development but stuck with last bit of
Set data to ALV for display (via reverse context mapping).
When Click on the Controller Usage button. The component controller of your Web Dynpro component DOES NOT appears on the right side of the screen.
Therefore I can not Map context node NODE_FLIGHTTAB of your Web Dynpro component to context DATA of the interface controller of the ALV component.
Could you please shed me light on this.
Your time and help much appreciated.
Best Regards
CB
Hi Chandra,
You need to add component controller first. Just go to the property tab of interface controller of the alv component and click on create button and then add the component controller. After that you'll be able to see the node in the context tab.
Regards
Arjun
Similar Messages
-
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 -
Retrieve data from other context node within the same context
Hi Experts,
I want to redefine method BUILD_TABLE for a table context node and I need to access data from another context node within the same context. I have looked through the methods of class CL_BSP_WD_CONTEXT_NODE_TV but could not find a mean of retrieving the other context nodes.
Any ideas?
Thanks a lot. Your help is appreciated.
Cheers,
JensHi Jens,
Check this [wiki|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=201066680] it should be helpful.
Regards,
Shobhit -
How to mapping Bapi_EeCatimesheet with Web Dynpro iview
I have problem with CATS:
1. mapping field from Web Dynpro iview with Bapi_EeCatimesheet_Worklist
Column: Activity = Bapi_EeCatimesheet_Worklist_input_Out.???
Column: xxx = ???
Variable as TimeSheet of SAP Easy View
2. How to insert Employee timesheet into SAP System by BapiHi,
At first time the ApplicationParameter was not displayed among the mappable properties. After that I changed the ApplicationParameter property of the WD iView (so it became different from the default one) and created a new room template. What happened ? At the new template I could map to room_id to the ApplicationParameter. Interesting, not?
One other thing: What do you think about the following ?
1. First creating a "Concat Strings" extension to create a string like "room_id=<room_id>"
2. Creating an other extension and mapping the newly created string to the ApplicationParameter property
3. Getting the parameter from WD with the help of getRequestParameter(java.lang.String key)
I have not tried it yet, but I plan to do it.
Regards,
Ferenc -
How to map XML to Web Dynpro context nodes?
Hi All,
Could anyone tell how xml string can be bound to context nodes ? In my requirement i need to serialize context nodes value to string and deserialize it back to nodes for implementing back naviagtion between views.
I didnt see much threads achieving this giving details on class cl_wdr_xml_convert_util and methods if_wd_client_conversion_util~string_to_struct.
I am using wd_context->to_xml to convert into xml.
From this format, i want to bind it back to context node.
When i use this below approch i get short dumb.
Serialization to xml:
lv_data_string = wd_context->to_xml( ).
Deserialization:
DATA lv_typedescr TYPE REF TO cl_abap_typedescr.
FIELD-SYMBOLS:
<fs_data> TYPE ANY TABLE.
CALL METHOD cl_abap_typedescr=>describe_by_object_ref
EXPORTING
p_object_ref = wd_context
RECEIVING
p_descr_ref = lv_typedescr
EXCEPTIONS
reference_is_initial = 1
OTHERS = 2.
try.
CALL METHOD cl_wdr_xml_convert_util=>if_wd_client_conversion_util~string_to_struct
EXPORTING
in = lv_data_string
typedescr = lv_typedescr
IMPORTING
data = <fs_data>
CATCH cx_wdr_conversion_exception into lo_err .
lv_exp = lo_err->get_text( ).
ENDTRY.
wd_context->bind_table( values = <fs-data>.
Using this way, i get a short dumb as assert statement is failed as value for typedescr->type_kind is '*'.
method if_wd_client_conversion_util~string_to_struct.
assert typedescr->type_kind = cl_abap_typedescr=>typekind_struct1
or typedescr->type_kind = cl_abap_typedescr=>typekind_struct2.
raise exception type cx_wdr_conversion_exception
exporting textid = cx_wdr_conversion_exception=>illegal_type.
On debugging changing this value to required also made no difference, as no value could be assigned to the field symbol.
Suggest a soution to do this.Hi Thomas,
Thanks for your replies.
I have corrected it, but the field symbol is empty and while debugging it says data type is incorrect.
code:
FIELD-SYMBOLS:
<fs_data> TYPE ANY TABLE.
data: lsbp type ZXBPCENTRAL,
go_ref type ref to data.
CALL METHOD cl_abap_typedescr=>describe_by_data " ( before it was describe_by_object_ref)
EXPORTING
p_data = lsbp
receiving
p_descr_ref = lv_typedescr.
try.
CALL METHOD cl_wdr_xml_convert_util=>if_wd_client_conversion_util~string_to_struct
EXPORTING
in = lv_data_string
typedescr = lv_typedescr
IMPORTING
data = go_ref "<fs_data>
CATCH cx_wdr_conversion_exception into lo_err .
lv_exp = lo_err->get_text( ).------> Here the error says " Invalid data type and hence, there is no data.
ENDTRY.
assign go_ref->* to <fs_data>.
I am still looking for solution and thanks a lot .... -
Dynamic context in web dynpro abap: recursion node is possible?
Hi,
i'm working with web dynpro ABAP and I need to create a dynamic recursion node. Is possible?
thank you.
Regards.
AlHello Saravanan,
this is my code that creates a context node with recursion node, but supply_method i never called. why? could you help me?
CALL METHOD lr_root_info->add_new_child_node
EXPORTING
name = y_name
is_mandatory = abap_false
is_multiple = abap_true
is_mandatory_selection = abap_false
is_multiple_selection = abap_true
is_singleton = abap_true
is_initialize_lead_selection = abap_true
is_static = abap_true
supply_method = 'SUPPLY_NAV_LIST'
RECEIVING
child_node_info = lr_node_info.
ls_attribute-name = 'TEXT'.
ls_attribute-type_name = 'STRING'.
CALL METHOD lr_node_info->add_attribute
EXPORTING
attribute_info = ls_attribute.
ls_attribute-name = 'ENABLED'.
ls_attribute-type_name = 'WDY_BOOLEAN'.
CALL METHOD lr_node_info->add_attribute
EXPORTING
attribute_info = ls_attribute.
lr_node_info->add_recursive_child_node( child_name = y_name_nav child_info = lr_node_info is_static = abap_false ).
Thank you.
Al -
How to get Portal User Context in Web Dynpro application
I have successfully integrate a web dynpro app into SAP Netweaver Portal.
Within my web dynpro app, how can I get portal user context information such as first name, last name, job title or some newly created ume attibutes.
Is there any programmatical approach to get portal user context in my web dynpro. I not sure whether I can use the following codes in web dynpro?
IUserContext userContext = request.getUser();
String firstName = userContext.getFirstName();
String lastName = userContext.getLastName();
If yes, can someone point me the name of the jar file I have to import.
Note : The SAP Netweaver installation that runs my web dynpro app is same with the SAP Portal.Hi ,
you can use the below code to get User details and add com.sap.security_2.0.0 > lib > com.sap.security.api.jar
try
IWDClientUser clientUser = WDClientUser.getCurrentUser();
String firstName = clientUser.getFirstName();
String lastname = clientUser.getLastName();
catch (WDUMException e) {
wdComponentAPI.getMessageManager().reportException("Error Retrieving User"+e.toString(),true);
Regards,
Sunitha Hari -
Mapping one node in a view context to many nodes in the component controlle
Hi guys,
I need to map an element (attribute) of a node in the View Context to an attribute of multi nodes of the same type:
Context View:
customer_no
|
| -> KUNNR
Component Controller Context having two nodes:
- Node1
RFC1
|
|->KUNNR
- Node2
RFC2
|
|->KUNNR
Above I need to map the (KUNNR) in customer_no node to KUNNR in the RFC1 RFC2 before i execute the two RFCs services.
Note:
if this is not possible would you mention another solution.
Thanks,Hi,
As per MVC you cannot map context from view controller to component controller.Mapping can happen from component
controller to view controller.
You cannot create mapping for context attributes. You can map nodes if both source node and destination node both has same structure and same number of attributes. If they dont contain same number of attributes the extra attributes from the source node gets copied to the destination node.
In your case before the RFC execution you can read the value of attribute Kunnr from view and set it the RFC attribute Kunnr before the Function module execution.
Regards
Bala Baskaran.S -
Data storage in a context node and in a context attribute.
Hi All,
I want to know how exactly the data is stored in context node (internal table) and in context attribute (single value) in memory during the runtime.
Regards,
Yugesh AHi Andrea,
Sorry I got it wrong , for lr_comp you will have to take reference from controller IMPL class.
DATA:
lr_entity TYPE REF TO cl_crm_bol_entity,
lr_comp TYPE REF TO ( component controller IMPL class),
lv_ref_guid TYPE crmt_object_guid,
lr_collection TYPE REF TO cl_crm_bol_bo_col,
lr_bdc type ref to if_crm_ui_data_context,
comp_controller type cl_bsp_wd_component_controller.
lr_comp ?= me->comp_controller.
IF lr_comp IS BOUND.
TRY.
lr_entity ?= lr_comp->ZTYPED_CONTEXT->ZBTCUSTOMERH->collection_wrapper->get_current( ).
lv_ref_guid = lr_entity->get_property_as_string( iv_attr_name = 'REF_GUID' ).
CATCH cx_sy_ref_is_initial.
ENDTRY.
ENDIF.
Hope it helps.
Regards,
Manjeet Singh. -
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 -
Google Map route in web dynpro question
Hi all,
I have a route from add_A to add_B in my database, i want to get this route data from database and show up in google map page. The show up function can be implement by call google map javascript. My problem is how can send route data from web dynpro to my google map page. The google map page can be a JSP or html page, assume that we use the iFrame element to show this page.
I search forum, there is a way send the data by url parameter, but my case, the route data should be very large, may not be send by the url parameter. If any one have good idea or other solution for my case.hi all,
I am encountering to new problem. After deploy my app and run in portal, the redirect does not work. the error message is:
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException:
Suspend-Plug must no be triggered when running in portal. Use portal navigation instead to navigate to another application!
at com.sap.tc.webdynpro.progmodel.view.View.navigate(View.java:529)
at com.sap.tc.webdynpro.progmodel.view.View.navigate(View.java:462)
at com.esapro.jcats.routemap.wins.wdp.InternalRouteMapInterfaceView.wdFirePlugSuspend(InternalRouteMapInterfaceView.java:154)
at com.esapro.jcats.routemap.view.RouteMapView.onActionShow(RouteMapView.java:192)
at com.esapro.jcats.routemap.view.wdp.InternalRouteMapView.wdInvokeEventHandler(InternalRouteMapView.java:276)
... 29 more
So my question is may i use portal navigation to resolve my problem and how to do it. I need to delivery parameter by post method between them page. If anyone give me some mainly steps.
I've try the method,it doesn't work. It only replace a new blank page in portal conten area.
WDPortalNavigation.navigateAbsolute(
"ROLES://portal_content/other_vendors/line_manager/com.aa.pct.jcats/com.aa.pct.jcats.iviews/com.aa.pct.jcats.Map",
WDPortalNavigationMode.SHOW_INPLACE,
"width=300,height=200",
null,
WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,
null,
null,
best regard
reefish
Edited by: Ree Fish on Aug 6, 2009 5:53 PM -
Google maps url in Web dynpro for java
Hi all,
Can someone tell how I can create a Google Url and show this Url in a Iframe in a Web dynpro. I can create an url but I see the google webpage with the map. I just want only see the map in my Iframe!
Kind Regards,
RichardHi Richard,
One solution that comes to mind is to have a URL parameter embedded. So the path that you have set to the iframe can be extended say for example http://<your path to HTML file in Mimes>?undefined=<address specific to the user>
Next thing to do is extract the URL parameter undefined by JavaScripting. So you can pass the address value to this param.
Once you have this you can trigger this by passing different addresses to URL parameter each time.
Replace the wdDoInit() by following code:
public void wdDoInit()
//@@begin wdDoInit()
try {
String resourcePath = WDURLGenerator.getWebResourceURL(wdComponentAPI.getDeployableObjectPart(), "GoogleMapAPI.html");
wdThis.wdGetContext().currentContextElement().setPath(resourcePath + "?undefined=Mumbai");
} catch (WDURLException e) {
wdThis.wdGetAPI().getComponent().getMessageManager().reportException(e.getMessage(),true);
} catch (WDRuntimeException e) {
wdThis.wdGetAPI().getComponent().getMessageManager().reportException(e.getMessage(),true);
//@@end
Though I have hardcoded the location in above URL, i guess you got what i am indicating at!!
Even after all this, be carefull in preparing the URL which might result invalid URL due to special chars.
For Example: New York will result in invalid URL as <space> is not allowed. Ideally, it would have been New%20York. But then google API will no understand %20. Hence, I recommend you to replace %20 by <space> before calling Google API [You will have to write it in initialize() method of HTML file].
Also, replace the function initialise() in GoogleMapAPI.html
function initialize() {
if (GBrowserIsCompatible()) {
// This function is anonymous, is executed immediately and
var query_string = {};
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars<i>.split("=");
// If first entry with this name
if (typeof query_string[pair[0]] === "undefined") {
query_string[pair[0]] = pair[1];
//this.address.value = pair[1];
map = new GMap2(document.getElementById("map_canvas"));
geocoder = new GClientGeocoder();
showAddress(pair[1]);
I hope your address issue is addressed by me now!!
kunal kotak -
Web Dynpro for Accepting Data Changes
Hi,
I have a requirement where I need to give a screen with the fields of
| Customer|.Material | Enduser | Market | Market Segment | . Customer & Enduser is Compounter to Material. and Maket & Market Segment are Attribute of Material Master( Z Object).
We are using these objects in COPA Cube. Market & Market Segment are NA. There are millions of records in Customer / Material /End user combination. But there is no data maintained for Market & Market Segment.
We want to maintain where there is any sale happend for Customer Material and Enduser combination.
I created a Query to filtered the record with sales fall in this period with out market & Market segment. And used APD to updated it to DSO.
Now i want it to present to User to enter the data in the Market & Market Seg fields for the Material/Customer/Enduser combination.
Please let me know your thoughts on this. We are trying to build a WEB DYNPRO for this. But will a Dynpro will accept the data and change/update it in the backend table ?
Points are sure for proper guidance.
Thanks.
-S-In terms of Complexity .. I would rate the following in this order :
1. BSP
2. WDA
3. WDJ / VC
(* I have not worked in WDA and hence this ranking )
In terms of Presentability :
1. VC
2. WDA / WDJ
3. BSP
The main reason being that BSP renders in Plain HTML and you can make the BSP interesting and more presentable using Embedded flash objects / HTMLB etc ... I am referring to plain BSP Pages .
The rendering options are much better in WDA and VC would give you a better front end ... but then VC does not lend itself into a User Entry tool - bbut more of a reporting / display tool....
You can use BSP and formatting options not withstanding - you can just create a WDA with Flash Islands .... to make the most of both worlds...
I am not sure if this is simple in VC - you might have to get into the JCO conections etc for making the field editable. WDA with flash islands is much more manageable but then forthis you need to be in EHP1...
Edited by: Arun Varadarajan on Nov 17, 2009 12:38 AM -
User mapping option for Web Dynpro application deployment
Have WAS 6.40 server - portal not loaded!
In web dynpro content administrator, "Maintian Jco connections, click create, on "security tab", the user mapping option is presented in sp13.
In sp14 & 15, with option is not available.
HELP?
thank you.As per the procedure given in 3rd point I have changed the j2eadm password but it gives me the below error when I try to redeploy and run
Result
=> deployment aborted : file:/C:/WINDOWS/TEMP/temp26493Welcome.ear
Aborted: development component 'Welcome'/'local'/'LOKAL'/'0.2007.09.25.22.11.45':
Caught exception while checking the login credentials for SAP J2EE Engine. Check whether the SAP J2EE Engine is up and running.
com.sap.engine.deploy.manager.DeployManagerException: ERROR: Cannot connect to Host: [Natasha] with user name: [admin] Check your login information. Exception is: com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception while trying to get InitialContext. [Root exception is com.sap.engine.services.security.exceptions.BaseLoginException: Authentication did not succeed.]
(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.checkLoginCredentials.DMEXC)
Deployment exception : The deployment of at least one item aborted
Maybe you are looking for
-
How to call GOS(Generic Object service) attachment ( BMP file ) into SAP
How to call GOS(Generic Object service) attachment ( BMP file ) into SAP script Example: MM02 Service object there attaching the bmp file the same file i need to call script based on the material number Please provide the procedure and coding. Thank
-
Sysfail queue: queue stopped
i have some scenarios runnnig in my system, some scenarios are failing due to queue STOP, when i click the queue name from the MONI, it shows that three queues namely XBTI007, XBTI003, XBTI004 are in SYSFAIL status, when i cllick those queues, i find
-
The subject says it all, but I was wondering how well the blog features of iWeb work when publishing to a non-.Mac host. Right now I use WordPress for my blog. Is iWeb's blog feature a reasonable alternative? doug
-
New account assignment category in OPJP
Hi, Intend to have another account assignment category (apart from standard F) for order category 10 (PP order) and Doc type NB for a specific requirement . It appears that standard SAP does not have that provision. Please inform how to create a new
-
Removal of t-code authorization
Hi, How to remove authorization for a single t-code from the list of about 500 users. They have been authorized to this t-code via different roles. Thanks in advance, RAMA