on 04-28-2006 6:16 AM
I am trying to use a BAPI to display PO orders..
I am getting the error at the time of binding structure to my context. The error is:
The method bind(IPublicTest.INodeforElement) in the type IPublicTest.INodeforNode is not applicable for the arguments (Bapi_Po_Getitems_Input)
//@@begin wdDoInit()
Bapi_Po_Getitems_Input Input = new Bapi_Po_Getitems_Input();
wdContext.nodeNodefor().<b>bind</b>(Input);
//@@end
Plz help its urgent.
Atul
Message was edited by: Atul Shrivastava
Hi Atul,
Write the following code in the custom controller's wdDoInit() method:
//@@begin wdDoInit()
Bapi_Po_Getitems_Input Input = new Bapi_Po_Getitems_Input();
wdContext.nodeBapi_Po_Getitems_Input().bind(Input);
//@@end
Hope this helps,
Regards,
Tejas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply,
I have already tried the following steps and they don't seem to work.
Instead I now use
Bapi_Po_Getitems_Input Input = new Bapi_Po_Getitems_Input();
wdContext.nodeNodefor().bind((Collection) Input);
Now I am hanged at
try
{
wdContext.currentNodeforElement().<b>modelObject().</b>Execute();
}catch(Exception e)
{
wdComponentAPI.getMessageManager().reportException(e.toString(), false);
}
I am not getting the option for ModelObject rather of Model
Should I use it ? OR I am doing something wrong?
Plz help
Atul
Hi,
In the Custom Controller's wdDoInit() method, put the following code as it is.
Dont take only the single node as you have taken.
Take the whole input node as written below:
******************************************************
//@@begin wdDoInit()
Bapi_Po_Getitems_Input Input = new Bapi_Po_Getitems_Input();
wdContext.nodeBapi_Po_Getitems_Input().bind(Input);
//@@end
********************************************************
and in the executeBapi....() method in custom Controller,again dont take the single node.
Instead of that, take the whole bapi input node as suggested below:
*************************************************
public void executeBapi_Po_Getitems_Input( )
{
try {
wdContext.currentBapi_Po_Getitems_Input().modelObject
().Execute();
}
catch(Exception e)
{
wdComponentAPI.getMessageManager().reportException(e.toString(), false);
}
*******************************************************
Regards,
Tejas.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
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.