Posted: Sun Oct 14, 2007 9:17 pm Post subject: GL A/C posting using BAPI_ACC_GL_POSTING_POST
Requirement:
An interface needs to be developed to upload large journals either from a tab delimited file. Currently it's being done manually using FB50 transaction. Various Cost of Capital & Operational Property journals have to be posted at month end. A file interface needs to be developed.
Processing:
It involves following development/configurations:
File format determination (Required / optional fields and field checks).
Logical File Path configuration through transaction 'FILE'. A new physical file path should be created on operating system level or an existing one can be used if agreed. The Basis team member should create a new file path at operating system level, if required. The file path will have three directories: /GL_FILE /GL_Processed /GL_Error
Program Z_BAPI_GL_AC_DOC_POST needs to be developed to do the processing as described below:
The processing can be done in foreground as well as in background mode.
In case of background: File can only be read from Application Server.
In case of foreground: User will have an option to choose from Presentation or Application Server File.
Logical File Path / Name needs to be configured using FILE transaction for application server file processing. It is required to identify the Application server directory and file. Further it gives the flexibility to change the path and file name by using the transaction FILE, without making any changes to the program. It should not be hard-coded as directory structure might be different for Testing and production development servers.
Read the input file from presentation or application server as chosen.
Prepare Account doc header and detail internal tables.
Call 'BAPI_ACC_GL_POSTING_POST' to post the GL accounting document.
For application server case, Processed file can be flagged archived by using Function module DX_FILE_COPY and then it can be deleted using EPS_DELETE_FILE .
Error file can be created ( in /GL_Error directory for application server and with .err extension in case of PC processing ) for error records and can be re-processed after correction.
The list of successful and error transaction will be displayed after processing.
data:
obj_type like bapiache02-obj_type,
obj_key like bapiache02-obj_key,
obj_sys like bapiache02-obj_sys,
documentheader like bapiache08,
accountgl like bapiacgl08
occurs 0 with header line,
currencyamount like bapiaccr08
occurs 0 with header line,
return like bapiret2
occurs 0 with header line,
extension1 like bapiextc
occurs 0 with header line,
t_edidd like edidd occurs 0 with header line,
bapi_retn_info like bapiret2 occurs 0 with header line.
data: error_flag.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.