cancel
Showing results for 
Search instead for 
Did you mean: 

How To Make Context Node Globally and Used same Value in Other DCs in NWDS 7.3 ?

Former Member
0 Kudos

Hi,

I have created DC(A) and in my SC 2 more DCs (B, C)

I have to use DC(A) into other 2 DCs (B, C) with add dependency and Used Component.

Requirements :

1) if the DC(A) call from DC (B) and Updated the Value in DC (A) then after moving DC (C) the same value of DC (A) can use into DC (C).

2) in DC (A) one Context Node with Type Arraylist How i can use this Context with same value in Others DC (B , C). ?

Please Need Help regarding the Globally Context Node Attribute and Use Save Value in Other DCs.....

Thanks & Regards,

Mithun Suthar

Accepted Solutions (1)

Accepted Solutions (1)

Qualiture
Active Contributor
0 Kudos

Hi,

Just copy the relevant context nodes to the local interface controller, and create a public part for your component

In the dependent DC, add a dependency to the first component's PP's. Then add that DC to the Used Components

Add a data link between your component usage and your parent component, and you can access the context from the child DC

Hope this helps!

Robin

Former Member
0 Kudos

Thanks For replay...........

But i have already created the Data Link as you mention in the solution.

Please these are the Details of my requirement

Newly Created DC:


This is Our Component Controller Method Lists

1) CheckArrayList () Method Code

This is the method to check if the bapilist is null or not;  IF null then call exeBAPIcall() method ELSE return the same bapilist.

And we have also set the Context Parameter SoldToRererences ( Type is ArrayList) and use 

Into my other DCs

2) exeBAPIcall() Method Code


Here this method is used into the CheckArrayList() method

The exeBAPIcall() method is used to retrieve the BAPI output=> Customer_list  This Customer_List is coming fine after executing this method. We need to use this Customer_List output into our different DCs.

3)   getString10() - : Just Convert into 10 character length.

Here in the below screen we are mapping with RFC model.

We are using only Z_Bapi_Ecomm_Cust_List_Input from the RFC Model

Interface Controller

Here we have declared same method and context to be reused into the other DCs

Context for Interface Controller is same as Component Controller 

After this, I have added the Component Controller in Public Part as shown below:



After Adding to Public part, this displays into the Public Part of the newly created DC.

Next Step Add the Dependency into other DC for Used Component as show in below steps :

This is Old DC in this DC we have to used our Newly Created DC code and Context

I have added the dependency into this OLD DC as shown below:

Here the repcustlist is newly created DC and we have added this into old DC.

Then, I added this into Used Component and the Same Context display mentioned in repcustlist DC:

This is Component Controller Diagram

Also Added the Reference of the Interface Controller

I have added the same Reference into view as well as Interface Controller of the Old DC and after that I have used this DC into view code WdDoInit() method

Question

Our Requirement is Whenever a Report is clicked it should run the Old DC execute wdDoInit() and Call the BAPI and get Result into Newly created DC & when any other report is clicked or the same report is clicked again for that user login session, then the BAPI should not be called from the backend, but the data should be fetched from the result of newly created DC.

Details - :

We have 2 existing DCs ( Lets call them A & B) and 1 Newly Created DC ( Lets call this C ).


DC ( C) Contains the method to call BAPI and get the Result into the ArrayList


We have to configure the DC C into DC A and B with reference so that DC A & B can access the result of the BAPI which is executed in DC C.


When DC A is accessed, then DC C should call and execute BAPI from the backend & get the data into ArrayList.


When DC B is accessed then the DC C should be accessed to fetch the BAPI output result into it from the Existing ArrayList (which came from

DC A access) rather than the BAPI being executed again at the backend.


I have metntioned the condition in the CheckArrayList as “if Null or not and Size() = 0” but not getting correct results.


please in this issue my goal is once the BAPI call and populate the ArryList after how i can use same ArrayList() value in  Other DC without calling Same BAPI until the User Logged in and after Log-out same process for other User......

Thanks & Regards,

Mithun

ankurgodre
Active Contributor
0 Kudos

Hi Robin,

I'm working on exactly similar requirement & am stuck at one place.

Basically, we want the Return table from BAPI to be stored somewhere in the context of the newly created DC for that complete user login session so that any other DC can access the return table directly within that user login session without having the need to call the BAPI from the back end.

Could you please provide your inputs on how to achieve this?

Many Thanks

Ankur

Qualiture
Active Contributor
0 Kudos

Hi Mithun,

You didn't mention the 'during whole user session' reqirement in your opening post, so that changes things quite a bit...

What you want is not possible in a Web Dynpro application (you cannot maintain the context of a web dynpro application while switching between WD applications, navigating away, etc), for that you need to implement some kind of persistency or caching mechanism.

If I were you, I would have a look at Ehcache (http://ehcache.org), the most widely used open-source cache mechanism.

You could cache your BAPI context per user, and clear the per-user cache upon logout.

Hope this helps a bit!

Robin

Former Member
0 Kudos

Hi Robin,

Sorry for late response i have done that part using Session but your suggestion is also helpful in our requirement thanks for you help.....

Thanks & Regards,

Mithun

Answers (1)

Answers (1)

Former Member
0 Kudos

Tks very much for post:

I like it and hope that you continue posting.

Let me show other source that may be good for community.

Source: free interview questions

Best rgs

David