Code: Alles auswählen.
DATA: ls_z_segment TYPE z_idoc_segment_extension.
" Assume that the email address is passed in a custom Z-segment field
ls_z_segment-smtp_addr = 'email@example.com'.
" Code to update the ADR6 table
" This is a simplified example; actual implementation may vary
" and should handle exceptions and provide proper validation
IF ls_z_segment-smtp_addr IS NOT INITIAL.
UPDATE adr6 SET smtp_addr = ls_z_segment-smtp_addr WHERE addrnumber = <relevant_address_number>.
IF sy-subrc <> 0.
" Handle the error accordingly
ENDIF.
ENDIF.