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: 

How to append records to archive in AL11 using custom archive object ?

0 Kudos

Hi ,

I am trying to Archive the records from a custom table into a AL11 file with the logical path mentioned in my custom Archive object . I am able to see my file in the AL11 file path but unable to append the records at each time of execution.

Basically have followed Custom Data Archiving – As a Background Job (without using SARA) – JIT Archiving as Example | SAP Bl... for archival process .

Could you please guide me about appending the records to the same file ?

1 REPLY 1

Sandra_Rossi
Active Contributor

To append to existing file without clearing it, use FOR APPENDING (see ABAP documentation for more information):

OPEN DATASET file FOR APPENDING IN TEXT MODE ENCODING DEFAULT.
TRANSFER record TO file.
CLOSE DATASET file.