on 02-24-2015 8:09 AM
Hi All,
Is it possible to send RE Invoice to multiple e mails id's of the same customer.E mail id's are maintained in the customer master.
In standard we can send to only one Id .
Anyone having idea?
Thanks,
Ebin
Hi,
We found solution for it.
Following code in BadI BADI_RECP_SF-CHANGE_DOC_LIST to send mail with invoice to multiple mail id's of the same customer
FIELD-SYMBOLS : <WA_DOC_LIST> TYPE ANY,
<DYN_FIELD> TYPE ANY,
<LT_DOC_LIST> TYPE TABLE.
DATA : LV_ADDRNUMBER TYPE AD_ADDRNUM,
LT_ADR6 TYPE TABLE OF ADR6,
WA_ADR6 TYPE ADR6,
LV_LINE TYPE REF TO DATA.
UNASSIGN <LT_DOC_LIST>.
CASE IS_OPTIONS-TDDEST.
WHEN 'MAIL'.
LOOP AT CT_DOC_LIST ASSIGNING <WA_DOC_LIST>.
IF <LT_DOC_LIST> IS NOT ASSIGNED.
CREATE DATA LV_LINE LIKE TABLE OF <WA_DOC_LIST>.
ASSIGN LV_LINE->* TO <LT_DOC_LIST>.
<LT_DOC_LIST> = CT_DOC_LIST.
ENDIF.
CLEAR : LV_ADDRNUMBER.
REFRESH : LT_ADR6[].
ASSIGN COMPONENT 'PARTNER' OF STRUCTURE <WA_DOC_LIST> TO <DYN_FIELD>.
IF SY-SUBRC = 0.
SELECT SINGLE ADDRNUMBER
FROM BUT020
INTO LV_ADDRNUMBER
WHERE PARTNER = <DYN_FIELD>.
IF LV_ADDRNUMBER IS NOT INITIAL.
SELECT *
FROM ADR6
INTO TABLE LT_ADR6
WHERE ADDRNUMBER = LV_ADDRNUMBER
AND FLGDEFAULT = ''
AND HOME_FLAG = ''.
ENDIF.
LOOP AT LT_ADR6 INTO WA_ADR6.
ASSIGN COMPONENT 'XMAILORFAXNO' OF STRUCTURE <WA_DOC_LIST> TO <DYN_FIELD>.
IF SY-SUBRC = 0.
<DYN_FIELD> = WA_ADR6-SMTP_ADDR.
APPEND <WA_DOC_LIST> TO <LT_DOC_LIST>.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
IF <LT_DOC_LIST> IS ASSIGNED.
CT_DOC_LIST = <LT_DOC_LIST>.
ENDIF.
ENDCASE.
Thanks,
Ebin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ebin,
How r u?
In standard it is nor possible to send one invoice on multiple email id. You need to customize a program for it and i have done almost same thing at one of my client.
Logic can be...apart from the standard filed you need to customized one more extra filed in customer master data and you can save all the email id's details in that filed only on which you want to send invoice.
Program should be in such way that apart from standard filled it should picked all the email id details from customized filled and send the invoice details on those id also.
Thanks
Rajnikant Verma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joseph ,
In NACE transaction please check whether they maintained custom program or standard one.
If it is standard one then check the query of the ADR6 table how they are fetching.
In customer table take the address id and check it in ADR6 table you will get the multiple mail id's and then , you might be using the 'so*send*mail' FM to send mails here you have to mention the Recipients table data (from adr6 mail id's).
thanks,
Krishna
User | Count |
---|---|
6 | |
5 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.