|
Content Author: Kevin
PO by e-mail: how to control sender address
The following may help you solve your problem. I am using the following in my PO Sapscript /: DEFINE &W_USER_EMAIL& = ' ' /: PERFORM GET_USER_EMAIL IN PROGRAM ZVENDOR_FAX_EMAIL /: USING &EKKO-ERNAM& /: CHANGING &W_USER_EMAIL& /: ENDPERFORM = ,,,,<h> &'Created by: 'W_USER_EMAIL&</> and the following in PROGRAM ZVENDOR_FAX_EMAIL FORM GET_USER_EMAIL TABLES IN_TAB STRUCTURE ITCSY out_tab structure itcsy. data: L_user like USR21-BNAME. data: L_persno like usr21-persnumber. data: L_user_email like ADR6-SMTP_ADDR. * gets User name READ TABLE IN_TAB WITH KEY 'EKKO-ERNAM'. IF SY-SUBRC EQ 0. CLEAR: L_USER, L_USER_EMAIL, L_persno. L_user = IN_TAB-value. * read user master Select single PERSNUMBER from usr21 into L_persno where bname EQ L_user. *e-mail found if sy-subrc eq 0 and L_persno ne space. select smtp_addr from adr6 into L_user_email up to 1 rows where persnumber eq L_persno and date_from le sy-datum. endselect. if sy-subrc eq 0 and L_user_email ne space. read table out_tab with key 'W_USER_EMAIL'. if sy-subrc eq 0. move L_user_email to out_tab-value. modify out_tab index sy-tabix. endif. endif. endif. endif. endform. "GET_USER_EMAIL See also
Get help for your SAP MM problems
SAP MM Books
SAP Material Management Tips
Main Index
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|