Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Plz Check Code!!!!!

Dear All,

Below is my code given but in output screen it does not show any value of ceratain fields like KOSTL,BELNR,BLDAT,WRBTR,DMBTR,BDIFF from BSID table.

Can anybody go through the program and let me know where is the error and where I am mistaking.

Regards,

Abhay.

REPORT rfdopr00

MESSAGE-ID fr

LINE-SIZE 132

NO STANDARD PAGE HEADING.

TABLES: b0sg,

kna1, "Daten auf Mandantenebene

  • KNKA,

knb1, "Daten auf Buchungskreisebene

knb4, "Zahlungsverhalten

knb5, "Mahndaten

  • KNKK, "Kreditkontrolle

knc1, "Verkehrszahlen

knc3, "Sonderumsätze

bsid, "Offend Posten

  • BKPF,

  • BSEG,

bsega.

TABLES:

bhdgd,

t001,

t001s,

*t001s,

t074t,

t074u,

tbsl,

tbslt,

tcurx,

adrs,

rfpdo,

rfsdo,

RFPOSXEXT,

faede.

FIELD-SYMBOLS: .

*Hilfsfelder

*---Prüfung ob mehrere Hauswährungen verarbeitet werden.

DATA: cfakt(3) TYPE p,

checksaldo(8) TYPE p,

checksald1(8) TYPE p,

checksald2(8) TYPE p,

checksald3(8) TYPE p,

checksald4(8) TYPE p,

checkagobl(8) TYPE p,

waers LIKE t001-waers,

wflag(1) TYPE p VALUE '0',

waers2 LIKE t001-waers,

wflag2(1) TYPE p VALUE '0',

ph-line(132) TYPE c.

*---Ermittlung aktuelles Geschäftsjahr über Funktionsbaustein.

DATA: curry LIKE bsid-gjahr.

*-Ermittlung Zahlungseingang bei Zahlungen mit Skontoabzug--


*

DATA: zvtage LIKE knb4-vzs01, "Verzugstage

zvskonto(8) TYPE p, "Zahlungsvolumen bei Zahlung mit Skonto

zvnetto(8) TYPE p, "Zahlungsvolumen bei Nettozahlung

zvverzug(8) TYPE p, "Verzugstage

zvmalvz(10) TYPE p, "Zahlungvolumen * Verzugstage

"KNB4-VZSxx)

zvtyp(1) TYPE c, "Skonto oder Nettozahler

  • ZVPER(4) TYPE C. "Periode letze Zahlung

zvper(6) TYPE c. "Periode letze Zahlung

*---Zeilenanzahl fü Adressausgabe -


*

DATA: zeilenanzahl LIKE adrs-anzzl VALUE 7.

DATA: ksaldo(6) TYPE p, "Saldovortrag

beabzug(6) TYPE p, "Berechtigte Abzüge

ubabzug(6) TYPE p, "Unberechtigte Abzüge

jahraug(6) TYPE p, "Kumulierter Jahresausgleich

kumzins(6) TYPE p. "Kumulierter Zins

  • Ausgabe der Mahndaten pro Buchungskreis.

  • ----------------------------------------

DATA: index(2) TYPE p VALUE 0.

  • Hilfsfelder

  • -----------------------------------------------------------

DATA: hf(1) TYPE c.

DATA: txt_1(78) TYPE c, "Mahnbereich

txt_2(78) TYPE c, "Mahnart

txt_3(78) TYPE c, "Mahnempfänger

txt_4(78) TYPE c, "Mahndatum

txt_5(78) TYPE c, "Mahnstufe

txt_6(78) TYPE c, "Mahnsperre

txt_7(78) TYPE c, "Mahnverfahren

txt_8(78) TYPE c. "Sachbearbeiter

DATA: BEGIN OF xmahn OCCURS 10.

INCLUDE STRUCTURE knb5.

DATA: END OF xmahn.

  • Hilfsfeld für Sicherung der knka Felder

  • -----------------------------------------------------------

*ATA: SAVE_KLIMG LIKE KNKA-KLIMG, "Gesamtlimit

  • SAVE_KLIME LIKE KNKA-KLIME, "Einzellimit

  • SAVE_WAERS LIKE KNKA-WAERS, "Währung

  • SAVE_DLAUS LIKE KNKA-DLAUS. "letzte Auskunft

  • Hilfsfelder

  • -----------------------------------------------------------

DATA: char1(1) TYPE c.

DATA: flag1(1) TYPE c.

DATA: intens(1) TYPE c.

DATA: rastza(1) TYPE c.

*----


*

*---- K o n s t a n t e n -


*

*----


*

*---- DNULL zum Vergleich mit Datumsfeldern -


*

DATA: dnull(8) TYPE c VALUE '00000000'.

*---- DECKBLATT = 'N' ==> Kein Deckblatt bei NEW-SECTION -


*

DATA: deckblatt TYPE c VALUE 'N'.

*----


*

*---- 'H' = Hilfsfelder, die jederzeit fuer Berechnungen ver- -


*

*---- wendet werden koennen. -


*

*----


*

DATA: BEGIN OF h,

stichtag(8),

offset(2) TYPE p,

offse1(2) TYPE p,

soll LIKE knc1-um01s,

haben LIKE knc1-um01h,

saldo LIKE knc1-umsav,

shbkz LIKE knc3-shbkz, "Sonderhauptbuchkennzeichen

saldv LIKE knc3-saldv, "Sonderhauptbuch-Saldovortrag

shbls LIKE knc3-solll, "Sonderhauptbuch-Lfd.-Saldo

shbsl LIKE knc3-solll, "Sonderhauptbuch-Lfd.-SOLL

shbhb LIKE knc3-habnl, "Sonderhauptbuch-Lfd.-HABEN

  • GBNUM LIKE KNC1-GBN01, "Geschaeftsber. Nummer ECKERT

  • GBUMS LIKE KNC1-GBU01, "Geschaeftsber. Umsatz

text(15),

umlow LIKE bsid-umskz, "Umsatzkennzeichen

umhig LIKE bsid-umskz, "Umsatzkennzeichen

**************AB*******

kostl LIKE bsid-kostl,

belnr LIKE bsid-belnr,

bldat LIKE bsid-bldat,

wrbtr LIKE bsid-wrbtr,

bdiff LIKE bsid-bdiff,

**************AB*******

END OF h.

*----


*

---- 'C' = Zwischenergebnisse, die aus Feldern des C-Segmentes ---

*---- berechnet werden. -


*

*----


*

DATA: BEGIN OF c,

saldo TYPE p, "Saldo

  • WEXOB TYPE P, "Wechsel-Obligo W,S,B

  • ANZOB TYPE P, "Anzahlungs-Obligo A

  • ZANFB TYPE P, "Zahlungs-Anforderung F

umkz1 LIKE knc3-shbkz, "SHBKZ 1

sums1 TYPE p, "Sonderumsatz 1

umkz2 LIKE knc3-shbkz, "SHBKZ 2

sums2 TYPE p, "Sonderumsatz 2

umkz3 LIKE knc3-shbkz, "SHBKZ 3

sums3 TYPE p, "Sonderumsatz 3

umkz4 LIKE knc3-shbkz, "SHBKZ 4

sums4 TYPE p, "Sonderumsatz 4

umkz5 LIKE knc3-shbkz, "SHBKZ 5

sums5 TYPE p, "Sonderumsatz 5

umkz6 LIKE knc3-shbkz, "SHBKZ 6

sums6 TYPE p, "Sonderumsatz 6

umkz7 LIKE knc3-shbkz, "SHBKZ 7

sums7 TYPE p, "Sonderumsatz 7

umkz8 LIKE knc3-shbkz, "SHBKZ 8

sums8 TYPE p, "Sonderumsatz 8

umkz9 LIKE knc3-shbkz, "SHBKZ 9

sums9 TYPE p, "Sonderumsatz 9

umkz10 LIKE knc3-shbkz, "SHBKZ 10

sums10 TYPE p, "Sonderumsatz 10

sonob TYPE p, "Sonstige Umsatz-Kz

babzg TYPE p, "Berechtigte Abzuege

uabzg TYPE p, "Unberechtigte Abzuege

kzins TYPE p, "Zinszahlungen

kumum TYPE p, "Umsatz

kumag TYPE p, "Kum. Jahresausgleich

  • KREUEB TYPE P, "Kreditueberschreitung

  • AGOBLI TYPE P, "Gesamt-Obligo (absolut)

agobli LIKE knc1-umsav, "Gesamt-Obligo (absolut)

  • RGOBLI TYPE P, "Gesamt-Obligo (relativ)

lftage(3) TYPE p, "Langfristige Überzugstage

mftage(3) TYPE p, "Mittelfristige Überzugstage

kftage(3) TYPE p, "Kurzfristige Überzugstage

zvtyp(1) TYPE c, "Flag Skonto oder Nettozahler

zvper(6) TYPE c, "letze Zahlungsperiode

zvverzug(8) TYPE p, "Durchschittliche Verzugst

END OF c.

*----


*

---- 'C2'= Zwischenergebnisse, die aus Feldern des C-Segmentes ---

*---- berechnet werden. -


*

*----


*

DATA: BEGIN OF c2 OCCURS 0,

bukrs LIKE knc1-bukrs,

saldo TYPE p, "Saldo

  • WEXOB TYPE P, "Wechsel-Obligo W,S,B

  • ANZOB TYPE P, "Anzahlungs-Obligo A

  • ZANFB TYPE P, "Zahlungs-Anforderung F

umkz1 LIKE knc3-shbkz, "SHBKZ 1

sums1 TYPE p, "Sonderumsatz 1

umkz2 LIKE knc3-shbkz, "SHBKZ 2

sums2 TYPE p, "Sonderumsatz 2

umkz3 LIKE knc3-shbkz, "SHBKZ 3

sums3 TYPE p, "Sonderumsatz 3

umkz4 LIKE knc3-shbkz, "SHBKZ 4

sums4 TYPE p, "Sonderumsatz 4

umkz5 LIKE knc3-shbkz, "SHBKZ 5

sums5 TYPE p, "Sonderumsatz 5

umkz6 LIKE knc3-shbkz, "SHBKZ 6

sums6 TYPE p, "Sonderumsatz 6

umkz7 LIKE knc3-shbkz, "SHBKZ 7

sums7 TYPE p, "Sonderumsatz 7

umkz8 LIKE knc3-shbkz, "SHBKZ 8

sums8 TYPE p, "Sonderumsatz 8

umkz9 LIKE knc3-shbkz, "SHBKZ 9

sums9 TYPE p, "Sonderumsatz 9

umkz10 LIKE knc3-shbkz, "SHBKZ 10

sums10 TYPE p, "Sonderumsatz 10

sonob TYPE p, "Sonstige Umsatz-Kz

babzg TYPE p, "Berechtigte Abzuege

uabzg TYPE p, "Unberechtigte Abzuege

kzins TYPE p, "Zinszahlungen

kumum TYPE p, "Umsatz

kumag TYPE p, "Kum. Jahresausgleich

  • KREUEB TYPE P, "Kreditueberschreitung

  • AGOBLI TYPE P, "Gesamt-Obligo (absolut)

agobli LIKE knc1-umsav, "Gesamt-Obligo (absolut)

  • RGOBLI TYPE P, "Gesamt-Obligo (relativ)

lftage(3) TYPE p, "Langfristige Überzugstage

mftage(3) TYPE p, "Mittelfristige Überzugstage

kftage(3) TYPE p, "Kurzfristige Überzugstage

zvtyp(1) TYPE c, "Flag Skonto oder Nettozahler

zvper(6) TYPE c, "letze Zahlungsperiode

zvverzug(8) TYPE p, "Durchschittliche Verzugst

END OF c2.

*----


*

---- 'C3'= Zwischenergebnisse, die aus Feldern des C-Segmentes ---

*---- berechnet werden. -


*

*----


*

DATA: BEGIN OF c3,

saldo TYPE p, "Saldo

  • WEXOB TYPE P, "Wechsel-Obligo W,S,B

  • ANZOB TYPE P, "Anzahlungs-Obligo A

  • ZANFB TYPE P, "Zahlungs-Anforderung F

umkz1 LIKE knc3-shbkz, "SHBKZ 1

sums1 TYPE p, "Sonderumsatz 1

umkz2 LIKE knc3-shbkz, "SHBKZ 2

sums2 TYPE p, "Sonderumsatz 2

umkz3 LIKE knc3-shbkz, "SHBKZ 3

sums3 TYPE p, "Sonderumsatz 3

umkz4 LIKE knc3-shbkz, "SHBKZ 4

sums4 TYPE p, "Sonderumsatz 4

umkz5 LIKE knc3-shbkz, "SHBKZ 5

sums5 TYPE p, "Sonderumsatz 5

umkz6 LIKE knc3-shbkz, "SHBKZ 6

sums6 TYPE p, "Sonderumsatz 6

umkz7 LIKE knc3-shbkz, "SHBKZ 7

sums7 TYPE p, "Sonderumsatz 7

umkz8 LIKE knc3-shbkz, "SHBKZ 8

sums8 TYPE p, "Sonderumsatz 8

umkz9 LIKE knc3-shbkz, "SHBKZ 9

sums9 TYPE p, "Sonderumsatz 9

umkz10 LIKE knc3-shbkz, "SHBKZ 10

sums10 TYPE p, "Sonderumsatz 10

sonob TYPE p, "Sonstige Umsatz-Kz

babzg TYPE p, "Berechtigte Abzuege

uabzg TYPE p, "Unberechtigte Abzuege

kzins TYPE p, "Zinszahlungen

kumum TYPE p, "Umsatz

kumag TYPE p, "Kum. Jahresausgleich

  • KREUEB TYPE P, "Kreditueberschreitung

  • AGOBLI TYPE P, "Gesamt-Obligo (absolut)

agobli LIKE knc1-umsav, "Gesamt-Obligo (absolut)

  • RGOBLI TYPE P, "Gesamt-Obligo (relativ)

  • LFTAGE(3) TYPE P, "Langfristige Überzugstage

  • MFTAGE(3) TYPE P, "Mittelfristige Überzugstage

  • KFTAGE(3) TYPE P, "Kurzfristige Überzugstage

  • ZVTYP(1) TYPE C, "Flag Skonto oder Nettozahler

  • ZVPER(6) TYPE C, "letze Zahlungsperiode

  • ZVVERZUG(8) TYPE P, "Durchschittliche Verzugst

END OF c3.

DATA: shbetrag LIKE bsega-dmshb. "TYPE P.

*----


*

*---- 'RTAB' = Rastertabelle fuer offene Posten -


*

*----


*

DATA: BEGIN OF rtab OCCURS 30,

sortk(1) TYPE c, "0 = Summe Gesber

"1 = Summe aller Gesber

"2 = Umsatzdaten

bukrs LIKE bsid-bukrs,

gsber LIKE bsid-gsber,

waers LIKE bsid-waers,

********AB********

kostl LIKE bsid-kostl,

belnr LIKE bsid-belnr,

bldat LIKE bsid-bldat,

wrbtr LIKE bsid-wrbtr,

bdiff LIKE bsid-bdiff,

********AB********

raart TYPE c, "Rasterart

"1 = Netto-Faelligkeit

"2 = Skonto1-Faelligkeit

"3 = Zahlungseingang

"4 = Belegalter

"5 = Ueber-Faelligkeit

kumum TYPE p, "Umsatz

anzah TYPE p, "Anzahlungen

opsum TYPE p, "Offene Posten Summe

rast1 TYPE p, "Rasterfeld 1

rast2 TYPE p, "Rasterfeld 2

rast3 TYPE p, "Rasterfeld 3

rast4 TYPE p, "Rasterfeld 4

rast5 TYPE p, "Rasterfeld 5

rast6 TYPE p, "Rasterfeld 6

  • COUNT TYPE P, "count für Gesber

END OF rtab.

*----


*

*---- 'RBUS' = Rastertabelle fuer Summen pro Sachbearbeiter -


*

*----


*

DATA: BEGIN OF rbus OCCURS 30,

sortk(1) TYPE c, "0 = Summe Gesber

"1 = Summe aller Gesber

"2 = Umsatzdaten

bukrs LIKE bsid-bukrs,

gsber LIKE bsid-gsber,

waers LIKE bsid-waers,

raart TYPE c, "Rasterart

"1 = Netto-Faelligkeit

"2 = Skonto1-Faelligkeit

"3 = Zahlungseingang

"4 = Ueber-Faelligkeit

kumum TYPE p, "Umsatz

anzah TYPE p, "Anzahlungen

opsum TYPE p, "Offene Posten Summe

rast1 TYPE p, "Rasterfeld 1

rast2 TYPE p, "Rasterfeld 2

rast3 TYPE p, "Rasterfeld 3

rast4 TYPE p, "Rasterfeld 4

rast5 TYPE p, "Rasterfeld 5

rast6 TYPE p, "Rasterfeld 6

  • COUNT TYPE P, "count für Gesber

END OF rbus.

*----


*

*---- 'RBUK' = Rastertabelle fuer Summen pro Buchungskreis -


*

*----


*

DATA: BEGIN OF rbuk OCCURS 30,

sortk(1) TYPE c, "0 = Summe Gesber

"1 = Summe aller Gesber

"2 = Umsatzdaten

bukrs LIKE bsid-bukrs,

gsber LIKE bsid-gsber,

waers LIKE bsid-waers,

raart TYPE c, "Rasterart

"1 = Netto-Faelligkeit

"2 = Skonto1-Faelligkeit

"3 = Zahlungseingang

"4 = Ueber-Faelligkeit

kumum TYPE p, "Umsatz

anzah TYPE p, "Anzahlungen

opsum TYPE p, "Offene Posten Summe

rast1 TYPE p, "Rasterfeld 1

rast2 TYPE p, "Rasterfeld 2

rast3 TYPE p, "Rasterfeld 3

rast4 TYPE p, "Rasterfeld 4

rast5 TYPE p, "Rasterfeld 5

rast6 TYPE p, "Rasterfeld 6

  • COUNT TYPE P, "count für Gesber

END OF rbuk.

*----


*

---- 'RSUM' = Rastertabelle pro Währung über alle Buchungskreise ---

*----


*

DATA: BEGIN OF rsum OCCURS 30,

sortk(1) TYPE c, "0 = Summe Gesber

"1 = Summe aller Gesber

  • BUKRS LIKE BSID-BUKRS,

  • GSBER LIKE BSID-GSBER,

waers LIKE bsid-waers,

raart TYPE c, "Rasterart

"1 = Netto-Faelligkeit

"2 = Skonto1-Faelligkeit

"3 = Zahlungseingang

"4 = Ueber-Faelligkeit

kumum TYPE p, "Umsatz

anzah TYPE p, "Anzahlungen

opsum TYPE p, "Offene Posten Summe

rast1 TYPE p, "Rasterfeld 1

rast2 TYPE p, "Rasterfeld 2

rast3 TYPE p, "Rasterfeld 3

rast4 TYPE p, "Rasterfeld 4

rast5 TYPE p, "Rasterfeld 5

rast6 TYPE p, "Rasterfeld 6

  • COUNT TYPE P, "count für Gesber

END OF rsum.

*----


*

*---- interne Tabelle für Periodenabgrenzung----


*

*----


*

RANGES: bmonat FOR rfpdo-doprbmon.

*----


*

*---- interne Tabelle für Kreditkontrollbereichsdaten----


*

*----


*

*ATA: BEGIN OF KREDK OCCURS 10,

  • KKBER LIKE KNKK-KKBER, "Kreditkontrollbereich

  • UEDAT LIKE KNKK-UEDAT, "Datum Kreditlimitüberschreitung

  • KLIMK LIKE KNKK-KLIMK, "Kreditkontrollbereichslimit

  • SSOBL LIKE KNKK-SSOBL, "Relevantes Sonderobligo

  • SAUFT LIKE KNKK-SAUFT, "Summe Auftragswerte

  • SKFOR LIKE KNKK-SKFOR, "Summe Forderungen

  • END OF KREDK.

*----


*

---- interne Tabellen für Konsistenzcheck Kreditkontrollbereiche ---

*----


*

*ATA: BEGIN OF KKBERSEL OCCURS 10,

  • KKBER LIKE KNKK-KKBER, "Kreditkontrollbereich

  • END OF KKBERSEL.

*ATA: BEGIN OF KKBERGES OCCURS 10,

  • KKBER LIKE KNKK-KKBER, "Kreditkontrollbereich

  • BUKRS LIKE T001-BUKRS, "Buchungskreis

  • END OF KKBERGES.

*----


*

---- In die Felder RP01 bis RP05 werden dynamisch die von aussen ---

*---- eingegebenen Rasterpunkte uebertragen -


*

*----


*

DATA: rp01(2) TYPE p, " 0

rp02(2) TYPE p, " 20

rp03(2) TYPE p, " 40

rp04(2) TYPE p, " 80

rp05(2) TYPE p, " 100

rp06(2) TYPE p, " 1

rp07(2) TYPE p, " 21

rp08(2) TYPE p, " 41

rp09(2) TYPE p, " 81

rp10(2) TYPE p. " 101

*----


*

*---- In die Felder RC01 bis RC10 werden die Rasterpunkte in -


*

---- charakterform abgestellt. (fuer REPLACE-Funktion in Variabler -

*---- Ueberschrift) -


*

*----


*

DATA: rc01(4) TYPE c, " 0

rc02(4) TYPE c, " 20

rc03(4) TYPE c, " 40

rc04(4) TYPE c, " 80

rc05(4) TYPE c, " 100

rc06(4) TYPE c, " 1

rc07(4) TYPE c, " 21

rc08(4) TYPE c, " 41

rc09(4) TYPE c, " 81

rc10(4) TYPE c. " 101

*----


*

*---- Felder für Umsatzkennzeichen -


*

*---- für Ausweis der Sonderumsätze----


*

*----


*

DATA: humkz1 LIKE knc3-shbkz,

humkz2 LIKE knc3-shbkz,

humkz3 LIKE knc3-shbkz,

humkz4 LIKE knc3-shbkz,

humkz5 LIKE knc3-shbkz,

humkz6 LIKE knc3-shbkz,

humkz7 LIKE knc3-shbkz,

humkz8 LIKE knc3-shbkz,

humkz9 LIKE knc3-shbkz,

humkz10 LIKE knc3-shbkz.

*----


*

*---- 'GAG' = Hilfsfelder für die Berechnung der Gauss'chen -


*

*---- Ausgleichsgeraden. ( Trend ) -


*

*----


*

DATA:BEGIN OF gag OCCURS 5,

f TYPE c, "1 = langfristig

"2 = mittelfristig

"3 = kurzfristig

"4 = letzter Vorgang

d(4) TYPE p, "Mitteldatum

t(4) TYPE p, "MW Überzgustage

u(8) TYPE p, "MW Umsatz

ut(8) TYPE p, "MW Umsatz * Tage

dt(8) TYPE p, "MW Datum * Tage

dd(8) TYPE p, "MW Datum * Datum

END OF gag.

*----


*

*---- Weitere Hilfsfelder für die Berechnung der Gauss'chen -


*

*---- Ausgleichsgeraden. ( Trend ) -


*

*----


*

DATA: lz(4) TYPE p, "Letzte Zahlung

dm(8) TYPE p, "Rechenfeld

vw(16) TYPE p, "Rechenfeld

vw1(16) TYPE p, "Rechenfeld

vw2(16) TYPE p. "Rechenfeld

DATA: BEGIN OF trend,

text(7) TYPE c,

trendda(4) TYPE c,

trenddb(4) TYPE c,

trenddc(4) TYPE c VALUE '/100',

END OF trend.

DATA: BEGIN OF s,

m(4) TYPE p, "Anzahl akzeptierter Mittelwerte

d(4) TYPE p, "Summe (Datum)

t(5) TYPE p, "Summe (Tage)

dt(8) TYPE p, "Summe (Datum * Tage)

dd(8) TYPE p, "Summe (Datum * Datum)

aw(4) TYPE p, "Schätzwert f. akt. Überzugstage

ae(9) TYPE p, "dto. aufbereitet.

bw(4) TYPE p, "Tendenz Tage /100 Tage

be(9) TYPE p, "dto. aufbereitet

END OF s.

*----


*

*---- E N D E der Hilfsfelder für Berechnung der Gauss'chen -


*

*---- Ausgleichsgeraden. ( Trend ) -


*

*----


*

*---- GBZAEHL - In diesem Feld wird vermerkt, fuer wieviele Ge- -


*

*---- schaeftsbereiche ein OP-Raster ausgegeben wird. -


*

---- Wird das Raster nur fuer einen Geschaeftsbereich ge- -

*---- druckt, so entfaellt das Summen-Raster. -


*

DATA: gbzaehl(3) TYPE p.

---- TOP-FLAG '1' = bei TOP-OF-PAGE Einzelpostenueberschrift ausg. --

*---- '2' = bei TOP-OF-PAGE Ueberschrift fuer Raster ausgeb. *

*---- '3' = bei TOP-OF-PAGE ULINE ausgeben. -


*

---- '4' = bei TOP-OF-PAGE Stammsatzueberschrift ausgeben --

DATA: top-flag(1) TYPE c.

*---- SEL-STAMM 'J' = Saldo Normalumsätze *

*---- SEL-POSTN 'J' = Stammsatz hat Posten gerastert *

*---- 'N' = Stammsatz hat keine Posten gerastert *

*---- SEL-POST2 'J' = Stammsatz hat Posten gerastert *

*---- 'N' = Stammsatz hat keine Posten gerastert *

DATA: BEGIN OF sel,

stamm(1) TYPE c,

postn(1) TYPE c,

post2(1) TYPE c,

END OF sel.

*---- SATZART '1' = Stammdaten -


*

*---- '2' = Faelligkeitsraster -


*

*---- '3' = Einzelposten -


*

DATA: satzart(1) TYPE c.

*---- RART = Erste ausgewaehlte Rasterart -


*

DATA: rart(1) TYPE c.

*---- TAGE = Tage nach denen die Posten sortiert sind -


*

DATA: tage(4) TYPE p,

*---- NTAGE = Tage fuer Netto-Faelligkeit -


*

ntage(4) TYPE p,

*---- STAGE = Tage fuer Skonto1-Faelligkeit -


*

stage(4) TYPE p,

*---- ZTAGE = Tage fuer voraussichtlichen Zahlungseingang -


*

ztage(4) TYPE p,

*---- ATAGE = Alter der Belege -


*

atage(4) TYPE p,

*---- UTAGE = Tage fuer Ueber-Faelligkeit -


*

utage(4) TYPE p.

*---- RASTERUU dient zur Sortierung der Einzelposten. Die Posten -


*

*---- gemaess ihrer Rasterung die Werte '1' bis '6' -


*

DATA: rasteruu(1) TYPE c.

*---- RAART Rasterart -


*

---- Die einzelnen Felder der Feldleiste werden bei SART-OF-SELECTION

*---- mit 1 oder 0 bestueckt. -


*

*ATA: BEGIN OF RAART,

  • NET(1) TYPE C, "X = ausgewaehlt, ' ' = nicht ausgewaehlt

  • SKT(1) TYPE C, "X = ausgewaehlt, ' ' = nicht ausgewaehlt

  • UEB(1) TYPE C, "X = ausgewaehlt, ' ' = nicht ausgewaehlt

  • END OF RAART.

DATA: BEGIN OF gb,

gsber LIKE bsid-gsber,

waers LIKE bsid-waers,

END OF gb.

*----


*

*---- Variable Ueberschriften -


*

*----


*

DATA: BEGIN OF varueb1,

feld1(40) TYPE c,

feld2(14) TYPE c,

feld3(14) TYPE c,

feld4(14) TYPE c,

feld5(14) TYPE c,

feld6(14) TYPE c,

feld7(14) TYPE c,

END OF varueb1.

DATA: BEGIN OF varueb2,

feld1(40) TYPE c,

feld2(14) TYPE c,

feld3(14) TYPE c,

feld4(14) TYPE c,

feld5(14) TYPE c,

feld6(14) TYPE c,

feld7(14) TYPE c,

END OF varueb2.

DATA: varueb3(132),

varueb4(132),

vartxt1(40),

vartxt(40) TYPE c.

*----


*

*---- Variable für Ausgabe der Sonderumsätze----


*

*----


*

DATA: shbbez LIKE t074t-ltext.

DATA: asums TYPE p. "

*----


*

*---- Interne Tabelle für Bezeichnungen der SHBKZ----


*

*----


*

DATA: BEGIN OF bezshb OCCURS 10,

shbkz LIKE t074t-shbkz,

ltext LIKE t074t-ltext,

END OF bezshb.

*----


*

*---- Interne Tabelle für Zwischenspeicherung -


*

*----


*

DATA: BEGIN OF blkey,

bukrs LIKE bsid-bukrs,

belnr LIKE bsid-belnr,

gjahr LIKE bsid-gjahr,

buzei LIKE bsid-buzei,

END OF blkey.

DATA: BEGIN OF rtage,

ntage LIKE ntage,

stage LIKE stage,

ztage LIKE ztage,

atage LIKE atage,

utage LIKE utage,

END OF rtage.

DATA: BEGIN OF hbsid OCCURS 10.

INCLUDE STRUCTURE bsid.

INCLUDE STRUCTURE bsega.

INCLUDE STRUCTURE rtage.

DATA: END OF hbsid.

DATA: BEGIN OF refbl OCCURS 10.

INCLUDE STRUCTURE blkey.

INCLUDE STRUCTURE rtage.

DATA: END OF refbl.

DATA: BEGIN OF hknb1 OCCURS 10.

INCLUDE STRUCTURE knb1.

DATA: END OF hknb1.

DATA: BEGIN OF ht001 OCCURS 10.

INCLUDE STRUCTURE t001.

DATA: END OF ht001.

*----


*

*---- Interne Tabelle für Ausgabe der Obligos -


*

*----


*

DATA: BEGIN OF aobligo OCCURS 12,

obart TYPE c, "Flag für Obligoart 1 = Kontokorrent

" 2 = SHBKZ

" 3 = sonstige SHB

shbkz LIKE t074t-shbkz, "SHB-Kennzeichen

ltext LIKE t074t-ltext, "Bezeichnung

oblig TYPE p, "Obligobetrag

END OF aobligo.

*----


*

*---- Declarationen für Accessibility /ALV GRID -


*

*----


*

DATA: acc_mode TYPE c.

DATA: uebtext(22) TYPE c.

DATA: uektext(15) TYPE c.

DATA: tittext(100) TYPE c.

DATA: dattext(10) TYPE c.

DATA: BEGIN OF rtab_alv OCCURS 30,

  • SORTK(1) TYPE C, "0 = Summe Gesber

  • "1 = Summe aller Gesber

  • "2 = Umsatzdaten

bukrs LIKE bsid-bukrs,

kunnr LIKE kna1-kunnr,

busab LIKE knb1-busab,

sortl LIKE kna1-sortl,

land1 LIKE kna1-land1,

gsber LIKE bsid-gsber,

waers LIKE bsid-waers,

  • hwaer like rf140-hwaer,

raart LIKE rf140-raart, "Rasterart

  • shkzg like bsid-shkzg,

  • XGUTS TYPE C, "Gutschrift

kumum LIKE rf140-kumumhw, "Umsatz

anzah LIKE rf140-anzbthw, "Anzahlungen

opsum LIKE rf140-gsaldd, "Offene Posten Summe

**************

  • belnr LIKE rf140-belnr,

**************

rast1 LIKE rf140-rast1, "Rasterfeld 1

rast2 LIKE rf140-rast2, "Rasterfeld 2

rast3 LIKE rf140-rast3, "Rasterfeld 3

rast4 LIKE rf140-rast4, "Rasterfeld 4

rast5 LIKE rf140-rast5, "Rasterfeld 5

rast6 LIKE rf140-rast6, "Rasterfeld 6

************AB*****

kostl LIKE bsid-kostl,

belnr LIKE bsid-belnr,

bldat LIKE bsid-bldat,

wrbtr LIKE bsid-wrbtr,

bdiff LIKE bsid-bdiff,

************AB*****

END OF rtab_alv.

*"General Data

TYPE-POOLS: slis.

*DATA: BEGIN OF GT_OUTTAB OCCURS 0.

  • INCLUDE STRUCTURE rtab_alv.

*DATA: END OF GT_OUTTAB.

DATA: gs_layout TYPE slis_layout_alv,

  • G_EXIT_CAUSED_BY_CALLER,

  • GS_EXIT_CAUSED_BY_USER TYPE SLIS_EXIT_BY_USER,

g_repid LIKE sy-repid,

g_grid_title TYPE lvc_title.

*"Callback

*Data: GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,

  • G_STATUS_SET TYPE SLIS_FORMNAME VALUE 'PF_STATUS_SET',

DATA: g_user_command TYPE slis_formname VALUE 'USER_COMMAND'.

  • G_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',

  • G_TOP_OF_LIST TYPE SLIS_FORMNAME VALUE 'TOP_OF_LIST',

  • G_END_OF_LIST TYPE SLIS_FORMNAME VALUE 'END_OF_LIST'.

*"Variants

DATA: gs_variant LIKE disvariant,

g_save.

  • Global structure of list

  • fieldcatalog

DATA: ls_fieldcat TYPE slis_fieldcat_alv.

DATA: gt_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.

  • sort

*DATA: GT_SORT TYPE SLIS_T_SORTINFO_ALV.

  • events

*DATA: GT_EVENTS TYPE SLIS_T_EVENT.

*----- Structure for specific color settings -

-


*DATA: COL_TAB_T TYPE SLIS_T_SPECIALCOL_ALV,

  • COL_TAB TYPE SLIS_SPECIALCOL_ALV.

DATA: g_tabname TYPE slis_tabname VALUE 'RTAB_ALV'.

  • print

*DATA: GS_PRINT TYPE SLIS_PRINT_ALV.

*----


*

*---- FIELD-GROUPS -


*

*----


*

FIELD-GROUPS:

header,

stammdaten,

op-raster,

einzelposten.

INSERT

knb1-bukrs " Buchungskreis

knb1-busab " Sachbearbeiter

kna1-kunnr " Kontonummer

satzart " Satzart

rtab-sortk " Sortkz fuer Tabelle RTAB

" '0' = normale Eintraege

" '1' = Summeneintraege

" '2' = Jahresumsatz

gb " Geschaeftsbereich

" - GB-GSBER

" - GB-WAERS

rasteruu " Kennzeichen fuer Detailposten bzw Raster

*----


ab hier nur fuer Einzelposten -


*

tage " Rastertage fuer Detailposten

bsid-umskz " Umsatzkennzeichen

bsid-blart " Belegart

  • BSID-ZUONR " Zuordnungsnummer

bsid-belnr " Belegnummer

bsid-buzei " Belegzeile

************AB*****

bsid-kostl

bsid-belnr

bsid-bldat

bsid-wrbtr

bsid-bdiff

************AB*****

INTO header.

INSERT

  • Addressdaten

adrs-line0 " 1. Zeile Adressenaufbereitung

adrs-line1 " 2. " "

adrs-line2 " 3. " "

adrs-line3 " 4. " "

adrs-line4 " 5. " "

adrs-line5 " 6. " "

adrs-line6 " 7. " "

  • ADRS-LINE7 " 8. " "

  • ADRS-LINE8 " 9. " "

  • ADRS-LINE9 " 10." "

  • Umsatzdaten

c-kumum " Umsatz

c-babzg " Berechtigt. Abzuege

c-uabzg " Unberechtigt. Abzuege

c-kzins " Zinszahlungen

c-kumag " Kum. Jahresausgleich

  • Warenkreditversicherung

knb1-vrsnr " Vertragsnummer

knb1-vrbkz " Institutsnummer

knb1-vlibb " Versicherungssumme

knb1-verdt " Gültig bis

knb1-vrszl " Ziel-Monate

knb1-vrspr " Selbstbeiteiligung in %

  • Obligos

c-saldo " Saldo ohne SHB-Vorgänge

  • C-WEXOB " Wechselobligo

  • C-ANZOB " Anzahlungsobligo

  • C-ZANFB " Zahlungsanforderungen

c-umkz1 "SHBKZ 1

c-sums1 "Sonderumsatz 1

c-umkz2 "SHBKZ 2

c-sums2 "Sonderumsatz 2

c-umkz3 "SHBKZ 3

c-sums3 "Sonderumsatz 3

c-umkz4 "SHBKZ 4

c-sums4 "Sonderumsatz 4

c-umkz5 "SHBKZ 5

c-sums5 "Sonderumsatz 5

c-umkz6 "SHBKZ 6

c-sums6 "Sonderumsatz 6

c-umkz7 "SHBKZ 7

c-sums7 "Sonderumsatz 7

c-umkz8 "SHBKZ 8

c-sums8 "Sonderumsatz 8

c-umkz9 "SHBKZ 9

c-sums9 "Sonderumsatz 9

c-umkz10 "SHBKZ 10

c-sums10 "Sonderumsatz 10

c-sonob " Sonst. Obligen

  • Limits

  • KNKA-KLIMG "Gesamtkreditlimit

  • KNKA-DLAUS "Datum letzte Auskunft

  • KREDK "Kreditkontrollbereichsdaten

c-agobli " Absolutes Gesamtobligo

  • C-KREUEB " Kreditueberschr.

  • C-RGOBLI " Relatives Gesamtobligo

  • Zahlungdaten

c-zvtyp "Flag Skonto oder Nettozahler

c-zvper "letze Zahlungsperiode

c-zvverzug "Durchschittliche Verzugstage

knb1-zterm "Zahlungsbedingung

knb1-xverr "Zahlungsverrechnung

kna1-sortl

kna1-land1

************AB*****

bsid-kostl

bsid-belnr

bsid-bldat

bsid-wrbtr

bsid-bdiff

************AB*****

INTO stammdaten.

INSERT

rtab-raart "Rasterart

rtab-kumum "Umsatz

rtab-anzah "Anzahlungen

rtab-opsum "Offene Posten Summe

rtab-rast1 "Rasterfeld 1

rtab-rast2 "Rasterfeld 2

rtab-rast3 "Rasterfeld 3

rtab-rast4 "Rasterfeld 4

rtab-rast5 "Rasterfeld 5

rtab-rast6 "Rasterfeld 6

  • RTAB-COUNT "count für gsber

************AB*****

rtab-kostl

rtab-belnr

rtab-bldat

rtab-wrbtr

rtab-bdiff

************AB*****

INTO op-raster.

INSERT

bsid-budat " Buchungsdatum

bsid-bldat " Belegdatum

bsid-cpudt " CPU-Datum

  • BKPF-USNAM " User-ID

bsid-waers " Wahrungsschluessel

bsega-netdt " Nettofaelligkeitsdatum

  • FAEDE-NETDT " Nettofaelligkeitsdatum

bsid-zfbdt " Zahlungsfristen-Basisdatum

bsid-bschl " Buchungsschluessel

bsid-zlsch " Zahlungsschluessel

bsid-manst " Mahnstufe

shbetrag " Hauswaehrungsbetrag

bsega-dmshb " Hauswaehrungsbetrag

bsega-wrshb " Fremwaehrungsbetrag

************AB*****

bsid-kostl

bsid-belnr

  • bsid-bldat

bsid-wrbtr

bsid-bdiff

************AB*****

INTO einzelposten.

begin_of_block 1.

*ELECT-OPTIONS:

  • GESBER FOR BSID-GSBER.

PARAMETERS:

monat LIKE rfpdo-doprbmon.

SELECT-OPTIONS:

kksaldo2 FOR rfsdo-doprsal2, "Saldovortrag

agoblig2 FOR rfsdo-doprago2. "Absolutes Obligo

  • RGOBLIGO FOR RFSDO-DOPRRGOB. "Relatives Obligo

SELECT-OPTIONS:

  • LAND FOR KNA1-LAND1,

  • KONTENGR FOR KNA1-KTOKD,

  • SACHBEAR FOR KNB1-BUSAB,

akonts FOR knb1-akont,

akontp FOR bsid-hkont.

SELECT-OPTIONS:

berabzu2 FOR rfsdo-doprbabz,

unbabzu2 FOR rfsdo-dopruabz,

zinse2 FOR rfsdo-doprkzin,

jhrausg2 FOR rfsdo-doprkuma.

  • BERABZUG FOR BEABZUG NO-DISPLAY, "Berechtigter Abzug

  • UNBABZUG FOR UBABZUG NO-DISPLAY, "Unberechtigter Abzug

  • ZINSEN FOR KUMZINS NO-DISPLAY, "Kumulierter Zins

  • JHRAUSGL FOR JAHRAUG NO-DISPLAY. "Kumulierter Jahresausgl.

SELECT-OPTIONS:

budat FOR bsid-budat,

bldat FOR bsid-bldat,

netdt FOR bsega-netdt.

PARAMETERS: n_belege LIKE rfpdo-bpetnbel

DEFAULT 'X', "Normale Belege.

stat_blg LIKE rfpdo-bpetsbel. "Statistische Belege

end_of_block 1.

begin_of_block 2.

PARAMETERS:

sortart LIKE rfpdo-doprsoar DEFAULT '1',

verdicht LIKE rfpdo-doprverd DEFAULT '1',

rastverd LIKE rfpdo-doprrast DEFAULT '0',

konzvers LIKE rfpdo-dopokonz, "Konzernversion

xbukrdat LIKE rfpdo3-allgbukd DEFAULT 0, "Bukr.daten

kausgabe LIKE rfpdo3-allgkaor.

  • SELECTION-SCREEN BEGIN OF LINE.

  • SELECTION-SCREEN COMMENT 01(30) TEXT-030.

PARAMETERS: rart-net LIKE rfpdo-doprrnet DEFAULT 'X'.

  • SELECTION-SCREEN COMMENT 33(01) TEXT-028.

PARAMETERS: rart-skt LIKE rfpdo-doprrskt DEFAULT 'X'.

  • SELECTION-SCREEN COMMENT 35(01) TEXT-028.

PARAMETERS: rart-zhl LIKE rfpdo-doprrzhl DEFAULT 'X'.

  • SELECTION-SCREEN COMMENT 35(01) TEXT-028.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: rart-alt LIKE rfpdo1-koprralt DEFAULT 'X'.

SELECTION-SCREEN COMMENT 03(28) text-031.

SELECTION-SCREEN POSITION pos_high.

PARAMETERS rbldat LIKE rfpdo2-kord10bd.

SELECTION-SCREEN COMMENT 61(12) text-032.

SELECTION-SCREEN END OF LINE.

  • SELECTION-SCREEN COMMENT 37(01) TEXT-028.

PARAMETERS: rart-ueb LIKE rfpdo-doprrueb DEFAULT 'X'.

  • SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 01(31) text-026.

SELECTION-SCREEN POSITION pos_low.

PARAMETERS: rastbis1 LIKE rfpdo1-allgrogr DEFAULT '000'.

  • SELECTION-SCREEN COMMENT 35(02) TEXT-027.

PARAMETERS: rastbis2 LIKE rfpdo1-allgrogr DEFAULT '020'.

  • SELECTION-SCREEN COMMENT 41(02) TEXT-027.

PARAMETERS: rastbis3 LIKE rfpdo1-allgrogr DEFAULT '040'.

  • SELECTION-SCREEN COMMENT 47(02) TEXT-027.

PARAMETERS: rastbis4 LIKE rfpdo1-allgrogr DEFAULT '080'.

  • SELECTION-SCREEN COMMENT 53(02) TEXT-027.

PARAMETERS: rastbis5 LIKE rfpdo1-allgrogr DEFAULT '100'.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 01(31) text-029.

SELECTION-SCREEN POSITION pos_low.

PARAMETERS: faktor LIKE rfpdo-doprfakt DEFAULT '0'.

SELECTION-SCREEN COMMENT 35(1) text-028.

PARAMETERS: stellen LIKE rfpdo-doprfakt DEFAULT '0'.

SELECTION-SCREEN END OF LINE.

PARAMETERS: pzuor LIKE rfpdo2-doprzuor DEFAULT 'X'.

PARAMETERS: umsatzkz LIKE rfpdo1-doprshbo. "DEFAULT 'WBSA'.

PARAMETERS:

title LIKE rfpdo1-allgline,

listsep LIKE rfpdo-allglsep,

mikfiche LIKE rfpdo-allgmikf.

PARAMETERS:

p_lvar LIKE gs_variant-variant DEFAULT space MODIF ID 508.

end_of_block 2.

AT SELECTION-SCREEN OUTPUT.

IF acc_mode IS INITIAL.

LOOP AT SCREEN.

IF screen-group1 = '508'.

screen-active = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

AT SELECTION-SCREEN ON akonts.

  • Konvertierung der Kontonummer

  • -----------------------------

LOOP AT akonts.

PERFORM alphaformat(sapfs000)

USING akonts-low akonts-low.

PERFORM alphaformat(sapfs000)

USING akonts-high akonts-high.

MODIFY akonts.

ENDLOOP.

AT SELECTION-SCREEN ON akontp.

  • Konvertierung der Kontonummer

  • -----------------------------

LOOP AT akontp.

PERFORM alphaformat(sapfs000)

USING akontp-low akontp-low.

PERFORM alphaformat(sapfs000)

USING akontp-high akontp-high.

MODIFY akontp.

ENDLOOP.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_lvar.

gs_variant-report = sy-repid.

gs_variant-variant = p_lvar.

PERFORM f4_for_s_lvar USING gs_variant.

p_lvar = gs_variant-variant.

AT SELECTION-SCREEN.

IF rastbis1 GT '998'

OR rastbis2 GT '998'

OR rastbis3 GT '998'

OR rastbis4 GT '998'

OR rastbis5 GT '998'.

  • SET CURSOR FIELD RASTBIS5.

MESSAGE e381.

ENDIF.

IF NOT rastbis5 IS INITIAL.

IF rastbis5 GT rastbis4

AND rastbis4 GT rastbis3

AND rastbis3 GT rastbis2

AND rastbis2 GT rastbis1.

ELSE.

MESSAGE e379.

ENDIF.

ELSE.

IF NOT rastbis4 IS INITIAL.

IF rastbis4 GT rastbis3

AND rastbis3 GT rastbis2

AND rastbis2 GT rastbis1.

ELSE.

MESSAGE e379.

ENDIF.

ELSE.

IF NOT rastbis3 IS INITIAL.

IF rastbis3 GT rastbis2

AND rastbis2 GT rastbis1.

ELSE.

MESSAGE e379.

ENDIF.

ELSE.

IF NOT rastbis2 IS INITIAL.

IF rastbis2 GT rastbis1.

ELSE.

MESSAGE e379.

ENDIF.

ELSE.

  • nichts zu tun

ENDIF.

ENDIF.

ENDIF.

ENDIF.

CLEAR bezshb.

REFRESH bezshb.

CONDENSE umsatzkz NO-GAPS.

IF NOT umsatzkz(1) IS INITIAL.

CLEAR char1.

MOVE umsatzkz(1) TO char1.

PERFORM shbkz_pruefen.

ENDIF.

IF NOT umsatzkz+1(1) IS INITIAL.

CLEAR char1.

MOVE umsatzkz+1(1) TO char1.

PERFORM shbkz_pruefen.

ENDIF.

IF NOT umsatzkz+2(1) IS INITIAL.

CLEAR char1.

MOVE umsatzkz+2(1) TO char1.

PERFORM shbkz_pruefen.

ENDIF.

IF NOT umsatzkz+3(1) IS INITIAL.

CLEAR char1.

MOVE umsatzkz+3(1) TO char1.

PERFORM shbkz_pruefen.

ENDIF.

IF NOT umsatzkz+4(1) IS INITIAL.

CLEAR char1.

MOVE umsatzkz+4(1) TO char1.

PERFORM shbkz_pruefen.

ENDIF.

IF NOT umsatzkz+5(1) IS INITIAL.

CLEAR char1.

MOVE umsatzkz+5(1) TO char1.

PERFORM shbkz_pruefen.

ENDIF.

IF NOT umsatzkz+6(1) IS INITIAL.

CLEAR char1.

MOVE umsatzkz+6(1) TO char1.

PERFORM shbkz_pruefen.

ENDIF.

IF NOT umsatzkz+7(1) IS INITIAL.

CLEAR char1.

MOVE umsatzkz+7(1) TO char1.

PERFORM shbkz_pruefen.

ENDIF.

IF NOT umsatzkz+8(1) IS INITIAL.

CLEAR char1.

MOVE umsatzkz+8(1) TO char1.

PERFORM shbkz_pruefen.

ENDIF.

IF NOT umsatzkz+9(1) IS INITIAL.

CLEAR char1.

MOVE umsatzkz+9(1) TO char1.

PERFORM shbkz_pruefen.

ENDIF.

IF NOT acc_mode IS INITIAL.

verdicht = '1'.

sortart = '1'.

  • RASTVERD = '1'.

xbukrdat = '2'.

ENDIF.

*

  • SELECT * FROM T001.

  • MOVE-CORRESPONDING T001 TO KKBERGES.

  • APPEND KKBERGES.

  • IF T001-BUKRS IN DD_BUKRS.

  • MOVE T001-KKBER TO KKBERSEL-KKBER.

  • COLLECT KKBERSEL.

  • ENDIF.

  • ENDSELECT.

  • LOOP AT KKBERSEL.

  • LOOP AT KKBERGES

  • WHERE KKBER = KKBERSEL-KKBER.

  • IF KKBERGES-BUKRS IN DD_BUKRS.

  • ELSE.

    • message Aussagkraft kreditüberschreitung usw. gefährdet.

  • ENDIF.

  • ENDLOOP.

  • ENDLOOP.

INITIALIZATION.

get_frame_title: 1, 2.

monat = '16'.

acc_mode = 'X'.

CALL FUNCTION 'GET_ACCESSIBILITY_MODE'

IMPORTING

accessibility = acc_mode

EXCEPTIONS

its_not_available = 1

OTHERS = 2.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

IF NOT acc_mode IS INITIAL.

g_repid = sy-repid.

  • PERFORM FIELDCAT_INIT USING GT_FIELDCAT[].

  • PERFORM SORT_INIT USING GT_SORT[].

  • PERFORM EVENTS_INIT USING GT_EVENTS[].

  • PERFORM PRINT_INIT.

ENDIF.

START-OF-SELECTION.

COMMIT WORK.

*- Fuellen zusätzlicher DB Sel-Opts

  • COPY: GESBER TO DD_GSBER, LAND TO DD_LAND1, SACHBEAR TO DD_BUSAB,

  • AKONTS TO DD_AKONT, AKONTP TO DD_HKONT.

copy: akonts to dd_akont, akontp to dd_hkont.

SELECT * FROM t001 APPENDING TABLE ht001

WHERE bukrs IN dd_bukrs.

*- Standardseitenkopf fuellen -


*

MOVE '0' TO bhdgd-inifl.

MOVE sy-linsz TO bhdgd-lines.

MOVE sy-uname TO bhdgd-uname.

MOVE sy-repid TO bhdgd-repid.

MOVE sy-title TO bhdgd-line1.

MOVE title TO bhdgd-line2.

MOVE ' ' TO bhdgd-bukrs.

MOVE mikfiche TO bhdgd-miffl.

MOVE listsep TO bhdgd-separ.

MOVE 'BUKRS' TO bhdgd-domai.

*- OP-Raster und Ueberschriften aufbereiten -


*

PERFORM raster_aufbau.

PERFORM shb_kennzeichen.

IF n_belege <> space.

n_belege = 'X'.

b0sg-xstan = 'X'.

ELSE.

b0sg-xstan = ' '.

ENDIF.

IF stat_blg <> space.

stat_blg = 'X'.

b0sg-xstas = 'X'.

ENDIF.

IF monat IS INITIAL

OR monat GT '16'.

monat = '16'.

ENDIF.

bmonat-low = '1'.

bmonat-high = monat.

bmonat-option = 'BT'.

bmonat-sign = 'I'.

APPEND bmonat.

GET kna1.

*HECK LAND.

*HECK KONTENGR.

CLEAR adrs.

MOVE-CORRESPONDING kna1 TO adrs.

MOVE zeilenanzahl TO adrs-anzzl.

CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'

EXPORTING

adrswa_in = adrs

IMPORTING

adrswa_out = adrs.

IF NOT konzvers IS INITIAL.

CLEAR checksaldo.

CLEAR checksald1.

CLEAR checksald2.

CLEAR checksald3.

CLEAR checksald4.

CLEAR checkagobl.

CLEAR waers2.

CLEAR wflag2.

CLEAR hbsid.

REFRESH hbsid.

CLEAR refbl.

REFRESH refbl.

sel-stamm = 'N'.

sel-postn = 'N'.

sel-post2 = 'N'.

CLEAR rtab.

REFRESH rtab.

CLEAR hknb1.

REFRESH hknb1.

CLEAR c2.

REFRESH c2.

CLEAR c3.

ENDIF.

*ET KNKA.

  • SAVE_KLIMG = KNKA-KLIMG. "Gesamtlimit

  • SAVE_KLIME = KNKA-KLIME. "Einzellimit

  • SAVE_WAERS = KNKA-WAERS. "Währung

  • SAVE_DLAUS = KNKA-DLAUS. "letzte Auskunft

*ET KNKK.

  • MOVE-CORRESPONDING KNKK TO KREDK.

  • INDEX = 0.

  • DO VARYING HF

  • FROM KREDK-KKBER+3

  • NEXT KREDK-KKBER+2.

  • IF HF <> SPACE. EXIT. ENDIF.

  • INDEX = SY-INDEX.

  • ENDDO.

  • SHIFT KREDK-KKBER BY INDEX PLACES RIGHT.

  • INDEX = 0.

GET knb1.

  • CHECK SACHBEAR.

CHECK akonts.

IF konzvers IS INITIAL.

CLEAR checksaldo.

CLEAR checksald1.

CLEAR checksald2.

CLEAR checksald3.

CLEAR checksald4.

CLEAR checkagobl.

CLEAR hbsid.

REFRESH hbsid.

CLEAR refbl.

REFRESH refbl.

sel-stamm = 'N'.

sel-postn = 'N'.

CLEAR rtab.

REFRESH rtab.

ENDIF.

CLEAR c.

CLEAR h-saldo.

  • CLEAR KREDK.

CLEAR: zvverzug,zvper,zvtyp.

CLEAR: gb,

rasteruu,

tage.

  • Lfd. Geschaeftsjahr gemaess Stichtag besorgen ---------------------*

  • laufendes Geschäftsjahr ermitteln

  • ---------------------------------

CALL FUNCTION 'GET_CURRENT_YEAR'

EXPORTING

bukrs = knb1-bukrs

date = dd_stida

IMPORTING

curry = curry.

  • SELECT SINGLE * FROM T001 WHERE BUKRS EQ KNB1-BUKRS.

READ TABLE ht001 WITH KEY bukrs = knb1-bukrs.

t001 = ht001.

IF NOT waers2 IS INITIAL

AND waers2 NE t001-waers.

wflag2 = '1'.

ENDIF.

waers2 = t001-waers.

GET knb4.

  • Ermittlung Zahlungseingang bei Zahlungen mit Skontoabzug-----------*

IF knb1-xzver <> space. "Daten über Zahlungsverhalten aufgezeichnet?

PERFORM payment_forecast.

  • MOVE KNB4-JAH012(2) TO ZVPER2(2).

MOVE knb4-jah01 TO zvper+2(4).

MOVE knb4-mon01 TO zvper(2).

ELSE.

zvtage = space.

zvper = space.

ENDIF.

c-zvtyp = zvtyp.

c-zvper = zvper.

c-zvverzug = zvverzug.

GET knc1.

CHECK: knc1-gjahr = curry.

PERFORM cfaktor.

IF cfakt NE 0.

checksald1 = checksald1 + knc1-babzg / cfakt.

checksald2 = checksald2 + knc1-uabzg / cfakt.

checksald3 = checksald3 + knc1-kzins / cfakt.

checksald4 = checksald4 + knc1-kumag / cfakt.

ELSE.

checksald1 = checksald1 + knc1-babzg.

checksald2 = checksald2 + knc1-uabzg.

checksald3 = checksald3 + knc1-kzins.

checksald4 = checksald4 + knc1-kumag.

ENDIF.

  • CHECK CHECKSALD1 IN BERABZU2.

  • CHECK CHECKSALD2 IN UNBABZU2.

  • CHECK CHECKSALD3 IN ZINSE2.

  • CHECK CHECKSALD4 IN JHRAUSG2.

  • aktuellen Saldo ermitteln (fuer CHECK auf Saldo) ------------------*

PERFORM saldo_aktuell.

PERFORM kum_werte.

  • CHECK CHECKSALDO IN KKSALDO2.

sel-stamm = 'J'.

GET knc3.

CHECK knc3-gjahr = curry.

  • CHECK CHECKSALD1 IN BERABZU2.

  • CHECK CHECKSALD2 IN UNBABZU2.

  • CHECK CHECKSALD3 IN ZINSE2.

  • CHECK CHECKSALD4 IN JHRAUSG2.

  • CHECK CHECKSALDO IN KKSALDO2.

  • Errechnen Sonderumsatz-Salden, Gesamtsaldo ------------------------*

  • Trend, Umsatz pro Gesch.Bereich -----------------------------------*

PERFORM sonder_umsaetze.

  • CHECK: C-AGOBLI IN AGOBLIG0,

  • check: C-RGOBLI IN RGOBLIGO.

sel-stamm = 'J'.

GET bsid.

IF konzvers IS INITIAL.

CHECK checksald1 IN berabzu2.

CHECK checksald2 IN unbabzu2.

CHECK checksald3 IN zinse2.

CHECK checksald4 IN jhrausg2.

CHECK checksaldo IN kksaldo2.

CHECK checkagobl IN agoblig2.

ENDIF.

  • C-RGOBLI IN RGOBLIGO.

  • CHECK GESBER.

CHECK akontp.

CASE bsid-bstat.

WHEN ' '.

CHECK n_belege EQ 'X'.

WHEN 'S'.

CHECK stat_blg EQ 'X'.

WHEN OTHERS.

EXIT.

ENDCASE.

  • CHECK SEL-STAMM = 'J'.

  • Einzelposten werden nur dann weiterverarbeitet, wenn ueberhaupt ---*

  • ein OP-Raster gewuenscht wird. ------------------------------------*

CHECK rastverd < '2'.

  • Bei SORTART = '2' werden nur Belege verarbeitet, welche in Fremd- -*

  • waehrung gebucht sind ---------------------------------------------*

IF sortart = '2'.

CHECK bsid-waers NE t001-waers.

ENDIF.

*ET BKPF.

  • CHECK SEL-STAMM = 'J'.

CHECK bsid-budat LE dd_stida.

*ET BSEG.

  • CHECK SEL-STAMM = 'J'.

CLEAR faede.

MOVE-CORRESPONDING bsid TO faede.

faede-koart = 'D'.

CALL FUNCTION 'DETERMINE_DUE_DATE'

EXPORTING

i_faede = faede

IMPORTING

e_faede = faede

EXCEPTIONS

OTHERS = 1.

bsega-netdt = faede-netdt.

  • TAGE gemaess Rasterart ermitteln -----------------------------------*

  • Netto-Faelligkeit --------------------------------------------------*

  • NTAGE = BSEGA-NETDT - DD_STIDA.

ntage = faede-netdt - dd_stida.

  • Ueber-Faelligkeit --------------------------------------------------*

  • UTAGE = DD_STIDA - BSEGA-NETDT.

utage = dd_stida - faede-netdt.

  • IF NOT BSID-ZFBDT IS INITIAL.

  • Skonto1-Faelligkeit ------------------------------------------------*

  • STAGE = BSID-ZFBDT + BSID-ZBD1T - DD_STIDA.

  • Voraussichtlicher Zahlungseingang-----------------------------------*

  • ZTAGE = BSID-ZFBDT + BSID-ZBD1T - DD_STIDA + ZVVERZUG.

  • ELSE.

  • Skonto1-Faelligkeit ------------------------------------------------*

  • STAGE = BSID-BLDAT + BSID-ZBD1T - DD_STIDA.

  • Voraussichtlicher Zahlungseingang-----------------------------------*

  • ZTAGE = BSID-BLDAT + BSID-ZBD1T - DD_STIDA + ZVVERZUG.

  • ENDIF.

  • Skonto1-Faelligkeit ------------------------------------------------*

stage = faede-sk1dt - dd_stida.

  • Voraussichtlicher Zahlungseingang-----------------------------------*

ztage = faede-sk1dt - dd_stida + zvverzug.

  • Alter der Belege ---------------------------------------------------*

IF rbldat IS INITIAL.

atage = dd_stida - bsid-budat.

ELSE.

atage = dd_stida - bsid-bldat.

ENDIF.

IF NOT pzuor IS INITIAL

OR NOT konzvers IS INITIAL.

PERFORM einzelposten_save.

ELSE.

  • die Einzelposten werden nach den Tagen der ersten Rasterart --------*

  • sortiert -----------------------------------------------------------*

IF rart-net = 'X'.

tage = ntage.

ELSE.

IF rart-skt = 'X'.

tage = stage.

ELSE.

IF rart-zhl = 'X'.

tage = ztage.

ELSE.

IF rart-alt = 'X'.

tage = atage.

ELSE.

IF rart-ueb = 'X'.

tage = utage.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

CASE bsid-umsks.

*----


Anzahlungen sammeln -


*

*----


auch wenn nicht von aussen abgegrenzt -


*

WHEN 'A'.

CLEAR rtab.

IF bsid-bstat NE 'S'.

MOVE: bsid-bukrs TO rtab-bukrs,

'0' TO rtab-sortk,

bsid-gsber TO rtab-gsber,

rart TO rtab-raart.

IF sortart = '2'.

MOVE bsid-waers TO rtab-waers.

MOVE bsega-wrshb TO rtab-anzah.

ELSE.

IF NOT konzvers IS INITIAL.

MOVE t001-waers TO rtab-waers.

MOVE bsega-dmshb TO rtab-anzah.

ELSE.

MOVE bsega-dmshb TO rtab-anzah.

ENDIF.

ENDIF.

COLLECT rtab.

*----


Summieren ueber alle Geschaeftsbereiche -


*

MOVE: '1' TO rtab-sortk,

'**' TO rtab-gsber.

COLLECT rtab.

ENDIF.

ENDCASE.

CHECK: budat,

bldat,

netdt.

sel-postn = 'J'.

IF sortart = '1'.

IF konzvers IS INITIAL .

PERFORM posten_rastern USING space.

MOVE space TO gb-waers.

ELSE.

PERFORM posten_rastern USING t001-waers.

MOVE t001-waers TO gb-waers.

ENDIF.

ELSE.

PERFORM posten_rastern USING bsid-waers.

MOVE bsid-waers TO gb-waers.

ENDIF.

---- nur bei Verdichtungsstufe '0' werden EINZELPOSTEN extrahiert --

IF verdicht = '0'.

MOVE '3' TO satzart.

MOVE bsid-gsber TO gb-gsber.

MOVE bsega-dmshb TO shbetrag.

*------Der Fremdwährungsbetrag soll nur Übernommen werden, wenn sich

  • sich der Währung von der Hauswährung unterscheidet.

IF bsid-waers EQ t001-waers.

MOVE space TO bsega-wrshb.

ENDIF.

EXTRACT einzelposten.

ENDIF.

  • EXIT. " <== einmal verteilt, das reicht

  • ENDIF.

  • ENDLOOP.

ENDIF.

GET knb1 LATE.

IF konzvers IS INITIAL.

CHECK checksald1 IN berabzu2.

CHECK checksald2 IN unbabzu2.

CHECK checksald3 IN zinse2.

CHECK checksald4 IN jhrausg2.

CHECK checksaldo IN kksaldo2.

CHECK: checkagobl IN agoblig2.

  • CHECK SEL-STAMM = 'J'.

IF NOT pzuor IS INITIAL.

PERFORM einzelposten_link.

PERFORM einzelposten_proc.

ENDIF.

  • Bei SORTART = '2' werden nur dann Stammsatzdaten ausgegeben, wenn -*

  • auch Einzelposten gerastert wurden. -------------------------------*

IF rastverd < '3'.

IF sortart = '2'.

CHECK sel-postn = 'J'.

ENDIF.

IF NOT kausgabe IS INITIAL.

CHECK sel-postn = 'J'.

ENDIF.

ENDIF.

CLEAR: gb,

rasteruu,

tage.

MOVE '1' TO satzart.

  • Stammdaten extrahieren ---------------------------------------------*

  • Kreditueberschreitung ----------------------------------------------*

  • C-KREUEB = C-AGOBLI - KREDK-KLIMK.

  • Kreditlimit noch nicht überschritten?------------------------------*

  • IF C-KREUEB < 0.

  • C-KREUEB = 0.

  • ENDIF.

  • Gesamt-Obligo (relativ) --------------------------------------------*

  • IF KREDK-KLIMK > 0.

  • C-RGOBLI = ( C-AGOBLI * 100 ) / KREDK-KLIMK.

  • ELSE.

  • C-RGOBLI = 0.

  • ENDIF.

  • CHECK: C-AGOBLI IN AGOBLIG2.

  • C-RGOBLI IN RGOBLIGO.

  • CHECK: CHECKAGOBL IN AGOBLIG2.

CLEAR bsid.

EXTRACT stammdaten.

  • clear c.

  • OP-Raster extrahieren ----------------------------------------------*

SORT rtab ASCENDING.

LOOP AT rtab.

MOVE: '2' TO satzart,

rtab-gsber TO gb-gsber,

rtab-waers TO gb-waers,

rtab-raart TO rasteruu.

EXTRACT op-raster.

ENDLOOP.

ELSE.

hknb1 = knb1.

APPEND hknb1.

MOVE-CORRESPONDING c TO c2.

c2-bukrs = knb1-bukrs.

APPEND c2.

ENDIF.

*EJECT

GET kna1 LATE.

IF NOT konzvers IS INITIAL.

IF wflag2 IS INITIAL.

CHECK checksald1 IN berabzu2.

CHECK checksald2 IN unbabzu2.

CHECK checksald3 IN zinse2.

CHECK checksald4 IN jhrausg2.

CHECK checksaldo IN kksaldo2.

CHECK: checkagobl IN agoblig2.

ENDIF.

IF NOT pzuor IS INITIAL.

PERFORM einzelposten_link.

ENDIF.

CLEAR sel-post2.

LOOP AT hknb1.

knb1 = hknb1.

LOOP AT c2

WHERE bukrs = knb1-bukrs.

CLEAR c.

MOVE-CORRESPONDING c2 TO c.

EXIT.

ENDLOOP.

PERFORM summ_c3.

CLEAR sel-postn.

PERFORM einzelposten_proc.

  • Bei SORTART = '2' werden nur dann Stammsatzdaten ausgegeben, wenn -*

  • auch Einzelposten gerastert wurden. -------------------------------*

IF rastverd < '3'.

IF sortart = '2'.

CHECK sel-postn = 'J'.

ENDIF.

IF NOT kausgabe IS INITIAL.

CHECK sel-postn = 'J'.

ENDIF.

ENDIF.

sel-post2 = 'J'.

CLEAR: gb,

rasteruu,

tage.

MOVE '1' TO satzart.

  • Stammdaten extrahieren ---------------------------------------------*

  • Kreditueberschreitung ----------------------------------------------*

  • C-KREUEB = C-AGOBLI - KREDK-KLIMK.

  • Kreditlimit noch nicht überschritten?------------------------------*

  • IF C-KREUEB < 0.

  • C-KREUEB = 0.

  • ENDIF.

  • Gesamt-Obligo (relativ) --------------------------------------------*

  • IF KREDK-KLIMK > 0.

  • C-RGOBLI = ( C-AGOBLI * 100 ) / KREDK-KLIMK.

  • ELSE.

  • C-RGOBLI = 0.

  • ENDIF.

  • CHECK: C-AGOBLI IN AGOBLIG2.

  • C-RGOBLI IN RGOBLIGO.

  • CHECK: CHECKAGOBL IN AGOBLIG2.

CLEAR bsid.

EXTRACT stammdaten.

  • clear c.

  • OP-Raster extrahieren ----------------------------------------------*

SORT rtab ASCENDING.

LOOP AT rtab

WHERE bukrs = knb1-bukrs.

MOVE: '2' TO satzart,

rtab-gsber TO gb-gsber,

rtab-waers TO gb-waers,

rtab-raart TO rasteruu.

EXTRACT op-raster.

CLEAR rtab-bukrs.

COLLECT rtab.

ENDLOOP.

ENDLOOP.

CLEAR knb1.

  • Bei SORTART = '2' werden nur dann Stammsatzdaten ausgegeben, wenn -*

  • auch Einzelposten gerastert wurden. -------------------------------*

CLEAR c.

IF wflag2 IS INITIAL.

MOVE-CORRESPONDING c3 TO c.

ENDIF.

IF rastverd < '3'.

IF sortart = '2'.

CHECK sel-post2 = 'J'.

ENDIF.

IF NOT kausgabe IS INITIAL.

CHECK sel-post2 = 'J'.

ENDIF.

ENDIF.

CLEAR: gb,

rasteruu,

tage.

MOVE '1' TO satzart.

  • Stammdaten extrahieren ---------------------------------------------*

  • Kreditueberschreitung ----------------------------------------------*

  • C-KREUEB = C-AGOBLI - KREDK-KLIMK.

  • Kreditlimit noch nicht überschritten?------------------------------*

  • IF C-KREUEB < 0.

  • C-KREUEB = 0.

  • ENDIF.

  • Gesamt-Obligo (relativ) --------------------------------------------*

  • IF KREDK-KLIMK > 0.

  • C-RGOBLI = ( C-AGOBLI * 100 ) / KREDK-KLIMK.

  • ELSE.

  • C-RGOBLI = 0.

  • ENDIF.

  • CHECK: C-AGOBLI IN AGOBLIG2.

  • C-RGOBLI IN RGOBLIGO.

  • CHECK: CHECKAGOBL IN AGOBLIG2.

CLEAR bsid.

EXTRACT stammdaten.

  • clear c.

  • OP-Raster extrahieren ----------------------------------------------*

SORT rtab ASCENDING.

LOOP AT rtab

WHERE bukrs = knb1-bukrs.

MOVE: '2' TO satzart,

rtab-gsber TO gb-gsber,

rtab-waers TO gb-waers,

rtab-raart TO rasteruu.

EXTRACT op-raster.

ENDLOOP.

ENDIF.

CLEAR adrs.

END-OF-SELECTION.

*----


*

  • Aufbereitung *

*----


*

CLEAR rtab.

REFRESH rtab.

*SORT.

IF konzvers = space.

SORT BY knb1-bukrs

knb1-busab

kna1-kunnr

satzart

rtab-sortk

gb

rasteruu

tage

bsid-umskz

bsid-blart

bsid-belnr

bsid-buzei.

ELSE.

SORT BY kna1-kunnr

knb1-bukrs

knb1-busab

satzart

rtab-sortk

gb

rasteruu

tage

bsid-umskz

bsid-blart

bsid-belnr

bsid-buzei.

ENDIF.

LOOP.

AT FIRST.

IF konzvers = 'X'.

MOVE '0000' TO bhdgd-werte.

PERFORM new-section(rsbtchh0).

ELSE.

  • Listseparation wird bei jedem neuen BK durchgefuehrt

ENDIF.

ENDAT.

IF konzvers IS INITIAL.

AT NEW knb1-bukrs.

MOVE knb1-bukrs TO bhdgd-grpin(4). "<= Micro-Fiche Info

MOVE knb1-bukrs TO bhdgd-bukrs.

MOVE bhdgd-bukrs TO bhdgd-werte.

PERFORM new-section(rsbtchh0).

CLEAR rbuk.

REFRESH rbuk.

  • SELECT SINGLE * FROM T001 WHERE BUKRS EQ KNB1-BUKRS.

READ TABLE ht001 WITH KEY bukrs = knb1-bukrs.

t001 = ht001.

IF waers EQ space.

MOVE t001-waers TO waers.

ENDIF.

IF waers NE t001-waers.

wflag = '1'.

ENDIF.

*- Betraege in gemaess Skalierung aufbereiten -

-


*

CLEAR h-text.

IF faktor(1) GT '0'.

MOVE '1' TO h-text.

WHILE sy-index LT 10 AND sy-index LE faktor(1).

ASSIGN h-text+sy-index(1) TO .

EXIT.

ENDIF.

ENDDO.

IF sortart = '1'.

MOVE text-107 TO varueb4.

REPLACE '$SKAL' WITH h-text INTO varueb4.

ELSE.

IF rastverd < '2'.

MOVE text-165 TO varueb4.

ELSE.

MOVE text-107 TO varueb4.

REPLACE '$SKAL' WITH h-text INTO varueb4.

ENDIF.

ENDIF.

WRITE dd_stida TO h-stichtag DD/MM/YY.

REPLACE '$STIDA' WITH h-stichtag INTO varueb4.

ENDAT.

AT NEW knb1-busab.

MOVE knb1-busab TO bhdgd-grpin+4(2). "<= Micro-Fiche Info

CLEAR rbus.

REFRESH rbus.

SELECT SINGLE * FROM t001s WHERE bukrs EQ knb1-bukrs

AND busab EQ knb1-busab.

ENDAT.

AT NEW kna1-kunnr.

MOVE kna1-kunnr TO bhdgd-grpin+6(10). "<= Micro-Fiche Info

CLEAR gbzaehl.

*-- Nur bei Verdichtungsstufe < 2 erfolgt Seitenvorschub pro Konto ---*

IF verdicht < '2'.

IF acc_mode IS INITIAL.

NEW-PAGE.

ENDIF.

*---- Es bleibt Platz fuer ein Raster -


*

RESERVE 7 LINES.

ENDIF.

top-flag = '0'.

*-- Bei Verdichtungsstufe '2' und Ausgabe von OP-Rastern muss Platz --*

*-- fuer Stamminfo inclusive Ueberschrift bleiben, weil kein Seiten- -*

*-- vorschub bei neuem Konto erfolgt. -

-


*

IF verdicht = '2' AND rastverd < '2'.

RESERVE 10 LINES.

ENDIF.

*-- Bei Verdichtungsstufe '2' o h n e Ausgabe von OP-Rastern muss --*

*-- Platz fuer Stamminfo ohne Ueberschrift bleiben, weil kein Seiten- *

*-- vorschub bei neuem Konto erfolgt. -

-


*

*-- Die Ueberschrift wird einmal bei TOP-OF-PAGE ausgegeben. -

-


*

*-- TOP-FLAG = '4' -

-


*

IF verdicht = '2' AND rastverd = '2'.

RESERVE 7 LINES.

ENDIF.

ENDAT.

ELSE.

AT NEW kna1-kunnr.

  • CLEAR RBUA.

  • REFRESH RBUA.

MOVE kna1-kunnr TO bhdgd-grpin(10). "<= Micro-Fiche Info

IF sortart = '1'.

MOVE text-168 TO varueb4.

ELSE.

IF rastverd < '2'.

MOVE text-165 TO varueb4.

ELSE.

MOVE text-168 TO varueb4.

ENDIF.

ENDIF.

WRITE dd_stida TO h-stichtag DD/MM/YY.

REPLACE '$STIDA' WITH h-stichtag INTO varueb4.

ENDAT.

AT NEW knb1-bukrs.

CLEAR rbuk.

REFRESH rbuk.

CLEAR gbzaehl.

MOVE knb1-bukrs TO bhdgd-grpin+10(4). "<= Micro-Fiche Info

IF NOT knb1-bukrs IS INITIAL.

READ TABLE ht001 WITH KEY bukrs = knb1-bukrs.

t001 = ht001.

IF waers EQ space.

MOVE t001-waers TO waers.

ENDIF.

IF waers NE t001-waers.

wflag = '1'.

ENDIF.

ENDIF.

ENDAT.

AT NEW knb1-busab.

CLEAR rbus.

REFRESH rbus.

IF NOT knb1-bukrs IS INITIAL

AND NOT knb1-busab IS INITIAL.

MOVE knb1-busab TO bhdgd-grpin+14(2). "<= Micro-Fiche Info

SELECT SINGLE * FROM t001s WHERE bukrs EQ knb1-bukrs

AND busab EQ knb1-busab.

ENDIF.

ENDAT.

ENDIF.

AT NEW satzart.

CASE satzart.

WHEN '2'. "Raster

IF acc_mode IS INITIAL.

IF rtab-sortk < '2'.

IF rastverd < '2'.

IF verdicht < '3'.

IF NOT konzvers IS INITIAL

AND NOT knb1-bukrs IS INITIAL.

CHECK xbukrdat NE '2'.

ENDIF.

FORMAT COLOR COL_HEADING INTENSIFIED OFF.

*----


Wenn ein neues Raster beginnt, muessen mindestens noch -


*

*----


9 Zeilen Platz haben. -


*

top-flag = '3'.

RESERVE 9 LINES.

WRITE: /01 sy-vline,

02 varueb1-feld1,

42 sy-vline,

43 varueb1-feld2,

57 sy-vline,

58 varueb1-feld3,

72 sy-vline,

73 varueb1-feld4,

87 sy-vline,

88 varueb1-feld5,

102 sy-vline,

103 varueb1-feld6,

117 sy-vline,

118 varueb1-feld7,

132 sy-vline.

WRITE: /01 sy-vline,

02 varueb2-feld1,

42 sy-vline,

43 varueb2-feld2,

57 sy-vline,

58 varueb2-feld3,

72 sy-vline,

73 varueb2-feld4,

87 sy-vline,

88 varueb2-feld5,

102 sy-vline,

103 varueb2-feld6,

117 sy-vline,

118 varueb2-feld7,

132 sy-vline.

ENDIF.

ENDIF.

ELSE.

IF rastverd < '2'.

IF verdicht < '3'.

FORMAT COLOR COL_NORMAL INTENSIFIED.

WRITE: /01 sy-vline, 02 text-167, 132 sy-vline.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

WHEN '3'. "Einzelposten

FORMAT COLOR COL_HEADING INTENSIFIED OFF.

  • SUMMARY.

WRITE: /01 sy-vline, 02 text-108, 132 sy-vline.

    • / TEXT-109.

  • DETAIL.

WRITE: /01 sy-vline, 02 sy-uline(130), 132 sy-vline.

top-flag = '1'.

ENDCASE.

ENDAT.

AT stammdaten. "Satzart '1'

IF acc_mode IS INITIAL.

  • CHECK VERDICHT < '3'.

IF verdicht < '3'.

  • IF RASTVERD < '2'.

DETAIL.

IF NOT konzvers IS INITIAL

AND NOT knb1-bukrs IS INITIAL.

IF xbukrdat = '2'

AND verdicht > '0'.

CHECK 1 = 2.

ENDIF.

ENDIF.

IF NOT konzvers IS INITIAL

AND NOT knb1-bukrs IS INITIAL

AND xbukrdat = '2'.

ELSE.

FORMAT COLOR COL_HEADING INVERSE.

WRITE: 01 sy-vline, 02 varueb4(130), 132 sy-vline.

FORMAT COLOR COL_HEADING INVERSE OFF.

ENDIF.

  • FORMAT COLOR COL_GROUP INTENSIFIED.

FORMAT COLOR COL_HEADING INTENSIFIED.

IF konzvers IS INITIAL.

WRITE: /01 sy-vline,

text-110,

knb1-bukrs,

text-111,

knb1-busab,

text-112,

kna1-kunnr,

132 sy-vline.

ELSE.

IF knb1-bukrs IS INITIAL.

WRITE: /01 sy-vline,

text-112,

kna1-kunnr,

132 sy-vline.

ELSE.

WRITE: /01 sy-vline,

text-112,

kna1-kunnr,

text-110,

knb1-bukrs,

text-111,

knb1-busab,

132 sy-vline.

ENDIF.

ENDIF.

DETAIL.

IF NOT konzvers IS INITIAL

AND NOT knb1-bukrs IS INITIAL

AND xbukrdat = '2'.

ELSE.

WRITE: /01 sy-vline, 02 sy-uline(130), 132 sy-vline.

ENDIF.

  • ELSE.

  • IF RASTVERD > '1'.

*--- Wenn nur Stammsatzinformationen ausgegeben werden, reicht eine -

**--- ueberschrfit pro Seite. Dies geschieht bei TOP-OF-PAGE. -


*

top-flag = '4'.

  • ENDIF.

PERFORM anschrift.

intens = 'X'.

ENDIF.

ENDIF.

ENDAT.

AT op-raster. "Satzart '2'

IF verdicht < '3'.

IF acc_mode IS INITIAL.

NEW-LINE.

ENDIF.

PERFORM raster_ausgabe.

ENDIF.

*-- Summen fuer hoehere Gruppenstufen bilden -

-


*

IF acc_mode IS INITIAL.

PERFORM sum_busab_bukrs_total.

ENDIF.

ENDAT.

AT einzelposten. "Satzart '3'

RESERVE 2 LINES.

NEW-LINE.

PERFORM einzelposten_ausgabe.

ENDAT.

AT END OF rasteruu.

IF satzart = '3'.

FORMAT COLOR COL_TOTAL INTENSIFIED OFF.

WRITE: /01 sy-vline, 02 sy-uline(130), 132 sy-vline.

CASE rasteruu.

WHEN '1'.

MOVE text-052 TO vartxt1.

REPLACE '$BIS' WITH rc01 INTO vartxt1.

WRITE: /01 sy-vline,

40 vartxt1,

87 sum(shbetrag) CURRENCY t001-waers,

  • ROUND FAKTOR DECIMALS STELLEN,

  • '*' UNDER BSID-WAERS.

'*' UNDER bsid-waers.

WRITE: 132 sy-vline.

WHEN '2'.

IF NOT rc02 IS INITIAL.

MOVE text-053 TO vartxt1.

REPLACE '$VON' WITH rc06 INTO vartxt1.

REPLACE '$BIS' WITH rc02 INTO vartxt1.

WRITE: /01 sy-vline,

40 vartxt1,

87 sum(shbetrag) CURRENCY t001-waers,

  • ROUND FAKTOR DECIMALS STELLEN,

  • '*' UNDER BSID-WAERS.

'*' UNDER bsid-waers.

WRITE: 132 sy-vline.

ELSE.

MOVE text-054 TO vartxt1.

REPLACE '$VON' WITH rc06 INTO vartxt1.

WRITE: /01 sy-vline,

40 vartxt1,

87 sum(shbetrag) CURRENCY t001-waers,

  • ROUND FAKTOR DECIMALS STELLEN,

  • '*' UNDER BSID-WAERS.

'*' UNDER bsid-waers.

WRITE: 132 sy-vline.

ENDIF.

WHEN '3'.

IF NOT rc03 IS INITIAL.

MOVE text-053 TO vartxt1.

REPLACE '$VON' WITH rc07 INTO vartxt1.

REPLACE '$BIS' WITH rc03 INTO vartxt1.

WRITE: /01 sy-vline,

40 vartxt1,

87 sum(shbetrag) CURRENCY t001-waers,

  • ROUND FAKTOR DECIMALS STELLEN,

'*' UNDER bsid-waers.

WRITE: 132 sy-vline.

ELSE.

MOVE text-054 TO vartxt1.

REPLACE '$VON' WITH rc07 INTO vartxt1.

WRITE: /01 sy-vline,

40 vartxt1,

87 sum(shbetrag) CURRENCY t001-waers,

  • ROUND FAKTOR DECIMALS STELLEN,

  • '*' UNDER BSID-WAERS.

'*' UNDER bsid-waers.

WRITE: 132 sy-vline.

ENDIF.

WHEN '4'.

IF NOT rc04 IS INITIAL.

MOVE text-053 TO vartxt1.

REPLACE '$VON' WITH rc08 INTO vartxt1.

REPLACE '$BIS' WITH rc04 INTO vartxt1.

WRITE: /01 sy-vline,

40 vartxt1,

87 sum(shbetrag) CURRENCY t001-waers,

  • ROUND FAKTOR DECIMALS STELLEN,

'*' UNDER bsid-waers.

WRITE: 132 sy-vline.

ELSE.

MOVE text-054 TO vartxt1.

REPLACE '$VON' WITH rc08 INTO vartxt1.

WRITE: /01 sy-vline,

40 vartxt1,

87 sum(shbetrag) CURRENCY t001-waers,

  • ROUND FAKTOR DECIMALS STELLEN,

  • '*' UNDER BSID-WAERS.

'*' UNDER bsid-waers.

WRITE: 132 sy-vline.

ENDIF.

WHEN '5'.

IF NOT rc05 IS INITIAL.

MOVE text-053 TO vartxt1.

REPLACE '$VON' WITH rc09 INTO vartxt1.

REPLACE '$BIS' WITH rc05 INTO vartxt1.

WRITE: /01 sy-vline,

40 vartxt1,

87 sum(shbetrag) CURRENCY t001-waers,

  • ROUND FAKTOR DECIMALS STELLEN,

'*' UNDER bsid-waers.

WRITE: 132 sy-vline.

ELSE.

MOVE text-054 TO vartxt1.

REPLACE '$VON' WITH rc09 INTO vartxt1.

WRITE: /01 sy-vline,

40 vartxt1,

87 sum(shbetrag) CURRENCY t001-waers,

  • ROUND FAKTOR DECIMALS STELLEN,

  • '*' UNDER BSID-WAERS.

'*' UNDER bsid-waers.

WRITE: 132 sy-vline.

ENDIF.

WHEN '6'.

MOVE text-054 TO vartxt1.

REPLACE '$VON' WITH rc10 INTO vartxt1.

WRITE: /01 sy-vline,

40 vartxt1,

87 sum(shbetrag) CURRENCY t001-waers,

  • ROUND FAKTOR DECIMALS STELLEN,

'*' UNDER bsid-waers.

WRITE: 132 sy-vline.

WHEN OTHERS.

WRITE: /01 sy-vline,

87 sum(shbetrag) CURRENCY t001-waers,

  • ROUND FAKTOR DECIMALS STELLEN,

'*' UNDER bsid-waers.

WRITE: 132 sy-vline.

ENDCASE.

WRITE: /01 sy-vline, 02 sy-uline(130), 132 sy-vline.

ENDIF.

ENDAT.

AT END OF satzart.

IF satzart = '2'.

IF rastverd < '2'.

IF verdicht < '3'.

IF acc_mode IS INITIAL.

ULINE.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDAT.

IF acc_mode IS INITIAL.

IF konzvers IS INITIAL.

AT END OF knb1-busab.

MOVE space TO bhdgd-grpin+6. "<= Micro-Fiche Info

IF verdicht < '4'.

NEW-PAGE.

MOVE text-051 TO varueb3.

REPLACE '$BUK' WITH knb1-bukrs INTO varueb3.

REPLACE '$SAB' WITH knb1-busab INTO varueb3.

REPLACE '$SBZ' WITH t001s-sname INTO varueb3.

top-flag = '2'.

PERFORM raster_ausgabe_busab.

ENDIF.

CLEAR t001s.

ENDAT.

AT END OF knb1-bukrs.

MOVE space TO bhdgd-grpin+4. "<= Micro-Fiche Info

IF verdicht < '5'.

NEW-PAGE.

MOVE text-050 TO varueb3.

REPLACE '$BUK' WITH knb1-bukrs INTO varueb3.

top-flag = '2'.

PERFORM raster_ausgabe_bukrb.

ENDIF.

ENDAT.

ELSE.

AT END OF knb1-busab.

  • MOVE SPACE TO BHDGD-GRPIN+6. "<= Micro-Fiche Info

CLEAR t001s.

ENDAT.

AT END OF knb1-bukrs.

MOVE space TO bhdgd-grpin+14. "<= Micro-Fiche Info

ENDAT.

AT END OF kna1-kunnr.

MOVE space TO bhdgd-grpin+10. "<= Micro-Fiche Info

ENDAT.

ENDIF.

ENDIF.

AT LAST.

MOVE space TO bhdgd-grpin. "<= Micro-Fiche Info

MOVE ' ' TO bhdgd-bukrs.

MOVE bhdgd-bukrs TO bhdgd-werte.

PERFORM new-section(rsbtchh0).

MOVE text-055 TO varueb3.

top-flag = '2'.

IF sortart = '1'.

MOVE text-109 TO varueb4.

ELSE.

MOVE text-165 TO varueb4.

ENDIF.

  • WRITE DD_STIDA TO H-STICHTAG DD/MM/YY.

REPLACE '$STIDA' WITH h-stichtag INTO varueb4.

IF acc_mode IS INITIAL.

PERFORM raster_ausgabe_total.

ELSE.

PERFORM raster_ausgabe_alv_grid.

ENDIF.

ENDAT.

ENDLOOP.

IF sy-pagno = 0. "Keine Liste ausgegeben

CALL FUNCTION 'POPUP_NO_LIST'.

ENDIF.

TOP-OF-PAGE.

IF acc_mode IS INITIAL.

*- Standard-Seitenkopf drucken -

-


*

PERFORM batch-heading(rsbtchh0).

*-- ab der zweiten Seite pro Konto Ueberschrift fuer Einzelposten ---*

DETAIL.

CASE top-flag.

WHEN '1'.

WRITE: / sy-vline, 2 sy-uline(130), 132 sy-vline.

  • SUMMARY.

FORMAT COLOR COL_HEADING INTENSIFIED OFF.

WRITE: / sy-vline, 2 text-108, 132 sy-vline.

  • TEXT-109.

WRITE: / sy-vline, 2 sy-uline(130), 132 sy-vline.

  • DETAIL.

*-- Ueberschriften fuer Listenteil 2 ausgeben -

-


*

WHEN '2'.

  • SUMMARY.

FORMAT COLOR COL_HEADING INVERSE.

WRITE: /01 sy-vline, 02 varueb4(130), 132 sy-vline..

FORMAT COLOR COL_HEADING INVERSE OFF.

  • FORMAT COLOR COL_GROUP INTENSIFIED.

FORMAT COLOR COL_HEADING INTENSIFIED.

WRITE: /01 sy-vline, 02 varueb3(130), 132 sy-vline.

ULINE.

FORMAT COLOR COL_HEADING INTENSIFIED OFF.

  • WRITE: VARUEB1,

  • VARUEB2.

WRITE: /01 sy-vline,

02 varueb1-feld1,

42 sy-vline,

43 varueb1-feld2,

57 sy-vline,

58 varueb1-feld3,

72 sy-vline,

73 varueb1-feld4,

87 sy-vline,

88 varueb1-feld5,

102 sy-vline,

103 varueb1-feld6,

117 sy-vline,

118 varueb1-feld7,

132 sy-vline.

WRITE: /01 sy-vline,

02 varueb2-feld1,

42 sy-vline,

43 varueb2-feld2,

57 sy-vline,

58 varueb2-feld3,

72 sy-vline,

73 varueb2-feld4,

87 sy-vline,

88 varueb2-feld5,

102 sy-vline,

103 varueb2-feld6,

117 sy-vline,

118 varueb2-feld7,

132 sy-vline.

  • ULINE.

WRITE: /01 sy-vline, 02 sy-uline(130), 132 sy-vline.

  • DETAIL.

WHEN '3'.

  • SUMMARY.

ULINE.

  • DETAIL.

*-- Ueberschrift fuer Stammsatzinformationen -

-


*

WHEN '4'.

    • SUMMARY.

  • FORMAT COLOR COL_HEADING INVERSE.

  • WRITE: VARUEB4.

  • FORMAT COLOR COL_HEADING INVERSE OFF.

  • FORMAT COLOR COL_HEADING INTENSIFIED.

  • WRITE: TEXT-100,

  • TEXT-101.

  • ULiNE.

  • DETAIL.

DETAIL.

FORMAT COLOR COL_HEADING INVERSE.

WRITE: 01 sy-vline, 02 varueb4(130), 132 sy-vline.

FORMAT COLOR COL_HEADING INVERSE OFF.

  • FORMAT COLOR COL_GROUP INTENSIFIED.

FORMAT COLOR COL_HEADING INTENSIFIED.

WRITE: /01 sy-vline,

text-110,

knb1-bukrs,

text-111,

knb1-busab,

text-112,

kna1-kunnr,

132 sy-vline.

DETAIL.

WRITE: /01 sy-vline, 02 sy-uline(130), 132 sy-vline.

ENDCASE.

ENDIF.

*eject

*----


*

  • U N T E R R O U T I N E N *

*----


*

*------- Faktor fuer Dezimalen bestimmen -


*

FORM cfaktor.

IF t001-waers NE tcurx-currkey.

SELECT SINGLE * FROM tcurx WHERE currkey = t001-waers.

IF sy-subrc NE 0.

tcurx-currkey = t001-waers.

cfakt = 100.

ELSE.

cfakt = 1.

DO tcurx-currdec TIMES.

cfakt = cfakt * 10.

ENDDO.

ENDIF.

ENDIF.

ENDFORM. "CFAKTOR

  • OP-Raster und Ueberschriften aufbereiten --------------------------*

FORM raster_aufbau.

  • Erste ausgewaehlte Rasterarte sichern ------------------------------*

IF rart-net = 'X'.

rart = '1'.

ELSE.

IF rart-skt = 'X'.

rart = '2'.

ELSE.

IF rart-zhl = 'X'.

rart = '3'.

ELSE.

IF rart-alt = 'X'.

rart = '4'.

ELSE.

IF rart-ueb = 'X'.

rart = '5'.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

  • Obergrenze Intervall -----------------------------------------------*

rp01 = rastbis1.

rp02 = rastbis2.

rp03 = rastbis3.

rp04 = rastbis4.

rp05 = rastbis5.

  • Untergrenze Intervall -----------------------------------------------*

rp06 = rp01 + 1.

IF NOT rp02 IS INITIAL.

rp07 = rp02 + 1.

ENDIF.

IF NOT rp03 IS INITIAL.

rp08 = rp03 + 1.

ENDIF.

IF NOT rp04 IS INITIAL.

rp09 = rp04 + 1.

ENDIF.

IF NOT rp05 IS INITIAL.

rp10 = rp05 + 1.

ENDIF.

  • Rasterpunkte in Charakterform für REPLACE.

WRITE: rp01 TO rc01.

IF NOT rp02 IS INITIAL.

WRITE: rp02 TO rc02.

MOVE text-202 TO varueb2-feld3.

ENDIF.

IF NOT rp03 IS INITIAL.

WRITE: rp03 TO rc03.

MOVE text-203 TO varueb2-feld4.

ENDIF.

IF NOT rp04 IS INITIAL.

WRITE: rp04 TO rc04.

MOVE text-204 TO varueb2-feld5.

ENDIF.

IF NOT rp05 IS INITIAL.

WRITE: rp05 TO rc05.

MOVE text-205 TO varueb2-feld6.

ENDIF.

IF NOT rp06 IS INITIAL.

WRITE: rp06 TO rc06.

MOVE text-206 TO varueb1-feld3.

ENDIF.

IF NOT rp07 IS INITIAL.

WRITE: rp07 TO rc07.

MOVE text-207 TO varueb1-feld4.

ENDIF.

IF NOT rp08 IS INITIAL.

WRITE: rp08 TO rc08.

MOVE text-208 TO varueb1-feld5.

ENDIF.

IF NOT rp09 IS INITIAL.

WRITE: rp09 TO rc09.

MOVE text-209 TO varueb1-feld6.

ENDIF.

IF NOT rp10 IS INITIAL.

WRITE: rp10 TO rc10.

MOVE text-210 TO varueb1-feld7.

ENDIF.

  • Variable ersetzen --------------------------------------------------*

  • IF SORTART = '1'.

  • MOVE TEXT-103 TO VARUEB2.

  • ELSE.

MOVE text-102 TO varueb1-feld1.

MOVE text-106 TO varueb2-feld1.

MOVE text-201 TO varueb2-feld2.

  • ENDIF.

REPLACE 'RP01' WITH rc01 INTO varueb2. "bis 0

REPLACE 'RP02' WITH rc02 INTO varueb2. "bis 20

REPLACE 'RP03' WITH rc03 INTO varueb2. "bis 40

REPLACE 'RP04' WITH rc04 INTO varueb2. "bis 80

REPLACE 'RP05' WITH rc05 INTO varueb2. "bis 100

REPLACE 'RP06' WITH rc06 INTO varueb1. "von 1

REPLACE 'RP07' WITH rc07 INTO varueb1. "von 21

REPLACE 'RP08' WITH rc08 INTO varueb1. "von 41

REPLACE 'RP09' WITH rc09 INTO varueb1. "von 81

REPLACE 'RP10' WITH rc10 INTO varueb1. "von 101

ENDFORM. "RASTER_AUFBAU

*----


*

  • FORM SALDO_AKTUELL *

*----


*

  • ........ *

*----


*

FORM saldo_aktuell.

ADD knc1-um01s THEN knc1-um02s UNTIL knc1-um16s GIVING h-soll

ACCORDING TO bmonat.

ADD knc1-um01h THEN knc1-um02h UNTIL knc1-um16h GIVING h-haben

ACCORDING TO bmonat.

h-saldo = h-soll - h-haben + knc1-umsav.

  • PERFORM CFAKTOR.

c-agobli = h-saldo.

IF cfakt NE 0.

checksaldo = checksaldo + h-saldo / cfakt.

checkagobl = checkagobl + c-agobli / cfakt.

ELSE.

checksaldo = checksaldo + h-saldo.

checkagobl = checkagobl + c-agobli.

ENDIF.

c-saldo = h-saldo.

ENDFORM. "SALDO_AKTUELL

*----


*

  • FORM KUM_WERTE *

*----


*

  • ........ *

*----


*

FORM kum_werte.

  • Berechtigte Abzuege ------------------------------------------------*

c-babzg = knc1-babzg.

  • Unberechtigte Abzuege ----------------------------------------------*

c-uabzg = knc1-uabzg.

  • Zinszahlung --------------------------------------------------------*

c-kzins = knc1-kzins.

  • Jahresumsatz -------------------------------------------------------*

  • C-KUMUM = KNC1-KUMUM. ECKERT: FELD KUMUM NICHT MEHR VORHANDEN

ADD knc1-um01u THEN knc1-um02u UNTIL knc1-um16u GIVING c-kumum

ACCORDING TO bmonat.

  • Kum. Jahresausgleich -----------------------------------------------*

c-kumag = knc1-kumag.

IF sortart = '1' . "Ausgabe kum Kum.Umsatz wenn Hauswährung gewünscht.

  • Kum. Umsatz---------------------------------------------------------*

CLEAR rtab.

MOVE: knc1-bukrs TO rtab-bukrs.

  • SORTK = 1.

  • Satz für Ausgabe des kummulieten Umsatzes auf Summenebene.

  • (Summe pro Sachbearbeiter und Buchungskreis)

MOVE: '2' TO rtab-sortk,

'** ' TO rtab-gsber,

  • RART TO RTAB-RAART,

c-kumum TO rtab-kumum.

COLLECT rtab.

  • CLEAR RTAB-BUKRS.

  • COLLECT RTAB.

ENDIF.

ENDFORM. "KUM_WERTE

*----


*

  • FORM SONDER_UMSAETZE *

*----


*

  • ........ *

*----


*

FORM sonder_umsaetze.

  • CLEAR: C.

  • Errechnen Sonderumsatz-Salden, Gesamtsaldo ------------------------*

*----


Trend, Umsatz pro Gesch.Bereich -


*

h-shbls = knc3-solll - knc3-habnl.

*-- Gesamt-Obligo -

-


*

c-agobli = knc3-saldv + h-shbls.

PERFORM cfaktor.

IF cfakt NE 0.

checkagobl = checkagobl + c-agobli / cfakt.

ELSE.

checkagobl = checkagobl + c-agobli.

ENDIF.

*-- Sonderumsatz-Salden -

-


*

CASE knc3-shbkz.

*----


Wechsel-Forderung -


*

  • WHEN 'W'. C-WEXOB = C-WEXOB + KNC3-SALDV + H-SHBLS.

*----


Scheckwechsel-Forderung -


*

  • WHEN 'S'. C-WEXOB = C-WEXOB + KNC3-SALDV + H-SHBLS.

*----


Wechsel-Forderung NB -


*

  • WHEN 'B'. C-WEXOB = C-WEXOB + KNC3-SALDV + H-SHBLS.

*----


Anzahlungs-Obligo -


*

  • WHEN 'A'. C-ANZOB = C-ANZOB + KNC3-SALDV + H-SHBLS.

*----


Zahlungs-Anforderung -


*

  • WHEN 'F'. C-ZANFB = C-ZANFB + KNC3-SALDV + H-SHBLS.

*----


Sonstige Sonderumsaetze -


*

*----


Einzel-Wertberichtigung -


*

  • WHEN 'E'. C-SONOB = C-SONOB + KNC3-SALDV + H-SHBLS.

*----


Buergschaften -


*

  • WHEN 'G'. C-SONOB = C-SONOB + KNC3-SALDV + H-SHBLS.

*----


Zins-Forderung -


*

  • WHEN 'Z'. C-SONOB = C-SONOB + KNC3-SALDV + H-SHBLS.

WHEN humkz1.

c-umkz1 = knc3-shbkz.

c-sums1 = c-sums1 + knc3-saldv + h-shbls.

WHEN humkz2.

c-umkz2 = knc3-shbkz.

c-sums2 = c-sums2 + knc3-saldv + h-shbls.

WHEN humkz3.

c-umkz3 = knc3-shbkz.

c-sums3 = c-sums3 + knc3-saldv + h-shbls.

WHEN humkz4.

c-umkz4 = knc3-shbkz.

c-sums4 = c-sums4 + knc3-saldv + h-shbls.

WHEN humkz5.

c-umkz5 = knc3-shbkz.

c-sums5 = c-sums5 + knc3-saldv + h-shbls.

WHEN humkz6.

c-umkz6 = knc3-shbkz.

c-sums6 = c-sums6 + knc3-saldv + h-shbls.

WHEN humkz7.

c-umkz7 = knc3-shbkz.

c-sums7 = c-sums7 + knc3-saldv + h-shbls.

WHEN humkz8.

c-umkz8 = knc3-shbkz.

c-sums8 = c-sums8 + knc3-saldv + h-shbls.

WHEN humkz9.

c-umkz9 = knc3-shbkz.

c-sums9 = c-sums9 + knc3-saldv + h-shbls.

WHEN humkz10.

c-umkz10 = knc3-shbkz.

c-sums10 = c-sums10 + knc3-saldv + h-shbls.

WHEN OTHERS.

c-sonob = c-sonob + knc3-saldv + h-shbls.

ENDCASE.

  • Der Umsatz pro GESBER wird nur dann in das OP-Raster gestellt, ---*

  • wenn ein OP-Raster gewuenscht wird. -------------------------------*

  • IF RASTVERD < '2'. .....ECKERT / FELDER NICHT MEHR VORHANDEN ??

  • WHILE H-GBNUM NE SPACE AND SY-INDEX <= 16

  • VARY H-GBNUM FROM KNC1-GBN01 NEXT KNC1-GBN02

  • VARY H-GBUMS FROM KNC1-GBU01 NEXT KNC1-GBU02.

*---- Umsatz vorhanden ?????? -


*

  • CHECK H-GBUMS NE 0.

*

  • IF SORTART = '1'.

  • CLEAR RTAB.

  • MOVE: KNC1-BUKRC TO RTAB-BUKRS,

  • '0' TO RTAB-SORTK,

  • H-GBNUM TO RTAB-GSBER,

  • RART TO RTAB-RAART,

  • H-GBUMS TO RTAB-KUMUM.

  • COLLECT RTAB.

*------ Summieren ueber alle Geschaeftsbereiche -


*

  • MOVE: '1' TO RTAB-SORTK,

  • '**' TO RTAB-GSBER.

  • COLLECT RTAB.

  • ENDIF.

  • ENDWHILE.

  • ENDIF.

ENDFORM. "SONDER_UMSAETZE

*----


*

  • FORM POSTEN_RASTERN *

*----


*

  • ........ *

*----


*

  • --> POSTEN_WAERS *

*----


*

FORM posten_rastern USING posten_waers.

IF rart-net = 'X'.

IF sortart = '1'.

PERFORM r USING ntage '1' bsega-dmshb posten_waers.

ELSE.

PERFORM r USING ntage '1' bsega-wrshb posten_waers.

ENDIF.

ENDIF.

IF rart-skt = 'X'.

IF sortart = '1'.

PERFORM r USING stage '2' bsega-dmshb posten_waers.

ELSE.

PERFORM r USING stage '2' bsega-wrshb posten_waers.

ENDIF.

ENDIF.

IF rart-zhl = 'X'.

IF sortart = '1'.

PERFORM r USING ztage '3' bsega-dmshb posten_waers.

ELSE.

PERFORM r USING ztage '3' bsega-wrshb posten_waers.

ENDIF.

ENDIF.

IF rart-alt = 'X'.

IF sortart = '1'.

PERFORM r USING atage '4' bsega-dmshb posten_waers.

ELSE.

PERFORM r USING atage '4' bsega-wrshb posten_waers.

ENDIF.

ENDIF.

IF rart-ueb = 'X'.

IF sortart = '1'.

PERFORM r USING utage '5' bsega-dmshb posten_waers.

ELSE.

PERFORM r USING utage '5' bsega-wrshb posten_waers.

ENDIF.

ENDIF.

ENDFORM. "POSTEN_RASTERN

*----


*

  • FORM R *

*----


*

  • ........ *

*----


*

  • --> R_TAGE *

  • --> R_ART *

  • --> R_BETRAG *

  • --> R_WAERS *

*----


*

FORM r USING r_tage r_art r_betrag r_waers.

CLEAR rtab.

MOVE: bsid-bukrs TO rtab-bukrs,

'0' TO rtab-sortk,

bsid-gsber TO rtab-gsber,

r_waers TO rtab-waers,

r_art TO rtab-raart,

r_betrag TO rtab-opsum.

IF r_tage <= rp01.

MOVE: r_betrag TO rtab-rast1.

IF r_art = rart.

MOVE '1' TO rasteruu.

ENDIF.

ELSE.

IF r_tage <= rp02

OR rp07 IS INITIAL.

MOVE: r_betrag TO rtab-rast2.

IF r_art = rart.

MOVE '2' TO rasteruu.

ENDIF.

ELSE.

IF r_tage <= rp03

OR rp08 IS INITIAL.

MOVE: r_betrag TO rtab-rast3.

IF r_art = rart.

MOVE '3' TO rasteruu.

ENDIF.

ELSE.

IF r_tage <= rp04

OR rp09 IS INITIAL.

MOVE: r_betrag TO rtab-rast4.

IF r_art = rart.

MOVE '4' TO rasteruu.

ENDIF.

ELSE.

IF r_tage <= rp05

OR rp10 IS INITIAL.

MOVE: r_betrag TO rtab-rast5.

IF r_art = rart.

MOVE '5' TO rasteruu.

ENDIF.

ELSE.

MOVE: r_betrag TO rtab-rast6.

IF r_art = rart.

MOVE '6' TO rasteruu.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

COLLECT rtab.

  • Summieren ueber alle Geschaeftsbereiche ---------------------------*

  • aber nur wenn SORTART = '1' ----------------------------------------*

  • IF SORTART = '1'.

MOVE: '1' TO rtab-sortk,

'**' TO rtab-gsber.

COLLECT rtab.

  • ENDIF.

ENDFORM. "R

*----


*

  • FORM ANSCHRIFT *

*----


*

  • ........ *

*----


*

FORM anschrift.

IF NOT knb1-bukrs IS INITIAL.

PERFORM mahndaten.

IF NOT konzvers IS INITIAL.

CHECK xbukrdat = 0.

ENDIF.

ENDIF.

PERFORM obligos.

IF konzvers IS INITIAL.

  • Ausgabe der Debitoreninformationen pro Buchungskreis

  • <<<<<<<<<<<< Block 1>>>>>>>>>>>>>>>

*----

-


Zeile 1 -

-


FORMAT COLOR COL_HEADING INTENSIFIED OFF.

WRITE: /01 sy-vline. "Anschrift

WRITE: 02 text-113 INTENSIFIED, "Anschrift

39 sy-vline,

40 text-116 INTENSIFIED, "Obligo

132 sy-vline.

WRITE: /01 sy-vline, 02 sy-uline(37), 39 sy-vline,

40 sy-uline(108), 132 sy-vline.

  • 90 TEXT-115 INTENSIFIED. "Umsatzdaten

  • 99 TEXT-127 INTENSIFIED. "Zahlungsdaten

*----

-


ZEILE 2 -

-


FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.

DETAIL.

CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '1'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line0 IS INITIAL

OR NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line0(35),

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."1. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

*WRITE: TEXT-122 UNDER TEXT-115, "Jahresumsatz

*110 C-KUMUM CURRENCY T001-WAERS NO-ZERO

  • ROUND FAKTOR DECIMALS STELLEN.

*WRITE: TEXT-157 UNDER TEXT-127, "Zahlungsbedingung

  • KNB1-ZTERM.

ENDIF.

*----

-


Zeile 3 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '2'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line1 IS INITIAL

OR NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line1(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."2. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

*WRITE: TEXT-123 UNDER TEXT-122, "Berechtigte Abzüge

*110 C-BABZG CURRENCY T001-WAERS NO-ZERO

  • ROUND FAKTOR DECIMALS STELLEN.

*WRITE: TEXT-158 UNDER TEXT-157. "Zahlungstyp.

*CASE ZVTYP.

*WHEN 'S'.

  • WRITE TEXT-155. "Skontozahler

*WHEN 'N'.

  • WRITE TEXT-156. "Nettozahler

*WHEN OTHERS.

*ENDCASE.

ENDIF.

*----

-


Zeile 4 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '3'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line2 IS INITIAL

OR NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line2(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."3. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

*WRITE: TEXT-124 UNDER TEXT-123, "Unberecht. Abzüge

*110 C-UABZG CURRENCY T001-WAERS NO-ZERO

  • ROUND FAKTOR DECIMALS STELLEN.

*WRITE: TEXT-159 UNDER TEXT-158, "Verzugsstage

*120(5) ZVVERZUG NO-ZERO.

ENDIF.

*----

-


Zeile 5 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '4'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line3 IS INITIAL

OR NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line3(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."4. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

*WRITE: TEXT-125 UNDER TEXT-124, "Zinsen

*110 C-KZINS CURRENCY T001-WAERS NO-ZERO

  • ROUND FAKTOR DECIMALS STELLEN.

*WRITE: TEXT-160 UNDER TEXT-159, "letzte Zahlperiode

*120(4) ZVPER NO-ZERO.

ENDIF.

*----

-


Zeile 6 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '5'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line4 IS INITIAL

OR NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line4(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."5. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

*SUMMARY.

*WRITE: TEXT-127 UNDER TEXT-124. "Zahlungsdaten

*DETAIL.

ENDIF.

*----

-


Zeile 7 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '6'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line5 IS INITIAL

OR NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line5(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."6. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

*WRITE: TEXT-157 UNDER TEXT-127, "Zahlungsbedingung

*110 KNB1-ZTERM.

ENDIF.

*----

-


Zeile 8 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '7'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line6 IS INITIAL

OR NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line6(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."7. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

*WRITE: TEXT-162 UNDER TEXT-127, "Zahlungsverrechnung

*110 KNB1-XVERR.

ENDIF.

*----

-


Zeile 9 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '8'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line7 IS INITIAL

OR NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line7(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."8. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

*WRITE: TEXT-158 UNDER TEXT-157. "Zahlungstyp.

*CASE ZVTYP.

  • WHEN 'S'.

  • WRITE 110 TEXT-155. "Skontozahler

  • WHEN 'N'.

  • WRITE 110 TEXT-156. "Nettozahler

  • WHEN OTHERS.

*ENDCASE.

ENDIF.

*----

-


Zeile 10 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '9'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line8 IS INITIAL

OR NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line8(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."9. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

*WRITE: TEXT-159 UNDER TEXT-158, "Verzugsstage

*110 ZVVERZUG NO-ZERO.

ENDIF.

*----

-


Zeile 11 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '10'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line9 IS INITIAL

OR NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line9(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."10. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

*WRITE: TEXT-160 UNDER TEXT-159, "letzte Zahlperiode

*110 ZVPER NO-ZERO.

ENDIF.

*----

-


Zeile 12 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '11'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

WRITE:

/01 sy-vline,

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."11. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 13 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '12'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

WRITE:

/01 sy-vline,

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."12. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

ENDIF.

*

  • Block 2

*

*SKIP.

WRITE: /01 sy-vline, 02 sy-uline(37), 39 sy-vline,

40 sy-uline(108), 132 sy-vline.

*----

-


Zeile 1 -

-


"Überschriften

SUMMARY.

FORMAT COLOR COL_HEADING INTENSIFIED OFF.

WRITE: /01 sy-vline,

02 text-115 INTENSIFIED, "Umsatzdaten

39 sy-vline,

40 text-127 INTENSIFIED, "Zahlungsdaten

132 sy-vline.

*DETAIL.

FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.

WRITE: /01 sy-vline, 02 sy-uline(37), 39 sy-vline,

40 sy-uline(108), 132 sy-vline.

*----

-


Zeile 2 -

-


WRITE: /01 sy-vline,

text-122 UNDER text-115 COLOR COL_HEADING INVERSE,

22 c-kumum CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

39 sy-vline.

WRITE: text-157 UNDER text-127 COLOR COL_HEADING INVERSE,

60 knb1-zterm,

132 sy-vline.

*----

-


Zeile 3 -

-


WRITE: /01 sy-vline,

text-123 UNDER text-122 COLOR COL_HEADING INVERSE,

22 c-babzg CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

39 sy-vline.

WRITE: text-162 UNDER text-157 COLOR COL_HEADING INVERSE,

60 knb1-xverr,

132 sy-vline.

*----

-


Zeile 4 -

-


WRITE: /01 sy-vline,

text-124 UNDER text-123 COLOR COL_HEADING INVERSE,

22 c-uabzg CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

39 sy-vline.

WRITE: text-158 UNDER text-162 COLOR COL_HEADING INVERSE.

CASE c-zvtyp.

WHEN 'S'.

WRITE 60 text-155. "Skontozahler

WHEN 'N'.

WRITE 60 text-156. "Nettozahler

WHEN OTHERS.

ENDCASE.

WRITE: 132 sy-vline.

*----

-


Zeile 5 -

-


WRITE: /01 sy-vline,

text-125 UNDER text-124 COLOR COL_HEADING INVERSE,

22 c-kzins CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

39 sy-vline.

WRITE: text-159 UNDER text-158 COLOR COL_HEADING INVERSE,

60 c-zvverzug NO-ZERO.

WRITE: 132 sy-vline.

*----

-


Zeile 6 -

-


WRITE: /01 sy-vline,

text-126 UNDER text-125 COLOR COL_HEADING INVERSE,

22 c-kumag CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

39 sy-vline.

WRITE: text-160 UNDER text-159 COLOR COL_HEADING INVERSE,

60 c-zvper NO-ZERO.

WRITE: 132 sy-vline.

*

  • Block 3

*

*SKIP.

WRITE: /01 sy-vline, 02 sy-uline(37), 39 sy-vline,

40 sy-uline(108), 132 sy-vline.

*----

-


Zeile 1 -

-


"Überschriften

FORMAT COLOR COL_HEADING INTENSIFIED OFF.

WRITE: /01 sy-vline,

02 text-114 INTENSIFIED, "Warenkredversicherung

39 sy-vline,

  • 33 TEXT-128 INTENSIFIED, "Limits

40 text-129 INTENSIFIED. "Mahndaten

WRITE: 132 sy-vline.

FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.

WRITE: /01 sy-vline, 02 sy-uline(37), 39 sy-vline,

40 sy-uline(108), 132 sy-vline.

*----

-


Zeile 2 -

-


"Überschriften

  • DETAIL.

WRITE: /01 sy-vline,

text-130 UNDER text-114 COLOR COL_HEADING INVERSE.

WRITE: 22 knb1-vrsnr, " TO VARTXT, "Vertragsnummer

39 sy-vline.

*WRITE: VARTXT UNDER VARTXT.

  • TEXT-144 UNDER TEXT-128, "Gesamtkreditlimit

*53(10) KNKA-KLIMG CURRENCY T001-WAERS NO-ZERO

  • ROUND FAKTOR DECIMALS STELLEN.

WRITE: text-136 UNDER text-129 COLOR COL_HEADING INVERSE.

WRITE: 56 txt_1. CLEAR txt_1.

WRITE: 132 sy-vline.

*----

-


Zeile 3 -

-


"Überschriften

  • DETAIL.

WRITE: /01 sy-vline,

text-131 UNDER text-130 COLOR COL_HEADING INVERSE.

WRITE: 22 knb1-vrbkz, " TO vARTXT, "Institutsnummer

39 sy-vline.

*WRITE: VARTXT UNDER VARTXT.

  • TEXT-145 UNDER TEXT-144, "Datum letzte Auskunft

*54 KNKA-DLAUS DD/MM/YY NO-ZERO.

WRITE: text-137 UNDER text-136 COLOR COL_HEADING INVERSE.

WRITE: txt_2 UNDER txt_1. CLEAR txt_2.

WRITE: 132 sy-vline.

*----

-


Zeile 4 -

-


"Überschriften

WRITE: /01 sy-vline,

text-132 UNDER text-131 COLOR COL_HEADING INVERSE.

WRITE: 22(16) knb1-vlibb CURRENCY t001-waers "Versicherungssumme

NO-ZERO ROUND faktor DECIMALS stellen,

39 sy-vline.

  • CONDENSE VARTXT. WRITE VARTXT.

*WRITE: TEXT-146 UNDER TEXT-145, "Kreditkontrollbereich

*58 KREDK-KKBER NO-ZERO.

WRITE: text-138 UNDER text-137 COLOR COL_HEADING INVERSE.

WRITE: txt_3 UNDER txt_2. CLEAR txt_3.

WRITE: 132 sy-vline.

*----

-


Zeile 5 -

-


WRITE: /01 sy-vline,

text-133 UNDER text-132 COLOR COL_HEADING INVERSE.

WRITE: 22 knb1-verdt DD/MM/YY NO-ZERO, " VARTXT DD/MM/YY NO-ZERO.

39 sy-vline.

*WRITE: VARTXT UNDER VARTXT.

  • TEXT-147 UNDER TEXT-146. "Limit Kredkontrollbe

*WRITE:

*53(10) KREDK-KLIMK CURRENCY T001-WAERS NO-ZERO

  • ROUND FAKTOR DECIMALS STELLEN.

WRITE: text-139 UNDER text-138 COLOR COL_HEADING INVERSE.

WRITE: txt_4 UNDER txt_3. CLEAR txt_4.

WRITE: 132 sy-vline.

*----

-


Zeile 6 -

-


WRITE: /01 sy-vline,

text-134 UNDER text-133 COLOR COL_HEADING INVERSE.

WRITE: 22 knb1-vrszl NO-ZERO, " TO VARTXT NO-ZERO. "Zielmonate

39 sy-vline.

  • CONDENSE VARTXT. WRITE VARTXT.

*WRITE: TEXT-148 UNDER TEXT-147, "Datum Kredlimüberschr

*54 KREDK-UEDAT DD/MM/YY NO-ZERO.

WRITE: text-140 UNDER text-139 COLOR COL_HEADING INVERSE.

WRITE: txt_5 UNDER txt_4. CLEAR txt_5.

WRITE: 132 sy-vline.

*----

-


Zeile 7 -

-


WRITE: /01 sy-vline,

text-135 UNDER text-134 COLOR COL_HEADING INVERSE.

WRITE: 22 knb1-vrspr NO-ZERO, "TO VARTXT NO-ZERO. "Selbstbeteiligung

39 sy-vline.

  • CONDENSE VARTXT. WRITE VARTXT.

*WRITE: TEXT-153 UNDER TEXT-148, "Limit überschrit. um

*53(10) C-KREUEB CURRENCY T001-WAERS NO-ZERO

  • ROUND FAKTOR DECIMALS STELLEN.

WRITE: text-141 UNDER text-140 COLOR COL_HEADING INVERSE.

WRITE: txt_6 UNDER txt_5. CLEAR txt_6.

WRITE: 132 sy-vline.

*----

-


Zeile 8 -

-


*WRITE:

  • / TEXT-154 UNDER TEXT-153. "Kreditausschöfung

**3(10) KREDK-SAUFT CURRENCY T001-WAERS NO-ZERO "

    • ROUND FAKTOR DECIMALS STELLEN.

*56(04) C-RGOBLI, '%'. "Relative Kreditauss

WRITE: /01 sy-vline,

39 sy-vline,

text-142 UNDER text-141 COLOR COL_HEADING INVERSE.

WRITE: txt_7 UNDER txt_6. CLEAR txt_7.

WRITE: 132 sy-vline.

*----

-


Zeile 9 -

-


*WRITE:

  • / TEXT-151 UNDER TEXT-150, "Forderungswerte

**3(10) KREDK-SKFOR CURRENCY T001-WAERS NO-ZERO

    • ROUND FAKTOR DECIMALS STELLEN.

  • / TEXT-150 UNDER TEXT-154. "Summe Auftragswerte

*53(10) KREDK-SAUFT CURRENCY T001-WAERS NO-ZERO "

  • ROUND FAKTOR DECIMALS STELLEN."

WRITE: /01 sy-vline,

39 sy-vline,

text-143 UNDER text-142 COLOR COL_HEADING INVERSE.

WRITE: txt_8 UNDER txt_7. CLEAR txt_8.

WRITE: 132 sy-vline.

ELSE.

IF knb1-bukrs IS INITIAL.

  • Konzerndaten

  • <<<<<<<<<<<< Block 1>>>>>>>>>>>>>>>

*----

-


Zeile 1 -

-


FORMAT COLOR COL_HEADING INTENSIFIED OFF.

WRITE: /01 sy-vline, "Anschrift

02 text-113 INTENSIFIED, "Anschrift

39 sy-vline,

40 text-116 INTENSIFIED, "Obligo

90 sy-vline,

91 text-115 INTENSIFIED, "Umsatzdaten

132 sy-vline.

WRITE: /01 sy-vline, 02 sy-uline(37), 39 sy-vline,

40 sy-uline(50), 90 sy-vline, 91 sy-uline(41), 132 sy-vline.

  • 99 TEXT-127 INTENSIFIED. "Zahlungsdaten

*----

-


ZEILE 2 -

-


FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.

DETAIL.

CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '1'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

WRITE:

/01 sy-vline,

02 adrs-line0(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."1. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 90 sy-vline,

91 text-122 COLOR COL_HEADING INVERSE, "Jahresumsatz

110 c-kumum CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

*----

-


Zeile 3 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '2'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line1 IS INITIAL

OR NOT asums IS INITIAL

OR NOT c-babzg IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line1(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."2. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 90 sy-vline,

91 text-123 COLOR COL_HEADING INVERSE, "Jahresumsatz

110 c-babzg CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 4 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '3'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line2 IS INITIAL

OR NOT asums IS INITIAL

OR NOT c-uabzg IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line2(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."3. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 90 sy-vline,

91 text-124 COLOR COL_HEADING INVERSE, "Jahresumsatz

110 c-uabzg CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 5 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '4'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line3 IS INITIAL

OR NOT asums IS INITIAL

OR NOT c-kzins IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line3(35), "Adressausgabe

39 sy-vline, "Adressausgabe

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."4. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 90 sy-vline,

91 text-125 COLOR COL_HEADING INVERSE, "Jahresumsatz

110 c-kzins CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 6 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '5'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line4 IS INITIAL

OR NOT asums IS INITIAL

OR NOT c-kumag IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line4(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."5. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 90 sy-vline,

91 text-126 COLOR COL_HEADING INVERSE, "Jahresumsatz

110 c-kumag CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 7 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '6'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line5 IS INITIAL

OR NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line5(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."6. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 90 sy-vline.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 8 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '7'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line6 IS INITIAL

OR NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line6(35), "Adressausgabe

39 sy-vline, "Adressausgabe

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."7. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 90 sy-vline.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 9 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '8'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line7 IS INITIAL

OR NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line7(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."8. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 90 sy-vline.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 10 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '9'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line8 IS INITIAL

OR NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line8(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."9. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 90 sy-vline.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 11 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '10'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT adrs-line9 IS INITIAL

OR NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

02 adrs-line9(35), "Adressausgabe

39 sy-vline,

shbbez UNDER text-116. "10. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 90 sy-vline.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 12 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '11'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

WRITE:

/01 sy-vline,

39 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."11. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 90 sy-vline.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 13 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '12'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

WRITE:

/01 sy-vline,

39 sy-vline,

shbbez UNDER text-116. "12. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 68 text-161.

ENDIF.

WRITE:

70 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen.

WRITE: 90 sy-vline.

WRITE: 132 sy-vline.

ENDIF.

ELSE.

  • Buchungskreisdaten

  • <<<<<<<<<<<< Block 1>>>>>>>>>>>>>>>

*----

-


Zeile 1 -

-


FORMAT COLOR COL_HEADING INTENSIFIED OFF.

WRITE: /01 sy-vline. "Anschrift

WRITE: 02 text-116 INTENSIFIED, "Anschrift

51 sy-vline,

52 text-115 INTENSIFIED, "Obligo

91 sy-vline,

92 text-127 INTENSIFIED, "Obligo

132 sy-vline.

WRITE: /01 sy-vline, 02 sy-uline(50), 51 sy-vline,

52 sy-uline(39), 91 sy-vline, 92 sy-uline(40),

132 sy-vline.

*----

-


ZEILE 2 -

-


FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.

DETAIL.

CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '1'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT asums IS INITIAL

OR NOT c-kumum IS INITIAL

OR NOT knb1-zterm IS INITIAL.

WRITE:

/01 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."1. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 31 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

33 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

51 sy-vline,

52 text-122 COLOR COL_HEADING INVERSE, "Jahresumsatz

72 c-kumum CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

91 sy-vline,

text-157 UNDER text-127 COLOR COL_HEADING INVERSE,

112 knb1-zterm.

WRITE: 132 sy-vline.

*WRITE: TEXT-122 UNDER TEXT-115, "Jahresumsatz

*110 C-KUMUM CURRENCY T001-WAERS NO-ZERO

  • ROUND FAKTOR DECIMALS STELLEN.

*WRITE: TEXT-157 UNDER TEXT-127, "Zahlungsbedingung

  • KNB1-ZTERM.

ENDIF.

*----

-


Zeile 3 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '2'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT asums IS INITIAL

OR NOT c-babzg IS INITIAL

OR NOT knb1-xverr IS INITIAL.

WRITE:

/01 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."1. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 31 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

33 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

51 sy-vline,

52 text-123 COLOR COL_HEADING INVERSE, "Jahresumsatz

72 c-babzg CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

91 sy-vline,

text-162 UNDER text-127 COLOR COL_HEADING INVERSE,

112 knb1-xverr.

ENDIF.

*----

-


Zeile 4 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '3'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT asums IS INITIAL

OR NOT c-uabzg IS INITIAL

OR NOT c-zvtyp IS INITIAL.

WRITE:

/01 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."1. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 31 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

33 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

51 sy-vline,

52 text-124 COLOR COL_HEADING INVERSE, "Jahresumsatz

72 c-uabzg CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

91 sy-vline,

text-158 UNDER text-127 COLOR COL_HEADING INVERSE.

CASE c-zvtyp.

WHEN 'S'.

WRITE 112 text-155. "Skontozahler

WHEN 'N'.

WRITE 112 text-156. "Nettozahler

WHEN OTHERS.

ENDCASE.

ENDIF.

*----

-


Zeile 5 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '4'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT asums IS INITIAL

OR NOT c-kzins IS INITIAL

OR NOT c-zvverzug IS INITIAL.

WRITE:

/01 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."1. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 31 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

33 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

51 sy-vline,

52 text-125 COLOR COL_HEADING INVERSE, "Jahresumsatz

72 c-kzins CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

91 sy-vline,

text-159 UNDER text-127 COLOR COL_HEADING INVERSE,

112 c-zvverzug.

ENDIF.

*----

-


Zeile 6 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '5'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT asums IS INITIAL

OR NOT c-kumag IS INITIAL

OR NOT c-zvper IS INITIAL.

WRITE:

/01 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."1. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 31 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

33 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

51 sy-vline,

52 text-126 COLOR COL_HEADING INVERSE, "Jahresumsatz

72 c-kumag CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

91 sy-vline,

text-160 UNDER text-127 COLOR COL_HEADING INVERSE,

112 c-zvper NO-ZERO.

ENDIF.

*----

-


Zeile 7 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '6'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."1. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 31 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

33 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

51 sy-vline,

91 sy-vline.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 8 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '7'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."1. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 31 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

33 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

51 sy-vline,

91 sy-vline.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 9 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '8'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."1. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 31 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

33 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

51 sy-vline,

91 sy-vline.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 10 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '9'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."1. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 31 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

33 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

51 sy-vline,

91 sy-vline.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 11 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '10'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

ENDIF.

IF NOT asums IS INITIAL.

WRITE:

/01 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."1. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 31 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

33 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

51 sy-vline,

91 sy-vline.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 12 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '11'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

WRITE:

/01 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."1. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 31 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

33 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

51 sy-vline,

91 sy-vline.

WRITE: 132 sy-vline.

ENDIF.

*----

-


Zeile 13 -

-


CLEAR shbbez.

CLEAR asums.

READ TABLE aobligo INDEX '12'.

IF sy-subrc = 0.

shbbez = aobligo-ltext.

asums = aobligo-oblig.

WRITE:

/01 sy-vline,

shbbez UNDER text-116 COLOR COL_HEADING INVERSE."1. Obligo

IF NOT shbbez IS INITIAL.

WRITE: 31 text-161 COLOR COL_HEADING INVERSE.

ENDIF.

WRITE:

33 asums CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen,

51 sy-vline,

91 sy-vline.

WRITE: 132 sy-vline.

ENDIF.

*

  • Block 3

*

*SKIP.

WRITE: /01 sy-vline, 02 sy-uline(37), 39 sy-vline,

40 sy-uline(108), 132 sy-vline.

*----

-


Zeile 1 -

-


"Überschriften

FORMAT COLOR COL_HEADING INTENSIFIED OFF.

WRITE: /01 sy-vline,

02 text-114 INTENSIFIED, "Warenkredversicherung

39 sy-vline,

  • 33 TEXT-128 INTENSIFIED, "Limits

40 text-129 INTENSIFIED. "Mahndaten

WRITE: 132 sy-vline.

FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.

WRITE: /01 sy-vline, 02 sy-uline(37), 39 sy-vline,

40 sy-uline(108), 132 sy-vline.

*----

-


Zeile 2 -

-


"Überschriften

  • DETAIL.

WRITE: /01 sy-vline,

text-130 UNDER text-114 COLOR COL_HEADING INVERSE.

WRITE: 22 knb1-vrsnr, " TO VARTXT, "Vertragsnummer

39 sy-vline.

*WRITE: VARTXT UNDER VARTXT.

  • TEXT-144 UNDER TEXT-128, "Gesamtkreditlimit

*53(10) KNKA-KLIMG CURRENCY T001-WAERS NO-ZERO

  • ROUND FAKTOR DECIMALS STELLEN.

WRITE: text-136 UNDER text-129 COLOR COL_HEADING INVERSE.

WRITE: 56 txt_1. CLEAR txt_1.

WRITE: 132 sy-vline.

*----

-


Zeile 3 -

-


"Überschriften

  • DETAIL.

WRITE: /01 sy-vline,

text-131 UNDER text-130 COLOR COL_HEADING INVERSE.

WRITE: 22 knb1-vrbkz, " TO vARTXT, "Institutsnummer

39 sy-vline.

*WRITE: VARTXT UNDER VARTXT.

  • TEXT-145 UNDER TEXT-144, "Datum letzte Auskunft

*54 KNKA-DLAUS DD/MM/YY NO-ZERO.

WRITE: text-137 UNDER text-136 COLOR COL_HEADING INVERSE.

WRITE: txt_2 UNDER txt_1. CLEAR txt_2.

WRITE: 132 sy-vline.

*----

-


Zeile 4 -

-


"Überschriften

WRITE: /01 sy-vline,

text-132 UNDER text-131 COLOR COL_HEADING INVERSE.

WRITE: 22(16) knb1-vlibb CURRENCY t001-waers "Versicherungssumme

NO-ZERO ROUND faktor DECIMALS stellen,

39 sy-vline.

  • CONDENSE VARTXT. WRITE VARTXT.

*WRITE: TEXT-146 UNDER TEXT-145, "Kreditkontrollbereich

*58 KREDK-KKBER NO-ZERO.

WRITE: text-138 UNDER text-137 COLOR COL_HEADING INVERSE.

WRITE: txt_3 UNDER txt_2. CLEAR txt_3.

WRITE: 132 sy-vline.

*----

-


Zeile 5 -

-


WRITE: /01 sy-vline,

text-133 UNDER text-132 COLOR COL_HEADING INVERSE.

WRITE: 22 knb1-verdt DD/MM/YY NO-ZERO, " VARTXT DD/MM/YY NO-ZERO.

39 sy-vline.

*WRITE: VARTXT UNDER VARTXT.

  • TEXT-147 UNDER TEXT-146. "Limit Kredkontrollbe

*WRITE:

*53(10) KREDK-KLIMK CURRENCY T001-WAERS NO-ZERO

  • ROUND FAKTOR DECIMALS STELLEN.

WRITE: text-139 UNDER text-138 COLOR COL_HEADING INVERSE.

WRITE: txt_4 UNDER txt_3. CLEAR txt_4.

WRITE: 132 sy-vline.

*----

-


Zeile 6 -

-


WRITE: /01 sy-vline,

text-134 UNDER text-133 COLOR COL_HEADING INVERSE.

WRITE: 22 knb1-vrszl NO-ZERO, " TO VARTXT NO-ZERO. "Zielmonate

39 sy-vline.

  • CONDENSE VARTXT. WRITE VARTXT.

*WRITE: TEXT-148 UNDER TEXT-147, "Datum Kredlimüberschr

*54 KREDK-UEDAT DD/MM/YY NO-ZERO.

WRITE: text-140 UNDER text-139 COLOR COL_HEADING INVERSE.

WRITE: txt_5 UNDER txt_4. CLEAR txt_5.

WRITE: 132 sy-vline.

*----

-


Zeile 7 -

-


WRITE: /01 sy-vline,

text-135 UNDER text-134 COLOR COL_HEADING INVERSE.

WRITE: 22 knb1-vrspr NO-ZERO, "TO VARTXT NO-ZERO. "Selbstbeteiligung

39 sy-vline.

  • CONDENSE VARTXT. WRITE VARTXT.

*WRITE: TEXT-153 UNDER TEXT-148, "Limit überschrit. um

*53(10) C-KREUEB CURRENCY T001-WAERS NO-ZERO

  • ROUND FAKTOR DECIMALS STELLEN.

WRITE: text-141 UNDER text-140 COLOR COL_HEADING INVERSE.

WRITE: txt_6 UNDER txt_5. CLEAR txt_6.

WRITE: 132 sy-vline.

*----

-


Zeile 8 -

-


*WRITE:

  • / TEXT-154 UNDER TEXT-153. "Kreditausschöfung

**3(10) KREDK-SAUFT CURRENCY T001-WAERS NO-ZERO "

    • ROUND FAKTOR DECIMALS STELLEN.

*56(04) C-RGOBLI, '%'. "Relative Kreditauss

WRITE: /01 sy-vline,

39 sy-vline,

text-142 UNDER text-141 COLOR COL_HEADING INVERSE.

WRITE: txt_7 UNDER txt_6. CLEAR txt_7.

WRITE: 132 sy-vline.

*----

-


Zeile 9 -

-


*WRITE:

  • / TEXT-151 UNDER TEXT-150, "Forderungswerte

**3(10) KREDK-SKFOR CURRENCY T001-WAERS NO-ZERO

    • ROUND FAKTOR DECIMALS STELLEN.

  • / TEXT-150 UNDER TEXT-154. "Summe Auftragswerte

*53(10) KREDK-SAUFT CURRENCY T001-WAERS NO-ZERO "

  • ROUND FAKTOR DECIMALS STELLEN."

WRITE: /01 sy-vline,

39 sy-vline,

text-143 UNDER text-142 COLOR COL_HEADING INVERSE.

WRITE: txt_8 UNDER txt_7. CLEAR txt_8.

WRITE: 132 sy-vline.

ENDIF.

ENDIF.

  • SKIP.

WRITE: /01 sy-vline, 02 sy-uline(130), 132 sy-vline.

IF rastverd = '2'.

SKIP 1.

ENDIF.

  • ULINE.

  • NEW-PAGE.

ENDFORM. "ANSCHRIFT

*----


*

  • FORM RASTER_AUSGABE *

*----


*

  • ........ *

*----


*

FORM raster_ausgabe.

  • Bei Verdichtung der Geschaeftsbereiche nur das Summenraster ausgeben*

IF rastverd = '1'. " AND VERDICHT > 0.

CHECK rtab-sortk = '1'.

ENDIF.

  • Das Summen-Raster wird nur ausgegeben, wenn mehr als ein Geschaefts-*

  • bereich vorhanden ist. ---------------------------------------------*

IF rtab-sortk = '1' AND rastverd NE '1'.

CHECK gbzaehl > 1.

ENDIF.

IF NOT konzvers IS INITIAL

AND NOT knb1-bukrs IS INITIAL.

CHECK xbukrdat NE '2'.

ENDIF.

IF rtab-sortk NE '2'.

  • Bei der ersten Rasterart , Anzahlungen usw. ausgeben ---------*

IF rasteruu = rart.

IF gb-gsber NE '**'.

  • OR GB-GSBER NE '***'.

gbzaehl = gbzaehl + 1.

ENDIF.

IF acc_mode IS INITIAL.

ULINE.

RESERVE 5 LINES.

IF gb-gsber NE '**'.

FORMAT COLOR COL_TOTAL INTENSIFIED OFF.

ELSE.

FORMAT COLOR COL_TOTAL INTENSIFIED.

ENDIF.

top-flag = '2'.

IF sortart = '1' AND konzvers IS INITIAL.

WRITE: 01 sy-vline,

02(04) gb-gsber, " Geschaeftsbereich

  • (11) RTAB-KUMUM CURRENCY T001-WAERS " Umsatz

  • ROUND FAKTOR DECIMALS STELLEN NO-ZERO,

14(11) rtab-anzah CURRENCY t001-waers " Anzahlungen

ROUND faktor DECIMALS stellen,

26(12) rtab-opsum CURRENCY t001-waers " Offene Posten

ROUND faktor DECIMALS stellen.

ELSE.

WRITE: 01 sy-vline,

02(04) gb-gsber, " Geschaeftsbereich

08(05) gb-waers, " Waehrung

14(11) rtab-anzah CURRENCY gb-waers " Anzahlungen

ROUND faktor DECIMALS stellen,

26(12) rtab-opsum CURRENCY gb-waers " Offene Posten Summe

ROUND faktor DECIMALS stellen.

ENDIF.

ENDIF.

ELSE.

IF acc_mode IS INITIAL.

WRITE: 01 sy-vline.

ENDIF.

ENDIF.

IF acc_mode IS INITIAL.

CASE rasteruu.

WHEN '1'. WRITE: 39(3) text-019, 42 sy-vline. " Net-Fae

WHEN '2'. WRITE: 39(3) text-020, 42 sy-vline. " Skt-Fae

WHEN '3'. WRITE: 39(3) text-021, 42 sy-vline. " Zhl-Ein

WHEN '4'. WRITE: 39(3) text-024, 42 sy-vline. " Alt-Fae

WHEN '5'. WRITE: 39(3) text-022, 42 sy-vline. " Ueb-Fae

ENDCASE.

IF sortart = '1' AND konzvers IS INITIAL.

WRITE: " Betraege in HW ausgeben

(12) rtab-rast1 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 57 sy-vline,

(12) rtab-rast2 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 72 sy-vline,

(12) rtab-rast3 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 87 sy-vline,

(12) rtab-rast4 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 102 sy-vline,

(12) rtab-rast5 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 117 sy-vline,

(12) rtab-rast6 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 132 sy-vline.

ELSE.

WRITE: " Betraege in FW ausgeben

(12) rtab-rast1 CURRENCY gb-waers NO-ZERO

ROUND faktor DECIMALS stellen, 57 sy-vline,

(12) rtab-rast2 CURRENCY gb-waers NO-ZERO

ROUND faktor DECIMALS stellen, 72 sy-vline,

(12) rtab-rast3 CURRENCY gb-waers NO-ZERO

ROUND faktor DECIMALS stellen, 87 sy-vline,

(12) rtab-rast4 CURRENCY gb-waers NO-ZERO

ROUND faktor DECIMALS stellen, 102 sy-vline,

(12) rtab-rast5 CURRENCY gb-waers NO-ZERO

ROUND faktor DECIMALS stellen, 117 sy-vline,

(12) rtab-rast6 CURRENCY gb-waers NO-ZERO

ROUND faktor DECIMALS stellen, 132 sy-vline.

ENDIF.

ENDIF.

ENDIF.

IF NOT acc_mode IS INITIAL.

IF rastverd = '0'.

CHECK rtab-sortk = '0'.

ENDIF.

CLEAR rtab_alv.

MOVE-CORRESPONDING rtab TO rtab_alv.

rtab_alv-kunnr = kna1-kunnr.

rtab_alv-land1 = kna1-land1.

rtab_alv-sortl = kna1-sortl.

IF rtab-waers IS INITIAL.

rtab_alv-waers = t001-waers.

ENDIF.

CASE rtab-raart.

WHEN 1.

rtab_alv-raart = 1.

WHEN 2.

rtab_alv-raart = 2.

WHEN 3.

rtab_alv-raart = 4.

WHEN 4.

rtab_alv-raart = 5.

WHEN 5.

rtab_alv-raart = 6.

ENDCASE.

IF konzvers IS INITIAL

AND NOT knb1-bukrs IS INITIAL.

rtab_alv-bukrs = knb1-bukrs.

ENDIF.

IF NOT rtab_alv-bukrs IS INITIAL.

rtab_alv-busab = knb1-busab.

ENDIF.

  • if ... is initial.

MOVE c-kumum TO rtab_alv-kumum.

  • endif.

MOVE gb-gsber TO rtab_alv-gsber.

IF NOT rtab_alv IS INITIAL.

APPEND rtab_alv.

ENDIF.

ENDIF.

ENDFORM. "RASTER_AUSGABE

*----


*

  • FORM SUM_BUSAB_BUKRS_TOTAL *

*----


*

  • ........ *

*----


*

FORM sum_busab_bukrs_total.

IF rtab-sortk = '0'.

IF konzvers IS INITIAL

OR ( NOT konzvers IS INITIAL

AND NOT rtab-bukrs IS INITIAL ) .

*-- Summen pro Sachbearbeiter -

-


*

MOVE-CORRESPONDING rtab TO rbus.

MOVE: knb1-bukrs TO rbus-bukrs,

gb-gsber TO rbus-gsber,

gb-waers TO rbus-waers.

COLLECT rbus.

*-- Gesamtsumme ueber alle Geschaeftsbereiche pro Sachbearb. -

-


*

*-- ermitteln, aber nur bei SORTART = '1' -

-


*

  • IF SORTART = '1'.

MOVE: knb1-bukrs TO rbus-bukrs,

'**' TO rbus-gsber,

'1' TO rbus-sortk.

  • '1' TO RBUS-COUNT.

COLLECT rbus.

  • ENDIF.

*-- Summen pro Buchungskreis -

-


*

MOVE-CORRESPONDING rtab TO rbuk.

MOVE: knb1-bukrs TO rbuk-bukrs,

gb-gsber TO rbuk-gsber,

gb-waers TO rbuk-waers.

COLLECT rbuk.

*-- Gesamtsumme ueber alle Geschaeftsbereiche und Sachbearb. -

-


*

*-- ermitteln, aber nur bei SORTART = '1' -

-


*

  • IF SORTART = '1'.

MOVE: knb1-bukrs TO rbuk-bukrs,

'**' TO rbuk-gsber,

'1' TO rbuk-sortk.

  • '1' TO RBUK-COUNT.

COLLECT rbuk.

  • ENDIF.

ENDIF.

*-- Summen fuer Listenteil 2 ermitteln -

-


*

MOVE: knb1-bukrs TO rtab-bukrs,

gb-gsber TO rtab-gsber,

gb-waers TO rtab-waers.

COLLECT rtab.

*-- Gesamtsumme ueber alle Buchungs- und Geschaeftsbereiche -

-


*

*-- ermitteln, aber nur bei SORTART = '1' -

-


*

  • IF SORTART = '1'.

  • MOVE: '**' TO RTAB-BUKRS,

  • '**' TO RTAB-GSBER,

  • '1' TO RTAB-SORTK.

  • COLLECT RTAB.

  • ENDIF.

IF konzvers IS INITIAL

OR ( NOT konzvers IS INITIAL

AND rtab-bukrs IS INITIAL ) .

MOVE-CORRESPONDING rtab TO rsum.

IF sortart = '1' AND konzvers IS INITIAL.

MOVE: t001-waers TO rsum-waers.

ENDIF.

MOVE: '1' TO rsum-sortk.

COLLECT rsum.

ENDIF.

ENDIF.

IF rtab-sortk = '2'.

  • AND GB-GSBER = '***'.

*-- Gesamtumsatz ueber alle Geschaeftsbereiche pro Sachbearb. -

-


*

*-- ermitteln, aber nur bei SORTART = '1' -

-


*

IF sortart = '1'.

MOVE-CORRESPONDING rtab TO rbus.

MOVE: knb1-bukrs TO rbus-bukrs,

gb-gsber TO rbus-gsber,

gb-waers TO rbus-waers,

'2' TO rbus-sortk.

COLLECT rbus.

ENDIF.

*-- Gesamtumsatz ueber alle Geschaeftsbereiche und Sachbearb. -

-


*

*-- ermitteln, aber nur bei SORTART = '1' -

-


*

IF sortart = '1'.

MOVE-CORRESPONDING rtab TO rbuk.

MOVE: knb1-bukrs TO rbuk-bukrs,

gb-gsber TO rbuk-gsber,

gb-waers TO rbuk-waers,

'2' TO rbuk-sortk.

COLLECT rbuk.

ENDIF.

ENDIF.

ENDFORM. "SUM_BUSAB_BUKRS_TOTAL

*----


*

  • FORM EINZELPOSTEN_AUSGABE *

*----


*

  • ........ *

*----


*

FORM einzelposten_ausgabe.

IF intens IS INITIAL.

FORMAT COLOR COL_NORMAL INTENSIFIED OFF.

intens = 'X'.

ELSE.

FORMAT COLOR COL_NORMAL INTENSIFIED.

intens = ' '.

ENDIF.

  • DETAIL.

WRITE: 01 sy-vline,

02 knb1-bukrs, " Buchungskreis

gb-gsber, " Geschaeftsbereich

tage, " Ueberzugstage

21 bsid-umskz, " Umsatzkennzeichen

23 bsid-blart, " Belegart

  • 24 BSID-ZUONR, " Zuordnungsnummer

26 bsid-belnr, " Belegnummer

bsid-buzei, " Belegzeile

(8) bsega-netdt, " Netto-Faelligkeit

  • (8) FAEDE-NETDT, " Netto-Faelligkeit

(8) bsid-zfbdt, " Zahlungsfristenbasis

(8) bsid-budat, " Buchungsdatum

(8) bsid-bldat, " Belegdatum

  • (8) BSID-CPUDT, " CPU-Datum

bsid-bschl, " Buchungsschluessel

bsid-zlsch, " Zahlungsschluessel

  • 120 BKPF-USNAM. " Benutzer

82 bsid-manst NO-ZERO,

86 bsega-dmshb CURRENCY t001-waers, "Hauswaehrungsbetrag

  • ROUND FAKTOR DECIMALS STELLEN,

bsid-waers, "Waehrung

bsega-wrshb CURRENCY bsid-waers NO-ZERO, "Fremdwaehrungsbtr.

  • ROUND FAKTOR DECIMALS STELLEN.

  • SUMMARY.

132 sy-vline.

ENDFORM. "EINZELPOSTEN_AUSGABE

*----


*

  • FORM RASTER_AUSGABE_BUSAB *

*----


*

  • ........ *

*----


*

FORM raster_ausgabe_busab.

IF rastverd < '2'.

DETAIL.

SORT rbus.

CLEAR gbzaehl.

CLEAR rastza.

LOOP AT rbus.

NEW-LINE.

  • Bei Verdichtung der Geschaeftsbereiche nur das Summenraster ausgeben*

IF rastverd = '1'. "AND VERDICHT > 0.

CHECK rbus-sortk NE '0'.

ENDIF.

  • Das Summen-Raster wird nur ausgegeben, wenn mehr als ein Geschaefts-*

  • bereich vorhanden ist. ---------------------------------------------*

IF rbus-sortk = '1' AND rastverd NE '1'.

CHECK gbzaehl GT 1.

ENDIF.

IF rbus-gsber NE '**'.

FORMAT COLOR COL_TOTAL INTENSIFIED OFF.

ELSE.

FORMAT COLOR COL_TOTAL INTENSIFIED.

ENDIF.

IF rbus-sortk NE '2'.

  • Bei der ersten Rasterart Anzahlungen usw. ausgeben ----------------*

rastza = 'X'.

IF rbus-raart = rart.

IF rbus-gsber NE '**'.

gbzaehl = gbzaehl + 1.

ENDIF.

RESERVE 5 LINES.

IF sortart = '1' AND konzvers IS INITIAL.

WRITE: /01 sy-vline,

02(04) rbus-gsber, " Geschaeftsbereich

  • (11) RBUS-KUMUM CURRENCY T001-WAERS " Umsatz

  • ROUND FAKTOR DECIMALS STELLEN NO-ZERO,

14(11) rbus-anzah CURRENCY t001-waers " Anzahlungen

ROUND faktor DECIMALS stellen,

26(12) rbus-opsum CURRENCY t001-waers " Offene Posten Summe

ROUND faktor DECIMALS stellen.

ELSE.

WRITE: /01 sy-vline,

02(04) rbus-gsber, " Geschaeftsbereich

08(05) rbus-waers, " Waehrung

14(11) rbus-anzah CURRENCY rbus-waers " Anzahlungen

ROUND faktor DECIMALS stellen,

26(12) rbus-opsum CURRENCY rbus-waers " Offene Posten Summe

ROUND faktor DECIMALS stellen.

ENDIF.

ELSE.

WRITE: /01 sy-vline.

ENDIF.

CASE rbus-raart.

WHEN '1'. WRITE: 39(3) text-019, 42 sy-vline. " Net-Fae

WHEN '2'. WRITE: 39(3) text-020, 42 sy-vline. " Skt-Fae

WHEN '3'. WRITE: 39(3) text-021, 42 sy-vline. " Zhl-Ein

WHEN '4'. WRITE: 39(3) text-024, 42 sy-vline. " Alt-Fae

WHEN '5'. WRITE: 39(3) text-022, 42 sy-vline. " Ueb-Fae

ENDCASE.

IF sortart = '1' AND konzvers IS INITIAL.

WRITE: " Ausgabe in HW

(12) rbus-rast1 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 57 sy-vline,

(12) rbus-rast2 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 72 sy-vline,

(12) rbus-rast3 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 87 sy-vline,

(12) rbus-rast4 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 102 sy-vline,

(12) rbus-rast5 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 117 sy-vline,

(12) rbus-rast6 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 132 sy-vline.

ELSE.

WRITE: " Ausgabe in FW

(12) rbus-rast1 CURRENCY rbus-waers NO-ZERO

ROUND faktor DECIMALS stellen, 57 sy-vline,

(12) rbus-rast2 CURRENCY rbus-waers NO-ZERO

ROUND faktor DECIMALS stellen, 72 sy-vline,

(12) rbus-rast3 CURRENCY rbus-waers NO-ZERO

ROUND faktor DECIMALS stellen, 87 sy-vline,

(12) rbus-rast4 CURRENCY rbus-waers NO-ZERO

ROUND faktor DECIMALS stellen, 102 sy-vline,

(12) rbus-rast5 CURRENCY rbus-waers NO-ZERO

ROUND faktor DECIMALS stellen, 117 sy-vline,

(12) rbus-rast6 CURRENCY rbus-waers NO-ZERO

ROUND faktor DECIMALS stellen, 132 sy-vline.

ENDIF.

ELSE.

IF rastza IS INITIAL.

FORMAT COLOR COL_NORMAL INTENSIFIED.

WRITE: /01 sy-vline, 02 text-167, 132 sy-vline.

WRITE: /01 sy-vline, 02 sy-uline(130), 132 sy-vline.

NEW-LINE.

IF rbus-gsber NE '**'.

FORMAT COLOR COL_TOTAL INTENSIFIED OFF.

ELSE.

FORMAT COLOR COL_TOTAL INTENSIFIED.

ENDIF.

ENDIF.

  • Ausgabe des Jahresumsatzes -----------------------------------------*

WRITE: 01 sy-vline.

WRITE: 02 rbus-gsber(4),

08 text-166,

87 rbus-kumum CURRENCY t001-waers.

WRITE: 132 sy-vline.

ENDIF.

AT END OF waers.

ULINE.

ENDAT.

ENDLOOP.

ENDIF.

ENDFORM. "RASTER_AUSGABE_BUSAB

*----


*

  • FORM RASTER_AUSGABE_BUKRB *

*----


*

  • ........ *

*----


*

FORM raster_ausgabe_bukrb.

IF rastverd < '2'.

DETAIL.

SORT rbuk.

CLEAR gbzaehl.

CLEAR rastza.

LOOP AT rbuk.

NEW-LINE.

  • Bei Verdichtung der Geschaeftsbereiche nur das Summenraster ausgeben*

IF rastverd = '1'. "AND VERDICHT > 0.

CHECK rbuk-sortk NE '0' .

ENDIF.

  • Das Summen-Raster wird nur ausgegeben, wenn mehr als ein Geschaefts-*

  • bereich vorhanden ist. ---------------------------------------------*

IF rbuk-sortk = '1' AND rastverd NE '1'.

CHECK gbzaehl GT 1.

ENDIF.

IF rbuk-gsber NE '**'.

FORMAT COLOR COL_TOTAL INTENSIFIED OFF.

ELSE.

FORMAT COLOR COL_TOTAL INTENSIFIED.

ENDIF.

IF rbuk-sortk NE '2'.

  • Bei der ersten Rasterart Anzahlungen usw. ausgeben ---------*

rastza = 'X'.

IF rbuk-raart = rart.

IF rbuk-gsber NE '**'.

gbzaehl = gbzaehl + 1.

ENDIF.

RESERVE 5 LINES.

IF sortart = '1' AND konzvers IS INITIAL.

WRITE: /01 sy-vline,

02(04) rbuk-gsber, " Geschaeftsbereich

  • (11) RBUK-KUMUM CURRENCY T001-WAERS " Umsatz

  • ROUND FAKTOR DECIMALS STELLEN NO-ZERO,

14(11) rbuk-anzah CURRENCY t001-waers " Anzahlungen

ROUND faktor DECIMALS stellen,

26(12) rbuk-opsum CURRENCY t001-waers " Offene Posten Summe

ROUND faktor DECIMALS stellen.

ELSE.

WRITE: /01 sy-vline,

02(04) rbuk-gsber, " Geschaeftsbereich

08(05) rbuk-waers, " Waehrung

14(11) rbuk-anzah CURRENCY rbuk-waers " Anzahlungen

ROUND faktor DECIMALS stellen,

26(12) rbuk-opsum CURRENCY rbuk-waers " Offene Posten Summe

ROUND faktor DECIMALS stellen.

ENDIF.

ELSE.

WRITE: /01 sy-vline.

ENDIF.

CASE rbuk-raart.

WHEN '1'. WRITE: 39(3) text-019, 42 sy-vline. " Net-Fae

WHEN '2'. WRITE: 39(3) text-020, 42 sy-vline. " Skt-Fae

WHEN '3'. WRITE: 39(3) text-021, 42 sy-vline. " Zhl-Ein

WHEN '4'. WRITE: 39(3) text-024, 42 sy-vline. " Alt-Fae

WHEN '5'. WRITE: 39(3) text-022, 42 sy-vline. " Ueb-Fae

ENDCASE.

IF sortart = '1' AND konzvers IS INITIAL.

WRITE: " Ausgabe in HW

(12) rbuk-rast1 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 57 sy-vline,

(12) rbuk-rast2 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 72 sy-vline,

(12) rbuk-rast3 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 87 sy-vline,

(12) rbuk-rast4 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 102 sy-vline,

(12) rbuk-rast5 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 117 sy-vline,

(12) rbuk-rast6 CURRENCY t001-waers NO-ZERO

ROUND faktor DECIMALS stellen, 132 sy-vline.

ELSE.

WRITE: " Ausgabe in FW

(12) rbuk-rast1 CURRENCY rbuk-waers NO-ZERO

ROUND faktor DECIMALS stellen, 57 sy-vline,

(12) rbuk-rast2 CURRENCY rbuk-waers NO-ZERO

ROUND faktor DECIMALS stellen, 72 sy-vline,

(12) rbuk-rast3 CURRENCY rbuk-waers NO-ZERO

ROUND faktor DECIMALS stellen, 87 sy-vline,

(12) rbuk-rast4 CURRENCY rbuk-waers NO-ZERO

ROUND faktor DECIMALS stellen, 102 sy-vline,

(12) rbuk-rast5 CURRENCY rbuk-waers NO-ZERO

ROUND faktor DECIMALS stellen, 117 sy-vline,

(12) rbuk-rast6 CURRENCY rbuk-waers NO-ZERO

ROUND faktor DECIMALS stellen, 132 sy-vline.

ENDIF.

ELSE.

IF rastza IS INITIAL.

FORMAT COLOR COL_NORMAL INTENSIFIED.

WRITE: /01 sy-vline, 02 text-167, 132 sy-vline.

WRITE: /01 sy-vline, 02 sy-uline(130), 132 sy-vline.

NEW-LINE.

IF rbuk-gsber NE '**'.

FORMAT COLOR COL_TOTAL INTENSIFIED OFF.

ELSE.

FORMAT COLOR COL_TOTAL INTENSIFIED.

ENDIF.

ENDIF.

  • Ausgabe des Jahresumsatzes -----------------------------------------*

WRITE: 01 sy-vline.

WRITE: 02 rbuk-gsber(4),

07 text-166,

87 rbuk-kumum CURRENCY t001-waers.

WRITE: 132 sy-vline.

ENDIF.

AT END OF waers.

ULINE.

ENDAT.

ENDLOOP.

ENDIF.

ENDFORM. "RASTER_AUSGABE_BUKRB

*----


*

  • FORM RASTER_AUSGABE_TOTAL *

*----


*

  • ........ *

*----


*

FORM raster_ausgabe_total.

IF rastverd < '2'.

DETAIL.

  • MOVE TEXT-102 TO VARUEB1.

  • MOVE TEXT-106 TO VARUEB2.

REPLACE 'RP01' WITH rc01 INTO varueb2. "bis 0

REPLACE 'RP02' WITH rc02 INTO varueb2. "bis 20

REPLACE 'RP03' WITH rc03 INTO varueb2. "bis 40

REPLACE 'RP04' WITH rc04 INTO varueb2. "bis 80

REPLACE 'RP05' WITH rc05 INTO varueb2. "bis 100

REPLACE 'RP06' WITH rc06 INTO varueb1. "von 1

REPLACE 'RP07' WITH rc07 INTO varueb1. "von 21

REPLACE 'RP08' WITH rc08 INTO varueb1. "von 41

REPLACE 'RP09' WITH rc09 INTO varueb1. "von 81

REPLACE 'RP10' WITH rc10 INTO varueb1. "von 101

SORT rsum.

LOOP AT rsum.

NEW-LINE.

  • Bei Verdichtung der Geschaeftsbereiche nur das Summenraster ausgeben*

IF rastverd = '1' AND verdicht > 0.

CHECK rsum-sortk = '1'.

ENDIF.

FORMAT COLOR COL_TOTAL INTENSIFIED.

  • Bei der ersten Rasterart Umsatz, Anzahlungen usw. ausgeben ---------*

IF rsum-raart = rart.

RESERVE 5 LINES.

WRITE: 01 sy-vline,

02(02) '**', "

08(05) rsum-waers, " Waehrung

14(11) rsum-anzah CURRENCY rsum-waers " Anzahlungen

ROUND faktor DECIMALS stellen,

26(12) rsum-opsum CURRENCY rsum-waers " Offene Posten Summe

ROUND faktor DECIMALS stellen.

  • ENDIF.

ELSE.

WRITE: /01 sy-vline.

ENDIF.

CASE rsum-raart.

WHEN '1'. WRITE: 39(3) text-019, 42 sy-vline. " Net-Fae

WHEN '2'. WRITE: 39(3) text-020, 42 sy-vline. " Skt-Fae

WHEN '3'. WRITE: 39(3) text-021, 42 sy-vline. " Zhl-Ein

WHEN '4'. WRITE: 39(3) text-024, 42 sy-vline. " Alt-Fae

WHEN '5'. WRITE: 39(3) text-022, 42 sy-vline. " Ueb-Fae

ENDCASE.

WRITE:

(12) rsum-rast1 CURRENCY rsum-waers NO-ZERO

ROUND faktor DECIMALS stellen, 57 sy-vline,

(12) rsum-rast2 CURRENCY rsum-waers NO-ZERO

ROUND faktor DECIMALS stellen, 72 sy-vline,

(12) rsum-rast3 CURRENCY rsum-waers NO-ZERO

ROUND faktor DECIMALS stellen, 87 sy-vline,

(12) rsum-rast4 CURRENCY rsum-waers NO-ZERO

ROUND faktor DECIMALS stellen, 102 sy-vline,

(12) rsum-rast5 CURRENCY rsum-waers NO-ZERO

ROUND faktor DECIMALS stellen, 117 sy-vline,

(12) rsum-rast6 CURRENCY rsum-waers NO-ZERO

ROUND faktor DECIMALS stellen, 132 sy-vline.

  • ENDIF.

AT END OF waers.

ULINE.

ENDAT.

ENDLOOP.

ENDIF.

ENDFORM. "RASTER_AUSGABE_TOTAL

*----


*

  • FORM PAYMENT_FORECAST *

*----


*

  • ........ *

*----


*

FORM payment_forecast.

  • Es werden die letzten 5 Zahlungseingänge berücksichtigt.

  • Summe des Zahlungsvolumens 'wenn Kunde auf Skontoabzug verzichtet'.

ADD knb4-agn01 THEN knb4-agn02 UNTIL knb4-agn05 GIVING zvnetto.

  • Summe des Zahlungsvolumens 'wenn Kunde mit maximalem Skontoabzug

  • zahlt'.

ADD knb4-ags01 THEN knb4-ags02 UNTIL knb4-ags05 GIVING zvskonto.

zvmalvz = 0.

IF zvskonto > zvnetto.

  • Kunde zahlt überwiegend mit Skontoabzug.

zvtyp = 'S'.

zvmalvz = knb4-ags01 * knb4-vzs01

+ knb4-ags02 * knb4-vzs02

+ knb4-ags03 * knb4-vzs03

+ knb4-ags04 * knb4-vzs04

+ knb4-ags05 * knb4-vzs05.

IF zvskonto <> 0.

zvverzug = zvmalvz / zvskonto.

ELSE.

zvverzug = 0.

ENDIF.

ELSE.

  • Kunde zahlt überwiegend netto.

zvtyp = 'N'.

zvmalvz = knb4-agn01 * knb4-vzn01

+ knb4-agn02 * knb4-vzn02

+ knb4-agn03 * knb4-vzn03

+ knb4-agn04 * knb4-vzn04

+ knb4-agn05 * knb4-vzn05.

IF zvnetto <> 0.

zvverzug = zvmalvz / zvnetto.

ELSE.

zvverzug = 0.

ENDIF.

ENDIF. "IF ZVSKONTO > ZVNETTO.

ENDFORM. "PAYMENT_FORECAST

*----


*

  • FORM MAHNDATEN *

*----


*

  • ........ *

*----


*

FORM mahndaten.

CALL FUNCTION 'FOR_ALL_KNB5'

EXPORTING: xkunnr = kna1-kunnr

xbukrs = knb1-bukrs

TABLES xknb5 = xmahn

EXCEPTIONS key_incomplete = 1

not_authorized = 2

not_found = 3.

IF sy-subrc = 0.

LOOP AT xmahn.

IF sy-tabix LE 6.

WRITE xmahn-maber TO txt_1+index.

WRITE xmahn-mahna TO txt_2+index NO-ZERO.

WRITE xmahn-knrma TO txt_3+index NO-ZERO.

IF NOT xmahn-madat IS INITIAL.

WRITE xmahn-madat TO txt_4+index.

ENDIF.

WRITE xmahn-mahns TO txt_5+index NO-ZERO.

IF NOT xmahn-busab IS INITIAL.

SELECT SINGLE * FROM t001s INTO *t001s

WHERE bukrs EQ xmahn-bukrs

AND busab EQ xmahn-busab.

WRITE *t001s-sname(10) TO txt_6+index.

CLEAR *t001s.

ELSE.

WRITE t001s-sname(10) TO txt_6+index.

ENDIF.

WRITE xmahn-mansp TO txt_7+index NO-ZERO.

WRITE xmahn-gmvdt TO txt_8+index NO-ZERO.

index = index + 13.

ELSE.

EXIT.

ENDIF.

ENDLOOP.

ELSE.

CASE sy-subrc.

WHEN '1'.

MESSAGE e370 WITH knb1-bukrs kna1-kunnr.

WHEN '2'.

MESSAGE e371 WITH knb1-bukrs 'D' kna1-kunnr.

ENDCASE.

ENDIF.

REFRESH xmahn.

CLEAR xmahn.

index = 0.

ENDFORM. "MAHNDATEN

*----


*

  • FORM SHB_KENNZEICHEN *

*----


*

  • ........ *

*----


*

FORM shb_kennzeichen.

CLEAR humkz1.

CLEAR humkz2.

CLEAR humkz3.

CLEAR humkz4.

CLEAR humkz5.

CLEAR humkz6.

CLEAR humkz7.

CLEAR humkz8.

CLEAR humkz9.

CLEAR humkz10.

IF NOT umsatzkz(1) IS INITIAL.

humkz1 = umsatzkz(1).

ENDIF.

IF NOT umsatzkz+1(1) IS INITIAL.

humkz2 = umsatzkz+1(1).

ENDIF.

IF NOT umsatzkz+2(1) IS INITIAL.

humkz3 = umsatzkz+2(1).

ENDIF.

IF NOT umsatzkz+3(1) IS INITIAL.

humkz4 = umsatzkz+3(1).

ENDIF.

IF NOT umsatzkz+4(1) IS INITIAL.

humkz5 = umsatzkz+4(1).

ENDIF.

IF NOT umsatzkz+5(1) IS INITIAL.

humkz6 = umsatzkz+5(1).

ENDIF.

IF NOT umsatzkz+6(1) IS INITIAL.

humkz7 = umsatzkz+6(1).

ENDIF.

IF NOT umsatzkz+7(1) IS INITIAL.

humkz8 = umsatzkz+7(1).

ENDIF.

IF NOT umsatzkz+8(1) IS INITIAL.

humkz9 = umsatzkz+8(1).

ENDIF.

IF NOT umsatzkz+9(1) IS INITIAL.

humkz10 = umsatzkz+9(1).

ENDIF.

ENDFORM. "SHB_KENNZEICHEN

*----


*

  • FORM SHBKZ_PRUEFEN *

*----


*

  • ........ *

*----


*

FORM shbkz_pruefen.

CLEAR flag1.

SELECT * FROM tbsl

WHERE koart = 'D'.

IF NOT tbsl-xsonu IS INITIAL.

SELECT * FROM tbslt

WHERE bschl = tbsl-bschl

AND umskz = char1.

flag1 = 'X'.

ENDSELECT.

ENDIF.

ENDSELECT.

IF NOT flag1 IS INITIAL.

SELECT SINGLE * FROM t074u

WHERE koart = 'D'

AND umskz = char1.

IF NOT t074u-merkp IS INITIAL.

IF sy-batch IS INITIAL.

SET CURSOR FIELD 'UMSATZKZ'.

ENDIF.

MESSAGE w376 WITH char1 'D'.

ENDIF.

SELECT SINGLE * FROM t074t

WHERE spras = sy-langu

AND koart = 'D'

AND shbkz = char1.

IF sy-subrc = 0.

bezshb-shbkz = t074t-shbkz.

bezshb-ltext = t074t-ltext.

APPEND bezshb.

ELSE.

CLEAR flag1.

ENDIF.

ENDIF.

IF flag1 IS INITIAL.

IF sy-batch IS INITIAL.

SET CURSOR FIELD 'UMSATZKZ'.

ENDIF.

MESSAGE w375 WITH char1 'D'.

ENDIF.

ENDFORM. "SHBKZ_PRUEFEN

*----


*

  • FORM OBLIGOS *

*----


*

  • ........ *

*----


*

FORM obligos.

CLEAR aobligo.

REFRESH aobligo.

IF NOT c-saldo IS INITIAL.

CLEAR aobligo.

MOVE '1' TO aobligo-obart.

MOVE c-saldo TO aobligo-oblig.

WRITE text-117 TO aobligo-ltext.

APPEND aobligo.

ENDIF.

IF NOT c-sums1 IS INITIAL.

CLEAR aobligo.

MOVE '2' TO aobligo-obart.

MOVE c-umkz1 TO aobligo-shbkz.

MOVE c-sums1 TO aobligo-oblig.

LOOP AT bezshb

WHERE shbkz = c-umkz1.

MOVE bezshb-ltext TO aobligo-ltext.

ENDLOOP.

APPEND aobligo.

ENDIF.

IF NOT c-sums2 IS INITIAL.

CLEAR aobligo.

MOVE '2' TO aobligo-obart.

MOVE c-umkz2 TO aobligo-shbkz.

MOVE c-sums2 TO aobligo-oblig.

LOOP AT bezshb

WHERE shbkz = c-umkz2.

MOVE bezshb-ltext TO aobligo-ltext.

ENDLOOP.

APPEND aobligo.

ENDIF.

IF NOT c-sums3 IS INITIAL.

CLEAR aobligo.

MOVE '2' TO aobligo-obart.

MOVE c-umkz3 TO aobligo-shbkz.

MOVE c-sums3 TO aobligo-oblig.

LOOP AT bezshb

WHERE shbkz = c-umkz3.

MOVE bezshb-ltext TO aobligo-ltext.

ENDLOOP.

APPEND aobligo.

ENDIF.

IF NOT c-sums4 IS INITIAL.

CLEAR aobligo.

MOVE '2' TO aobligo-obart.

MOVE c-umkz4 TO aobligo-shbkz.

MOVE c-sums4 TO aobligo-oblig.

LOOP AT bezshb

WHERE shbkz = c-umkz4.

MOVE bezshb-ltext TO aobligo-ltext.

ENDLOOP.

APPEND aobligo.

ENDIF.

IF NOT c-sums5 IS INITIAL.

CLEAR aobligo.

MOVE '2' TO aobligo-obart.

MOVE c-umkz5 TO aobligo-shbkz.

MOVE c-sums5 TO aobligo-oblig.

LOOP AT bezshb

WHERE shbkz = c-umkz5.

MOVE bezshb-ltext TO aobligo-ltext.

ENDLOOP.

APPEND aobligo.

ENDIF.

IF NOT c-sums6 IS INITIAL.

CLEAR aobligo.

MOVE '2' TO aobligo-obart.

MOVE c-umkz6 TO aobligo-shbkz.

MOVE c-sums6 TO aobligo-oblig.

LOOP AT bezshb

WHERE shbkz = c-umkz6.

MOVE bezshb-ltext TO aobligo-ltext.

ENDLOOP.

APPEND aobligo.

ENDIF.

IF NOT c-sums7 IS INITIAL.

CLEAR aobligo.

MOVE '2' TO aobligo-obart.

MOVE c-umkz7 TO aobligo-shbkz.

MOVE c-sums7 TO aobligo-oblig.

LOOP AT bezshb

WHERE shbkz = c-umkz7.

MOVE bezshb-ltext TO aobligo-ltext.

ENDLOOP.

APPEND aobligo.

ENDIF.

IF NOT c-sums8 IS INITIAL.

CLEAR aobligo.

MOVE '2' TO aobligo-obart.

MOVE c-umkz8 TO aobligo-shbkz.

MOVE c-sums8 TO aobligo-oblig.

LOOP AT bezshb

WHERE shbkz = c-umkz8.

MOVE bezshb-ltext TO aobligo-ltext.

ENDLOOP.

APPEND aobligo.

ENDIF.

IF NOT c-sums9 IS INITIAL.

CLEAR aobligo.

MOVE '2' TO aobligo-obart.

MOVE c-umkz9 TO aobligo-shbkz.

MOVE c-sums9 TO aobligo-oblig.

LOOP AT bezshb

WHERE shbkz = c-umkz9.

MOVE bezshb-ltext TO aobligo-ltext.

ENDLOOP.

APPEND aobligo.

ENDIF.

IF NOT c-sums10 IS INITIAL.

CLEAR aobligo.

MOVE '2' TO aobligo-obart.

MOVE c-umkz10 TO aobligo-shbkz.

MOVE c-sums10 TO aobligo-oblig.

LOOP AT bezshb

WHERE shbkz = c-umkz10.

MOVE bezshb-ltext TO aobligo-ltext.

ENDLOOP.

APPEND aobligo.

ENDIF.

IF NOT c-sonob IS INITIAL.

CLEAR aobligo.

MOVE '3' TO aobligo-obart.

MOVE c-sonob TO aobligo-oblig.

WRITE text-152 TO aobligo-ltext.

APPEND aobligo.

ENDIF.

SORT aobligo.

ENDFORM. "OBLIGOS

*----


*

  • FORM EINZELPOSTEN_SAVE *

*----


*

  • ........ *

*----


*

FORM einzelposten_save.

CLEAR hbsid.

CLEAR refbl.

MOVE-CORRESPONDING bsid TO hbsid.

MOVE-CORRESPONDING bsega TO hbsid.

MOVE ntage TO hbsid-ntage.

MOVE stage TO hbsid-stage.

MOVE ztage TO hbsid-ztage.

MOVE atage TO hbsid-atage.

MOVE utage TO hbsid-utage.

APPEND hbsid.

MOVE-CORRESPONDING bsid TO refbl.

MOVE ntage TO refbl-ntage.

MOVE stage TO refbl-stage.

MOVE ztage TO refbl-ztage.

MOVE atage TO refbl-atage.

MOVE utage TO refbl-utage.

APPEND refbl.

ENDFORM. "EINZELPOSTEN_SAVE

*----


*

  • FORM EINZELPOSTEN_LINK *

*----


*

  • ........ *

*----


*

FORM einzelposten_link.

LOOP AT hbsid

WHERE rebzg NE space.

LOOP AT refbl

WHERE bukrs = hbsid-bukrs

AND belnr = hbsid-rebzg

AND gjahr = hbsid-rebzj

AND buzei = hbsid-rebzz.

hbsid-ntage = refbl-ntage.

hbsid-stage = refbl-stage.

hbsid-ztage = refbl-ztage.

hbsid-atage = refbl-atage.

hbsid-utage = refbl-utage.

MODIFY hbsid.

ENDLOOP.

ENDLOOP.

ENDFORM. "EINZELPOSTEN_LINK

*----


*

  • FORM EINZELPOSTEN_PROC *

*----


*

  • ........ *

*----


*

FORM einzelposten_proc.

LOOP AT hbsid

WHERE bukrs = knb1-bukrs.

IF t001-bukrs NE knb1-bukrs.

READ TABLE ht001 WITH KEY bukrs = knb1-bukrs.

t001 = ht001.

ENDIF.

CLEAR bsid.

CLEAR bsega.

MOVE-CORRESPONDING hbsid TO bsid.

MOVE-CORRESPONDING hbsid TO bsega.

ntage = hbsid-ntage.

stage = hbsid-stage.

ztage = hbsid-ztage.

atage = hbsid-atage.

utage = hbsid-utage.

  • die Einzelposten werden nach den Tagen der ersten Rasterart --------*

  • sortiert -----------------------------------------------------------*

IF rart-net = 'X'.

tage = ntage.

ELSE.

IF rart-skt = 'X'.

tage = stage.

ELSE.

IF rart-zhl = 'X'.

tage = ztage.

ELSE.

IF rart-alt = 'X'.

tage = atage.

ELSE.

IF rart-ueb = 'X'.

tage = utage.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

CASE bsid-umsks.

*----


Anzahlungen sammeln -


*

*----


auch wenn nicht von aussen abgegrenzt -


*

WHEN 'A'.

CLEAR rtab.

IF bsid-bstat NE 'S'.

MOVE: bsid-bukrs TO rtab-bukrs,

'0' TO rtab-sortk,

bsid-gsber TO rtab-gsber,

rart TO rtab-raart.

IF sortart = '2'.

MOVE bsid-waers TO rtab-waers.

MOVE bsega-wrshb TO rtab-anzah.

ELSE.

IF NOT konzvers IS INITIAL.

MOVE t001-waers TO rtab-waers.

MOVE bsega-dmshb TO rtab-anzah.

ELSE.

MOVE bsega-dmshb TO rtab-anzah.

ENDIF.

ENDIF.

COLLECT rtab.

*----


Summieren ueber alle Geschaeftsbereiche -


*

MOVE: '1' TO rtab-sortk,

'**' TO rtab-gsber.

COLLECT rtab.

ENDIF.

ENDCASE.

CHECK: budat,

bldat,

netdt.

sel-postn = 'J'.

IF sortart = '1'.

IF konzvers IS INITIAL.

PERFORM posten_rastern USING space.

MOVE space TO gb-waers.

ELSE.

PERFORM posten_rastern USING t001-waers.

MOVE t001-waers TO gb-waers.

ENDIF.

ELSE.

PERFORM posten_rastern USING bsid-waers.

MOVE bsid-waers TO gb-waers.

ENDIF.

---- nur bei Verdichtungsstufe '0' werden EINZELPOSTEN extrahiert --

IF verdicht = '0'.

MOVE '3' TO satzart.

MOVE bsid-gsber TO gb-gsber.

MOVE bsega-dmshb TO shbetrag.

*------Der Fremdwährungsbetrag soll nur Übernommen werden, wenn sich

  • sich der Währung von der Hauswährung unterscheidet.

IF bsid-waers EQ t001-waers.

MOVE space TO bsega-wrshb.

ENDIF.

EXTRACT einzelposten.

ENDIF.

ENDLOOP.

ENDFORM. "EINZELPOSTEN_PROC

*----


*

  • FORM SUMM_C3 *

*----


*

  • ........ *

*----


*

FORM summ_c3.

c3-saldo = c3-saldo + c-saldo.

c3-umkz1 = c-umkz1.

c3-sums1 = c3-sums1 + c-sums1.

c3-umkz2 = c-umkz2.

c3-sums2 = c3-sums2 + c-sums2.

c3-umkz3 = c-umkz3.

c3-sums3 = c3-sums3 + c-sums3.

c3-umkz4 = c-umkz4.

c3-sums4 = c3-sums4 + c-sums4.

c3-umkz5 = c-umkz5.

c3-sums5 = c3-sums5 + c-sums5.

c3-umkz6 = c-umkz6.

c3-sums6 = c3-sums6 + c-sums6.

c3-umkz7 = c-umkz7.

c3-sums7 = c3-sums7 + c-sums7.

c3-umkz8 = c-umkz8.

c3-sums8 = c3-sums8 + c-sums8.

c3-umkz9 = c-umkz9.

c3-sums9 = c3-sums9 + c-sums9.

c3-umkz10 = c-umkz10.

c3-sums10 = c3-sums10 + c-sums10.

c3-sonob = c3-sonob + c-sonob.

c3-babzg = c3-babzg + c-babzg.

c3-uabzg = c3-uabzg + c-uabzg.

c3-kzins = c3-kzins + c-kzins.

c3-kumum = c3-kumum + c-kumum.

c3-kumag = c3-kumag + c-kumag.

c3-agobli = c3-agobli + c-agobli.

ENDFORM. "SUMM_C3

*&----


*

*& Form RASTER_AUSGABE_ALV_GRID

*&----


*

  • text

*----


*

FORM raster_ausgabe_alv_grid.

tittext = text-300.

WRITE dd_stida TO dattext.

REPLACE '&' WITH dattext INTO tittext.

g_grid_title = tittext.

g_repid = sy-repid.

g_save = 'A'.

PERFORM fieldcat_init USING gt_fieldcat[].

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

i_callback_program = g_repid

  • I_CALLBACK_PF_STATUS_SET = G_STATUS_SET

i_callback_user_command = g_user_command

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

i_grid_title = g_grid_title

  • I_GRID_SETTINGS =

  • IS_LAYOUT =

it_fieldcat = gt_fieldcat[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

i_default = 'X'

i_save = g_save

is_variant = gs_variant

  • IT_EVENTS =

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

t_outtab = rtab_alv

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. "RASTER_AUSGABE_ALV_GRID

*&----


*

*& Form FIELDCAT_INIT

*&----


*

  • text

*----


*

  • -->P_GT_FIELDCAT[] text

*----


*

FORM fieldcat_init

USING rt_fieldcat TYPE slis_t_fieldcat_alv.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'BUKRS'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'BUKRS'.

ls_fieldcat-ref_tabname = 'BSID'.

APPEND ls_fieldcat TO rt_fieldcat.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'KUNNR'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'KUNNR'.

ls_fieldcat-ref_tabname = 'KNA1'.

APPEND ls_fieldcat TO rt_fieldcat.

***************AB*************

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'KOSTL'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'KOSTL'.

ls_fieldcat-ref_tabname = 'BSID'.

APPEND ls_fieldcat TO rt_fieldcat.

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = g_tabname.

  • ls_fieldcat-fieldname = 'BELNR'.

    • LS_FIELDCAT-KEY = ' '. "sets key field

  • ls_fieldcat-ref_fieldname = 'BELNR'.

  • ls_fieldcat-ref_tabname = 'RF140'.

  • APPEND ls_fieldcat TO rt_fieldcat.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'BELNR'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'BELNR'.

ls_fieldcat-ref_tabname = 'BSID'.

APPEND ls_fieldcat TO rt_fieldcat.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'BLDAT'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'BLDAT'.

ls_fieldcat-ref_tabname = 'BSID'.

APPEND ls_fieldcat TO rt_fieldcat.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'WRBTR'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'WRBTR'.

ls_fieldcat-ref_tabname = 'BSID'.

APPEND ls_fieldcat TO rt_fieldcat.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'BDIFF'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'BDIFF'.

ls_fieldcat-ref_tabname = 'BSID'.

APPEND ls_fieldcat TO rt_fieldcat.

***************AB*************

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'BUSAB'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'BUSAB'.

ls_fieldcat-ref_tabname = 'KNB1'.

APPEND ls_fieldcat TO rt_fieldcat.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'SORTL'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'SORTL'.

ls_fieldcat-ref_tabname = 'KNA1'.

APPEND ls_fieldcat TO rt_fieldcat.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'LAND1'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'LAND1'.

ls_fieldcat-ref_tabname = 'KNA1'.

APPEND ls_fieldcat TO rt_fieldcat.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'GSBER'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'GSBER'.

ls_fieldcat-ref_tabname = 'BSID'.

APPEND ls_fieldcat TO rt_fieldcat.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'WAERS'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'WAERS'.

ls_fieldcat-ref_tabname = 'BSID'.

APPEND ls_fieldcat TO rt_fieldcat.

  • CLEAR LS_FIELDCAT.

  • LS_FIELDCAT-TABNAME = G_TABNAME.

  • LS_FIELDCAT-FIELDNAME = 'HWAER'.

    • LS_FIELDCAT-KEY = ' '. "sets key field

  • LS_FIELDCAT-REF_FIELDNAME = 'RF140'.

  • LS_FIELDCAT-REF_TABNAME = 'HWAER'.

  • APPEND LS_FIELDCAT TO RT_FIELDCAT.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'RAART'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'RAART'.

ls_fieldcat-ref_tabname = 'RF140'.

APPEND ls_fieldcat TO rt_fieldcat.

  • CLEAR LS_FIELDCAT.

  • LS_FIELDCAT-TABNAME = G_TABNAME.

  • LS_FIELDCAT-FIELDNAME = 'SHKZG'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

  • LS_FIELDCAT-REF_FIELDNAME = 'SHKZG'.

  • LS_FIELDCAT-REF_TABNAME = 'BSID'.

  • APPEND LS_FIELDCAT TO RT_FIELDCAT.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'KUMUM'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'KUMUMHW'.

ls_fieldcat-ref_tabname = 'RF140'.

ls_fieldcat-cfieldname = 'WAERS'.

ls_fieldcat-no_zero = 'X'.

APPEND ls_fieldcat TO rt_fieldcat.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'ANZAH'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'ANZBTHW'.

ls_fieldcat-ref_tabname = 'RF140'.

ls_fieldcat-cfieldname = 'WAERS'.

ls_fieldcat-no_zero = 'X'.

APPEND ls_fieldcat TO rt_fieldcat.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'OPSUM'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'GSALDD'.

ls_fieldcat-ref_tabname = 'RF140'.

ls_fieldcat-cfieldname = 'WAERS'.

ls_fieldcat-no_zero = 'X'.

APPEND ls_fieldcat TO rt_fieldcat.

WRITE: rp01 TO rc01.

WRITE: rp02 TO rc02.

WRITE: rp03 TO rc03.

WRITE: rp04 TO rc04.

WRITE: rp05 TO rc05.

WRITE: rp06 TO rc06.

WRITE: rp07 TO rc07.

WRITE: rp08 TO rc08.

WRITE: rp09 TO rc09.

WRITE: rp10 TO rc10.

CLEAR uebtext.

CLEAR uektext.

uebtext = text-201.

uektext = text-201.

REPLACE 'RP01' WITH rc01 INTO uebtext.

REPLACE 'RP01' WITH rc01 INTO uektext.

CONDENSE uebtext.

CONDENSE uektext.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'RAST1'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'RAST1'.

ls_fieldcat-ref_tabname = 'RF140'.

ls_fieldcat-seltext_s = uebtext.

ls_fieldcat-seltext_m = uebtext.

ls_fieldcat-seltext_l = uebtext.

  • LS_FIELDCAT-REPTEXT_DDIC = uebtext.

ls_fieldcat-cfieldname = 'WAERS'.

ls_fieldcat-no_zero = 'X'.

APPEND ls_fieldcat TO rt_fieldcat.

CLEAR uebtext.

CLEAR uektext.

IF NOT rp06 IS INITIAL.

IF rp02 IS INITIAL.

uektext = text-206.

REPLACE 'RP06' WITH rc06 INTO uektext.

ELSE.

uebtext = text-206.

uektext = rc06(3).

uektext+4(1) = '-'.

ENDIF.

ENDIF.

IF NOT rp02 IS INITIAL.

uebtext+11(11) = text-202.

IF NOT rp06 IS INITIAL.

uektext+6 = rc02(3).

ENDIF.

ENDIF.

REPLACE 'RP02' WITH rc02 INTO uebtext.

REPLACE 'RP06' WITH rc06 INTO uebtext.

CONDENSE uebtext.

CONDENSE uektext.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'RAST2'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'RAST2'.

ls_fieldcat-ref_tabname = 'RF140'.

ls_fieldcat-seltext_s = uektext.

ls_fieldcat-seltext_m = uebtext.

ls_fieldcat-seltext_l = uebtext.

  • LS_FIELDCAT-REPTEXT_DDIC = uebtext.

ls_fieldcat-cfieldname = 'WAERS'.

ls_fieldcat-no_zero = 'X'.

APPEND ls_fieldcat TO rt_fieldcat.

CLEAR uebtext.

CLEAR uektext.

IF NOT rp07 IS INITIAL.

IF rp03 IS INITIAL.

uektext = text-207.

REPLACE 'RP07' WITH rc07 INTO uektext.

ELSE.

uebtext = text-207.

uektext = rc07(3).

uektext+4(1) = '-'.

ENDIF.

ENDIF.

IF NOT rp03 IS INITIAL.

uebtext+11(11) = text-203.

IF NOT rp07 IS INITIAL.

uektext+6 = rc03(3).

ENDIF.

ENDIF.

REPLACE 'RP03' WITH rc03 INTO uebtext.

REPLACE 'RP07' WITH rc07 INTO uebtext.

CONDENSE uebtext.

CONDENSE uektext.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'RAST3'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'RAST3'.

ls_fieldcat-ref_tabname = 'RF140'.

ls_fieldcat-seltext_s = uektext.

ls_fieldcat-seltext_m = uebtext.

ls_fieldcat-seltext_l = uebtext.

  • LS_FIELDCAT-REPTEXT_DDIC = uebtext.

ls_fieldcat-cfieldname = 'WAERS'.

ls_fieldcat-no_zero = 'X'.

APPEND ls_fieldcat TO rt_fieldcat.

CLEAR uebtext.

CLEAR uektext.

IF NOT rp08 IS INITIAL.

IF rp04 IS INITIAL.

uektext = text-208.

REPLACE 'RP08' WITH rc08 INTO uektext.

ELSE.

uebtext = text-208.

uektext = rc08(3).

uektext+4(1) = '-'.

ENDIF.

ENDIF.

IF NOT rp04 IS INITIAL.

uebtext+11(11) = text-204.

IF NOT rp08 IS INITIAL.

uektext+6 = rc04(3).

ENDIF.

ENDIF.

REPLACE 'RP04' WITH rc04 INTO uebtext.

REPLACE 'RP08' WITH rc08 INTO uebtext.

CONDENSE uebtext.

CONDENSE uektext.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'RAST4'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'RAST4'.

ls_fieldcat-ref_tabname = 'RF140'.

ls_fieldcat-seltext_s = uektext.

ls_fieldcat-seltext_m = uebtext.

ls_fieldcat-seltext_l = uebtext.

  • LS_FIELDCAT-REPTEXT_DDIC = uebtext.

ls_fieldcat-cfieldname = 'WAERS'.

ls_fieldcat-no_zero = 'X'.

APPEND ls_fieldcat TO rt_fieldcat.

CLEAR uebtext.

CLEAR uektext.

IF NOT rp09 IS INITIAL.

IF rp05 IS INITIAL.

uektext = text-209.

REPLACE 'RP09' WITH rc09 INTO uektext.

ELSE.

uebtext = text-209.

uektext = rc09(3).

uektext+4(1) = '-'.

ENDIF.

ENDIF.

IF NOT rp05 IS INITIAL.

uebtext+11(11) = text-205.

IF NOT rp09 IS INITIAL.

uektext+6 = rc05(3).

ENDIF.

ENDIF.

REPLACE 'RP05' WITH rc05 INTO uebtext.

REPLACE 'RP09' WITH rc09 INTO uebtext.

CONDENSE uebtext.

CONDENSE uektext.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'RAST5'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'RAST5'.

ls_fieldcat-ref_tabname = 'RF140'.

ls_fieldcat-seltext_s = uektext.

ls_fieldcat-seltext_m = uebtext.

ls_fieldcat-seltext_l = uebtext.

  • LS_FIELDCAT-REPTEXT_DDIC = uebtext.

ls_fieldcat-cfieldname = 'WAERS'.

ls_fieldcat-no_zero = 'X'.

APPEND ls_fieldcat TO rt_fieldcat.

CLEAR uebtext.

CLEAR uektext.

IF NOT rp10 IS INITIAL.

uebtext = text-210.

uektext = text-210.

ENDIF.

REPLACE 'RP10' WITH rc10 INTO uebtext.

REPLACE 'RP10' WITH rc10 INTO uektext.

CONDENSE uebtext.

CONDENSE uektext.

CLEAR ls_fieldcat.

ls_fieldcat-tabname = g_tabname.

ls_fieldcat-fieldname = 'RAST6'.

  • LS_FIELDCAT-KEY = ' '. "sets key field

ls_fieldcat-ref_fieldname = 'RAST6'.

ls_fieldcat-ref_tabname = 'RF140'.

ls_fieldcat-seltext_s = uebtext.

ls_fieldcat-seltext_m = uebtext.

ls_fieldcat-seltext_l = uebtext.

  • LS_FIELDCAT-REPTEXT_DDIC = uebtext.

ls_fieldcat-cfieldname = 'WAERS'.

ls_fieldcat-no_zero = 'X'.

APPEND ls_fieldcat TO rt_fieldcat.

ENDFORM. " FIELDCAT_INIT

*&----


*

*& Form USER_COMMAND

*&----


*

  • text

*----


*

  • --> R_UCOMM

  • --> RS_SELFIELD

*----


*

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

DATA: lt_seltab TYPE STANDARD TABLE OF rsparams WITH HEADER LINE.

CASE r_ucomm.

WHEN '&IC1'.

READ TABLE rtab_alv INTO rtab_alv INDEX rs_selfield-tabindex.

lt_seltab-selname = 'DD_KUNNR'.

lt_seltab-sign = 'I'.

lt_seltab-option = 'EQ'.

lt_seltab-low = rtab_alv-kunnr.

APPEND lt_seltab.

IF NOT rtab_alv-bukrs IS INITIAL.

lt_seltab-selname = 'DD_BUKRS'.

lt_seltab-sign = 'I'.

lt_seltab-option = 'EQ'.

lt_seltab-low = rtab_alv-bukrs.

APPEND lt_seltab.

ENDIF.

lt_seltab-selname = 'X_OPSEL'.

lt_seltab-sign = 'I'.

lt_seltab-option = 'EQ'.

lt_seltab-low = 'X'.

APPEND lt_seltab.

lt_seltab-selname = 'PA_STIDA'.

lt_seltab-sign = 'I'.

lt_seltab-option = 'EQ'.

lt_seltab-low = dd_stida.

APPEND lt_seltab.

lt_seltab-selname = 'X_NORM'.

lt_seltab-sign = 'I'.

lt_seltab-option = 'EQ'.

lt_seltab-low = 'X'.

APPEND lt_seltab.

lt_seltab-selname = 'X_SHBV'.

lt_seltab-sign = 'I'.

lt_seltab-option = 'EQ'.

lt_seltab-low = 'X'.

APPEND lt_seltab.

lt_seltab-selname = 'PA_GRID'.

lt_seltab-sign = 'I'.

lt_seltab-option = 'EQ'.

lt_seltab-low = 'Y'.

APPEND lt_seltab.

SUBMIT rfitemar WITH SELECTION-TABLE lt_seltab

AND RETURN.

ENDCASE.

ENDFORM. " USER_COMMAND

*&----


*

*& Form F4_FOR_s_lvar

*&----


*

  • text

*----


*

  • -->P_s_lvar text

*----


*

FORM f4_for_s_lvar CHANGING i_variant LIKE disvariant.

DATA: exit.

DATA: e_variant LIKE disvariant.

CALL FUNCTION 'REUSE_ALV_VARIANT_F4'

EXPORTING

is_variant = i_variant

i_save = 'A'

IMPORTING

e_exit = exit

es_variant = e_variant

EXCEPTIONS

program_error = 3

OTHERS = 3.

IF sy-subrc = 0 AND exit = space.

i_variant-variant = e_variant-variant.

ENDIF.

ENDFORM. " F4_FOR_s_lvar

Former Member
Not what you were looking for? View more on this topic or Ask a question