cancel
Showing results for 
Search instead for 
Did you mean: 

Read data from local context and populate it into a Table

Former Member
0 Kudos

Hi,

I have created a small WDA that add/remove names, it reads the user input from a popup

box (when you click on ADD) and save it to my local context that is bounded to a table.

The data is gone every time I refresh the browser.

What are the options to populate my data from that local context into my table,

it would be helpful if you can show a sample code.

Thanks in advance.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Prashant,

Thanks for the useful information. I did create a BAPI service and then called it

in my action after the user clicks ok and it worked just fine.

Thanks a lot man

Former Member
0 Kudos

Hi Prashant

I did create a function module and called it in my action, and now the data can be populated

into the table. Do you know how can I store the data permanently in my context?

as the data is gone every time i refresh the page

Thanks

Former Member
0 Kudos

Data in context cant be made permanant if you are going to refresh the browser, however what you can do is DECLARE

1. a method in WD COMPONENT and call it within WDEXIT of the VIEW which will write all context data when applications view exits to some data base table in R/3.

2. a method in WD COMPONENT and call it within WDDOINIT of you the VIEW,This method should initialize the context, from the previously stored data each time your component STARTS!!

You can add little more logic to distinguish if WD Comp is INSTANTIATED for first time or its BEING REFRESH. But all this needs to be STORED in SOME R/3 Table where you can read and write to from your component.

Greetings

Prashant

Former Member
0 Kudos

Data will be gone since its an internal table, that available only during the INSTANCE life time of your webdynpro component. Each time you refresh the browser new component gets instantiated.

When you have data in the internal table, you can write it to DataBase table for persistence.

within the webdynpro method ABAP statements can be free executed.

all Insert update execute as usual, you can call Function Module that takes your internal table as input.

these are few options available for persistence.

Greetings

Prashant