0% found this document useful (0 votes)
61 views2 pages

Post FI Document Using BAPI - 2

This document outlines the process of posting Financial Accounting (FI) documents in SAP using the BAPI 'BAPI_ACC_DOCUMENT_POST' from an Excel file. Key steps include uploading data, validating GL accounts, handling currency conversions for intercompany postings, and committing the transaction. A sample source code is provided for reference, along with important notes regarding field status group configurations and currency conversions.

Uploaded by

RomildoBarbosa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views2 pages

Post FI Document Using BAPI - 2

This document outlines the process of posting Financial Accounting (FI) documents in SAP using the BAPI 'BAPI_ACC_DOCUMENT_POST' from an Excel file. Key steps include uploading data, validating GL accounts, handling currency conversions for intercompany postings, and committing the transaction. A sample source code is provided for reference, along with important notes regarding field status group configurations and currency conversions.

Uploaded by

RomildoBarbosa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Custom Search Search

Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us

SAP Virtual/Onsite Post FI document using BAPI


Trainings By Rajesh Kumar, Infosys Technologies

INTRODUCTION:
Document Categories:
The accounting documents record changes in values in a company code arising
ABAPTM from accounting transactions. They consist of one or more line items (postings),
Adobe Forms each of which represents an individual transaction posted to an account. When
ABAP-HR
posting an accounting document, the SAP system updates the transaction figures
ALE & IDocs
ALV in the accounts to which the document is posted.An accounting document is a
BAPI representation within the SAP System of the document (for example, an invoice)
BASIS
that triggered the posting.
BSP
Business Objects BAPI ‘BAPI_ACC_DOCUMENT_POST’ acts as the interface between your code
Business Workflow and standard transactions FB01/FB50.
CRM NEW
This document explains the various steps involved to post a FI document using
LSMW
SAP Script/Smart Forms BAPI ‘BAPI_ACC_DOCUMENT_POST’ from an excel file.This is helpful to SAP
BI/BW Technical consultants as it gives the details of all the required parameters and
eXchange Infrastructure (XI)
data in document posting and validation to check if the GL account in which we
Enterprise Portals (EP)
eCATT are posting amounts is present in SAP database. Transaction code for FI
Object Oriented Programming documents are FB01/FB50(Create), FB02(Change) and FB03(Display). In one
SAP Query
document, more than 999 line item cannot be posted because BAPI can post up
Userexits/BADIs
WebDynpro for Java/ABAPTM to 999 lines in one document. The file should be balanced for the document to be
Others posted i.e. credit amount and debit amount should be equal. In FI, header table
for document data is BKPF and line item table is BSEG.
What's New? STEPS:

ABAP Test Cockpit HOT Various steps involved in posting a document from a file are:
SAP ABAP Pragmas
Understanding SE32 (ABAP Text 1. Upload data from excel file into an internal table using FM ‘GUI_UPLOAD’ as
Element Maintenance) explained in subroutine UPLOAD_FORM_EXCEL.
Creating an IDoc File on SAP
Application Server
2. After we upload excel data into an internal table we need split the data into
Understanding “Advance with
dialog” option of SAP Workflow field patterns into header data and line item data as explained in subroutine
SAP Workflow Scenario: ‘SPLIT_INTO_RECORDS’. This splitting is done according to my file format.
Maintenance Notification
Approval In header data in the file in line no.2, posting date and header company code.
Enhancements to a standard That is why I have used case when 2. And all the other information is present
class at the lines as described by CASE statement. Line item details start from line
Working with Floating Field in
Adobe Forms number 14, that’s why LOOP AT t_upload INTO w_upload FROM 14is used.
Inserting data from Internal User can split the data according to their file format.
Table into the step “Send Mail”
Display GL Account long text 3. After the splitting, loop at the line item table and validate the GL account
using enhancement framework
Differences between numbers. If the GL accounts are valid, Populate the line item data into BAPI
polymorphism in JAVA and GL and currency tables otherwise append that GL account number into error
ABAP
Passing multiline parameters message table. This is explained in subroutines ‘VALIDATE_GL’ and
from an ABAP Class event to a ‘POPULATE_BAPI’.
Workflow container
Concept of Re-evaluate agents 4. In case of intercompany postings, in which line item and Header Company
for active work items in SAP
Workflow codes are different. Find out line item company code currency key and
Dynamic creation of component compare if the line item currency key and header currency key given is same
usage in ABAP WebDynpro
or different. If these are different then we need to populate
Adobe Forms: Display symbols
like copyright and others ‘EXCHANGE_RATE’ field of currency table if it is given in the file. Otherwise
Deactivate Hold functionality in BAPI itself will fetch the exchange rate between 2 currencies and do the
Purchase order (ME21N)
Quiz on OOABAP conversion.
Add fields in FBL5N using
BADIs 5. Above step is required because a document is posted in 3 currencies
Tutorial on Wide casting document currency, company code currency and group currency. In case of
Defining a Range in Module
Pool Program the intra company code postings all the currencies are same so the amounts
Copy fields from one are same In all3 currencies. But in case of inter company code postings the
structure/table into another
currencies are different so the amounts are also different. Due to this we
structure/table
Side Panel Usage in NWBC need to give and exchange rate base on which the BAPI will convert the
amounts.
Contribute? 6. Next step in document posting is to check the data using BAPI
‘BAPI_ACC_DOCUMEN_CHECK’. If this BAPI do not return any error
Sample Specs message, go to next step otherwise display error message given by BAPI.
What's Hot? 7. Post the document using BAPI ‘BAPI_ACC_DOCUMEN_POST’. Check for
sy-subrc, if initial; commit the work using ‘BAPI_TRANSACTION_COMMIT’.
Web Dynpro for ABAP Tutorials This step is explained in subroutine ‘POST_DOCUMENT’. While providing
header data in W_HEADER work area do not provide OBJ_KEY, OBJ_TYPE
Join the Mailing List and OBJ_SYS, these are automatically populated by BAPI.

Enter name and email address below: SUMMARY:


Name:
This document explains the various steps involved in FI document posting from
Email: excel file. Main steps involved are uploading and splitting data into internal table,
Populate data into BAPI tables and call BAPI to post the documents and
Subscribe Unsubscribe
committing the transaction. A sample source code is given for the references.
GO
Note:In case of intercompany code postings, if the exchange rate between 2
currencies is given in the file, programmer should pass only the exchange rate
given. Currency value conversions will be done by the BAPI. Also Field status
group configurations of GL accounts are not considered by BAPI as it is
bypassed by BAPI, but these are considered when doing posting using FB50.

Click here for the source code.

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM

Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us

©2006-2007 SAPTechnical.COM. All rights reserved.


All product names are trademarks of their respective companies. SAPTechnical.COM is in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver, and and any other SAP trademarks are registered trademarks of SAP AG in Germany and in several
other countries.
Every effort is made to ensure content integrity. Use information on this site at your own risk.
Graphic Design by Round the Bend Wizards

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy