cancel
Showing results for 
Search instead for 
Did you mean: 

Single adaptive RFC model with different RFCs

Former Member
0 Kudos

Hi there,

I created a single adaptive RFC model and put 3 RFC function into it.

I'd like to call the RFCs from a custom controller. My question is, how can I switch between the different RFCs, e. g. how can I decide what RFC to call?

For a model with a single RFC in it, I simply bind the model inside wdDoInit() and call it later with modelObject().execute(). Can I later bind another rfc outside wdDoInit() ?

My second problem is, that 2 of the RFCs have exactly the same import and export parameters. This causes some trouble, because I need to rename that parameters for the model binding in my custom controller. Is it possible to pass the parameters of a RFC directly in one block to another rfc?

Best regards,

Markus

Accepted Solutions (1)

Accepted Solutions (1)

monalisa_biswal
Contributor
0 Kudos

It doesn't matter how many RFCs you have in one model.

For each RFC you will have a model node in your context.

You will have to bind model object to every model node.

So when you want to execute a RFC you have call .execute() method of the corresponding model Node.

e.g: ZXXRFC1()

ZXXRFC2()

ZXXRFC3() are three RFCs.

There will be three model nodes

->ZXXRFC1

->ZXXRFC2

->ZXXRFC3 under your context.

wdContext.currentZXXRFC2ContextElement().modelObject().execute() to execute ZXXRFC2()

wdContext.currentZXXRFC3ContextElement().modelObject().execute() to execute ZXXRFC3()

IF you have same import and export parameter you have to rename the model nodes.

You have to pass values to each RFC separately.

Hope it helps.

Monalisa

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Even if you bind the context in WDDoInit() you can execute it anytime on the event you want to. You can also bind it later on in the same event that you can execute instead of wdDoInit().

For the 2 different RFC, you will have to set parameters to the corresponding nodes whenever you are calling that RFC.

Regards,

Murtuza

Former Member
0 Kudos

hi,

it is better to create separate model for sepearate destination.

And you can write the code to bind the RFC model anywhere you want.

with regards

shanto aloor