Application Development and Automation 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: 
Read only

table updation using alv

Former Member
0 Likes
664

Dear Expert,

While updating the jest table against the Order number, the data in the table is not getting affected. When i refresh the list t again shows the order number. Can anyone please provide me sample ALV program where it displays the list of Orders.

when one selects the order the order should get approved.

if i get sample program then i would be helpful.

Regards,

Shakti.

6 REPLIES 6
Read only

Former Member
0 Likes
626

/1BCDWB/DBJEST - use this program name

to see list of order

actually it is the selection screen program of JEST table

cheers

s.janagar

Read only

Former Member
0 Likes
626

hi Sapbond007,

You have to create an ALV event handler class to write back the data that has been changed in your ALV.

Please refer to example programs BCALV_EDIT_* (I think BCALV_EDIT_04 should be the correct one)...

or you should refer This code

  • Lock the table

CALL FUNCTION 'ENQUEUE_E_TABLE'

EXPORTING

mode_rstable = 'E'

tabname = p_table

EXCEPTIONS

foreign_lock = 1

system_failure = 2

OTHERS = 3.

IF sy-subrc = 0.

  • Modify the database table with these changes

MODIFY (p_table) FROM TABLE <dyn_tab_temp>.

REFRESH <dyn_tab_temp>.

  • Unlock the table

CALL FUNCTION 'DEQUEUE_E_TABLE'

EXPORTING

mode_rstable = 'E'

tabname = p_table.

Regards

Saurabh Goel

Read only

Former Member
0 Likes
626

Hi,

After updating the Order number once again you have to call the ALV list then only the internal table contents will update i the ALV list Display.

Read only

Former Member
0 Likes
626

HI,

I think the problem is not somewhere in ALV but that appropriate status is not being set.

You could probably use FM such as STATUS_UPDATE to update the status.. and then see the results.

Revert if you need more.

Read only

Former Member
0 Likes
626

u can use this example

https://wiki.sdn.sap.com/wiki/display/Snippets/ALV-Editingandsavingtheeditedvaluesin+Database%28OOPS%29

for saving the table using ALV

cheers

s.janagar

Read only

0 Likes
626

Dear Expert,

While calling the function STATUS_CHANGE_EXTERN the objnr field is passed as blank, due to which the data is

not getting updated.

Regards,

Shakti.