cancel
Showing results for 
Search instead for 
Did you mean: 

how to: if email empty, print by paper?

Former Member
0 Kudos

Hello Gurus,

Using the forum posts, I have implemented sending dunning letters per email.

I want that if the debitor email address is empty then the dunning letter is printed by paper.

I tried modifiyng user exit EXIT_SAPF150D_001 so that if the email address is empty, the output device is set to '1', that is printer: FINAA-NACHA = '1'

So I create a dunning run (F150) as usual, selects the ouput device 'EMAIL' (created for email output)

For customers without email address, there is a spool request created but it does not come out of the printer, it still contains the original output device 'EMAIL'. I don't know if I need more coding in the user exit or...

Thank you for your help.

Alex-

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

have you checked the value of LDEST during this procedure? this has to filled with printer name

Former Member
0 Kudos

Hello,

I solved my problem the following way:

- not use a specific EMAIL output device

- use the usual paper printer device but in the user exit, add such code:

IF T047E-LISTN = 'NET'. "Internet für die Mahnstufe gewünscht

IF SAVE_INTAD NE SPACE. "Internetadresse gepflegt

FINAA-NACHA = 'I'. "Ausgabe über Internet

FINAA-INTAD = SAVE_INTAD.

FINAA-TEXTF = 'PDF'.

ELSE.

FINAA-NACHA = '1'. "Ausgabe auf Drucker

ENDIF.

ELSE.

IF T047E-LISTN = 'FAX' "Fax für die Mahnstufe gewünscht

....

The first test (T047E-LISTN = 'NET') is an attribure of the dunning form: T.code FBMA --> dunning texts.