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

update z-table record not working

Former Member
0 Likes
773

Hi Friends ,

I have a ztable . I am updating a record of the ztable using dialog programming i.e from the screen .

DATA: ztable_tmp type ztable.

....

...

......

...........

UPDATE ZTABLE FROM ZTABLE_TMP.

COMMIT WORK .

....

...

.....................

The above code is not updating the record changed on the screen . I checked in debug and the wa has the changed values but the ztable in the database is not getting updated .

Please advise !

Thanks!!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
651

DATA ztable TYPE SPFLI.

MOVE 'AA' TO ztable-CARRID.

MOVE '0064' TO ztable-CONNID.

MOVE 'WASHINGTON' TO ztable-CITYFROM.

...

UPDATE SPFLI FROM ztable.

Don't use Commit statement

Kevin

Hi Friends ,

I have a ztable . I am updating a record of the ztable using dialog programming i.e from the screen .

DATA: ztable_tmp type ztable.

....

...

......

...........

UPDATE ZTABLE FROM ZTABLE_TMP.

COMMIT WORK .

....

...

.....................

The above code is not updating the record changed on the screen . I checked in debug and the wa has the changed values but the ztable in the database is not getting updated .

Please advise !

Thanks!!

5 REPLIES 5
Read only

Former Member
0 Likes
652

DATA ztable TYPE SPFLI.

MOVE 'AA' TO ztable-CARRID.

MOVE '0064' TO ztable-CONNID.

MOVE 'WASHINGTON' TO ztable-CITYFROM.

...

UPDATE SPFLI FROM ztable.

Don't use Commit statement

Kevin

Read only

Former Member
0 Likes
651

What is sy-subrc after the UPDATE statement.

Rob

Read only

0 Likes
651

it is zero . Is this is correct way to update from a work area ?

Read only

0 Likes
651

It is updating now . I guess I have a prob displaying the updated table value back on the screen .

Thanks !

Read only

0 Likes
651

Try declaring the table:

DATA: ztable_tmp type ztable with header line.

Rob