on 08-24-2007 6:12 AM
Hi all,
wdContext.currentZ_Matrls_For_Plant_InputElement().modelObject().execute()
This is the query given in PDF(Creating a Web Dynpro Application Accessing ABAP Functions)to get data from the model (database)by clicking search button after giving parameter in the input field.
But i want to get whole data in the model(database)just like <b>SELECT * FROM EMP</b> I mean there is no where condition here.
Regards
Padma
Hi Padma,
As Sumit said, please check the BAPI's Input parameter list if its a mandatory field in your SAP GUI.
If its not Mandatory then u may go ahead and execute the BAPI withoput giving any paramter.
Also if its mandatory, check if it takes a "" to fetch all the data by executing the BAPI. If it doesnt allow a "" to fecth all the data then you need to write a wrapper on top of it which gives back the entire list.
Regards,
Rekha Malavathu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Padma ji,
It depends on ur input parameters what values u will get from bapi .If no mandatory parameters are there,u will get all the records.
Secondly it also depends on that bapi,what it is designed for.U can not pass query like select * from emp to r/3 system.
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,
Shall i use same command(wdContext.currentZ_Matrls_For_Plant_InputElement().modelObject().execute()) to fetch data from R/3 system for with and without inputparameters.
I want to get all the records from the database(model).
Inoreder to Implement EVS in My project to an inputfield i used (wdContext.currentZ_Matrls_For_Plant_InputElement().modelObject().execute())
But no data is comming from database.Both Keys and Values of EVS are showing empty.
Hi Padma,
wdContext.currentZ_Matrls_For_Plant_InputElement().modelObject().execute()) is not a command.
U can set the parameters to the model & then execute the model,if u remember few days back i replied to ur thread,where u asked "how to pass the parameters ".
Check the node size for wdContext.nodeZ_Matrls_For_Plant_Input() after executing the model.If no values r there in that,check in r/3 system whether values r there or not?
regards
Sumit
Hi,
Let me know after execute method have you mention the invalidate() method or not.
After the you can find the outputnode(Which node you are expecting the data)size.
If it returns some value the output is coming form backend otherwise not coming.
Check once this way then you will get the values thru that node u bind the value attribute to your inputfiled then it might behave like you expecting EVS.
This might helps you otherwise tell me your details once again?
thanks,
Lohi.
Hi,
My context is BAPI_PO_GETITEMS_INPUT(RootNode)
OUTPUT(SubNode)
MATRL_LIST(SubNode)
po_item,shipping etc(Attributes)
PurchaseOrder(attribute of BAPI_PO_GETITEMS_INPUT)
In My project PurchaseOrder is inputfiled.Now i want to implement EVS to this field.
the code i used in my custController is
IWDAttributeInfo attributeinfo=wdContext.nodeBAPI_PO_GETITEMS_INPUT().getNodeInfo().getAttribute("Purchaseorder");
ISimpleTypeModifiable WerksType=attributeinfo.getModifiableSimpleType();
IModifiableSimpleValueSet EVSvalueSet=WerksType.getSVServices().getModifiableSimpleValueSet();
executeBapi_Po_GetItems_Input( );
int n=wdContext.nodeBAPI_PO_GETITEMS_INPUT().size();
for(int i=0;i<n;i++)
{
IBAPI_PO_GETITEMS_INPUTElement item=wdContext.nodeBAPI_PO_GETITEMS_INPUT().getBAPI_PO_GETITEMS_INPUTElementAt(i);
EVSvalueSet.put(item.getPurchaseorder(),item.getPurchaseorder());
}
public void executeBapi_Po_GetItems_Input( )
{
//@@begin executeBapi_Po_GetItems_Input()
try
{
wdContext.currentBAPI_PO_GETITEMS_INPUTElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}
catch(Exception e)
{
e.printStackTrace();
}
//@@end
}
The problem is Data is not getting populated in that EVS.It is showing Empty
Regards
Padma>
public void executeBapi_Po_GetItems_Input( )
{
//@@begin executeBapi_Po_GetItems_Input()
try
{
wdContext.currentBAPI_PO_GETITEMS_INPUTElement().modelObject().execute();
wdComponentAPI.getMessagemanager.reportSuccess("size for output node"+wdContext.nodeBAPI_PO_GETITEMS_INPUT().size());
wdContext.nodeOutput().invalidate();
}
catch(Exception e)
{
e.printStackTrace();
}
//@@end
}
can u use this code for ur execute method & check what it is printing??
regards
Sumit
Message was edited by:
Sumit Malhotra
Hi Sumit,
It is giving size as 1 means that is giving zero records.
wdContext.currentBAPI_PO_GETITEMS_INPUTElement().modelObject().execute();
Can you suggest me wat to give after modelObject() to get a column details
wdContext.currentBAPI_PO_GETITEMS_INPUTElement().modelObject().....
Regards
Padma
Hi Padma,
Sorry for that.u have to get the size of output node .
for(int i=0;i<n;i++)
{
IBAPI_PO_GETITEMS_INPUTElement item=wdContext.nodeBAPI_PO_GETITEMS_INPUT().getBAPI_PO_GETITEMS_INPUTElementAt(i);
EVSvalueSet.put(item.getPurchaseorder(),item.getPurchaseorder());
}
here u r getting the values from input node. U have to get the values from the node from output node.
like : String itemName = wdContext.nodeItemListNode().getItemListNodeElementAt(i).getItemName();
regards
Sumit
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.