Skip to Content
avatar image
Former Member

When i send F.27 account statement as email, spool is not getting generated.

Hello Gurus,

I have a requirement where i need to send the Spool generated after executing the Tcode F.27 to the customer. Implemented the Customer Exit EXIT_RFKORIEX_001 with the below mentioned code.

I am able to send the attachment to the customer but Spool is not getting generated. Kindly Help on this.

code:

TABLES: kna1, "Kunden A-Segment
knb1, "Kunden B-Segment
lfa1, "Lieferanten A-Segment
lfb1, "Lieferanten B-Segment
bkorm, "Korrespondenzanforderungen
finaa. "Daten zum Sendemedium

DATA: save_koart LIKE bkorm-koart, "Hilfsfeld Kontoart
save_land1 LIKE kna1-land1, "Hilfsfeld Faxanschluß
save_telfx LIKE kna1-telfx, "Hilfsfeld Faxanschluß
save_zsabe LIKE knb1-zsabe, "Hilfsfeld Faxanschluß
save_intad LIKE knb1-intad. "Hilfsfeld Internet

kna1 = i_kna1.
lfa1 = i_lfa1.
knb1 = i_knb1.
lfb1 = i_lfb1.
bkorm = i_bkorm.
save_koart = i_koart.

SELECT adrnr
FROM kna1 INTO TABLE @DATA(lt_kunnr)
WHERE kunnr = @i_kna1-kunnr.
IF sy-subrc = 0.
SELECT addrnumber,persnumber,smtp_addr
FROM adr6 INTO TABLE @DATA(lt_email)
FOR ALL ENTRIES IN @lt_kunnr
WHERE addrnumber = @lt_kunnr-adrnr.
ENDIF.
LOOP AT lt_email INTO DATA(ls_email).


CLEAR: save_land1,
save_telfx,
save_zsabe.

IF save_koart = 'D'.
save_land1 = kna1-land1.
save_telfx = knb1-tlfxs.
save_zsabe = knb1-zsabe.
* save_intad = knb1-intad.
save_intad = ls_email-smtp_addr.
ELSE.
save_land1 = lfa1-land1.
save_telfx = lfb1-tlfxs.
save_zsabe = lfb1-zsabe.
save_intad = lfb1-intad.
ENDIF.

IF save_intad NE space.
finaa-nacha = 'I'. "Ausgabe über Internet
finaa-intad = save_intad.
finaa-textf = 'PDF'.
ELSEIF save_telfx NE space.
finaa-nacha = '2'. "Ausgabe auf Fax
finaa-tdschedule = 'IMM'.
finaa-tdteleland = save_land1.
finaa-tdtelenum = save_telfx.
finaa-tdfaxuser = space.
finaa-namep = save_zsabe.
finaa-formc = 'FI_FAX_COVER_A4'.
finaa-fornr = space.
ELSE.
finaa-nacha = '1'. "Drucken
ENDIF.

* Daten zum Sendemedium merken für Aufrufer
e_finaa = finaa.
ENDLOOP.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers