cancel
Showing results for 
Search instead for 
Did you mean: 

refresh model data

Former Member
0 Kudos

hai friends,

how to refresh the model data before i call the RFC function module again in a single application.

can anybody please help me.

Thanks in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

both the ways are not working for me..

Let me be more clear. i mapped the model node from component to the view controller.

all the UI elements data is dynamically stored into the model node of the view.

suppose i run once the function module for some set of data to create say some order...

then later i give the action display where the code is written for the display also in the same function. now if i say display and execute the function it is fecthing the same data as i created not the data which is supposed to come.

Former Member
0 Kudos

Brrr...

No offence, but try to pass this text to your team-mate and ask if he/she understands it

But if I understand you, one of proposed ways should work for you. Re-visit your code. There is simply no way to have stale output if you are re-creating input.

VS

Former Member
0 Kudos

hai Silaev,

Thanx.

The problem is solved when i use different instances of the RFC fn module but i wanted to know if there is any way that i can refresh the Output Modelnode.

The RFC function handles create and display the data.

the RFC object is instantiated as <instance1> and binded in Init of the CompController.

1. now in my screen if i try to create say order

OnActionSubmit

{

wdThis.wdCurrent<InputNodeRFC>.set<field>(data);

...

...

...

wdThis.wdGet<controller>.CreateOrder();

}

The code in method CreateOrder of compController

wdContext.current<InputnodeRFC>.set<element>("create");

<instance1>.execute();

<outputNode>.invalidate();

...it successfully creates and returns the success message.

2. To display Sales Order

OnActionOrderSelected

{

wdThis.current<InputNodeRFC>.set<field>(data);

...

...

wdThis.wdGet<controller>.DispOrder();

}

DispOrder contains the code

{

....

wdContext.current<RFCInputNode>.set<element>="display"

<instance1>.execute();

<RFCOutputNode>.invalidate();

}

if i run either of them it works fine.

and if i try to create order in the begining and then try to display some order data by giving orderno ..

the data in the output node is not refreshed.

my screen shows still the same data.

is there any help for this.

Former Member
0 Kudos

Hi Vijayalakshami,

Invalidate your main node of the model using following code.

wdcontext.node<node name>.invalidate();

or another way is to create one model instance and bind this model instance to the model.

So, it overrites your privious one.

regards,

Bhavik

Former Member
0 Kudos

This is valid when node has supply function.

Otherwise use:


wdContext.node<YourNodeForRfcInput>_Input.bind( new <YourRfcInputModelClass>_Input() );

VS