cancel
Showing results for 
Search instead for 
Did you mean: 

Storing data from a BAPI

Former Member
0 Kudos

Hi All,

I am using BAPI_USER_GET_DETAIL in Web Dynpro application. I am getting the details of the user and I have provided the facility of updating the user details. The details are being updated through BAPI_USER_CHANGE.

Now, the details populated in the form are FirstName, LastName and E-Mail. I want to store these values in the form somewhere so that a notification or an e-mail should be sent to the user indicating that the FirstName has been changed. The mail should contain the Previous FirstName and Changed/Updated FirstName.

So is there a way of storing some value returned by a BAPI.

Regards

Nikhil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Nikhil

You can definitely store the value in SAP WAS database table but not in the form itself. For that either you can create a table from dictionary perspective and accessing that table from your web dynpro application using JDBC or you can use CAF entity service to persist that data. For that you require creating a CAF project and corresponding services (entity service, application service(wrapper to the entity)), then generating webdyn[pro model out of the CAF project and then consuming that model inside your web dynpro DC project.

If you only require to store data for sending email and nothing else then I would rather suggest to store those data in local variables and use java mail API to send email. For this you obviously require a SMTP server to send the email.

Cheers

Sudip

Former Member
0 Kudos

Hi Sudip,

Got the solution.

All I had to do was to store the data returned from BAPI in a Context Attribute.

Thanks for your input.

Regards

Nikhil

Answers (0)