viernes, 2 de diciembre de 2022

Modificar usuario SENDER que envía correo mediante SO_NEW_DOCUMENT_ATT_SEND_API1

 Muy fácil / Very easy:

Antes de ejecutar la FM SO_NEW_DOCUMENT_ATT_SEND_API1, debemos actualizar SY-UNAME, por supuesto, el usuario que vamos a asignar debe tener asociado su e-mail correspondiente en la SU01, or ejemplo:

Before executing the FM SO_NEW_DOCUMENT_ATT_SEND_API1, we must update SY-UNAME, of course, the user that we are going to assign must have its corresponding e-mail associated in SU01, for example.


           sy
-uname = ls_xekko-ernam.
    


          
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
            
EXPORTING
              document_data              
= ls_document_data
              put_in_outbox              
= abap_on
              commit_work                
= abap_on
            
TABLES
              packing_list               
= lt_packing_list[]
              object_header              
= t_object_header[]
              contents_txt               
= t_contents_txt[] " Body message
              contents_bin               
= lt_contents_bin[]
              receivers                  
= lt_receivers[]
            
EXCEPTIONS
              too_many_receivers         
= 1
              document_not_sent          
= 2
              document_type_not_exist    
= 3
              operation_no_authorization 
= 4
              parameter_error            
= 5
              x_error                    
= 6
              enqueue_error              
= 7
              
OTHERS                     = 8.

 


No hay comentarios:

Publicar un comentario