cancel
Showing results for 
Search instead for 
Did you mean: 

wdContext.currentBapi_Po_Getitems_InputElement().modelObject().execute();

Former Member
0 Kudos

Hi all,

what it mean sending input parameters to Model??

What will happen internally to this??

Regards

Padma

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

How to give input parameters to the Model.

I am having an input fileld up on giving value and click search it has to get all the records related to that inputfield which i selected

But how to give this inputField parameter to the model

Regards

Padma

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

what exactly do you want to know?

How to fill an inputstructure in a model or what the execute does?

Regards,

Dennis