cancel
Showing results for 
Search instead for 
Did you mean: 

wdContext.currentZ_Matrls_For_Plant_InputElement().modelObject().execute()

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member193726
Active Participant
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Sumit,

I have data in my R/3 System.

I want to get data from Model and popup them in EVS.

I just tried to enter my own data into EVS ValueSet.But it is giving error if i click search by selcting value from EVS as "String "414-0100" does not match the enumaration"

Regards

Padma

Former Member
0 Kudos

Padma,

U can not add ur own values in EVS just like that. have u checked whether ur output node is having value or not after executing the model??

or just send the code with all details so we can try to find out the problem.

regards

Sumit

Message was edited by:

Sumit Malhotra

Former Member
0 Kudos

Hi Sumit,

Tell me ur mail-id.I will forward the project to you now.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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>

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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