cancel
Showing results for 
Search instead for 
Did you mean: 

Can change documents be written when using the ADDR_COMM_MAINTAIN

KleinerEisbär
Explorer
0 Kudos
181

Dear all,

I wrote a program to update/insert/delete email address data via function module ADDR_COMM_MAINTAIN. After calling this I additionally use ADDR_MEMORY_SAVE. 

Basically it works. But no change documents are written as is usual when using SAP standard transactions to change addresses. 

Is there any possibility to set change documents in the environment of ADDR_COMM_MAINTAIN?

My calls of both functions:

 

   CALL FUNCTION 'ADDR_COMM_MAINTAIN'
      EXPORTING
        address_handle     = lv_address_handle
        address_number     = iv_address_number
*       DATE_FROM          = '00010101'
*       LANGUAGE           = SY-LANGU
        table_type         = 'ADSMTP'
*       SUBSTITUTE_ALL_COMM_DATA             = ' '
*       ACCEPT_TELNR_CALL  = ' '
*       CONSIDER_CONSNUMBER_FOR_INSERT       = ' '
*       CHECK_ADDRESS      = 'X'
        iv_time_dependence = 'X'
*       IV_CONSIDER_ADRCOMC_FOR_INSERT       = 'X'
*       BLK_EXCPT          =
*     IMPORTING
*       RETURNCODE         =
      TABLES
        comm_table         = ct_comm_table
        error_table        = lt_addr_error
*       COMM_TABLE_OUT     =
*       IT_USAGE           =
*       IT_USAGE_UUID      =
*       ET_USAGE_OUT       =
*       ET_USAGE_UUID_OUT  =
*       ET_CREATED_USAGE_UUID                =
      EXCEPTIONS
        parameter_error    = 1
        address_not_exist  = 2
        internal_error     = 3
        address_blocked    = 4
        OTHERS             = 5.
          CALL FUNCTION 'ADDR_MEMORY_SAVE'
*      EXPORTING
*        execute_in_update_task = 'X'
      EXCEPTIONS
        address_number_missing = 1
        person_number_missing  = 2
        internal_error         = 3
        database_error         = 4
        reference_missing      = 5
        OTHERS                 = 6.

 

Thanks in advance! 🙂

View Entire Topic
KleinerEisbär
Explorer
0 Kudos

Thanks, Raymond, for your recommendation.

Now my next step was to write a COMMIT WORK after the ADDR_MEMORY_SAVE function call and then it already worked with change documents. 🙂

Anyway, thanks for the idea with ADRESSE_WRITE_DOCUMENT. I wasn't aware about it and will keep it in mind for other situations.

 

RaymondGiuseppi
Active Contributor
0 Kudos

Basically, as you didn't commit work/luw, database was updated by an implicit database commit only and registred calls in update task were never processed...