on 08-27-2007 6:43 AM
Hi,
I want To keep EVS to my InputField.If i enter some value manually and if iclick search it is displaying the list of values related to that input from R/3 database
Now i want to have EVS to my InputField(means instead of giving manually i wnat the data to be populated from database).Is it that i have to import the model again..or wat to do
Regards
Padma
Hi Padma,
No need to import the model again.Currently u r adding the values manually,instead of that just put the values from r/3 what u will be getting after executing the model.
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sumith,
This is the code i used for EVS to my input field in my CustmController
public void wdDoInit()
{
//@@begin wdDoInit()
Bapi_Po_Getitems_Input input = new Bapi_Po_Getitems_Input();
wdContext.nodeBAPI_PO_GETITEMS_INPUT().bind(input);
wdContext.currentContextElement().setTotalPrice(new BigDecimal(BigInteger.ZERO));
wdContext.currentContextElement().setUnits("");
// Code for EVS
IWDAttributeInfo attributeinfo=wdContext.nodeBAPI_PO_GETITEMS_INPUT().getNodeInfo().getAttribute(IPrivateMainView.IBAPI_PO_GETITEMS_INPUTElement.PURCHASEORDER);
ISimpleTypeModifiable WerksType=attributeinfo.getModifiableSimpleType();
IModifiableSimpleValueSet EVSvalueSet=WerksType.getSVServices().getModifiableSimpleValueSet();
try
{
wdContext.nodeBAPI_PO_GETITEMS_INPUT().currentBAPI_PO_GETITEMS_INPUTElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
wdComponentAPI .getMessageManager().reportSuccess("size for output node"+wdContext.nodeBAPI_PO_GETITEMS_INPUT().size());
}
catch(Exception e)
{
e.printStackTrace();
}
wdComponentAPI .getMessageManager().reportSuccess("size for Bapi node"+wdContext.nodeBAPI_PO_GETITEMS_INPUT().size());
int n=wdContext.nodeBAPI_PO_GETITEMS_INPUT().size();
for(int i=0;i<n;i++)
{
String purNo=(wdContext.nodeBAPI_PO_GETITEMS_INPUT().getBAPI_PO_GETITEMS_INPUTElementAt(i).getPurchaseorder()!=null)? wdContext.nodeBAPI_PO_GETITEMS_INPUT().getBAPI_PO_GETITEMS_INPUTElementAt(i).getPurchaseorder():"";
EVSvalueSet.put(purNo,purNo);
wdComponentAPI .getMessageManager().reportSuccess("the value of string is"+purNo);
}
//@@end
}
But the value of wdComponentAPI .getMessageManager().reportSuccess("size for output node"+wdContext.nodeBAPI_PO_GETITEMS_INPUT().size());
is comming as Zero and the value of wdComponentAPI .getMessageManager().reportSuccess("the value of string is"+purNo); is giving as NULL
Regards
Padma
Hi Sumith,
I have an RFC Model by name BAPI_PO_GETITEMS_INPUT.
This will appear as a Node in your component controller. Under the node you will have an output subnode which will further contain another node with some attributes under it. Like,
BAPI_PO_GETITEMS_INPUT(Node).......It has an attribute called Purchaseorder and
|_OUTPUT(Subnode under MainNode)
|_ITEMLIST(Subnode under OutputNode)
|_ITEM NAME(Attribute under Itemlist Node)
|_ITEM NUMBER(Attribute under Itemlist Node)
In my View where my Inputfield is there i have the context structure as
BAPI_PO_GETITEMS_INPUT(Node).......It has an attribute called
Purchaseorder
I mapped CustomController with model and
View (PurchaseOrder with CustomController purchaseOrder
Regards
Padma
Hi Sumith,
Is this code correct to get EVS from R/3
Bapi_Po_Getitems_Input input = new Bapi_Po_Getitems_Input();
wdContext.nodeBAPI_PO_GETITEMS_INPUT().bind(input);
// Code for EVS
IWDAttributeInfo attributeinfo=wdContext.nodeBAPI_PO_GETITEMS_INPUT().getNodeInfo().getAttribute(IPrivateMainView.IBAPI_PO_GETITEMS_INPUTElement.PURCHASEORDER);
ISimpleTypeModifiable WerksType=attributeinfo.getModifiableSimpleType();
IModifiableSimpleValueSet EVSvalueSet=WerksType.getSVServices().getModifiableSimpleValueSet();
try
{
wdContext.nodeBAPI_PO_GETITEMS_INPUT().currentBAPI_PO_GETITEMS_INPUTElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
wdComponentAPI .getMessageManager().reportSuccess("size for output node"+wdContext.nodeBAPI_PO_GETITEMS_INPUT().size());
}
catch(Exception e)
{
e.printStackTrace();
}
wdComponentAPI .getMessageManager().reportSuccess("size for Bapi node"+wdContext.nodeBAPI_PO_GETITEMS_INPUT().size());
int n=wdContext.node|_ITEMLIST().size();
for(int i=0;i<n;i++)
{
String purNo=(wdContext.nodeBAPI_PO_GETITEMS_INPUT().getBAPI_PO_GETITEMS_INPUTElementAt(i).getPurchaseorder()!=null)? wdContext.nodeBAPI_PO_GETITEMS_INPUT().getBAPI_PO_GETITEMS_INPUTElementAt(i).getPurchaseorder():"";
EVSvalueSet.put(purNo,purNo);
wdComponentAPI .getMessageManager().reportSuccess("the value of string is"+purNo);
}
//@@end
}
Hi padma,
No,its not correct. instead of this wdContext.nodeBAPI_PO_GETITEMS_INPUT().getBAPI_PO_GETITEMS_INPUTElementAt(i). use the node available in output .
wdContext.nodeOutput or child node of output .
After executing the model,input node is of no use.only output node & its child nodes will get u the values.
regards
Sumit
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.