cancel
Showing results for 
Search instead for 
Did you mean: 

External mapping context

Former Member
0 Kudos

Hello.

I have one problem. I have 2 components? for example compA and compB. In compB I used compA. From compB I give parameters to compA throuth Context mapping and in compA execute RFC using this parameters. After execute I want to mapping result context from compA to compB. Is it possible to do? And if possible, how can I do this?

Accepted Solutions (1)

Accepted Solutions (1)

former_member191044
Active Contributor
0 Kudos

Hello Na Na,

Put the input and output nodes of the rfc to the interface / public part of compA. Then reuse the context in compB. This should work.

Regards,

Tobias

Former Member
0 Kudos

You idea call  method from compB to set the context of compA. But I can't understand enath how I cen get node through this mrthod...

former_member191044
Active Contributor
0 Kudos


I have never tryed that myself. You could try to use a param in the method of type "I<YourNodeName>. Otherwise you would have to create a object that reprensts the fields of the result context and use this as param.

Are you sure that the rfc result isn't null? Because i think it should work via the described mapping.

Former Member
0 Kudos

It's null when I get this context in compB or use function. Becouse RFC execute fires after. And I don't know how make execute before method getRFCContext() in compA

former_member191044
Active Contributor
0 Kudos

Put the executeRFC method to the interface of compA. Then you can use it from compB with this line of code: wdThis.wdGet<CompANameInterface>.executeRFC();

Hope this helps,

BR Tobias.

Former Member
0 Kudos

I also have embed view from compA in compB window. I need show some layout of compA and get this contextNode after executing RFC. So, when I open iView in compB, in UIElement it open view from compA. So, also, make execute RFC. But if I want get content in compB from compA, it gives me before execute

former_member191044
Active Contributor
0 Kudos

Sorry but i don't get your problem. After you execute the RFC the context should be filled with the result and you could access it via contex mapping.

Former Member
0 Kudos

in version 7.3.  In compB I have first iVIew, whitch mapping context with used component compA and fire plug to second iView, whitch have compAinterfaceview in UI container. After I fire plug to second view, I can't see my context in compA wdInit. It's null. I see it only in any iVew mapped to compA.

former_member191044
Active Contributor
0 Kudos

I think the mapped context is not initialized in the wdDoInit method. Create your own init method in compA and call it from the wdDoInit of the view of compA.

So you have the call hierarchy like this --> Fire plug of compB --> wDoInit of the view in comA (hook method) --> your own init method in controller of compA. Then you should be able to access the initialized mapped context.

Hope this helps.

Former Member
0 Kudos

But is any way after plug of compB perform wdInit of compA, not wdInit of iView in compA? I want send params to compA and in compA wdInit execute RFC, where I have byte for resource. And in iview of compA in wdInit create this resourse for dowload.

former_member191044
Active Contributor
0 Kudos

And this created resource you need in compB? Why don't you create a method in compA, lets say createResource which has returntype of IWDResource and and as input  params you give your needed values. So you would need to map the input params to the context, exceute the rfc, create the resource and return the created resource to compB. In this way you would not need to use context mapping. This should work if you are not able to access the context mapping correctly.

Answers (0)