on 2007 Mar 02 12:08 AM
Hi all,
I have a Bapi that I am calling where I am filling the required structures, but I continue to get the "Missing required parameter HEADER in Method Z_....".
The parameter header is a structure, and it appears correctly under the Input node.
I have gone to the point of creating and binding the element directly in the executeZ_Fuji_Cm_Sales_Start_Input( ) to prove that I am filling this:
<b>public void executeZ_Fuji_Cm_Sales_Start_Input( )
{
//@@begin executeZ_Fuji_Cm_Sales_Start_Input()
//$$begin Service Controller(-781629941)
Ztsd_Cm_Header head = new Ztsd_Cm_Header();
head.setCm_Mode("CREATE");
wdContext.nodeHeader().bind(head);
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try{
wdContext.currentZ_Fuji_Cm_Sales_Start_InputElement ().modelObject().execute();
wdContext.nodeOutput().invalidate();
} catch(WDDynamicRFCExecuteException ce) {
manager.reportException(ce.getMessage(), false);
}
//$$end
//@@end
}</b>
I continue to get the missing HEADER parameter error and it does not even try the RFC. Am I missing something in the above code?
It may be of note that HEADER is a CHANGING parameter of the Function Module, and that when I went to map the binding it made me change the name in the OUTPUT node to something else as it saw this node as a duplicate. It is still named Header in the Input node and is mapped to the Bapi parameter HEADER.
Any thoughts?Thanks
Hi Todd,
Write the below code in wdDoInit() of component controller:
public void wdDoInit(){
Z_Fuji_Cm_Sales_Start_Input input = new Z_Fuji_Cm_Sales_Start_Input();
wdContext.nodeZ_Fuji_Cm_Sales_Start_Input().bind(input);
Ztsd_Cm_Header head = new Ztsd_Cm_Header();
head.setCm_Mode("CREATE");
<b>input.add<table>(head ); / input.set<Structure>(head );</b>
}
Regards,
Jhansi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi - thanks to all that replied. As usual, I found the solution just after I posted the question.
What confused me is the fact that the NWDS generates the binding of the input node automatically in the wdDoInit of the service controller
<b>wdContext.nodeZ_Fuji_Cm_Sales_Start_Input().bind(new Z_Fuji_Cm_Sales_Start_Input );</b>
When I commented this line out and coded it as you ended up suggesting, things started working. Thanks!
If i am not worng you are creating the HEADER instace correctly in your code but you are not adding this instance to the currentZ_Fuji_Cm_Sales_Start_InputElement().
So try adding/setting this HEADER to the Input .
Regards,Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
61 | |
11 | |
7 | |
7 | |
7 | |
6 | |
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.