Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FB01 POSTING

former_member806481
Participant
0 Likes
1,503

I need to do a FB01 posting and the data will be passed by an excel File.

This is the structure of the file

t(10) TYPE c, " Date comptable
waers TYPE waers, " Devise
monat TYPE bbkpf-monat, " Pèriode
kursf TYPE bbkpf-kursf, " taux de change
wwert TYPE bbkpf-wwert, " date de conversion
xblnr TYPE bbkpf-xblnr, " Référence
bktxt TYPE bbkpf-bktxt, " Texte d'en tĂŞte
bschl(2) TYPE c, " Clé de comptabilisation
hkont(17) TYPE c,
wrbtr(16) TYPE c, " Montant TTC
mwskz(2) TYPE c, " Code de TVA
zuonr(18) TYPE c, " Affection
sgtxt(50) TYPE c, " Texte
kostl(10) TYPE c, " Centre de cout
projk(24) TYPE c, " EOTP
menge(17) TYPE c, " Quantité
meins(3) TYPE c, " Unité de quantité
umskz(1) TYPE c, " Code CGS
zfbdt TYPE char10, " Date de base
vbund TYPE rassc, " Nº de la société S/L du partenaire
zlsch(1) TYPE c, " Mode de paiement
qsskz(2) TYPE c, " Code déclaration d’honoraires
bewar(3) TYPE c, " Type de flux
name1(35) TYPE c, " Nom du fournisseur (CPD)
stras(35) TYPE c, " Rue (CPD)
pstlz(10) TYPE c, " Code postal (CPD)
ort01(35) TYPE c, " Localité (CPD)
land1(3) TYPE c, " Pays (CPD)
banks(3) TYPE c, " Pays banque (CPD)
bankl(15) TYPE c, " Clé bancaire (CPD)
bankn(18) TYPE c, " Compte bancaire (CPD)
bkont(2) TYPE c, " Clé R.I.B. (CPD)
ebeln(10) TYPE c,
ebelp(5) TYPE c,
xref3 TYPE xref3, " Clé de référence du poste
bvtyp TYPE bvtyp, " Type de banque partenaire
dmbtr(16) TYPE c, " Type montant DI
valut(10) TYPE c, " Type date de valeur
xref1 TYPE xref1, " Clé de référence du poste

xref2 TYPE xref2, " Clé de référence du poste

and at the moment we are using BDC to do post the document

however for the following file

test.txt

I am getting this error in SM35

image.pngreport-1.txtinclude-1.txt

I have aslo attached the code

I am trying with the BAPI approach but the structure of the file is quite difficult to map it to BAPI for example name1, land1 cannot be mapped

BAPI : bapi_acc_gl_posting_post

1 REPLY 1
Read only

abo
Active Contributor
0 Likes
1,395

You're on the right track: prefer the BAPI to batchinput of FB01 for new developments and push for changes if the existing solution is using a batch.

If you have time for some study and experimentation, you could also check out ODIN (I've read about it, sadly I haven't had a chance to test it yet, but it looks promising)