当前位置:网站首页>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 .
边栏推荐
- Pytorch builds neural network to predict temperature
- Différenciation et introduction des services groupés, distribués et microservices
- Message queuing: how to ensure that messages are not lost
- pytorch_ 01 automatic derivation mechanism
- [paper reading] semi supervised left atrium segmentation with mutual consistency training
- 《HarmonyOS实战—入门到开发,浅析原子化服务》
- Mybaits之多表查询(联合查询、嵌套查询)
- 论文阅读【MM21 Pre-training for Video Understanding Challenge:Video Captioning with Pretraining Techniqu】
- High voltage leakage relay bld-20
- Flinksql read / write PgSQL
猜你喜欢
C nullable type
TCC of distributed transaction solutions
分布式事务介绍
Message queuing: how to ensure that messages are not lost
得物客服一站式工作台卡顿优化之路
What are the common message queues?
pytorch_ 01 automatic derivation mechanism
Message queue: how to deal with message backlog?
Dynamic memory management
sql查询:将下一行减去上一行,并做相应的计算
随机推荐
Harmonyos practice - Introduction to development, analysis of atomized services
Web architecture design process
JVM the truth you need to know
《HarmonyOS实战—入门到开发,浅析原子化服务》
[论文阅读] Semi-supervised Left Atrium Segmentation with Mutual Consistency Training
Distributed global ID generation scheme
Hcip seventh operation
论文阅读【Semantic Tag Augmented XlanV Model for Video Captioning】
判断文件是否为DICOM文件
Message queuing: how to ensure that messages are not lost
分布式事务解决方案之TCC
async / await
C nullable type
什么是依赖注入(DI)
【日常训练--腾讯精选50】292. Nim 游戏
Simple case of SSM framework
Mapbox Chinese map address
产业金融3.0:“疏通血管”的金融科技
Paper reading [MM21 pre training for video understanding challenge:video captioning with pre training techniqu]
Paper reading [semantic tag enlarged xlnv model for video captioning]