Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

saving the new values after editing the fields; in oops method

0 Kudos
166

Hi,

i have created an alv using oops method. in the list we have a coloumn for new values wherein the user can put values from the dropdown/ edit manually.

after putting the new values in place we want to save these values in the database.

but when iam saving, these new values are not populating in the internal table and thats why not getting saved correctly.

can anybody tell me what to do.

thank you,

sharad

1 ACCEPTED SOLUTION

Former Member
0 Kudos
137

are u using proper events when saving?

7 REPLIES 7

Former Member
0 Kudos
138

are u using proper events when saving?

0 Kudos
137

yes, saving is done in module user_command n the pai.

but the changed values are coming in the internal table so it is not saving properly.

0 Kudos
137

yes, saving is done in module user_command in the pai.

but the changed values are not coming in the internal table so it is not saving properly.

Former Member
0 Kudos
137

try putting simillar code as following in PAI before calling save routine

CALL METHOD CL_GUI_CFW=>DISPATCH

importing return_code = return_code.

if return_code <> cl_gui_cfw=>rc_noevent.

" a control event occured => exit PAI

clear g_ok_code.

exit.

endif

0 Kudos
137

i didnt get what you wanted to say.............

the class that i ve used is cl_gui_alv_grid.....

please tell me clearly....

thanks

0 Kudos
137

Data you are changing is on the frontend. You need to pass data to backend (server). The static method 'dispatch' of control framework class (CL_GUI_CFW) is used to do this 'manual' synchronization. It is sort of helper method of control framework (which is basis for ALV controls) and is independent of ALV controls (cl_gui_alv_grid etc.) that are used.

Try putting this code as suggested and check.

short code would be (without error handling)

CL_GUI_CFW=>DISPATCH( ).

null

0 Kudos
137

Hi,

the PAI events are not events of the grid control. I think you must register event with the object and set appropriate handler for processing. In the handler, use method get_current_cell to get and process the value.

Regards,

Clemens