Send Customer Statement By EmailSAP Training

This tutorial explains about sending the customer statements by email.

F.27 transaction is used to create the customer statements. By default SAP allows to print the customer statements. Upon the execution of F.27 SAP creates a spool request.


For Remote SAP Access or online SAP Access learn more by clicking on the links above.


If a business wants to send the customer statements following ABAP code changes are required.

Create a new project in CMOD.

Add RFKORIEX in the enhancement list.

Go to the EXIT_RFKORIEX_001 component and add the following 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.

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.
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.

Please click here for SAP Training.

Advertisements

0 thoughts on “Send Customer Statement By EmailSAP Training

  1. firanki says:

    My brother recommended I would possibly like this blog.
    He was once entirely right. This publish actually made my
    day. You cann’t consider just how much time I had spent for this information! Thanks!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s