当前位置:网站首页>SAP ABAP BDC (batch data communication) -018
SAP ABAP BDC (batch data communication) -018
2022-07-07 05:47:00 【Boating in rainy days】
SAP ABAP BDC( Batch data communication )-018
Introduction to batch input
Batch input is usually used to convert data from non R/3 System transfer to R/3 System or in R/3 Data transmission between systems .
It is a data transmission technology , Allows you to automatically transfer data sets to screens that belong to transactions , So as to transmit to SAP System . Batch input is controlled by the batch input session .
In this tutorial , You will learn :
- Introduction to batch input
- Batch input method
- Batch input process
- To write BDC Program
- Create a batch input session
- Batch input recorder
Batch input session
Combine a series of transaction calls with input data and user operations . Batch input sessions can be used to perform dialog transactions in batch input , Some or all of the screens are handled by the session . Batch input sessions are stored in the database as database tables , And when accessing transactions, it can be used as an internal table in the program .
matters needing attention
- BDI By performing normal SAP Business to work , Just like users , But it will automatically execute transactions . All screen verification and business logic verification will be completed when batch data input is used .
- It is suitable for inputting large amounts of data .
- No manual interaction
Batch input method
SAP There are two ways to transfer old data to R/3 The basic method of the system .
- Classic batch input method .
- Call transaction method .
Classic batch input method
In this method ,ABAP/4 The program reads the external data to SAP System and stored in the batch input session .
After creating a session , You can run a session to execute SAP Business .
This method uses OPEN、BDC_INSERT and BDC_CLOSE BDC_ Function modules
Batch input session can be through 3 There are ways to deal with
- In the foreground
- Backstage
- During processing , Display error
If you want to test data transmission , Batch input session should be processed in the foreground or using error display .
If you want to perform data transmission or test its performance , Then the session should be processed in the background .
Precautions about classical batch input method
- Synchronous processing
- Transfer data of multiple transactions .
- Synchronize database updates .
- A batch input process log will be generated for each session .
- Cannot generate session in parallel .
Call transaction method .
In this method ,ABAP/4 Program usage CALL TRANSACTION USING Statement to run SAP Business .
The whole batch input process is carried out online in the program
matters needing attention :
- Faster data processing
- Asynchronous processing
- Transfer data for a single transaction .
- Do not generate batch processing logs .
Batch input process
You usually follow the following sequence of steps to develop batch input for your organization
- Analyze legacy data . Determine how to map the data to be transferred to SAP structure . Also pay attention to the necessary data type or data length conversion .
- Generate SAP data structure .
- Export data to a sequential file . Please note that , Predefined SAP The batch input program requires character format .
- If not used SAP Provided BDC Program , Please code your batch input program . Select the appropriate batch input method according to the situation .
- Process data and add it to SAP System .
- Analyze process logs . For those who do not create the correct log CALL TRANSACTION Method , Please use the message collected by the program .
- From the results of process analysis , Correct and reprocess the wrong data .
To write BDC Program
You can observe the following process to write BDC Program
- Analyze transactions to process batch input data .
- Determine the batch input method to use .
- Read data from sequential file
- Perform data conversion or error checking .
- Store the data in the batch input structure ,BDCDATA.
- Generate batch input sessions for classic batch input , Or use CALL TRANSACTION USING Statements directly process data .
Batch input data structure
Batch input data structure declaration
DATA : BEGIN OF < bdc table>
OCCURS <occurs parameters>.
INCLUDE STRUCTURE BDCDATA.
DATA:END OF <bdc table>.
The order of fields in the data of a particular screen makes no sense
matters needing attention
- fill BDC Data time , Please make sure to consider user settings . This is particularly relevant for filling in fields involving numbers ( Such as quantity , amount of money ). User settings determine the grouping characters of numbers , for example : According to user settings , The number 50000 can be written as 50,000.00 or 50.000,00.
- Compress quantity and quantity fields FVAL Field , Align them to the left .
- Please note that , In filling BDC Data table , Should pass BDC All fields filled in are treated as character type fields .
- On some screens , Use BDC When populating values in table controls , You must write down the number of lines that exist on the default size of the screen and the code for as many lines as possible . If more rows have to be filled , It must be “ Page down ” Function to write code .
- The number of lines displayed in the above scheme will vary according to the screen size used by the user . therefore , Always write code for standard screen sizes , And make BDC Always work with standard screen size , Regardless of how the user keeps their screen size .
Create a batch input session
- Use function modules BDC_OPEN_GROUP Open the batch input session .
- For every transaction in the session :
- stay BDCDATA Fill in the values of all screens and fields processed in the transaction .
- Transfer transactions to have BDC_INSERT Conversation .
- Use BDC_CLOSE_GROUP Close the batch input session
Batch input recorder
Batch input recorder ( System > service > Batch input > Recorder ) Record manually entered transactions , And create a batch input session , Can be used later SM35 perform .
- By selecting “ Recording ” Button to start the batch input recorder .
- The recording file name is a user-defined name , It can match the batch input session name that can be created from the recording file .
- Input SAP Transaction and start posting the transaction .
- Complete posting SAP After the transaction , You can choose to get the transaction and save to end the record , Or select the next transaction and post another transaction .
- After saving the recording file , You can create batch input sessions and... From recorded files / Or generate a batch input program from a recorded file .
- Now you can analyze the batch input session you created just like any other batch input session .
- The program generated by the batch input recorder function is a powerful tool for data interface programmers . It provides a solid foundation , Then it can be changed according to the customer's requirements .
边栏推荐
- Egr-20uscm ground fault relay
- Paper reading [MM21 pre training for video understanding challenge:video captioning with pre training techniqu]
- 【Shell】清理nohup.out文件
- Differences and introduction of cluster, distributed and microservice
- WEB架构设计过程
- Nodejs get client IP
- 什么是消息队列?
- Message queue: how to deal with message backlog?
- async / await
- What is dependency injection (DI)
猜你喜欢
基于NCF的多模块协同实例
爬虫练习题(三)
Leetcode: maximum number of "balloons"
Reading the paper [sensor enlarged egocentric video captioning with dynamic modal attention]
What are the common message queues?
The year of the tiger is coming. Come and make a wish. I heard that the wish will come true
Paper reading [MM21 pre training for video understanding challenge:video captioning with pre training techniqu]
R language [logic control] [mathematical operation]
上海字节面试问题及薪资福利
消息队列:消息积压如何处理?
随机推荐
淘寶商品詳情頁API接口、淘寶商品列錶API接口,淘寶商品銷量API接口,淘寶APP詳情API接口,淘寶詳情API接口
Message queue: how to deal with message backlog?
STM32按键状态机2——状态简化与增加长按功能
Five core elements of architecture design
Mybaits之多表查询(联合查询、嵌套查询)
集群、分布式、微服務的區別和介紹
Go 語言的 Context 詳解
上海字节面试问题及薪资福利
Hcip seventh operation
Simple case of SSM framework
分布式事务解决方案之2PC
Win configuration PM2 boot auto start node project
async / await
“多模态”概念
The navigation bar changes colors according to the route
SQL query: subtract the previous row from the next row and make corresponding calculations
[reading of the paper] a multi branch hybrid transformer network for channel terminal cell segmentation
Preliminary practice of niuke.com (9)
Get the way to optimize the one-stop worktable of customer service
高级程序员必知必会,一文详解MySQL主从同步原理,推荐收藏