cancel
Showing results for 
Search instead for 
Did you mean: 

SAVE DATA in TABLE on Clicking SAVE BUTTON

Former Member
0 Kudos

Hi Experts,

I working on a web dynpro component ,for which i created a view.

i layout i created a button -SAVE .

which should save the data in the custom table .

can any one pls help with the logic

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

To achieve this following steps need to be followed:

1. in the property "On action" create a new method.

2. now in this method, using code wizard select the appropriate node from which your table is binded. Select "Read option" and "As Table operation" check box.

3. This will automatically generate some lines of code.

4. Identify the internal table, declared as the type of that node.

5. write a insert or update query on the corresponding DB table with this internal table.

Hope. this will help u.

Cheers

Gaurav

former_member199125
Active Contributor
0 Kudos

hi...

In that button action...

first fetch the node values like

CALL METHOD LO_ND_N_FAMILY1->GET_STATIC_ATTRIBUTES_TABLE

  • EXPORTING

  • FROM = 1

  • TO = 2147483647

IMPORTING

TABLE = IT_FDATA.

here N_FAMILY1 IS NODE NAME.

IF your node structure is similar to ztable, then use modify statements.

modify ztable from it_data...

Hope you got idea.

Regards

Srinvias

Former Member
0 Kudos

Every button needs to have Action defined ( an event handler method) where you can write your logic for saving data to your table.

Former Member
0 Kudos

Hi,

You have to write your bussiness logic statement in on action of SAVE.

For save button create one Action say SAVE. In that action code like to save data.

Use MOIDFY or INSERT Statement as per your requirement.

Cheers,

Kris.