on 08-29-2007 6:37 AM
Hi all,
I have 2 views View1 and view2 and a customController.I mapped 2 models in customController(Bapi_Po_Getitems_Input,Z_Po_F4_Help_Input).
I will get purchaseorder from (Z_Po_F4_Help_Input) and some data has to be displayed in table from Bapi_Po_Getitems_Input model.
I mapped Z_Po_F4_Help_Input (MainNode)
OUTPUT1(SubNode)
Po_Items(SubNode)
PurchaseOrder(Attribute) to VIEW1
<b> and</b>
Bapi_Po_Getitems_Input(MainNode)
OUTPUT(SubNode)
I_KKO(Subnode)
Net_Price,po_item..etc as Attributes to VIEW2
and Z_Po_F4_Help_Input (MainNode)
OUTPUT1(SubNode)
Po_Items(SubNode)
PurchaseOrder(Attribute)
Bapi_Po_Getitems_Input(MainNode)
OUTPUT(SubNode)
I_KKO(Subnode) Net_Price,po_item..etc to
CustomController
the code i used to execute these 2 models is
public void wdDoInit()
{
//@@begin wdDoInit()
Z_Po_F4_Help_Input F4Item=new Z_Po_F4_Help_Input();
wdContext.nodeZ_Po_F4_Help_Input().bind(F4Item);
Bapi_Po_Getitems_Input PoItem= new Bapi_Po_Getitems_Input();
wdContext.nodeBapi_Po_Getitems_Input().bind(PoItem);
try
{
wdContext.currentZ_Po_F4_Help_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
wdComponentAPI .getMessageManager().reportSuccess("Controller:size of F4 Outputnode"+wdContext.nodeI_Ekko().size());
wdContext.currentBapi_Po_Getitems_InputElement().modelObject().execute();
wdContext.nodeOutput1().invalidate();
}
catch(Exception e)
{
e.printStackTrace();
}
The problem here is only the model Z_Po_F4_Help_Input is getting executed and giving its size as 3000.But the model Bapi_Po_Getitems_Input is not getting executed and giving its size as 0
can any one plz tell me where is the problem
Regards
Padma
Hi ,
try putting two execute methods in two different try catch block
try
{
wdContext.currentZ_Po_F4_Help_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
wdComponentAPI .getMessageManager().reportSuccess("Controller:size of F4 Outputnode"+wdContext.nodeI_Ekko().size());
}catch(WDDynamicRFCExecuteException e){
wdComponentAPI.getMessageManager().raiseException(e.getMessage(), true);
}
try{
wdContext.currentBapi_Po_Getitems_InputElement().modelObject().execute();
wdContext.nodeOutput1().invalidate();
}
}catch(WDDynamicRFCExecuteException e1){
wdComponentAPI.getMessageManager().raiseException(e1.getMessage(), true);
}
Regards
Akshaya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Padma,
Just check that your Bapi_Po_Getitems_Input doesn't require an input parameter.
Also, try executing this Bapi_Po_Getitems_Input directly in R/3 and see how many rows do you get there.
Warm Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can you try commenting the node.invalidate statements?
Also try printing exception using message manager.
Let me know the output
Ashutosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Padma,
Have u tried to debug it,whether bapi is called or not??Go to r/3 system,transaction code SE37 . open the bapi, put external breakpoint there & run ur application. Check whether bapi is called or not.it should be called according to ur code.
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,
I used the same functionModule in another project.It is giving records and i sucessfully displayed in a table.But in this project i am getting error.I am not getting where the problem is comming??
Control is going ito try{}block but no values are comming from module.
wdContext.currentBapi_Po_Getitems_InputElement().modelObject().execute();
It has to get all the data from backend right.
Regards
Padma
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
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.