How to use attributes from different context nodes in one view?
I am VERY new to the concept of CRM and currently working on creating an alternate version of the BP_HEAD_SEARCH. With help from SAPPRESSs book 'SAP CRM Web Client' i was ble to create my own simple Z-component.
However after going back and forth the book and the forum (including this [article|https://wiki.sdn.sap.com/wiki/display/CRM/Howtoaddanexistingfieldtoasearchpageofadifferent+component]) i was not able to find a solution to my problem. My current search uses BuilHeaderAdvancedSearch as context node for searching. But the search should also be able to use attributes from BuilActivity, which is directly related to BuilHeader. I can't seem to find a way to get attributes from BuilActivity into the search window of my component without having to change SAP-Standard.
Is this really the only way? Please advise on possible code and insertion point.
Any suggestions?
Similar Messages
-
Reading Attributes from different context nodes in the same view
Hi,
I have added a new field as part of an enhancement for Trade Promotions. This field is a checkbox and part of the context node TRADE in the view TPMOE/HeaderEOF. This field will be checked or unchecked using a logic in the background.
The logic will be based on an attribute (Fund Plan ID) which is part of another context node FUNDPLAN in the same view.
How can I read the attribute of FUNDPLAN context node in TRADE context node?
A sample code will be quite helpful as I am new to CRM 2007.
Thanks,
Abhishek
Edited by: Abhishek Periwal on Oct 16, 2008 2:35 PMHi Abhishek,
If I understand your question correctly, you would like to access the Fund plan ID (in a different context node) in the getter setter methods of the check box attribute which you have added.
The code snippet mentioend by sudeep works perfectly fine when you are making any checks in the view implementation class. But since you are in the getter setter methods of the context class, this doesnot work as "me" always refers to the class instance in which you are present.
Now in this case what you need to do is :
1) create an attribute <view_controller> in your context class. Here the context is TRADE. The type of this attribute wud be same as the view controller class CL_TPMOE_HEADEREOF0_IMPL
2) Go to the view controller class and redefine the method
DO_VIEW_INIT_ON_ACTIVATION. This method is called only once when the view is loaded for the first time.
3) In this method, put the following code
me->typed_context->(Trade)->[view_controller] = me.
by the above code, you are setting the newly created attribute to the view controller instance.
4) The next step would be, go back to your getter setter methods or what ever it may be, try referring to the Fund plan ID by the code snippet mentioned below
data: lr_entity type ref to cl_crm_bol_entity.
lr_entity ?= me->[view_controller]->typed_context->[the context node in which the fund plan id is present]->get_current().
lv_field_value = lr_entity->get_property_as_String( **pass the field name here ).
This should definitely resolve the problem.
Thanks,
Vinay -
Reading Attributes from same context node of different attributes
Hi,
I want read Attributes from same context nodes of diifrent attributes.
I have attribute A and B of same node, want to get read value from atrribute A into B.
Regards,
Brahmajisolved
DATA: lv_current TYPE REF TO if_bol_bo_property_access.
DATA: lv_value type String.
IF iterator IS BOUND.
lv_current = iterator->get_current( ).
ELSE.
lv_current = collection_wrapper->get_current( ).
ENDIF.
CALL METHOD current->get_property_as_string
EXPORTING
iv_attr_name = 'ZZAFLD00004Y'
RECEIVING
rv_result = lv_value . -
How to search data from a context node.
Hi Friends,
Thanks for ur help for previous problem . I am facing some other problem i.e how to
search data from a context node.
i have a context node :-
Car(main node) which consist of details, owners, engine and Brand as its sub node.
the value attibutes of difft nodes are:-
Car- category
Details- Mileage, Price, registration_no, miles_used
owner - name, phnno,addrs
Brand - main_brand, co_brand
Engine- Bhp,Rpm
Now i have to apply a search criteria on the basis of price, miles_used .
pls help to implement that .
Thanks & regards
Pravin jhaHi PRAVIN,
What I can understand from your problem is that, you have a list with various properties and you want to display them and search them in your WD App. If I am correct, use the following approach:
Instead of using "details, owners, engine and Brand" Nodes, use the attributes inside the parent node. i.e in the node Car, add all the attributes viz. Mileage, Price, registration_no, miles_used, name, phnno,addr etc.
Now you can create a table of this node "Car" and can easily search on the basis of any criteria.
I hope this solves your issue. If you are looking for something else, please revert, I'll be happy to help you.
Cheers!!!
Umang -
HOW TO ACCESS ATTRIBUTES FROM DIFFERENT VIEW SET
Hi Experts,
How i can access the variables declared in context class from component controller class
and vice-versa.
Thanks & Regards
AnsalHi Ansal
You can bind your context node of view to component controller context node and then you can access the data.
You can do this binding by inserting following statements in create_context_node method of your _ctxt class.
owner->do_context_node_binding( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BUILHEADER'
iv_node_2_bind = builheader ).
Regards,
Rashmi -
Reading attributes of different context nodes
Hello,
I want to read attributes of BP_DATA/TaxNumberList Node: BUILHEADER from Node BUILTAXNUMBER.
I have tried all without success. In GENIL Browser they are not related.
What can i do?
Best Regards
JMHi
I checked in the Model Browser. Seems 'BuilTaxNumber' has 'BuilHeader' as parent.
Can you validate once in TCODE GENIL_MODEL_BROWSER for ONEORDER Component set.
Regards,
Masood Imrani S. -
How to use classes from different user defined Packages
well i made 2 packages... one containing employee class and realted matter and other contaning bankaccounts and bank related work... now how can i use them in an another.. i know about the import statement but still couldn't make it work.... now suppose iam makin a obejct of employee class and passing in name and salary and all in the constructor... now i want that when i create the bankaccount class then the name of the employee should be passed to the bankaccount class so that it can assigen a account no. .. now how do i do this as when i create a object of employee class its made at runtime.. and if i create a object of bankaccount.. how wil it take that name as before goin to bank account i should already have a list of emplyees and then this list should be worked upon by the backaccount class to assign the accountno.s
Hope my question was clear... would appriciate a explanation and guidance!!!Thank you so much ... i was able to solve the problem... i passed the object in the constructor of the accounts class and it all worked out the way i wanned... thank you so much... it wasn't that difficult but the idea was just not clicking...this place is wonderful... everyone rocks!!! and so greatful about all the help.. please keep up the good work and even i will try to contribute as much as possible!!
-
How to read the attribute in another context node from setter method
Hi,
As part of the requirement
i need to read the STRUCT.E_MAIL ( attribute ) present in INDEPENDANTEMAIL context node from the SET_S_SRUCT method of the context node HEADER.
I tried th following but it didnt work out....
Get the Custom Controller Path
*lr_cuco ?= controller->get_custom_controller( controller_id = 'BP_HEAD/IndComm').
*IF lr_cuco IS BOUND.
Get the Entity
*lr_entity ?= lr_cuco->typed_context->independantemail->collection_wrapper->get_current( ).
*ENDIF.
*CHECK lr_entity IS BOUND.
Get the Trade Event Type.
*lv_email = lr_entity->get_property_as_string( 'E_MAIL' ).
also i tried ...
data:
*lv_value type string,
*lr_property type ref to if_bol_bo_property_access.
*lr_property = collection_wrapper->get_current( ).
*lv_value = lr_property->GET_PROPERTY_AS_STRING( importing iv_attr_name = 'E_MAIL'
returining ev_result = lv_email ).
but it didnt workout ......
Any suggestions ...................
Regards,
Sijo...Hi,
Both Context node are available in view then refer this link.
Reading Attributes from different context nodes in the same view
Relationship name for context node INDEPENDENTMAIL is 'BuilIndependantEmailRel'
Regards
Gaurav -
How to find if a particular context node attribute is changed.
Hi,
When a screen is opened, the context node attribs has some values. On some event, i wanted to check if one particular attribute in the context node has changed. Is it possible to figure this out.
(ps note that I need not find if any change has happened to the entire table but only one column (attribute) of the node. Note that the node has cardinality 0...n. So there are multiple possible values)
Thanks in advance.
regards,
suresh.Hi,
If you use the [Context change log|http://help.sap.com/saphelp_nw2004s/helpdata/en/ae/f95e42ff93c153e10000000a1550b0/frameset.htm]
and loop over the result table, looking for a certain attribute name and node name,
you'll get all the changes of that attribute, for all elements in that node.
grtz,
Koen -
How can I bind a dynamic attribute of a context node to ALV?
Hi all,
I'm trying to show data with Webdynpor ALV, but i met a question which blocked me. The situation is that there is a static context node and it's mapped to WD ALV, while programming I create a dynamic attribute to the context node. The dynamic column can be shown on the UI, but there is no any data in it. How can i deal with it?
Thanks a lot!
Edited by: Julia Zhu on Dec 3, 2009 7:48 AMHi Julia,
Welcome to SDN.
Post it in the ABAP webdynpro forum to get quick replies. Web Dynpro ABAP
Also search in sdn as there are chances that somebody has already posted the queries related to same issue.
Regards,
Swarna Munukoti. -
How to modify the data of Context Node of type table in BSPCOMP WB
Hi,
I have context node which is of table type. Now, beofre displaying the table, I have to delete few entries from this context node.
Could you please help me out, how exactly I can handle this?
Component: BP_DATA (Enhanced)
View: MarketingAttributesEOVP
Context Node: ATTRIBUTES
Thanks,
SandeepMake use of ON_NEW_FOCUS method of the context node to achieve the same. Get the collection first and then iterate it remove the entities which are not needed and then set the rest of the collection. You can also check standard code for reference.
Rg,
Harshit Kumar -
Access attribute of a context node in another context node of the same view
Hi all,
I want to acess value of an attribute PERNR of context node CUSTOMERS in another context node AUTHENTICATION of the same view. A sample syntax would be helpful .
Thanks,You didn't specify your version of Oracle so here are two options. If 10.2 or greater, use XMLTable, else use the ExtractValue option.
-- The WITH simply simulates your existing table that I do not have.
WITH fake_tab AS
(SELECT XMLTYPE('<?xml version="1.0" encoding="ISO-8859-1"?>
<Settings>
<Setting Name="A1" Value="N"/>
<Setting Name="A2" Value="N"/>
<Setting Name="A3" Value="SOMEVALUE"/>
<Setting Name="A4" Value="N"/>
<Setting Name="A5" Value="Y"/>
<Setting Name="A6" Value="N"/>
</Settings>
') tab_col
FROM dual)
-- For 10.2 and higher use this SELECT
SELECT a5
FROM fake_tab,
XMLTABLE('/Settings'
PASSING fake_tab.tab_col
COLUMNS
a5 VARCHAR2(10) PATH 'Setting[@Name="A5"]/@Value');
-- For 10.1 and before
SELECT ExtractValue(tab_col, '/Settings/Setting[@Name="A5"]/@Value')
FROM fake_tab; -
Hi,
I have the following issue when deploying:
Solution Deployment : Missing one or more of the following attributes from the root node in solution .wsp: assembly '', type ''
The solution is a farm solution (was never sandbox) and it deploys fine.
It was updated several times with success. We did not see this issue until recently when we had some other issue (unrelated) and looked at the logs. The solution is updated without problem and updates are available for the user. But we can see this error
in the logs at the update time.
Any idea what might cause this?
Pop AnisiaHi,
This error is wide meaning, as it can come from differences between SP versions, variables types used, bad manifest file, WebConfiguration ...
You can try to redeploy the solution.
retracted the solution,removed all the previous ref, removed dll from GAC and folder from 14\features and reset the iis, deploying it again.
Here are some similar issue post, you can use as a reference:
https://social.technet.microsoft.com/Forums/office/en-US/72ac9a02-3a51-48b8-9e36-3b24a2d4da74/missing-one-or-more-of-the-following-attributes-from-the-root-node-in-solution-alertbdcwsp?forum=sharepointgeneralprevious
https://social.technet.microsoft.com/Forums/office/en-US/331af288-5ba6-48a7-9e9d-ac4e4bc8f8fa/missing-one-or-more-of-the-following-attributes-from-the-root-node-in-solution-xxxwsp-assembly-?forum=sharepointdevelopmentprevious
In additional, you can check the ULS log (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS) to get the detailed information.
I hope this helpful.
Best Regards,
Lisa Chen
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
How to join fields from different internal tables and display into one int
hai i have one doubt...
how to join fields from different internal tables and display into one internal table..
if anybody know the ans for this qus tell me......hii
you can read data as per condition and then can join in one internal table using READ and APPEND statement..refer to following code.
SELECT bwkey " Valuation Area
bukrs " Company Code
FROM t001k
INTO TABLE i_t001k
WHERE bukrs IN s_bukrs.
IF sy-subrc EQ 0.
SELECT bwkey " Valuation Area
werks " Plant
FROM t001w
INTO TABLE i_t001w
FOR ALL ENTRIES IN i_t001k
WHERE bwkey = i_t001k-bwkey
AND werks IN s_werks.
IF sy-subrc EQ 0.
LOOP AT i_output INTO wa_output.
READ TABLE i_t001w INTO wa_t001w WITH KEY werks = wa_output-werks.
READ TABLE i_t001k INTO wa_t001k WITH KEY bwkey = wa_t001w-bwkey.
wa_output-bukrs = wa_t001k-bukrs.
MODIFY i_output FROM wa_output.
CLEAR wa_output.
ENDLOOP. " LOOP AT i_output
ENDIF. " IF sy-subrc EQ 0
regards
twinkal -
[POL-3309] trying to use datapage from different file.
Getting this error trying to access both the ESB and BPEL datasources in SOA Suite 10.1.3 GA.
Any ideas how to fix?I am also getting same error message when I am trying to establish a olite connection. Moreover I got this error when I opened BPEL console :
Cannot fetch a datasource connection.
The process domain was unable to establish a connection with the datasource with the connection URL "jdbc/BPELServerDataSourceWorkflow". The exception reported is: [POL-3309] trying to use datapage from different file
Please check that the machine hosting the datasource is physically connected to the network. Otherwise, check that the datasource connection parameters (user/password) is currently valid.
Please provide solution.....
Maybe you are looking for
-
My ipod doesn't change from this frozen blueish screen.
-
No sound from ipod shuffle?
The iPod Shuffle registers on iTune, the downloaded songs show up on the computer screen; however when I attach the ear plugs to the unit not sound emits from the ear phones, not even a hiss. What should be done?
-
Can't connect to itunes to sync
I have just upgraded to IOS612 for my iPad Model 02 14.0 and Itunes to 11.02.26 and now nothing syncs - even my pc does not recognise my iPad. I need help please? Thanks
-
Por que se elimina la musica de itunes?
es la tercera vez que me pasa, tengo toda mi musica en itunes 150 albumes y de repente la proxima vez que abro la aplicacion ya se encuentra vacia y tengo que neuvamente sincronizar mi musica, nunca apago la maquina, solo cuando regresa del modo repo
-
HT1473 my cd's wont automatically import to itunes
my computer reads the cd in windows media player but i cant import it into itunes.