7 ABAP for FIsappress Abap Development for Financial Accounting

3
11 Contents 7 Workflow as a User Exit ........................................................... 227 7.1 Workflow Events: Linking System Actions with External Applications ................................................................................ 228 7.1.1 Event Handling ............................................................... 228 7.1.2 Event Creation Options .................................................. 231 7.1.3 Application Development Implications ........................... 231 7.2 Practical Example ........................................................................ 232 7.2.1 Prerequisites .................................................................. 232 7.2.2 Workflow-Enabled Class ................................................. 233 7.2.3 Standard Task ................................................................. 236 7.2.4 Event Creation ............................................................... 240 7.2.5 Now Test! ...................................................................... 241 7.3 Summary .................................................................................... 243 The Author ............................................................................................... 245 Index ......................................................................................................... 247

description

7 ABAP for FIsappress Abap Development for Financial Accounting

Transcript of 7 ABAP for FIsappress Abap Development for Financial Accounting

Page 1: 7 ABAP for FIsappress Abap Development for Financial Accounting

11

Contents

7 Workflow as a User Exit ........................................................... 227

7.1 Workflow Events: Linking System Actions with External Applications ................................................................................ 2287.1.1 Event Handling ............................................................... 2287.1.2 Event Creation Options .................................................. 2317.1.3 Application Development Implications ........................... 231

7.2 Practical Example ........................................................................ 2327.2.1 Prerequisites .................................................................. 2327.2.2 Workflow-Enabled Class ................................................. 2337.2.3 Standard Task ................................................................. 2367.2.4 Event Creation ............................................................... 2407.2.5 Now Test! ...................................................................... 241

7.3 Summary .................................................................................... 243

The Author ............................................................................................... 245Index ......................................................................................................... 247

370_Book.indb 11 1/6/11 7:35:31 AM

Page 2: 7 ABAP for FIsappress Abap Development for Financial Accounting

167

As today’s corporate ERP system landscape becomes more and more distributed, you have to be prepared for different kinds of data that can flow to and from external systems. With this in mind, the focus of this chapter is inbound scenarios in Financial Accounting.

Inbound Scenarios in Financial Accounting5

In this chapter, we consider data processing scenarios when the SAP system receives accounting data from external systems. This can be master data from legacy systems or posting data from, for example, an external payroll system. This chapter describes how you can intervene in this process using various user exits.

Master Data Migration and Distribution5.1

There could be no SAP ERP implementation project without an initial data migra-tion procedure. Imagine how painful it would be if a company started its trading activity by implementing SAP ERP and then entered its existing customers and vendors one by one. As a rule, the moment a company implements SAP ERP, the customer/vendor list (which is in some other legacy system) has to be prepared. There are also scenarios in which accounting master data are loaded from external systems on a regular basis.

In the following subsections, we’ll discuss several ways to load master data into an SAP system and how to seamlessly penetrate the standard data flow to address specific requirements.

Batch Input5.1.1

If you are familiar with the SAP Legacy System Migration Workbench (LSMW) and have completed data migration projects, you probably recognize these standard SAP programs for the mass uploading of customer and vendor master records: reports RFBIDE00 and RFBIKR00.

370_Book.indb 167 1/6/11 7:36:44 AM

Page 3: 7 ABAP for FIsappress Abap Development for Financial Accounting

168

Inbound Scenarios in Financial Accounting5

Both reports have the same selection screen as shown in Figure 5.1. Input data for the report must be presented as a fl at fi le located on the application server.

Note

You can also pass a logical fi le name into the report by passing it through invisible parameter LDS_NAME, which can be used in a SUBMIT statement. In this case, the value of the visible fi le path name parameter is ignored.

Selection Screen of Report RFBIDE00Figure 5.1

By default, the maximum length of an input fi le line is 2,000 characters—this is the length of dictionary structure BDIFIBIWA . If your input fi le has longer lines, you can extend structure BDIFIBIWA by using customer include structure CI_BDIFIBIWA.

Keep in mind, however, that structure BDIFIBIWA only defi nes the length of an input fi le line, whereas the actual structure of the data being processed is defi ned according to the fi rst 31 characters of the line (see the structure shown in Figure 5.2).

The fi rst character of each fi le line is a record type, which can take one of three values: 0, 1, or 2. Record type 0 marks the beginning of a session, record type 1 is the beginning of one customer (or vendor) data for one transaction code, and record type 2 is a data record. The next 30 characters of a fi le line contain a dictionary structure name. For record type 0, the structure name is always BGR00 ; for record type 1, the structure name is always BKN00 for customers and BLF00 for vendors.

370_Book.indb 168 1/6/11 7:36:45 AM