当前位置:网站首页>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 .
边栏推荐
- 高级程序员必知必会,一文详解MySQL主从同步原理,推荐收藏
- K6el-100 leakage relay
- JVM the truth you need to know
- SAP webservice 测试出现404 Not found Service cannot be reached
- C nullable type
- Différenciation et introduction des services groupés, distribués et microservices
- Go 语言的 Context 详解
- Distributed global ID generation scheme
- How to get free traffic in pinduoduo new store and what links need to be optimized in order to effectively improve the free traffic in the store
- I didn't know it until I graduated -- the principle of HowNet duplication check and examples of weight reduction
猜你喜欢
Use, configuration and points for attention of network layer protocol (taking QoS as an example) when using OPNET for network simulation
力扣102题:二叉树的层序遍历
R语言【逻辑控制】【数学运算】
2pc of distributed transaction solution
OpenSergo 即将发布 v1alpha1,丰富全链路异构架构的服务治理能力
Jhok-zbg2 leakage relay
Preliminary practice of niuke.com (9)
What are the common message queues?
Harmonyos practice - Introduction to development, analysis of atomized services
What is message queuing?
随机推荐
async / await
I didn't know it until I graduated -- the principle of HowNet duplication check and examples of weight reduction
Introduction to distributed transactions
Leetcode 1189 maximum number of "balloons" [map] the leetcode road of heroding
5阶多项式轨迹
[PM products] what is cognitive load? How to adjust cognitive load reasonably?
JSP setting header information export to excel
论文阅读【Sensor-Augmented Egocentric-Video Captioning with Dynamic Modal Attention】
async / await
Unity keeps the camera behind and above the player
京东商品详情页API接口、京东商品销量API接口、京东商品列表API接口、京东APP详情API接口、京东详情API接口,京东SKU信息接口
How does mapbox switch markup languages?
Explication contextuelle du langage Go
bat 批示处理详解
Simple case of SSM framework
Cve-2021-3156 vulnerability recurrence notes
Pytorch builds neural network to predict temperature
【已解决】记一次EasyExcel的报错【读取xls文件时全表读不报错,指定sheet名读取报错】
Design, configuration and points for attention of network arbitrary source multicast (ASM) simulation using OPNET
Digital innovation driven guide