Skip to Content
0
Former Member
Mar 22, 2012 at 09:31 AM

Abap : Commit and rollback

618 Views

Hi experts,

I have experience with another prog. languages - > what was in the block below was done all or nothing

begin work

call function

delete

update

commit work or rollback

i don't have experience with commit and rollback in ABAP.

i have e.g. code below

* start block

CALL FUNCTION 'RSDU_TABLE_TRUNCATE'
EXPORTING
i_tablnm = 'table1

CALL FUNCTION 'RSDRI_ODSO_INSERT'
EXPORTING
i_odsobject = 'table1

CALL FUNCTION 'RSDU_TABLE_TRUNCATE'
EXPORTING
i_tablnm = 'table2'

CALL FUNCTION 'RSDRI_ODSO_INSERT'
EXPORTING
i_odsobject = 'table2'

CALL FUNCTION 'RSEC_GENERATE_FROM_ODS'

* end block

please practise example what should i do to all things will be done "together" ( commit ) or nothing ( rollback - situation before running this code ).

( maybe i have to use ENQUEUE or something like this )

I tried something, but only part of the code in block was rollback.

Is possible add into this block internal table and use rollback for them too ?

Thanks in advance

Martin