on 02-16-2009 8:11 AM
HI,
I want to impliment OV Ssearch help.I have lot of documents for this OVS,but its very confusing.
Can any one please suggest how to impliment this OVS step-by-step.
Please help me in doing this.
Thanks in advance.
Regards
-Sandip
Hi Sandip,
Check these link:
http://help.sap.com/saphelp_nw04s/helpdata/en/47/9ef8c99b5e3c5ce10000000a421937/frameset.htm
/people/shruti.rathour/blog/2008/05/05/ovs-help-in-web-dynpro-abap
Regards.
Rajat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandip ,
OVS helper context: The OVS stores its data (search input data and the query results) in an OVS helper context, which is part of the OVS custom controller. The application developer declares a context node of cardinality 1..1 for storing the search input data and another node of cardinality 0..n for storing the query results. If a suitable RFC function is available, you just have to declare the model binding. The input and output node are then part of the created context structure.
OVS listener: The OVS uses a listener implementation of the interface IWDOVSContextNotificatiionListener. This listener implements three hook methods, which act as event handlers and are called at three separate points in time: When the OVS is required for a field, when the search query is triggered and when the user selects a row in search result table.
OVS extension: The OVS is used for finding objects and copying object values to the context. It is an input help service provided for all context attributes which were programmatically extended with the OVS feature. The webDynpro Programming model API provides the WDValueServices class for adding this OVS extension to context attributes.
https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdjava/valueHelp-ObjectValue+Selector
Hope this will help to some extent.
Thanks,
Tulasi Palnati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hii,
Am providing u with the code where the search help gets populated with values from the RFC.
Create a value node called Ctx_vn_ProjectsNode and corresponding value attributes Ctx_va_Team,Ctx_va_Description.Bind an input field to the value attribute Ctx_va_Team.
1)the following method is called at wdDoInit() method of View.
public void populateProjects( )
{
//@@begin populateProjects()
wdThis.wdGetTdc_UICustController().fetchProjects();
IPublicTdc_UICust.ICtx_vn_ProjectsNode ProjectsNode = wdThis.wdGetTdc_UICustController()
.wdGetContext().nodeCtx_vn_Projects();
IPublicTdc_UICust.ICtx_vn_ProjectsElement ProjectsElement = null ;
IPrivateTdc_CSIReportView.ICtx_vn_ProjectsNode l_ProjectsNode = wdContext.nodeCtx_vn_Projects();
IPrivateTdc_CSIReportView.ICtx_vn_ProjectsElement l_ProjectsElement = null ;
if(ProjectsNode.size()!=0)
{
for(int i = 0; i<ProjectsNode.size();++i)
{
ProjectsElement = ProjectsNode.getCtx_vn_ProjectsElementAt(i);
l_ProjectsElement = l_ProjectsNode.createCtx_vn_ProjectsElement();
l_ProjectsElement.setCtx_va_Team(ProjectsElement.getCtx_va_Team());
l_ProjectsElement.setCtx_va_Description(ProjectsElement.getCtx_va_Description());
l_ProjectsNode.addElement(l_ProjectsElement);
}
}
wdThis.wdGetTdc_UICustController().attachProjectF4(wdContext.nodeCtx_vn_Projects()
.getNodeInfo().getAttribute(IPrivateTdc_CSIReportView
.ICtx_vn_ProjectsElement.CTX__VA__TEAM));
//@@end
}
2)call this method at UICust
public void fetchProjects( )
{
//@@begin fetchProjects()
String userID = getUserID();
//String userID = "278401";
IPublicTdc_DataCust.IZsm_Fetch_Projects_InputNode InputNode = wdThis.wdGetTdc_DataCustController()
.wdGetContext().nodeZsm_Fetch_Projects_Input();
IPublicTdc_DataCust.IZsm_Fetch_Projects_InputElement InputElement = null ;
IPublicTdc_DataCust.IProjectNode l_ProjectNode= wdThis.wdGetTdc_DataCustController().wdGetContext().nodeProject();
IPublicTdc_DataCust.IProjectElement l_ProjectElement = null ;
IPublicTdc_UICust.ICtx_vn_ProjectsNode ProjectsNode = wdContext.nodeCtx_vn_Projects();
IPublicTdc_UICust.ICtx_vn_ProjectsElement ProjectsElement = null ;
try
{
InputNode.currentZsm_Fetch_Projects_InputElement().setUser_Id(userID);
wdThis.wdGetTdc_DataCustController().executeZsm_Fetch_Projects_Input();
if(l_ProjectNode.size()!=0)
{
for(int i =0;i<l_ProjectNode.size();++i)
{
l_ProjectElement = l_ProjectNode.getProjectElementAt(i);
ProjectsElement = ProjectsNode.createCtx_vn_ProjectsElement();
ProjectsElement.setCtx_va_Team(l_ProjectElement.getProject_Id());
ProjectsElement.setCtx_va_Description(l_ProjectElement.getProject_Name());
ProjectsNode.addElement(ProjectsElement);
}
}
else
{
wdComponentAPI.getMessageManager().reportException("No Projects fetched for UserID:" + userID
+ " System cannot proceed !!" , true);
}
}
catch(Exception e)
{
}
//@@end
}
3)call this method at UICust.
public void attachProjectF4( com.sap.tc.webdynpro.progmodel.api.IWDAttributeInfo p_proj )
{
//@@begin attachProjectF4()
ISimpleTypeModifiable l_simpleType = p_proj.getModifiableSimpleType();
IModifiableSimpleValueSet l_valueSet = l_simpleType.getSVServices().getModifiableSimpleValueSet();
String initialValue = null;
IPublicTdc_UICust.ICtx_vn_ProjectsNode ProjectsNode = wdContext.nodeCtx_vn_Projects();
IPublicTdc_UICust.ICtx_vn_ProjectsElement ProjectsElement = null ;
for(int i=0;i<ProjectsNode.size();++i)
{
ProjectsElement = ProjectsNode.getCtx_vn_ProjectsElementAt(i);
l_valueSet.put(ProjectsElement.getCtx_va_Team(),ProjectsElement.getCtx_va_Description());
}
//@@end
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.