on 09-03-2007 9:33 AM
Dear all,
I'm having this error Mandatory parameter HEAD of method BAPI_MATPHYSINV_CREATE missing. for the parameters of head,it haf:
PLANT
STGE_LOC
SPEC_STOCK
DOC_DATE
PLAN_DATE
POST_BLOCK
FREEZEBOOKINV
DEL_BATCHES
PHYS_INV_NO
PHYS_INV_REF
GROUPING_TYPE
PHYS_INV_NO_LONG
PHYS_INV_REF_LONG
some of the above parameters is user input,some i have already hardcoded it as follow :
Bapi_Physinv_Create_Head head =new Bapi_Physinv_Create_Head();
head.setPlant("1000");
head.setSpec_Stock("");
head.setPost_Block(false);
head.setFreezebookinv(false);
head.setDel_Batches(true);
head.setPhys_Inv_No("");
head.setPhys_Inv_Ref("");
head.setGrouping_Type("");
head.setPhys_Inv_No_Long("");
head.setPhys_Inv_Ref_Long("");
input.setHead(new Bapi_Physinv_Create_Head());
Anyone pls advice me how to deal wif this error? thanks
Hi Joan,
Change this line
input.setHead(new Bapi_Physinv_Create_Head());
to
input.setHead(head);
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 Joan,
Just have a look at your RFC in R/3. You might be missing some of the mandatory parameter that needs to be set for successful execution of the RFC.
Try setting all the parameters and execute.
Hope you have binded your input node also.
wdContext.node<InputNode>().bind(input)();
//execute RFC Code
Warm Regards,
Murtuza
Hi Murtuza,
I've treid run in se37 using those inputs tat i hardcoded or key in for this web dynpro application,this FM module can be executed succesfully...
below is my code for init(),
Bapi_Matphysinv_Create_Input input = new Bapi_Matphysinv_Create_Input();
wdContext.nodeBapi_Matphysinv_Create_Input().bind(input);
Bapi_Physinv_Create_Head head =new Bapi_Physinv_Create_Head();
head.setPlant("1000");
head.setSpec_Stock("");
head.setPost_Block(false);
head.setFreezebookinv(false);
head.setDel_Batches(true);
head.setPhys_Inv_No("");
head.setPhys_Inv_Ref("");
head.setGrouping_Type("");
head.setPhys_Inv_No_Long("");
head.setPhys_Inv_Ref_Long("");
input.setHead(head);
is there anything tat i left out?
or for null value, i should use "" ? thanks
Joan,
Do 2 things.
1. Check that all your mappings from view>controller>Model are proper.
2. Display all the values that you have set before executing RFC
wdComponentAPI.getMessageManager().reportSuccess(wdContext.CurrentBapi_Physinv_Create_HeadElement().getPlant());
.........
........ for all the parameters
this is to confirm that the values being set by us are passed correctly to the model node.
Regards,
Murtuza
hi Murtuza,
thanks! i guess it works d.coz no error msg shown. By the way,this bapi is to create a PI doc...if this FM executed sucessfuly,a PI doc number wl be generated.Is it possible for me to get this PI doc number shown in my web dynpro application after i had executed this FM thru RFC? Many thanks
Hi Joan,
There would be an output node inside your input node which will give the output of your RFC after its execution.
Bind the attribute <PI Doc number> to a UI element say Text View's text property.
Also, invalidate the output node after execution of your RFC.
eg. Output node is output1
wdContext.nodeOutput1().invalidate();
You will see the result returned by the RFC in your text view that has been binded to the attribute of your output node.
Regards,
Murtuza
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
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.