Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Dunning Email F150 not working

Former Member
0 Kudos

Hello experts .

I'm working with F150 and I need to add printout . I followed the following tutorials :

But none of these works as expected.

Below follows everything I did in settings

I have two options because in my debbug appears FI-FI not TR-LO.

Can anyone tell me what I'm doing wrong?

Thanks for your time
Cristina Rodrigues

5 REPLIES 5

Former Member
0 Kudos

Hi

but what doesn't work?

Max

0 Kudos

Hello Max,

The option Printout doesn't work as expected.

When I press printout the email isn't send.

And none window opens or message saying that the email was sent.

0 Kudos

Hi

The BTE is right, but you should check what happens as soon as it's called

That BTE is called by fm PRINT_DUNNING_NOTICE, it can allow to change the parameters to be transferd to fm OPEN_FORM

That fm should be called in routine  open_dunning_form in include, so try to check if all parameters are moved there

Tha mail is managed when the form is closed ( close_dunning_form), in particular the form  close_dunning_form_net_new or  close_dunning_form_net should be called: so try to check it

And try to check if you can see something in SOST transaction

Max

0 Kudos

Hi ,

Thanks for your time first of all.

I tried another tutorial (http://scn.sap.com/community/abap/blog/2015/03/16/dunning-notice-in-sap-best-practice-from-abaper-pr...) and this time the emails are sent. But the emails are sent the strange way. I need preview first and after this the popup with email shows up.

Cristina

Former Member
0 Kudos

Hi

This setting explains how to use a Smartform instead of Sapscript (Event 1720), but the BTE to be used in order to send the mail is always the same (1'040)

So now are you using smartform or sapscript?

Anyway both method should show a popup before sending a mail:

Sapscript: Use fm  FI_PRINT_DUNNING_NOTICE,

the mail is sent by PRINT_DUNNING_NOTICE (called by FI_PRINT_DUNNING_NOTICE) as soon as the sapscript is closed (FORM close_dunning_form)



IF NOT i_itcpo-tdpreview IS INITIAL

   AND SY-BATCH IS INITIAL.

     i_itcpp-tdnoprint = 'X'.

     CALL FUNCTION 'DISPLAY_OTF'

     EXPORTING

       CONTROL = i_itcpp

     IMPORTING

       RESULT  = i_itcpp

     TABLES

       otf     = lt_hotfdata

     EXCEPTIONS

       OTHERS  = 1.

     CALL FUNCTION 'CORRESPONDENCE_POPUP_EMAIL'

     EXPORTING

       i_intad  = i_finaa-intad

     IMPORTING

       e_answer = hanswer

       e_intad  = i_finaa-intad

     EXCEPTIONS

       OTHERS   = 1.

   ENDIF.

As you can see, if you have choosen print previes a popup should be displayed

Smartform: Use fm  FI_PRINT_DUNNING_NOTICE_SF

As the sapscript, after running the smartform a popup will be displayed a popup:


IF NOT i_itcpo-tdpreview IS INITIAL AND SY-BATCH IS INITIAL.

       i_itcpp-tdnoprint = 'X'.

       CALL FUNCTION 'DISPLAY_OTF'

       EXPORTING

         CONTROL = i_itcpp

       IMPORTING

         RESULT  = i_itcpp

       TABLES

         otf     = lt_hotfdata

       EXCEPTIONS

         OTHERS  = 1.

       CALL FUNCTION 'CORRESPONDENCE_POPUP_EMAIL'

       EXPORTING

         i_intad  = finaa-intad

       IMPORTING

         e_answer = ld_hanswer

         e_intad  = finaa-intad

       EXCEPTIONS

         OTHERS   = 1.

     ENDIF.

In both case you need to set the printpreview

U can set the flag for print preview in the BTE 1040, here you can change the value of ITCPO

Max