Tuesday, November 27, 2018

SAP ABAP: Get email from table with username

1. Create email variable at data section

DATAL_SMTP_ADDR type adr6-SMTP_ADDR.


2. Get username from ADR6 and USR21 tables

select ADR6~SMTP_ADDR INTO L_SMTP_ADDR FROM
  USR21 LEFT OUTER JOIN ADR6 On
   USR21~addrnumber =  ADR6~addrnumber
                and USR21~persnumber =  ADR6~persnumber
  WHERE USR21~BNAME sy-uname.
  ENDSELECT.

No comments:

Post a Comment

Problem with database open ORA-19804, ORA-19809, ORA-03113

1. Try to login to database with SYS AS SYSDBA user. If the instance is idle, run the startup command. 2. If ORA-03113 occured, check the la...