Hallo
Ich habe eine kurze Frage.
Wir stellen auf ERP 6.0 um und jetzt meckert ein Report das das NODATA Kennzeichen '/' nicht funktioniert.
Könnt Ihr mir helfen wie ich Ihne wieder zum laufen bringe?
Hier der Report:
*----------------------------------------------------------------------*
* Report ZFBIFB01_TBG
* Author: Thomas Janosch
* Rohrdorfer Zement
*----------------------------------------------------------------------*
* Datenübernahme Schnittstelle Union Beton / TBG Inntal / TBW
* Verzeichnisse
* Testsystem : '\USR\SAP\D01\DVEBMGS00\WORK'
* Produktivsystem: '\USR\SAP\P01\DVEBMGS00\WORK'
*----------------------------------------------------------------------*
* Es werden Satzbetten für Übernahme Workbench erzeugt.
* Objekt 100 Finanzbuchhaltungsbelege
report zfbifb01_tbg
no standard page heading
line-size 132
line-count 65(0)
message-id zf.
include: zspstop.
*......Tabellen-Definition
tables: skb1, "Prüfung Abstimmkonto
knb1, "Umschlüsselung Debitor
cepc, "Prüfung Profitcenter
kna1, "Prüfung Debitor,
t005. "Prüfung Ausländer/EG-Ausländer wegen Steuerschlüssel
*......Feldsymbole
field-symbols: <f>.
constants:
c_minus type c value '-',
c_plus type c value '+',
c_err type c value 'X'.
*......Data-Definition
data: w_newbs(2),
k_steuer(2),
d_flag(1),
f_name like rlgrap-filename,
d_lines type i,
d_open(1),
d_subrc like sy-subrc,
i_pfad like dxfields-longpath,
docl(50),
d_fehler(1),
dl_fehler(1),
d_text(10),
saknr like skb1-saknr,
prctr like cepc-prctr,
isteuer type i. "Steuer nur einmal buchen!
data: d_brutto like bseg-dmbtr,
d_netto like bseg-dmbtr,
d_steuer like bseg-dmbtr, "Steuer auf Positionsebene
d_rsteuer like bseg-dmbtr, "Gesamte Steuer
d_skonto like bseg-dmbtr,
d_mwskz like bseg-mwskz,
begin of i_import occurs 0,
satz(600),
end of i_import,
xbgr00 like bgr00, "Mappenvorsatz
xbbkpf like bbkpf, "Kopfdaten 1
xbbseg like bbseg, "Allgemeines
xbwith like bwith, "Quellensteuer
xbbtax like bbtax, "Steuer
xbselk like bselk, "Selektion Kopf
xbselp like bselp, "Selektion Position
*...Satzbetten für Importdatei
*......vorsa
begin of vorsa,
recid(5), "Satzart (="VORSA")
prdnr(4), "Mandant
werks(4), "Werk (Buchungskreis)
datum(8), "Datum (TTMMJJJJ)
end of vorsa,
*......opdat
begin of opdat,
recid(5), "Satzart (="OPDAT")
optyp(1), "OP-Typ (0=Rechnung; 2=Gutschrift)
fknum(10), "Rechnungsnummer (1-4: Werk; 5-10: Lfd.Nr.)
fkdat(8), "Belegdatum (TTMMJJJJ)
fkdat2(8), "Buchungsdatum (TTMMJJJJ)
opnum(10), "OP-Nummer (ähnlich Rechnungsnummer)
kunnr(8), "Debitorennummer (Kundennummer/abw. DebiNr)
fil03(1), "Einstelliges Kennzeichen (Filler = " ")
mwskz(1), "Mehrwertsteuerkennzeichen (1=16%)
zbd1t(3), "Skonto Tage 1
zbd1p(3), "Skonto Prozent 1
zbd2t(3), "Skonto Tage 2
zbd2p(3), "Skonto Prozent 2
zbdnt(3), "Nettotage
zlart(2), "Zahlungsart ("08")
waers(3), "Währungsschlüssel
fil05(2), "Komponente der Versionsnummer ("10")
valut(8), "Valutadatum TTMMJJJJ
fil06(19), "Character 19 (Filler = " ")
btrbr_fw(11), "Betrag (Brutto-Fremdwährung)
btrne_fw(11), "Betrag (Netto-Fremdwährung)
btrbr(11), "Betrag (Brutto-Eigenwährung)
btrne(11), "Betrag (Netto-Eigenwährung)
skbtr(11), "Betrag (Skontofähig)
end of opdat,
*......sachk
begin of sachk,
recid(5), "Satzart (="SACHK")
kostl(6), "Kostenstelle
koart(7), "Kostenart
saknr(7), "Sachkonto
fknum(10), "Rechnungsnummer (1-4: Werk; 5-10: Lfd.Nr.)
fkdat(8), "Rechnungsdatum (TTMMJJJJ)
fil01(20), "Character 20 (Filler = " ")
btrne(11), "Betrag (Netto)
menge(11), "Menge
prdgr(1), "Hauptartikel ("H") ?
lfdat(8), "(Filler = "0")
prdar(1), "(Filler = " ")
artnr(20), "Artikelnummer ?
kostlb(8), "?
end of sachk.
data: r_read,s_read,
h_datum(6).
***********************************************************************
* SELECTION-SCREEN *
***********************************************************************
selection-screen begin of block b1 with frame title text-004.
parameters:
p_bukrs like bkpf-bukrs obligatory default '0020',
p_file(128) default 'C:\Temp\??.txt'.
selection-screen skip 1.
parameters:
p_appl like rfpdo-rfbifile obligatory default
'\USR\BKPF.txt'.
selection-screen skip.
selection-screen begin of line.
selection-screen comment 1(30) text-002 for field p_satz.
selection-screen position 33.
parameters:
p_satz as checkbox default space.
selection-screen end of line.
parameters:
p_mappe like bgr00-group obligatory default text-005,
p_nodata(1) default '\' no-display.
selection-screen end of block b1.
* info messages as popup, log or no info
selection-screen skip 1.
selection-screen begin of block bl2 with frame title text-001.
parameters: xxpop type c radiobutton group rbl1,
xxlog type c radiobutton group rbl1 default 'X',
xxinf type c radiobutton group rbl1.
selection-screen skip.
selection-screen begin of line.
selection-screen comment 1(30) text-008 for field p_pruef.
selection-screen position 33.
parameters: p_pruef as checkbox default 'X'.
selection-screen end of line.
selection-screen end of block bl2.
***********************************************************************
* AT SELECTION-SCREEN
***********************************************************************
at selection-screen on value-request for p_file.
* prozessiert ein Dynpro zur Dateiselektion auf dem Frontend *
call function 'KD_GET_FILENAME_ON_F4'
changing
file_name = f_name
exceptions
mask_too_long = 1
others = 2.
if sy-subrc = 0.
p_file = f_name.
endif.
*** prüfen lokaler Dateiname ***
at selection-screen on p_file.
if p_file = 'X'
and p_file = space.
set cursor field 'P_FILE'.
message e900(zf) with 'Dateiname fehlt oder falsch!'.
endif.
*** prüfen zentraler Dateiname ***
at selection-screen on value-request for p_appl.
call function 'F4_DXFILENAME'
exporting
i_location_flag = 'P'
i_server = 'rosp01'
i_path = '\USR\SAP\D01\DVEBMGS00\WORK'
filemask = '*.*'
fileoperation = 'S'
importing
o_path = i_pfad
abend_flag = d_flag
exceptions
rfc_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.
at selection-screen on p_appl.
if p_appl = 'X'.
if p_appl = space.
set cursor field 'P_APPL'.
message e900(zf).
* Dateiname fehlt oder falsch!
endif.
endif.
at selection-screen on p_mappe.
perform mappenname.
***********************************************************************
* INITIALIZATION *
***********************************************************************
initialization.
perform mappenname.
***********************************************************************
* START-OF-SELECTION *
***********************************************************************
start-of-selection.
stat: datafile,
mappe,
fehler,
positionen,belege.
perform upload using p_file.
check d_lines > 0.
d_datafile-read = d_lines.
if p_bukrs = '0035'.
write: 'Falscher Buchungskreis. Bitte Fakturaübernahme für Österreich',
'verwenden.'.
exit.
endif.
if p_bukrs = '0061'.
write: 'Falscher Buchungskreis. Bitte Fakturaübernahme für Österreich',
'verwenden.'.
exit.
endif.
if p_bukrs = '0020'.
write: 'Falscher Buchungskreis. Bitte Fakturaübernahme für Sand & Kies',
'verwenden.'.
exit.
endif.
if p_bukrs = '0021'.
write: 'Falscher Buchungskreis. Bitte Fakturaübernahme für Sand & Kies',
'verwenden.'.
exit.
endif.
if p_bukrs = '0064'.
write: 'Falscher Buchungskreis. Bitte Fakturaübernahme für Sand & Kies',
'verwenden.'.
exit.
endif.
if p_bukrs = '0063'.
write: 'Falscher Buchungskreis. Bitte Fakturaübernahme für Sand & Kies',
'verwenden.'.
exit.
endif.
if p_satz = 'X'.
open dataset p_appl for output in text mode.
if sy-subrc <> 0.
exit.
else.
d_open = 'X'.
*...Mappenvorsatz füllen
perform fill_nodata using xbgr00.
perform fill_bgr00.
endif.
endif.
*....Achtung Steuerkennzeichen A0 keine Steuer
*.... A1 16&
loop at i_import.
perform initializ_structurs.
case i_import-satz+0(5).
when 'VORSA'. "Währungssatz
perform splitten using 'VORSA'.
when 'OPDAT'. "Rechnungsbuchung
perform fill_bbtax. "Steuer
perform splitten using 'OPDAT'.
perform fill_bbkpf.
perform fill_bbseg_personenkonto.
when 'SACHK'. "Sachbuchung
perform splitten using 'SACHK'.
perform fill_bbseg_sachkonto.
endcase.
endloop.
perform fill_bbtax. "Steuer
if d_open = 'X'. close dataset p_appl. endif.
**********************************************************************
* *
**********************************************************************
end-of-selection.
print_statistik.
*....RFBIBL00 Starten
if d_open = 'X'.
submit rfbibl00 with ds_name = p_appl "Dateiname Satzbetten
with fl_check = p_pruef "Nur Prüfen?
with callmode = 'B' "Mappe erzeugen
with xlog = xxlog "Protokollart
with xinf = xxinf
with xpop = xxpop.
endif.
*&---------------------------------------------------------------------*
*& Form UPLOAD
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_P_FILE text
*----------------------------------------------------------------------*
form upload using p_p_file.
call function 'WS_UPLOAD'
exporting
filename = p_p_file
filetype = 'ASC'
tables
data_tab = i_import
exceptions
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
others = 10.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
describe table i_import lines d_lines.
endform. " UPLOAD
*&---------------------------------------------------------------------*
*& Form FILL_BGR00
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form fill_bgr00.
move '0' to xbgr00-stype.
move p_mappe to xbgr00-group.
move sy-mandt to xbgr00-mandt.
move sy-uname to xbgr00-usnam.
move sy-datum to xbgr00-start.
move 'X' to xbgr00-xkeep.
move p_nodata to xbgr00-nodata.
transfer xbgr00 to p_appl.
endform. " FILL_BGR00
*&---------------------------------------------------------------------*
*& Form FILL_BBKPF
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form fill_bbkpf.
xbbkpf-stype = '1'.
xbbkpf-tcode = 'FB01'.
* IF opdat-optyp = '0'.
xbbkpf-blart = 'RV'.
* ELSE.
* xbbkpf-blart = 'RG'.
* ENDIF.
xbbkpf-bukrs = p_bukrs.
xbbkpf-budat = opdat-fkdat2.
xbbkpf-waers = opdat-waers.
xbbkpf-belnr = opdat-fknum+3(7).
xbbkpf-monat = opdat-fkdat2+2(2).
xbbkpf-bldat = opdat-fkdat.
* xbbkpf-xmwst = 'X'.
if d_open = 'X'.
transfer xbbkpf to p_appl.
endif.
perform write_header.
endform. " FILL_BBKPF
*&---------------------------------------------------------------------*
*& Form FILL_BBSEG
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
form fill_bbseg_sachkonto.
xbbseg-stype = '2'.
xbbseg-tbnam = 'BBSEG'.
xbbseg-newko = sachk-saknr.
perform check_sachkonto using xbbseg-newko.
if sachk-btrne+0(1) = c_plus.
if opdat-optyp = '0'.
xbbseg-newbs = '50'.
else.
xbbseg-newbs = '40'.
endif.
else.
if opdat-optyp = '0'.
xbbseg-newbs = '40'.
else.
xbbseg-newbs = '50'.
endif.
endif.
w_newbs = xbbseg-newbs.
*...Positionstext
xbbseg-sgtxt = sachk-artnr.
* Nettobetrag
perform betragsfeld using sachk-btrne changing xbbseg-wrbtr.
xbbseg-mwskz = d_mwskz.
*...Profitcenter
xbbseg-prctr = sachk-kostl. "Profitcenter
perform check_profitcenter using xbbseg-prctr.
if d_open = 'X'.
transfer xbbseg to p_appl.
endif.
d_text = 'Sachkonto'.
perform write_item_line.
endform. " FILL_BBseg
*&---------------------------------------------------------------------*
*& Form INITIALIZ_STRUCTURS
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
form initializ_structurs.
perform fill_nodata using xbbkpf.
perform fill_nodata using xbbseg.
perform fill_nodata using xbwith.
perform fill_nodata using xbbtax.
perform fill_nodata using xbselk.
perform fill_nodata using xbselp.
endform. " INITIALIZ_STRUCTURS
*&---------------------------------------------------------------------*
*& Form fill_nodata
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_XBKN00 text
*----------------------------------------------------------------------*
form fill_nodata using p_struc.
do.
assign component sy-index of structure p_struc to <f>.
if sy-subrc <> 0. exit. endif.
move p_nodata to p_nodata.
move p_nodata to <f>.
enddo.
endform. " fill_nodata
*&---------------------------------------------------------------------*
*& Form splitten
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_R_SATZ text
*----------------------------------------------------------------------*
form splitten using p_kz.
case p_kz.
when 'VORSA'.
clear vorsa.
vorsa = i_import.
when 'OPDAT'.
clear opdat.
opdat = i_import.
stat_r belege.
when 'SACHK'.
clear sachk.
sachk = i_import.
stat_r positionen.
endcase.
endform. " splitten
*&---------------------------------------------------------------------*
*& Form ermitteln_debitor
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_R_SATZ_KONTO text
*----------------------------------------------------------------------*
form ermitteln_debitor changing p_altkn.
shift p_altkn left deleting leading '0'.
select * from knb1 where altkn = p_altkn and bukrs = p_bukrs.
xbbseg-newko = knb1-kunnr.
if knb1-kverm+0(1) = 'A'.
d_mwskz = knb1-kverm.
endif.
endselect.
if sy-dbcnt = 0.
clear: docl.
docl = text-006.
replace '$altkn$' with p_altkn into docl.
xbbseg-newko = 'ZZZZZZ'.
* d_fehler = 'X'.
stat_r fehler.
endif.
endform. " ermitteln_debitor
*&---------------------------------------------------------------------*
*& Form FILL_BBSEG_PERSONENKONTO
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form fill_bbseg_personenkonto.
clear: d_steuer,d_brutto,d_netto,d_skonto,d_mwskz.
xbbseg-stype = '2'.
xbbseg-tbnam = 'BBSEG'.
*...Debitorennummer ist mit Alter Kontonummer knb1-altkn identisch
*...Über diese Routine wird der neu angelegte SAP Debitor gefunden.
*...Desweiteren wird ggf. ein Steuerkennzeichen im Feld KNB1-KVERM
*...gefunden.
perform ermitteln_debitor using opdat-kunnr.
if opdat-btrbr+0(1) = c_plus.
if opdat-optyp = '0'.
xbbseg-newbs = '01'.
k_steuer = '01'.
else.
xbbseg-newbs = '11'.
k_steuer = '11'.
endif.
else.
if opdat-optyp = '0'.
xbbseg-newbs = '11'.
else.
xbbseg-newbs = '01'.
endif.
endif.
* IF opdat-btrbr+0(1) = c_plus.
* xbbseg-newbs = '01'.
* ELSE.
* xbbseg-newbs = '11'.
* ENDIF.
* Bruttobetrag
perform betragsfeld using opdat-btrbr changing xbbseg-wrbtr.
* Nettobetrag
perform betragsfeld using opdat-btrne changing xbbseg-wmwst.
if xbbseg-wrbtr > xbbseg-wmwst.
replace ',' with '.' into xbbseg-wrbtr.
pack xbbseg-wrbtr to d_brutto.
replace ',' with '.' into xbbseg-wmwst.
pack xbbseg-wmwst to d_netto.
d_steuer = d_brutto - d_netto.
* WRITE d_steuer TO xbbseg-wmwst NO-GROUPING.
write d_brutto to xbbseg-wrbtr no-grouping.
d_mwskz = 'A1'. "16% BRD
isteuer = 1.
else.
d_mwskz = 'A6'.
endif.
case opdat-mwskz.
when '1'.
d_mwskz = 'A1'. "16% BRD
isteuer = 1.
when '2'.
d_mwskz = 'A6'. "0% EU
isteuer = 1.
when '3'.
d_mwskz = 'C1'. "19% BRD
isteuer = 1.
endcase.
xbbseg-wmwst = p_nodata.
xbbseg-prctr = p_nodata.
*
* Zahlunskonditionen übertragen
*
* Tage 1/ Prozent 1
xbbseg-zbd1t = opdat-zbd1t.
xbbseg-zterm = space.
xbbseg-zbd1p+0(2) = opdat-zbd1p+0(2).
xbbseg-zbd1p+2(1) = ','.
xbbseg-zbd1p+3(1) = opdat-zbd1p+2(1).
if opdat-zbd1t = space and opdat-zbd1p = space.
xbbseg-zbd1t = opdat-zbdnt.
elseif opdat-zbd2t = space and opdat-zbd2p = space.
xbbseg-zbd2t = opdat-zbdnt.
xbbseg-zbd3t = space.
xbbseg-zbd2p = space.
else.
xbbseg-zbd2t = opdat-zbd2t.
xbbseg-zbd3t = opdat-zbdnt.
xbbseg-zbd2p+0(2) = opdat-zbd2p+0(2).
xbbseg-zbd2p+2(1) = ','.
xbbseg-zbd2p+3(1) = opdat-zbd2p+2(1).
endif.
* Skontierfähiger Betrag
* xbbseg-skfbt = xbbseg-wrbtr.
xbbseg-skfbt+0(7) = opdat-skbtr+2(7).
xbbseg-skfbt+7(1) = ','.
xbbseg-skfbt+8(2) = opdat-skbtr+9(2).
if d_open = 'X'.
transfer xbbseg to p_appl.
endif.
d_text = 'Debitor'.
perform write_item_line.
endform. " FILL_BBSEG_PERSONENKONTO
*&---------------------------------------------------------------------*
*& Form FILL_BBTAX
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form fill_bbtax.
xbbtax-stype = '2'.
xbbtax-tbnam = 'BBTAX'.
if isteuer = 1.
write d_steuer to xbbtax-fwste no-grouping.
if k_steuer = '01'.
xbbtax-bschl = 50.
else.
xbbtax-bschl = 40.
endif.
xbbtax-mwskz = d_mwskz.
d_text = 'Steuer'.
perform write_tax_line.
endif.
if d_open = 'X' and isteuer = 1.
transfer xbbtax to p_appl.
endif.
clear isteuer.
endform. " FILL_BBTAX
*&---------------------------------------------------------------------*
*& Form mappenname
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form mappenname.
p_mappe+2(4) = p_bukrs.
h_datum(2) = sy-datum+6(2).
h_datum+2(2) = sy-datum+4(2).
h_datum+4(2) = sy-datum+2(2).
p_mappe+6(6) = h_datum.
endform. " mappenname
*&---------------------------------------------------------------------*
*& Form check_sachkonto
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_XBBSEG_NEWKO text
*----------------------------------------------------------------------*
form check_sachkonto using p_xbbseg_newko.
saknr = p_xbbseg_newko.
shift saknr right deleting trailing space.
translate saknr using ' 0'.
select single * from skb1
where bukrs = p_bukrs
and saknr = saknr.
if sy-subrc <> 0.
clear: docl.
docl = text-007.
replace '$saknr$' with p_xbbseg_newko into docl.
clear p_xbbseg_newko.
d_fehler = 'X'.
stat_r fehler.
endif.
endform. " check_sachkonto
*&---------------------------------------------------------------------*
*& Form write_Header
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form write_header.
uline.
format color col_heading intensified on.
write:/ sy-vline no-gap,
xbbkpf-blart,
xbbkpf-bukrs,
xbbkpf-budat,
xbbkpf-waers,
xbbkpf-belnr,
xbbkpf-xblnr,
xbbkpf-monat,
xbbkpf-bldat,
xbbkpf-bktxt, 132 sy-vline.
uline.
format color col_key.
write:/ sy-vline,
'Buchung ' no-gap, sy-vline no-gap,
'BS' no-gap, sy-vline no-gap,
'Konto ' no-gap, sy-vline no-gap,
'Buchungsbetrag ' no-gap, sy-vline no-gap,
'Kz' no-gap, sy-vline no-gap,
'Profitcnt.' no-gap, sy-vline no-gap,
'Skontobetrag ' no-gap, sy-vline no-gap,
'Fehler ' no-gap, 132 sy-vline no-gap.
uline.
endform. " write_Header
*&---------------------------------------------------------------------*
*& Form write_customer
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form write_item_line.
format color col_background intensified off.
write:/ sy-vline no-gap,
d_text, sy-vline no-gap,
xbbseg-newbs no-gap, sy-vline no-gap,
xbbseg-newko no-gap, sy-vline no-gap,
xbbseg-wrbtr right-justified no-gap, sy-vline no-gap,
xbbseg-mwskz no-gap, sy-vline no-gap,
xbbseg-prctr no-gap, sy-vline no-gap,
xbbseg-skfbt right-justified no-gap, sy-vline no-gap,
* xbbseg-sgtxt(21) NO-GAP, sy-vline NO-GAP,
docl, 132 sy-vline no-gap.
endform. " write_customer
*&---------------------------------------------------------------------*
*& Form write_tax_line
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form write_tax_line.
clear: docl,xbbseg-newko,xbbseg-prctr,xbbseg-sgtxt,xbbseg-wskto.
write:/ sy-vline no-gap,
d_text , sy-vline no-gap,
xbbtax-bschl no-gap , sy-vline no-gap,
xbbseg-newko no-gap, sy-vline no-gap,
xbbtax-fwste right-justified no-gap, sy-vline no-gap,
xbbtax-mwskz no-gap, sy-vline no-gap,
xbbseg-prctr no-gap, sy-vline no-gap,
xbbseg-wskto right-justified no-gap, sy-vline no-gap,
* xbbseg-sgtxt(21) NO-GAP, sy-vline NO-GAP,
docl, 132 sy-vline no-gap.
endform. " write_tax_line
*&---------------------------------------------------------------------*
*& Form check_Profitcenter
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_XBBSEG_PRCTR text
*----------------------------------------------------------------------*
form check_profitcenter using p_xbbseg_prctr.
prctr = p_xbbseg_prctr.
shift prctr right deleting trailing space.
translate prctr using ' 0'.
select single * from cepc
where prctr = prctr
and datbi = '99991231'
and kokrs = '0061'.
if sy-subrc <> 0.
clear docl.
docl = text-011.
replace '$prctr$' with p_xbbseg_prctr into docl.
clear p_xbbseg_prctr.
d_fehler = 'X'.
stat_r fehler.
endif.
endform. " check_Profitcenter
*&---------------------------------------------------------------------*
*& Form betragsfeld
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_OPDAT_BTRBR text
* <--P_XBBSEG_WRBTR text
*----------------------------------------------------------------------*
form betragsfeld using value(p_wert)
changing p_xwert.
data: x_dmbtr type p decimals 2.
shift p_wert left deleting leading c_plus.
shift p_wert left deleting leading c_minus.
if p_wert co '0123456789 '.
pack p_wert to x_dmbtr.
write x_dmbtr to p_xwert no-grouping.
else.
clear: docl.
docl = 'Aufbereitung für Wert $wert$ !'(098).
replace '$wert$' with p_wert into docl.
dl_fehler = c_err.
stat_r fehler.
endif.
endform. " betragsfeld