‎2009 Sep 14 9:20 PM
HI , thanks for the future help , i'm trying to send a payment notification in Tx F110 , but all the stuff is inthe web is not clear , i hope is not a problem but i really need something step by step to do this , thnaks .
‎2009 Sep 14 9:59 PM
Hi,
1) Once you have executed F110m, the output would be in a Spool.
Create a separate program to read the spool and use the standard func module SO_NEW_DOCUMENT_ATT_SEND_API1 to send out mails.
Option 2) Create a different payment type for Emails and create a separate program. Through config maintain this payment method and program. In your program you can call the standard function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send emails.
Hope this helps.
Regards,
Subramanian
‎2009 Sep 14 9:59 PM
Hi,
1) Once you have executed F110m, the output would be in a Spool.
Create a separate program to read the spool and use the standard func module SO_NEW_DOCUMENT_ATT_SEND_API1 to send out mails.
Option 2) Create a different payment type for Emails and create a separate program. Through config maintain this payment method and program. In your program you can call the standard function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send emails.
Hope this helps.
Regards,
Subramanian
‎2009 Sep 15 2:23 PM
It's a good idea but i need to use "standar" procedure , all the steps that are in the forums but i need that to work , what i see , is that , the steps are not explained very carefully or it's something i'm measing , , for example in the case when they say , that you have to copy the include that trigerrs 2040 event , i don't know if i have to copy it in the same FM or in a ZFM , besides that , i read about a table TBE01 that contains all the events but the 2040 doesn't exist , tha's why i want a step by step solution , i hope that somebody can help me like this
‎2009 Sep 15 2:37 PM
Hello,
For the code in the copied Z-Program, its upto you how you code as per your requirement.
For config, you can check this [link|http://sapient.wordpress.com/2007/12/09/business-transaction-events-bte/].
Cheers,
Suhas
‎2009 Sep 15 2:38 PM
1) Once you have executed F110m, the output would be in a Spool.
Create a separate program to read the spool and use the standard func module SO_NEW_DOCUMENT_ATT_SEND_API1 to send out mails.
Option 2) Create a different payment type for Emails and create a separate program. Through config maintain this payment method and program. In your program you can call the standard function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send emails.
Why? SAP provides a standard solution for e-mailing payment advices!!!
‎2009 Sep 15 2:45 PM
Hello Brad,
May i know which standard SAP solution are you talking about?
BR,
Suhas
‎2009 Sep 15 2:46 PM
It's a good idea but i need to use "standar" procedure , all the steps that are in the forums but i need that to work , what i see , is that , the steps are not explained very carefully or it's something i'm measing , , for example in the case when they say , that you have to copy the include that trigerrs 2040 event , i don't know if i have to copy it in the same FM or in a ZFM , besides that , i read about a table TBE01 that contains all the events but the 2040 doesn't exist , tha's why i want a step by step solution , i hope that somebody can help me like this
Ok, so you've figured out that BTE 2040 and 2050 are used for sending payment advices via e-mail. This isn't the place for a class on BTE configuration, but it seems that you've been given a link that helps. There are many posts, links, and help files that will assist you. Now, as far as the two BTE's, there is an OSS note that identifies the process but the number escapes me at this time. Look at the sample functions in FIBF for the documentation, but 2040 should be used to identify the form to be used and switch to e-mail processing:
* This function module is used for BTE 00002040 to send payment
* advice notifications via e-mail for EFTs.
TYPE-POOLS SZADR.
DATA: LS_ADDR1_COMPLETE TYPE SZADR_ADDR1_COMPLETE,
LS_ADSMTP_LINE TYPE SZADR_ADSMTP_LINE.
* Default - Print payment advice
* Default layout in config is Z_CHK_ADVICE_LZ for checks
C_FINAA-NACHA = '1'.
* Check for vendor payment and wire transaction
CHECK: I_REGUH-LIFNR NE SPACE,
I_REGUH-RZAWE EQ 'T'.
* Switch to the EFT advice
C_FINAA-FORNR = 'Z_EFT_ADVICE'.
* Check that address number is available
CHECK I_REGUH-ZADNR NE SPACE.
* Read complete address of vendor/customer
CALL FUNCTION 'ADDR_GET_COMPLETE'
EXPORTING
ADDRNUMBER = I_REGUH-ZADNR
IMPORTING
ADDR1_COMPLETE = LS_ADDR1_COMPLETE
EXCEPTIONS
OTHERS = 4.
CHECK SY-SUBRC EQ 0.
* Check that e-mail address is available
LOOP AT LS_ADDR1_COMPLETE-ADSMTP_TAB INTO LS_ADSMTP_LINE
WHERE ADSMTP-SMTP_ADDR NE SPACE
AND ADSMTP-REMARK EQ 'EFT'.
EXIT.
ENDLOOP.
CHECK SY-SUBRC EQ 0.
* Choose message type 'I'nternet and fill email address
C_FINAA-NACHA = 'I'.
C_FINAA-INTAD = LS_ADSMTP_LINE-ADSMTP-SMTP_ADDR.
And 2050 is used to set the title for the e-mail.
‎2009 Sep 15 2:56 PM
Hi
The standard fm OPEN_FORM can create a mail instead of the spool, so u need to apply all modification in order to process a mail.
Perhap the version of your standard program can do it, else u should a code like this:
XPROGRAMM = SY-REPID.
CALL FUNCTION 'ADDR_GET_NEXT_COMM_TYPE'
EXPORTING
STRATEGY = 'CS01'
ADDRESS_NUMBER = KNA1-ADRNR
IMPORTING
COMM_TYPE = LVS_COMM_TYPE
COMM_VALUES = LVS_COMM_VALUES
EXCEPTIONS
ADDRESS_NOT_EXIST = 1
PERSON_NOT_EXIST = 2
NO_COMM_TYPE_FOUND = 3
INTERNAL_ERROR = 4
PARAMETER_ERROR = 5
OTHERS = 6.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CONVERT_COMM_TYPE_DATA'
EXPORTING
PI_COMM_TYPE = LVS_COMM_TYPE
PI_COMM_VALUES = LVS_COMM_VALUES
PI_COUNTRY = KNA1-LAND1
PI_REPID = XPROGRAMM
IMPORTING
PE_ITCPO = ITCPO
PE_DEVICE = XDEVICE
PE_MAIL_RECIPIENT = LVS_RECIPIENT
PE_MAIL_SENDER = LVS_SENDER
EXCEPTIONS
COMM_TYPE_NOT_SUPPORTED = 1
RECIPIENT_CREATION_FAILED = 2
SENDER_CREATION_FAILED = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF..Max
‎2009 Sep 15 2:58 PM
Hi
step 2
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DEVICE = XDEVICE
DIALOG = 'X'
FORM = <form name>
OPTIONS = ITCPO
MAIL_SENDER = LVS_SENDER
MAIL_RECIPIENT = LVS_RECIPIENT
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
OTHERS = 11.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.In my sample I get the mail address of customer, but it's the same for a vendor.
This solution the system'll create the mail to be send by SCOT transaction: u make sure the partner (i.e vendor or customer) and the user have the mail addresses.
Max
‎2009 Sep 15 3:45 PM
I did what it says in the link of Suhas , but when i try to create the bte in the p/s module it says that the data element EV00002040 doesn't exist , do i have to create it ? because it a standar name and it ask me for a password for modification os standar, what should i do ? , or somebody has come across with this problem ?
‎2009 Sep 15 3:51 PM
Hi
It's a PROCESS not P/S so u can see it by transaction BERP
If u need to active it by trx FIBF
Settings->Process Modules->....of a customer
Max
‎2009 Sep 15 4:30 PM
look what i did , in my zFM i put a code to send an email to my account to be sure if the event is trigger but when i ask the FI person to run the transacction it doesn't send anything because the tx scot and sost are empty , that says that it never pass in my FM , what step i'm missing ?
‎2009 Sep 15 4:40 PM
U can post your code?
Anyway the BTE 2040 is triggered in the routine avis_nachrichtenart (include RFFORI06):
FORM avis_nachrichtenart.
DATA up_fimsg LIKE fimsg OCCURS 0 WITH HEADER LINE.
STATICS up_profile LIKE soprd.
* Nachrichtenart ermitteln lassen
CLEAR finaa.
finaa-nacha = '1'.
CALL FUNCTION 'OPEN_FI_PERFORM_00002040_P'
EXPORTING
i_reguh = reguh
TABLES
t_fimsg = up_fimsg
CHANGING
c_finaa = finaa.
LOOP AT up_fimsg INTO fimsg.
PERFORM message USING fimsg-msgno.
ENDLOOP.
* Nachrichtenart Fax (2) oder Mail (I) prüfen, sonst nur Druck (1)
CASE finaa-nacha.
WHEN '2'.
CALL FUNCTION 'TELECOMMUNICATION_NUMBER_CHECK'
EXPORTING
service = 'TELEFAX'
number = finaa-tdtelenum
country = finaa-tdteleland
EXCEPTIONS
OTHERS = 4.
IF sy-subrc NE 0.
finaa-nacha = '1'.
finaa-fornr = t042b-aforn.
ENDIF.
WHEN 'I'.
IF up_profile IS INITIAL.
CALL FUNCTION 'SO_PROFILE_READ'
IMPORTING
profile = up_profile
EXCEPTIONS
OTHERS = 4.
IF sy-subrc NE 0.
up_profile-smtp_exist = '-'.
ENDIF.
ENDIF.
IF up_profile-smtp_exist NE 'X' OR finaa-intad IS INITIAL.
finaa-nacha = '1'.
finaa-fornr = t042b-aforn.
ENDIF.
WHEN OTHERS.
finaa-nacha = '1'.
ENDCASE.
ENDFORM. "avis_nachrichtenart
Can u see the code above?
Max
‎2009 Sep 16 3:45 PM
Thanks for all the help , but what i find is that the event 2040 and 2050 are not trigger , because a place a piece of code to send mail y the ZFM 2030 or 2020 or 2010 , , and it send the mail but when the code is in the 2040 or 2050 don't , that's the problem , what should a i do ?
‎2009 Sep 16 3:57 PM
Hi
The BTE 2040 and 2050 are called by fm OPEN_FI_PERFORM_00002040_P and OPEN_FI_PERFORM_00002050_P, so u can set a break-point there in order to check why your BTE is not triggered.
Anyway u make sure you have set your BTE via trx FIBF correctly
Max
‎2009 Sep 16 4:20 PM
i'm sure it's not trigger the event , that's why i don't undestarnd.
‎2009 Sep 16 4:31 PM
‎2009 Sep 17 6:11 PM
‎2009 Sep 17 6:20 PM
Hi
Insert a break-point, u can run the program to generate the print, file,... alone, so by se38
Max
‎2009 Sep 17 8:35 PM
‎2009 Sep 18 8:47 AM
Hi
U need to run F110, chose a payment, press ENTER and go to tab "Printout/Data medium": here u can see the program to be called.
Max