on 07-27-2006 3:27 PM
Hi,
is there a way to create dynamic value nodes and attributes?
I have a bapi which gives me a table in the back-end. At this moment i need to create te nodes manually. I was wondering if it is also possible not create the dynamicly.
Hi,
I hope there is a Output node from a bapi which carries the Table Structure. You can use that
Regards
Saravanan K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Bind the output node to the tableUI element.
In the Layout right click the RootUIElement and select the Apply template and select the Table from the menu and click the next button and select the output node.
IPrivate<ViewName>.I<BapiName>Node nodeWeb=wdContext.node<BapiName>();
IPrivate<ViewName>.I<Name>Node nodeCC=wdContext.node<Name>();
nodeCC.invalidate();
int size=nodeWeb.size();
for(int i=0;i<size;i++){
IPrivate<ViewName>.I<BapiName>Element elementWeb=nodeWeb.get<BapiName>ElementAt(i);
IPrivate<ViewName>.I<Name>Element elementCC=wdContext.create<Name>Element();
elementCC.set<Param>(elementWeb.get<Param>());
nodeCC.addElement(elementCC);
}
Kind Regards
Mukesh
Hi,
Consider the OutputNode
--TableNode
First find the size of the TableNode as wdContext.nodeTableNode().size();
for(int i=0;i<size;i++)
{
//You can assign this string to the table element
wdContext.nodeTableNode().getTableNodeElement(i).get<Attribute>);
}
I just presented the code. Change this code according to your structure
Regards
Saravanan K
HI,
Try this thread
1.First import the BAPI,
2.Using Component Controller(Bind the Inputof BAPI tothe Custom controller and do the steps in previous reply(bind to the Table)
3.Using Custom Controller. Here Create a node Say Master Create Two Nodes Input And Output. And Create attributes according to the Input and Out Parameters of BAPI.Bind the Input and Out Parameters.Then Bind the node Master to the Component Controller and then to view
4.Then Write a code to populate the Table with the BAPI o/p
Rergards
Saravanan K
I want to create automaticly value nodes in the NWDS. I have from the bapi the value nodes field name, -index and value. But this table provides me fields which i need to use in an adobe form. It are about 400 fields and i want to seee if it is possible to at least create the value nodes or in the component or in the view.
Hi
To make use of these fields in the adobe form you will have to set the dataSource property of InteractiveForm UI element to this node.
Then when you go to Data view in Adobe designer you can drag these fields and drop them on the form and thus use them.
To display the content in the form of a table you can use Subform adobe ui element.
Regards,
Ajay
Context structure:
Y_Tf_Process_Status_Input
outputPros
Ytf_Process_LogPros
<atribute> Isr_Number
Yisr_Special_Data_Get_Input
OutputSDG
Special_DataOutputSDG
<atribute>Fieldname
<atribute>FieldValue
<atribute>FieldIndex
___________________________________________
this is the code i have now... what am i doing wrong (sorry)
try {
IPublicProcess_Status_Cust.IYisr_Special_Data_Get_InputElement inputIsr = wdContext.currentYisr_Special_Data_Get_InputElement();
String isrNr = wdContext.currentYtf_Process_LogProsElement().getIsr_Number();
inputIsr.setNotification_No(isrNr);
inputIsr.setDo_Not_Read_Linked(true);
inputIsr.execute();
IPublicProcess_Status_Cust.ISpecial_DataOutputSDGNode nodeoutput=wdContext.nodeSpecial_DataOutputSDG();
int size=nodeoutput.size();
IPublicProcess_Status_Cust.IMappedFieldsNode nodeoutputview=wdContext.nodeMappedFields();
for(int j=0;j<size;j++){
IPublicProcess_Status_Cust.ISpecial_DataOutputSDGElement elementoutput=nodeoutput.getSpecial_DataOutputSDGElementAt(j);
IPublicProcess_Status_Cust.IMappedFieldsElement elementoutputview=wdContext.createMappedFieldsElement();
elementoutputview.setFieldname(elementoutput.getFieldname());
elementoutputview.setFieldvalue(elementoutput.getFieldvalue());
nodeoutputview.addElement(elementoutputview);
}
} catch (Exception e) {
logger.catching(e);
}
Hi
try {
IPublicProcess_Status_Cust.IYisr_Special_Data_Get_InputElement inputIsr = wdContext.currentYisr_Special_Data_Get_InputElement();
<b>//You have to create the <CreatedInputNode> and bind it to the View to get Input From Client</b> String isrNr = wdContext.current<CreatedInputNode>Element().getIsr_Number();
inputIsr.setNotification_No(isrNr);
inputIsr.setDo_Not_Read_Linked(true);
<b>//<Yisr_Special_Data> bind the base node to execute</b> wdContext.current<Yisr_Special_Data>Element().modelObject().execute();
IPublicProcess_Status_Cust.ISpecial_DataOutputSDGNode nodeoutput=wdContext.nodeSpecial_DataOutputSDG();
int size=nodeoutput.size();
IPublicProcess_Status_Cust.IMappedFieldsNode nodeoutputview=wdContext.nodeMappedFields();
for(int j=0;j<size;j++){
IPublicProcess_Status_Cust.ISpecial_DataOutputSDGElement elementoutput=nodeoutput.getSpecial_DataOutputSDGElementAt(j);
IPublicProcess_Status_Cust.IMappedFieldsElement elementoutputview=wdContext.createMappedFieldsElement();
elementoutputview.setFieldname(elementoutput.getFieldname());
elementoutputview.setFieldvalue(elementoutput.getFieldvalue());
nodeoutputview.addElement(elementoutputview);
}
} catch (Exception e) {
logger.catching(e);
}
Kind Regards
Mukesh<b></b><b></b><b></b><b></b>
THe Yisr_Special_Data_input needs to fill an adobe form. now i get a message the form must not be empty. what do i need to adjust.
try {
IPublicProcess_Status_Cust.IYisr_Special_Data_Get_InputElement inputIsr = wdContext.currentYisr_Special_Data_Get_InputElement();
//You have to create the <CreatedInputNode> and bind it to the View to get Input From Client</b>
String isrNr = wdContext.currentYtf_Process_LogElement().getIsr_Number();
inputIsr.setNotification_No(isrNr);
inputIsr.setDo_Not_Read_Linked(true);
//<Yisr_Special_Data> bind the base node to execute
wdContext.currentYisr_Special_Data_Get_InputElement().modelObject().execute();
IPublicProcess_Status_Cust.ISpecial_DataOutputSDGNode nodeoutput=wdContext.nodeSpecial_DataOutputSDG();
int size=nodeoutput.size();
IPublicProcess_Status_Cust.IMappedFieldsNode nodeoutputview=wdContext.nodeMappedFields();
for(int j=0;j<size;j++){
IPublicProcess_Status_Cust.ISpecial_DataOutputSDGElement elementoutput=nodeoutput.getSpecial_DataOutputSDGElementAt(j);
IPublicProcess_Status_Cust.IMappedFieldsElement elementoutputview=wdContext.createMappedFieldsElement();
elementoutput.setFieldname(elementoutput.getFieldname());
elementoutput.setFieldvalue(elementoutput.getFieldvalue());
nodeoutputview.addElement(elementoutputview);
}
} catch (Exception e) {
logger.catching(e);
}
Message was edited by: Eoin Cronan
the bapi Y_Tf_Process_Status_Input i use as an search engine by clicking on the table. the lead selects triggers (input isr_number) the Yisr_Special_Data_Get_Input and opens a new view with an adobe form.
Yisr_Special_Data_Get_Input gives me a table (attributes fieldname, value and index) the fieldnames i now manually created and binded to the form so the fieldvalue gives me the data I need. Now I don't want to create de attributes manually but want it to be created in NWDS in noded mappedfields while running the bapi
Hi
try to execute this code
try {
IPublicProcess_Status_Cust.IYisr_Special_Data_Get_InputElement inputIsr = wdContext.currentYisr_Special_Data_Get_InputElement();
//get the value from earliar BAPI lead selection
String isrNr = wdContext.currentOutputProsElement().getIsr_Number();
inputIsr.setNotification_No(isrNr);
inputIsr.setDo_Not_Read_Linked(true);
//Execute the modelnode
wdContext.currentYisr_Special_Data_Get_InputElement().modelObject().execute();
IPublicProcess_Status_Cust.IYisr_Special_Data_Get_OutputNode nodeoutput=wdContext.nodeYisr_Special_Data_Get_Output();
int size=nodeoutput.size();
//get the output node size to check the sucessful of BAPI execution
wdComponentAPI.getMessageManager().reportSuccess(String.valueOf(size));
IPublicProcess_Status_Cust.IMappedFieldsNode nodeoutputview=wdContext.nodeMappedFields();
for(int j=0;j<size;j++){
IPublicProcess_Status_Cust.IYisr_Special_Data_Get_OutputElement elementoutput=nodeoutput.getYisr_Special_Data_Get_OutputElementAt(j);
IPublicProcess_Status_Cust.IMappedFieldsElement elementoutputview=wdContext.createMappedFieldsElement();
elementoutputview.setFieldname(elementoutput.getFieldname());
elementoutputview.setFieldvalue(elementoutput.getFieldvalue());
nodeoutputview.addElement(elementoutputview);
}
} catch (Exception e) {
logger.catching(e);
}
Kind Regards
Mukesh
still the same. I checked with the old code to make sur the form was not empty.
old code:
try {
IPublicProcess_Status_Cust.IMappedFieldsElement field =
wdContext.createMappedFieldsElement();
Yisr_Special_Data_Get_Input inputIsr =
new Yisr_Special_Data_Get_Input();
String isrNr =
wdContext.currentYtf_Process_LogProsElement().getIsr_Number();
inputIsr.setNotification_No(isrNr);
inputIsr.setDo_Not_Read_Linked(true);
inputIsr.execute();
Iterator it = inputIsr.getResult().iterator();
while (it.hasNext()) {
Yisr_Special_Data_Get_Output output =
(Yisr_Special_Data_Get_Output) it.next();
Iterator records = output.getSpecial_Data().iterator();
while (records.hasNext()) {
Object obj = records.next();
System.out.println(obj);
com.shell.shellpeople.wd.teamflow.processstatus.model.sdg.Qisrsspecial_Param record =
(com.shell.shellpeople.wd.teamflow.processstatus.model.sdg.Qisrsspecial_Param) obj;
// Qisrsspecial_Param record = (Qisrsspecial_Param )records.next();
String fieldname = record.getFieldname();
String fieldvalue = record.getFieldvalue();
try {
Method method =
field.getClass().getMethod(
"set" + fieldname,
new Class[] { String.class });
method.invoke(field, new Object[] );
} catch (SecurityException e) {
logger.catching(e);
} catch (IllegalArgumentException e) {
logger.catching(e);
} catch (NoSuchMethodException e) {
logger.catching(e);
} catch (IllegalAccessException e) {
logger.catching(e);
} catch (InvocationTargetException e) {
logger.catching(e);
}
}
}
this.wdContext.nodeMappedFields().bind(field);
} catch (Exception e) {
logger.catching(e);
}
still the same>
code i have now is:
try {
IPrivateProcess_Status_Cust.IYisr_Special_Data_Get_InputElement inputIsr =
wdContext.currentYisr_Special_Data_Get_InputElement();
//get the value from earliar BAPI lead selection
String isrNr = wdContext.currentYtf_Process_LogProsElement().getIsr_Number();
inputIsr.setNotification_No(isrNr);
inputIsr.setDo_Not_Read_Linked(true);
//Execute the modelnode
wdContext.currentYisr_Special_Data_Get_InputElement().modelObject().execute();
IPrivateProcess_Status_Cust.ISpecial_DataOutputSDGNode nodeoutput =
wdContext.nodeSpecial_DataOutputSDG();
int size = nodeoutput.size();
//get the output node size to check the sucessful of BAPI execution
wdComponentAPI.getMessageManager().reportSuccess(String.valueOf(size));
IPrivateProcess_Status_Cust.IMappedFieldsNode nodeoutputview =
wdContext.nodeMappedFields();
for (int j = 0; j < size; j++) {
IPrivateProcess_Status_Cust.ISpecial_DataOutputSDGElement elementoutput =
nodeoutput.getSpecial_DataOutputSDGElementAt(j);
IPrivateProcess_Status_Cust.IMappedFieldsElement elementoutputview =
wdContext.createMappedFieldsElement();
elementoutput.setFieldname(elementoutput.getFieldname());
elementoutput.setFieldvalue(elementoutput.getFieldvalue());
nodeoutputview.addElement(elementoutputview);
}
} catch (Exception e) {
logger.catching(e);
}
Hi
1.do you got the BAPI output size?//if it size>0 means bapi executed well.
2. Is the MappedFieldsNode contains 2 parameters like Fieldname , Fieldvalue. otherwise create it.and Bind it.
IPrivateProcess_Status_Cust.IMappedFieldsNode nodeoutputview =
wdContext.nodeMappedFields();
for (int j = 0; j < size; j++) {
IPrivateProcess_Status_Cust.ISpecial_DataOutputSDGElement elementoutput =
nodeoutput.getSpecial_DataOutputSDGElementAt(j);
IPrivateProcess_Status_Cust.IMappedFieldsElement elementoutputview =
wdContext.createMappedFieldsElement();
elementoutputview .setFieldname(elementoutput.getFieldname());
elementoutputview .setFieldvalue(elementoutput.getFieldvalue());
nodeoutputview.addElement(elementoutputview);
}
} catch (Exception e) {
logger.catching(e);
}
Kind Regards
Mukesh
Hi
In the MappedFields(Node)create the 2 attribute and bind them in custom controller.
IPrivateProcess_Status_Cust.IMappedFieldsNode nodeoutputview =
wdContext.nodeMappedFields();
for (int j = 0; j < size; j++) {
IPrivateProcess_Status_Cust.ISpecial_DataOutputSDGElement elementoutput =
nodeoutput.getSpecial_DataOutputSDGElementAt(j);
IPrivateProcess_Status_Cust.IMappedFieldsElement elementoutputview =
wdContext.createMappedFieldsElement();
elementoutputview .setFieldname(elementoutput.getFieldname());
elementoutputview .setFieldvalue(elementoutput.getFieldvalue());
nodeoutputview.addElement(elementoutputview);
}
} catch (Exception e) {
logger.catching(e);
}
2. Bind the node MappedFields to the Component Controler.
3. Bind it to the view from componenet controler
Kind Regards
Mukesh
still the same...
The component has now 1 node mapped field which is bind to the views and to the custom controler.
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Bound data node Node(WD_Form.MappedFields) of InteractiveForm must not be empty!
at com.sap.tc.webdynpro.clientimpl.xdp.renderer.data.XfdRenderer.renderLeadSelectedElement(XfdRenderer.java:176)
at com.sap.tc.webdynpro.clientimpl.xdp.renderer.data.XfdRenderer.render(XfdRenderer.java:76)
at com.sap.tc.webdynpro.clientserver.renderer.AbstractRenderManager.render(AbstractRenderManager.java:62)
at com.sap.tc.webdynpro.clientserver.adobe.AdobeFormHelper.getDataStream(AdobeFormHelper.java:706)
at com.sap.tc.webdynpro.clientserver.adobe.AdobeFormHelper.createPDFDocumentForUIElement(AdobeFormHelper.java:398)
at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:185)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.afterHandleActionEvent(ClientApplication.java:1154)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:402)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:248)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:160)
Hi Eoin,
Kindly look at the link,this will help you to getout of the problem
Regards
Saravanan K
Everything is working.
the coding for integrating the fieldnames from the table into the NWDS. Should beintegrated in the already working code:
try {
IPublicProcess_Status_Cust.IMappedFieldsElement field =
wdContext.createMappedFieldsElement();
Yisr_Special_Data_Get_Input inputIsr = new Yisr_Special_Data_Get_Input();
String isrNr =
wdContext.currentYtf_Process_LogProsElement().getIsr_Number();
inputIsr.setNotification_No(isrNr);
inputIsr.setDo_Not_Read_Linked(true);
inputIsr.execute();
Iterator it = inputIsr.getResult().iterator();
while (it.hasNext()) {
Yisr_Special_Data_Get_Output output =
(Yisr_Special_Data_Get_Output) it.next();
Iterator records = output.getSpecial_Data().iterator();
while (records.hasNext()) {
Object obj = records.next();
System.out.println(obj);
com.shell.shellpeople.wd.teamflow.processstatus.model.sdg.Qisrsspecial_Param record =
(com.shell.shellpeople.wd.teamflow.processstatus.model.sdg.Qisrsspecial_Param) obj;
// Qisrsspecial_Param record = (Qisrsspecial_Param )records.next();
String fieldname = record.getFieldname();
String fieldvalue = record.getFieldvalue();
try {
Method method =
field.getClass().getMethod(
"set" + fieldname,
new Class[] { String.class });
method.invoke(field, new Object[] );
} catch (SecurityException e) {
logger.catching(e);
} catch (IllegalArgumentException e) {
logger.catching(e);
} catch (NoSuchMethodException e) {
logger.catching(e);
} catch (IllegalAccessException e) {
logger.catching(e);
} catch (InvocationTargetException e) {
logger.catching(e);
}
}
}
this.wdContext.nodeMappedFields().bind(field);
} catch (Exception e) {
wdComponentAPI.getMessageManager().reportException(e.toString(), false);
}
Hi
To bind the Bapi result and mappedfields you can use the loop as mentioned.
IPrivateProcess_Status_Cust.IMappedFieldsNode node = Context.nodeMappedFields();
IPrivateProcess_Status_Cust.IYisr_Special_Data_Get_Outputnode outputNode=context.nodeIPublicProcess_Status_Cust();
int size=outputNode.size();
for(int j=0;j<size;j++){
IPrivateProcess_Status_Cust.IYisr_Special_Data_Get_OutputElement element = outputNode.getYisr_Special_Data_Get_OutputElementAt(j);
IPrivateProcess_Status_Cust.IMappedFieldsElement field = Context.createMappedFieldsElement();
field.setFieldname(element.getFieldName());
field.setFieldvalue(element.getFieldvalue());
node.addElement(field);
}
While you bind and execute the Code Are you get the error as com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Bound data node Node(WD_Form.MappedFields) of InteractiveForm must not be empty!
Kind Regards
Mukesh
Hi
You use Adaptive RFC model.In this you can create the model for your BAPI.
After the model is created you map this model to the Custom/Component Controlleror Directly to the View.When you do this mapping in the Data Modeller by creating the Data Link between Model and Custom/Component/view controller you can select the Model Nodes of your BAPI.This will create the Model Nodes for the BAPI in the context.
Now you can execute the BAPI by setting the import parameters.
And then you can use the *_Output node as dataSource for your form.And thus you can use it to create form.
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I want to create dynamic value nodes in the node mappedfields, but doesn't seem to work.
code in the view
IPrivateProcessStatusView.ISpecial_DataOutputSDGNode nodeWeb=wdContext.nodeYisr_Special_Data_Get_Input();
IPrivateProcessStatusView.IYisr_Special_Data_Get_InputNode nodeCC=wdContext.nodeMappedFields();
nodeCC.invalidate();
int size=nodeWeb.size();
for(int i=0;i<size;i++){
IPrivateProcessStatusView.ISpecial_DataOutputSDGElement elementWeb=nodeWeb.getSpecial_DataOutputSDGElementAt(i);
IPrivateProcessStatusView.IMappedFieldsElement elementCC=wdContext.createMappedFieldsElement();
elementCC.set<Param>((elementWeb.getFieldname());
nodeCC.addElement(elementCC);
}
wdThis.wdFirePlugToWD_Form();
wdThis.wdGetProcess_Status_CustController().executeYIsr_Special_Data_Get_Input(Notification_No, Do_Not_Read_Linked);
karthik, what do you mean
the bapi Yisr_Special_Data_Get
has the parameter notification_No.
Thee output of this parameter Special_DataOutputSDG provides me with 3 model attributes the field value,
-name- and -index
The field name should fill my contextnode mappedfields with attributes... I used the code:
IPrivateProcessStatusView.ISpecial_DataOutputSDGNode nodeWeb=wdContext.nodeISpecial_DataOutputSDG();
IPrivateProcessStatusView.IYisr_Special_Data_Get_InputNode nodeCC=wdContext.nodeMappedFields();
nodeCC.invalidate();
int size=nodeWeb.size();
for(int i=0;i<size;i++){
IPrivateProcessStatusView.ISpecial_DataOutputSDGElement elementWeb=nodeWeb.getSpecial_DataOutputSDGElementAt(i);
IPrivateProcessStatusView.IMappedFieldsElement elementCC=wdContext.createMappedFieldsElement();
elementCC.set<Param>((elementWeb.getFieldname());
nodeCC.addElement(elementCC);
}
wdThis.wdFirePlugToWD_Form();
wdThis.wdGetProcess_Status_CustController().executeYIsr_Special_Data_Get_Input(Notification_No, Do_Not_Read_Linked);
Message was edited by: Eoin Cronan
The parameter notification no is extracted from a table.
I want to execute the bapi YIsr_Special_Data_Get and the fieldnames from the r3 system are in a table. I want to extract them and create with the fieldnames value attributes automaticly in NWDS. s i can make a form of it
the cust. controler will execute the bapi
//@@begin executeYIsr_Special_Data_Get_Input()
try {
IPublicProcess_Status_Cust.IMappedFieldsElement field =
wdContext.createMappedFieldsElement();
Yisr_Special_Data_Get_Input inputIsr =
new Yisr_Special_Data_Get_Input();
String isrNr =
wdContext.currentYtf_Process_LogProsElement().getIsr_Number();
inputIsr.setNotification_No(isrNr);
inputIsr.setDo_Not_Read_Linked(true);
inputIsr.execute();
Iterator it = inputIsr.getResult().iterator();
while (it.hasNext()) {
Yisr_Special_Data_Get_Output output =
(Yisr_Special_Data_Get_Output) it.next();
Iterator records = output.getSpecial_Data().iterator();
while (records.hasNext()) {
Object obj = records.next();
System.out.println(obj);
com.shell.shellpeople.wd.teamflow.processstatus.model.sdg.Qisrsspecial_Param record =
(com.shell.shellpeople.wd.teamflow.processstatus.model.sdg.Qisrsspecial_Param) obj;
// Qisrsspecial_Param record = (Qisrsspecial_Param )records.next();
String fieldname = record.getFieldname();
String fieldvalue = record.getFieldvalue();
try {
Method method =
field.getClass().getMethod(
"set" + fieldname,
new Class[] { String.class });
method.invoke(field, new Object[] );
} catch (SecurityException e) {
logger.catching(e);
} catch (IllegalArgumentException e) {
logger.catching(e);
} catch (NoSuchMethodException e) {
logger.catching(e);
} catch (IllegalAccessException e) {
logger.catching(e);
} catch (InvocationTargetException e) {
logger.catching(e);
}
}
}
this.wdContext.nodeMappedFields().bind(field);
} catch (Exception e) {
logger.catching(e);
}
Message was edited by: Eoin Cronan
Hi
Try this
try {
IPublicProcess_Status_Cust.IYisr_Special_Data_Get_InputElement inputIsr = wdContext.currentYisr_Special_Data_Get_InputElement();
String isrNr = wdContext.current<NodeNameFromViewInput>Element().getIsr_Number();
inputIsr.setNotification_No(isrNr);
inputIsr.setDo_Not_Read_Linked(true);
wdContext.currentYisr_Special_Data_Get_InputElement().modelObject().execute();
IPublicProcess_Status_Cust.IYisr_Special_Data_Get_OutputNode nodeoutput=wdContext.nodeYisr_Special_Data_Get_Output();
int size=nodeoutput.size();
IPublicProcess_Status_Cust.I<NodeNametoview>Node nodeoutputview=wdContext.node<NodeNametoview>();
for(int j=0;j<size;j++){
IPublicProcess_Status_Cust.IYisr_Special_Data_Get_OutputElement elementoutput=nodeoutput.getYisr_Special_Data_Get_OutputElementAt(j);
IPublicProcess_Status_Cust.I<NodeNametoview>Element elementoutputview=wdContext.create<NodeNametoview>Element();
elementoutputview.setFieldname(elementoutput.getFieldname());
elementoutputview.setFieldvalue(elementoutput.getFieldvalue());
nodeoutputview.addElement(elementoutputview);
}
} catch (Exception e) {
logger.catching(e);
}
Kind Regards
Mukesh
Hi
If you requirement is just to display the data coming from BAPI in the table in webdynpro, then create a table in the view.Right click on this table and select create binding.Now from he context structure select the BAPI node which gives you the data.
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Eoin,
Take a look at this tutorial:
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/b3f6e990-0201-0010-c087-c865f2c738b3">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/b3f6e990-0201-0010-c087-c865f2c738b3</a>
Regards
Sebastian
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.