on 08-29-2007 8:18 AM
Hi all,
what it mean sending input parameters to Model??
What will happen internally to this??
Regards
Padma
Hi Padma,
Your RFC is a simple Function Module that can be remotely Called.
Assume you have a RFC for getting the square of the number which takes in an integer argument and returns an integer value.
So, here input parameter that you pass is the number for which you want to get the square of:
input: 5
output: 25
You can get the input parameters for your RFC by looking at the import parameters of your BAPI in R/3.
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,
here is an small example:
//create an model object
Z_Bapi_Create_Inv_Input bapi_Create_Inv_Input = wdContext.currentZ_Bapi_Create_Inv_InputElement().modelObject();
//Bind the object to your model node
wdContext.nodeZ_Bapi_Create_Inv_Input().bind(bapi_Create_Inv_Input);
//now, you can use the created object to set your input parameters
bapi_Create_Inv_Input.setIm_Plant("VALUE")
bapi_Create_Inv_Input.setIm_Sp_Stock("VALUE")
//after setting all parameters, call execute and invalidate the output node
wdContext.currentZ_Bapi_Create_Inv_InputElement().modelObject().execute();
wdContext.nodeOutputCreate().invalidate();
But if you have an Inputfield, you also can map the ModelNode to Your view and map the relevant attribute to your inputfield.
Hope this helps.
Regards,
Dennis
Message was edited by:
Dennis Junker
Hi Padma,
Assume you have InputNode--> fname as your model input element.
On click of the button write this code.
IPrivate<viewname>.IInputNodeElement element = wdContext.NodeInputNode().createInputNodeElement();
element.setfname("XXXX");
wdContext.nodeInputNode().bind(element);
Now execute the BAPI:
try
{
wdContext.currentInputNodeElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}
catch(Exception e)
{
//handle exception
}
Here output is the node within your Input node that has the output returned by the BAPI.
Warm Regards,
Murtuza
Hi,
what exactly do you want to know?
How to fill an inputstructure in a model or what the execute does?
Regards,
Dennis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.