Parameters Descrption
ACCOUNTGL : mention only G/L line items here
ACCOUNTTAX : mention the VAT items here only but with the same item number like in currencyamount, the amounts are not important here, simply zero...
CURRENCYAMOUNT : mention all items here, in case of normal posting the amount comes to field AMT_DOCCUR, in case of VAT posting the amount of VAT comes to AMT_DOCCUR, the base amount comes to AMT_BASE
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.
代码:
report z_test_bapi_gl_ac_doc LINE-SIZE 200.
*----------------------------------------------------------------------*
* Written By: Ram Manohar Tiwari
*----------------------------------------------------------------------*
* Presented By: http://www.rmtiwari.com
*----------------------------------------------------------------------*
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.
*documentheader-obj_type = 'BKPFF'.
*documentheader-obj_key = '18000000002002004'.
*documentheader-obj_type = 'BKPFF'.
*documentheader-obj_key = '180000000010002004'.
*documentheader-obj_sys = 'RD1CLNT200'.
documentheader-username = sy-uname.
documentheader-header_txt = 'Test using BAPI'.
documentheader-comp_code = '1000'.
*documentheader-ac_doc_no
*documentheader-fisc_year = '2005'.
documentheader-doc_date = sy-datum.
documentheader-pstng_date = sy-datum.
*documentheader-trans_date
*documentheader-fis_period
documentheader-doc_type = 'SA'.
*documentheader-ref_doc_no
*documentheader-compo_acc
*documentheader-reason_rev
accountgl-itemno_acc = '1'.
accountgl-gl_account = '0000160100'.
accountgl-comp_code = '1000'.
accountgl-pstng_date = sy-datum.
accountgl-doc_type = 'SA'.
accountgl-profit_ctr = '0000010000'.
append accountgl.
accountgl-itemno_acc = '2'.
accountgl-gl_account = '0000160100'.
accountgl-comp_code = '1000'.
accountgl-pstng_date = sy-datum.
accountgl-doc_type = 'SA'.
accountgl-profit_ctr = '0000010000'.
append accountgl.
*AC_DOC_NO
*FISC_YEAR
*FIS_PERIOD
*accountgl-STAT_CON = 'X'.
*REF_KEY_1
*REF_KEY_2
*REF_KEY_3
*CUSTOMER
*VENDOR_NO
*ALLOC_NMBR
*ITEM_TEXT
*BUS_AREA
*COSTCENTER
*ACTTYPE
*ORDERID
*ORIG_GROUP
*COST_OBJ
*PROFIT_CTR
*PART_PRCTR
*WBS_ELEMENT
*NETWORK
*ROUTING_NO
*ORDER_ITNO
currencyamount-itemno_acc = '1'.
currencyamount-currency = 'GBP'.
currencyamount-amt_doccur = '100.00'.
append currencyamount.
currencyamount-itemno_acc = '2'.
currencyamount-currency = 'GBP'.
currencyamount-amt_doccur = '-100.00'.
append currencyamount.
* call BAPI-function in this system
call function 'BAPI_ACC_GL_POSTING_POST'
exporting
documentheader = documentheader
* importing
* obj_type = obj_type
* obj_key = obj_key
* obj_sys = obj_sys
tables
accountgl = accountgl
currencyamount = currencyamount
return = return
extension1 = extension1
exceptions
others = 1.
if sy-subrc <> 0.
message e999(re) with 'Problem occured'.
else.
loop at return.
if not return is initial.
clear bapi_retn_info.
move-corresponding return to bapi_retn_info.
if return-type = 'A' or return-type = 'E'.
error_flag = 'X'.
endif.
append bapi_retn_info.
endif.
endloop.
if error_flag = 'X'.
message e999(re) with 'Problem occured'.
rollback work.
else.
commit work.
endif.
endif.
来源:http://www.geocities.com/rmtiwari/main.html?http://www.geocities.com/rmtiwari/Resources/Management/SAPCaseStudies.html
分享到:
相关推荐
- **BAPI_ACC_GL_POSTING_POST**:此BAPI用于执行总账科目的过账操作。 以上BAPIs涵盖了SAP中财务管理与会计模块的核心功能,通过这些接口,用户可以高效地管理和操作财务数据,实现自动化处理,提高工作效率。
Guest Posting With A Twist Chapter 38. The Best Of The Best Strategy Part #1 Chapter 39. The Best Of The Best Strategy Part #2 Chapter 40. Part #6 - E-Commerce Ranking Strategies Chapter 41. Long ...
The RhinoPython community is very active and offers a wonderful resource for posting questions/answers and fi nding help on just about anything!: http://python.rhino3d.com/forums/ General References ...
信息安全_数据安全_Putin_is_Posting:Social_Media,_V 安全运营 安全防御 安全测试 web安全 安全人才
Processing the Information from a POST-Method Form H G CONTENTS http://docs.rinet.ru:8080/Using_Perl5_in_Web/ (2 of 24) [2/17/2007 1:22:34 PM] Making Your Perl Code Modular Defining and Calling ...
// A URLConnection that implements POST. // // Some implementations of URLConnection, e.g. the one in Navigator 3.0, // do not support POST. This is a stripped-down version that does. // // Note ...
10.8.5. Fetching a Rowset via a Many-to-many Relationship 10.8.6. Cascading Write Operations 10.8.6.1. Notes Regarding Cascading Operations 11. Zend_Debug 11.1. 输出变量的值 (Dumping Variables) 12...
ALERT linksys IT pls use this FW and release note for web posting WRH54G_IN 1.01.05.11 (for India)这个文件名暗示,这可能是Linksys公司发给其印度地区IT团队的一个通知,要求他们将此固件和相应的发布说明...
Post a comment Email Article Print Article Share Articles Digg del.icio.us Newsvine Facebook Google LinkedIn MySpace Reddit Slashdot StumbleUpon Technorati Twitter Windows Live YahooBuzz ...
例如,总账消息类型为ACC_GL_POSTING,处理代码为BAPI,触发方式为立即触发。 7. **增强程序**: 共享同一个增强点,比如在Include程序ZXACCU15中编写增强代码,可以对凭证信息进行补充和修改。 8. **消息类型与...
它被定义为:/// This struct represents a chatbot that is connected to a given `ship`,/// is watching/posting to a specific `chat_ship`/`chat_name`/// and is using the function `respond_to_message` to ...
ERP系统信息化资料:SAP专业培训教材_UT Script_FICO_TO-BE-FI-002 General Ledger Posting Process_V1.0.doc
AND h.posting_date BETWEEN 'START_DATE' AND 'END_DATE'; ``` 这里`START_DATE`和`END_DATE`代表你感兴趣的日期范围。 5. **查询库存信息** 对库存操作的查询通常涉及`MFG_WORK ORDERS`,`MFG_MATERIAL_...
This is a version of Anders Melander's TGIFImage ported to Delphi 7. It supports animated GIF files in Delphi 7. Note: This Delphi 7 version should also work older Delphi versions (not tested much). ...
在“Nysc E-Posting System”中,MySQL用于存储学生信息、实习项目详情、服务记录等数据。开发者可能创建了多个表格,如“students”,“internships”,和“service_records”,并使用SQL查询来执行数据检索、更新...
录像23_Internal order Posting
phpbb_imgur phpbb论坛的界面,用于在imgur上上传图像执照: 许可下:CC-BY-SA作者: ... / forum / styles / prosilver.mod2 / template / posting_buttons.html 后: <script type =“ text / javascript” src =
1.4.2 A Domain Name ........................................................................18 1.4.3 Web Host / Server ......................................................................18 1.4.4 ...
在"event_channel.c"这个源文件中,我们可以预期找到与事件通道实现相关的C语言代码。通常,这样的代码会包含以下几个核心概念: 1. **事件结构体(Event Structure)**:定义了事件的基本属性,如事件类型、数据、...
在SAP财务系统中,GL(总帐)会计是企业财务管理系统的核心部分,用于记录、汇总和报告所有的财务交易。本教程将详细讲解如何在SAP环境中操作GL总帐会计,包括总帐科目的维护、凭证处理以及余额查询等关键功能。 1....