cancel
Showing results for 
Search instead for 
Did you mean: 

how to save the list of user entered values in the SAP database

Former Member
0 Kudos

Hi,

I had gone through the PDF (Creating a Web Dynpro Application Accessing ABAP Functions)

but in that it is given how to retrive data from database..but how to write code for saving the userentered records in the database

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Padma,

Its same like reading.When u read data from bapi ,u call the bapi which reads the data from backend.While writing the data ,u will use the bapi which writes back to backend.In that bapi u will be passing the user entered data as input parameters.

regards

Sumit

Message was edited by:

Sumit Malhotra

Former Member
0 Kudos

Hi Sumit Malhotra ,

inorder to read data from the backend its given that call simply the stmt wdContext.currentBapi_Flight_getList_Input.modelObject.execute().

The same is given in PDF.but my dout here is where we are giving inputs to this query...

Former Member
0 Kudos

Hi padma,

1. in ur requirment u must connect with BAPI(Backend R/3).in ur Web dynpro explorer

2.. select ur project. u create one model. Right click model then click create model

3. select import adaptive RFC model. then system will ask abt some details. then select which BAPi u connect. select that BAPI.

4. BAPI contains some set of well defined Datas

you check with data in R/3(there is some limited set of data availabel in selected BAPI) then give ur inputs for ur reference...

Regards,

P.Manivannan.

Message was edited by:

Armin Reichert

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi Padma

wdContext.currentBapi_Flight_getList_Input.modelObject.execute();

The Above Statement Executes the function module in SAP.

Inside the FM there is code to retrieve the data.

Before that you are passing some input to the FM.

In the same way you pass some input to the FM and again call the same statement, but in your function module you use update statements or insert statements to write to SAP tables.

The above statement simply executes your Code in SAP side.

Regards

Abhimanyu L

Former Member
0 Kudos

Hi Padma,

If u have checked the tutorial u mentioned properly,u r passing data already to the bapi as destination_from & destination to,then only u r getting the data according to the destinations

public void wdDoInit()

{

//@@begin wdDoInit()

// Create a new element in the Bapi_Flight_Getlist_Input node

Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();

wdContext.nodeBapi_Flight_Getlist_Input().bind(input);

// Create new elements in the Destination_From and Destination_To nodes

input.setDestination_From(new Bapisfldst());

input.setDestination_To(new Bapisfldst());

//@@end

}

still u can find the explaination below.

1. Create the object of the model like abc model = new abc();

2. create the object of the model node ,like bapi_create_input inputBapi = new bapi_create_input(model) or whatever is ur node name.

3 bins that to the context wdContext.nodebapi_Create_input.bind(inputBapi);

4. set the values same like u set for ur context attributes like inputBapi.setname("abc");

5.Execute the bapi.

regards

Sumit

Former Member
0 Kudos

Hi Padma,

If u have got ur problem resolved,please close the thread.Not only this but all the threads,whichever is solved.

regards

Sumit

Former Member
0 Kudos

Hi Sumit,

Ok but how to delete the thread

Former Member
0 Kudos

Hi padma,

No need to delete the thread.Just check Rules of engagement for forum in this link

I will suggest u to close all other threads also,which are solved.

regards

Sumit

Message was edited by:

Sumit Malhotra

Former Member
0 Kudos

Hi Sumit,

can u tell me how to create supply function???

i just gone through the PDF(Advanced Input Help - The Object Value Selector (OVS))

In that he created supplufunction and 4 methods

1)getOVSInputNode-com.sap.tc.webdynpro.programmodel.api.IWDNode

2)getOVSListener-com.sap.tc.webdynpro.programmodel.api.IWDOVSContextNotificationlistener

3)getOVSOutputtNode-com.sap.tc.webdynpro.programmodel.api.IWDNode

4)SwithchOVSListener-String

Can u plz tell me how to get these return types and how to create supply function just by clicking new in methods tab

Answers (0)