on 04-13-2011 8:58 AM
Hi we have a requirement , we need to lookup and fetch email address based on SAP UserID from SU01 , currently we have implement this logic in XSLT mapping ...anybody have done this or have any information about this...thanks
Have you the username on source message interface?
If yes, you can lookup by an RFC lookup (like this http://simonlesflex.wordpress.com/2010/12/07/pi-oracle-dblookup/
Sap manual: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0b6bb9d-7689-2c10-52a7-c3bd341d4...
and get user mail in SU01 by username selection.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This could be the abap code in the RFC function:
GET MAIL ADDRESS ************************
Select single * from usr21 into ls_usr21 where
bname eq <IV_USERNAME>.
If sy-subrc eq 0 and not ls_usr21 is INITIAL.
Select * from adr6 into table lt_adr6 where
persnumber eq ls_usr21-persnumber and
ADDRNUMBER eq ls_usr21-ADDRNUMBER.
If sy-subrc eq 0 and not lt_adr6 is INITIAL.
Sort lt_adr6 by date_from DESCENDING CONSNUMBER DESCENDING.
Read TABLE lt_adr6 into ls_adr6 index 1.
If sy-subrc eq 0 and not ls_adr6 is INITIAL.
ls_receivers-receiver = ls_adr6-SMTP_ADDR.
ls_receivers-rec_type = 'U'.
append ls_receivers to et_receivers.
endif.
endif.
endif.
***************************************************
ET_RECEIVER => Table Output with mail
Then, use standard Function in MMapping for Lookup (look at previous posted document) for calling RFC, and map result to destination structure field
Hi Kiran,
Was this query solved. if yes then please provide some pointers to the solution. Will help others!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran
The easiest solution would be to use the standard BAPI (BAPI_USER_GET_DETAIL) in ECC to fetch data from SU01.
Use this BAPI to do a RFC lookup in ECC. Refer the following to understand how RFC lookup works in PI:
/people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups
Note: There is a limitation with BAPI that it will fetch only 1 record at a time. If you face any challenge in terms of performance then refer the following discussion and make a custom RFC and use to fetch multiple records at a time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then you can still use Java RFC-Lookup. You just have to create java class and implement it to your XSLT as [Java-enhancement|http://help.sap.com/saphelp_srm40/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/frameset.htm].
Officially It's working only with SAP java XSLT processor "SAP-XML Toolkit". However from version PI 7.1 the standart XSTL processor is Xalan so if you have this or higher version of PI you can switch your Interface Mapping to use "SAP XML Toolkit" or implement [java-enhancement in Xalan-way|http://xml.apache.org/xalan-j/extensions.html#java-namespace].
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi r.a.kiran,
you can also use existing BAPI function BAPI_USER_GET_DETAIL. You will get all user details but you don't have to create your own RFC. May be you can use also another details from that function.
Email addresses of user will be in result table ADDSMTP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.