Sie sind auf Seite 1von 24

0

Special Methods

Contents:

 Transferring data using interactive lists


 Using variable external data format
 SAP - LUW
 Changing RFBIDE00 to call transaction
 Tips & Tricks

 SAP AG 1999

© SAP AG BC420 13-1


0.2
Special Methods: Unit Objectives

At the conclusion of this unit, you will be able to:

 Use interactive lists for data transfer


 Read and process variable format for external
data records
 Estimate the effects of the SAP - LUW architecture
on external data transfer
 Transfer customers using CALL TRANSACTION

 SAP AG 1999

© SAP AG BC420 13-2


0.3
Course Overview Diagram

Call Transaction
Batch Input

Direct Input

TA Recorder
7 12 IDoc BAPI
9
10
11 12
Principles of Standard 4
Data Tansfer

DX Workbench 11
3 5
LSM Workbench
8 10 11

13
13
6 Basics

2 Datenübernahme 14

1 Course Overview

 SAP AG 1999

© SAP AG BC420 13-3


0.4
Special Methods: Contents (1)

InteractiveLists
Interactive Lists

UsingVariable
Using Variable External
ExternalData
Data Format
Format

SAP--LUW
SAP LUW

ChangingRFBIDE00
Changing RFBIDE00to
toCall
CallTransaction
Transaction

Tips&&Tricks
Tips Tricks

 SAP AG 1999

© SAP AG BC420 13-4


0.5
BI and Interactive Lists

Demo Program: SAPBC420_SPTD_INTERACTIV_LIST

Customer Overview

Customer no. Name

 Z-00-10002 Thor Nielson


 Z-00-10003 Elena Lopez
 Z-00-10004 Donna Moore
 Z-00-10005 Charlotte Sanford

X Z-00-10006 Gerd Schmidt
 Z-00-10007 Ning Shao The user selected this
 Z-00-10008 Ruth Thibideaux record
 Z-00-10009 Helga Martin
 Z-00-10010 Jose Vega
 Z-00-10011 Jonathan Turner
 Z-00-11001 Lisa Hofmeister
 Z-00-12344 Ariel Meyers

 SAP AG 1999

 The demo program SAPBC420_SPTD_INTERACTIV_LIST creates a list from which you can select details
by choosing checkboxes.

© SAP AG BC420 13-5


0.6
Transaction Recorder Results

Customer overview

Customer no. Name

 Z-00-10002 Elena Lopez


 Z-00-10003 Jennifer Belmont
 Z-00-10004 Aneesha Mishra

X Z-00-10005 Francesca Bertolini

X Z-00-10006 Jose Vega
 Z-00-10007 Rodney Washington
 Z-00-10008 Jean-Pierre D’Arcy
 Z-00-10009 David Grecco The field with an ‘X’ for the
Field name Fld contents
 Z-00-10010 Bao Yin check box is not set.
 Z-00-10011 Oleg Kopp Supplement fields
BDC_CURSOR 07/02
BDC_OKCODE =PICK
...
These entries
must be
supplemented
06/02 X
07/02 X

Row Column
 SAP AG 1999

 When this transaction is recorded using the transaction recorder, you can see that the check boxes in
the recording list are not checked. These important entries must be added manually.
 To do this, you must specify the position in the list using X/Y coordinates (X is the row, and Y is the
column).
Important to note: The first column in the list has the value 2.
 The selected row does not always match the row position, as the headers must also be included
in the total number of rows.
 The fourth check box selected in the example is actually the sixth row as the header includes two
rows. The value for the BDC_CURSOR cursor field is set to ‘07/02’, as this is the last position on
the last.
The fields to select are therefore row 6/ column 2 and row 7/ column 2.

© SAP AG BC420 13-6


0.7
Editing the Recording

Recording Changes in the


recording

Program Screen St. Field name Field value


T BC420 BS
...
SAPMSSY0 120 X
06/02 X
07/02 X
BDC_CURSOR 07/02
BDC_OKCODE =PICK
SAPMSSY0 120 X
BDC_OKCODE =BACK
...

 SAP AG 1999

 The slide illustrates the changes made in the recording editor.

© SAP AG BC420 13-7


0.8
Special Methods: Contents (2)

InteractiveLists
Interactive Lists

UsingVariable
Using Variable External
ExternalData
Data Format
Format

SAP--LUW
SAP LUW

ChangingRFBIDE00
Changing RFBIDE00to
toCall
CallTransaction
Transaction

Tips&&Tricks
Tips Tricks

 SAP AG 1999

© SAP AG BC420 13-8


0.9
External Data in Variable Data Format

Record type “A” for address and


general customer data

A1347Lisa Hofmeister Hofmeister 0004Garden...


BDE 1234567822222222XNational Bank
A4547Elena Lopez Lopez 0004Grissom...
Data for one
BDE 2345678933333333XCity Bank
customer
BDE 3456789044444444XStandard Bank
A1233Joseph Miller MillerJ 0003Beacon...
BDE 4445618455553222XFastBank
A1444Donna Moore MooreD 0001Main...
BDE 3245778177773333XQuickBank
BDE 0888111433335567XEconomyBank
BDE 2223656388889888XSpecialBank

Record type "B" for bank details

 SAP AG 1999

 In the example, the external data is in a variable format. All customer information has the record type
“A” except for the bank details. The first byte in every record indicates the record type.
 The bank details for a customer are listed after the A records and are marked as record type “B”.

© SAP AG BC420 13-9


0.10
Reading and Processing Variable Format

REPORT sapbc420_sptd_var_format_bin.
...
OPEN DATASET infile FOR INPUT IN BINARY MODE.
...
DO.
READ DATASET infile INTO rectype.
...
PERFORM fill_tab.
ENDDO. The first byte of the file
... INFILE is read into
RECTYPE.
FORM fill_tab.
IF rectype = 'A'.
READ DATASET infile INTO reca. Depending on the
* fill records bkn00, bkna1, bkna2 ... record type (A or B), the
ELSEIF rectype = 'B' system reads general
READ DATASET infile INTO recb. customer data or the
* fill record bknbk (bankdata) customer bank details.
ELSE.
..
ENDFORM.
 SAP AG 1999

 The slide shows an example of how to read the variable external data format.
 If the data is binary data, the system first reads the record indicator into the variable rectype.
 The form routine fill_tab is used to interpret and read the rest of data according to the record
indicator (A or B). Processing can then begin.

© SAP AG BC420 13-10


0.11
Special Methods: Contents (3)

InteractiveLists
Interactive Lists

UsingVariable
Using Variable External
ExternalData
Data Format
Format

SAP--LUW
SAP LUW

ChangingRFBIDE00
Changing RFBIDE00to
toCall
CallTransaction
Transaction

Tips&&Tricks
Tips Tricks

 SAP AG 1999

© SAP AG BC420 13-11


0.12
Synchronous Processing

DB DB

One transaction One transaction processed


processed (SAP-LUW 1) (SAP-LUW 2)

Mark
Mark Mark
Mark
changes
changes changes
changes
Update
Update Update
Update ...
B WP V WP B WP V WP

VBLOG VBLOG

With BI, the next transaction cannot be processed until the SAP-LUW has
been completed. Processing is always synchronous.

 SAP AG 1999

 From a business point-of-view, an SAP logical unit of work (SAP-LUW ) consists of an SAP
transaction a user executes online (first part of LUW) and the corresponding update (second part of
LUW). In online processing, the user can proceed with the next SAP transaction after saving, usually
at the end of the transaction processing (online part). The user therefore starts an additional SAP-
LUW while the update from the first SAP-LUW was running. This is asynchronous transaction
processing.
 In online processing, the user can proceed with the next SAP transaction after saving, usually at the
end of the transaction processing (online part). The user therefore starts an additional SAP-LUW
while the update from the first SAP-LUW was running. This is called asynchronous transaction
processing.
 The processing of batch input sessions, however, is synchronous. This means SAP-LUW 2 is not
started until the update for SAP-LUW 1 is completed.

© SAP AG BC420 13-12


0.13
Asynchronous Processing

SAP-LUW
SAP-LUW 11 When call transaction is used in
processing mode “A” (asynchronous), the
Mark next transaction could be started here (not
changes Update recommended).
Update
B WP V WP

SAP-LUW
SAP-LUW 22

Mark
changes Update
Update
B WP V WP

SAP-LUW
SAP-LUW 22

Mark
changes Update
Update
B WP V WP
 SAP AG 1999

 Processing mode "A" for call transaction:


After the first part of the SAP-LUW is completed and the changes are marked, the next SAP-LUW
can be started immediately. This means that external data imported using call transaction could be
imported partially in parallel (overlapping import), if the update takes longer than the calling of the
next record to be processed.
 We do not recommend the use of asynchronous processing with CT; if you do use it, test it
thoroughly beforehand.
SAP Notes on updating / locks:
 Lock table 17267, 13907, 97760
 Update / repeat update 70085

© SAP AG BC420 13-13


0.14
Special Methods: Contents (4)

InteractiveLists
Interactive Lists

UsingVariable
Using Variable External
ExternalData
Data Format
Format

SAP-LUW
SAP- LUW

ChangingRFBIDE00
Changing RFBIDE00to
toCall
CallTransaction
Transaction

Tips&&Tricks
Tips Tricks

 SAP AG 1999

© SAP AG BC420 13-14


0.15
The New Selection Screen for ZRFBIDE00

RFBIDE00 was
Call Transaction Interface for Customers
copied to
ZRFBIDE00 and
File path changed. The
selection screen
includes new
parameters.

X XCALL
ANZ_MODE N
Error: SY-SUBRC <> 0
UPDATE S CT

Fehlermappe

For CT, XCALL must be


set to 'X'.
 SAP AG 1999

 When the parameter XCALL is selected, processing is through 'Call Transaction .. Using ..’. The
transactions are not stored in a batch input session, instead, processing begins immediately. If
processing with 'Call Transaction .. Using ..' was not successful, the cause of the error is logged, and
the transaction is then saved in a batch input session.
 You can use parameter ANZ_MODE to control the display mode (see CT method).
 The parameter UPDATE specifies the update mode (see CT method).

© SAP AG BC420 13-15


0.16
Modifying ZRFBIDE00 for Call Transaction (CT)

REPORT ZRFBIDE00 MESSAGE-ID FB.

467 DATA: XCALL(1) TYPE C. " X=Call transaction


468 DATA: ANZ_MODE(1) TYPE C. " A=All N=Nothing E=Error
469 DATA: UPDATE(1) TYPE C. " S=Synchronous A=Asynchronous

...
Comments are added
490 * PARAMETERS XCALL LIKE RFPD0-RFBICALL. for using CT
491 * PARAMETERS ANZ_MODE LIKE RFPD0-ALLGAZMD.
492 * PARAMETERS UPDATE LIKE RFPD0-ALLGVBMD.
...

When CT is used, the comments are removed

 SAP AG 1999

 Program RFBIDE00 for customer data transfer includes comments for help with modifying the
program for use with call transaction.
 Comment out the three variables after the DATA statement. Set the three variables after the
PARAMETERS statement to active (remove comments).

© SAP AG BC420 13-16


0.17
Special Methods: Contents (5)

InteractiveLists
Interactive Lists

UsingVariable
Using Variable External
ExternalData
Data Format
Format

SAP-LUW
SAP- LUW

ChangingRFBIDE00
Changing RFBIDE00to
toCall
CallTransaction
Transaction

Tips&&Tricks
Tips Tricks

 SAP AG 1999

© SAP AG BC420 13-17


0.18
SAP Notes on Data Transfer

Components: BC-ADM, BC-DB-...,


BC-KRN, CA-CL, ...

Notes:

LSMW 101014, 168644, 158198, 158285


BI Recorder (pre-inst.) 78448
BI logs and reorg. 18307, 39282, 24438, 18319
All reorg. jobs 16083
BI and commit work 26703, 24141
BI and updating 33421, 49633
BI in foreground 45507, 26171, 49132
BI and postprocessing 15999
BI in the background 33319, 19422
BI and long texts 159738
BI and table controls 11788
Character sets... 42709
Confirmation prompt 13882
Data transfer
 SAP AG 1999 with CATT 87162

 SAPNet allows you to create your own problem messages for SAP support, thus speeding up and
optimizing processing of customer messages.
 You can perform a free search of the SAP Note database for answers to questions you may have.

© SAP AG BC420 13-18


0.19
BI Utility Programs

• RSBDCREO
• Deletes all sessions that are marked as successfully completed and are
still in the system, and the corresponding session logs.
• Physically deletes all logs for which sessions no longer exist.
• Reorganizes log file.
• Integrated in batch input monitor.

• RSBDCLOG
• Creates a list of batch input logs selected according to session name.
• You can display or delete logs (if sessions exist, you can activate an
analysis).
• Integrated in batch input monitor.

• RSBDCDRU
• Allows to select session contents and print out these selections.
• Integrated in batch input monitor.

 SAP AG 1999

 RSBDCREO is the most important of the three utility programs listed. You use this program to
reorganize batch input sessions and their logs.

© SAP AG BC420 13-19


0.20
BI Programming: Reduce Rollback Segment Load

ABAPsequential
Open Programmfile

Open BI session

Read data record


(sequential file)
Every 100 to 1000
Fill BDC table
transactions:
Fill BI session /
CALL TRANSACTION Use COMMIT WORK to
COMMIT WORK prevent overloading the
database rollback segments.
Last data record?

Close BI session

Close sequential file

 SAP AG 1999

 Database rollback segments are buffer areas that store the “before image” of the database during a
database logical unit of work (LUW) (DB - LUW = database processing step). The “before image” is
the change information needed to restore the database to a consistent state, if an error occurs during
this small processing step.
 The call of BDC_INSERT to fill the batch input session causes database changes that fill the rollback
segments. To restrict the growth of these segments, we recommend you trigger a database commit at
regular intervals (every 100 or 1000 loops). To do this, use the ABAP command COMMIT WORK,
which resets the rollback segments.

© SAP AG BC420 13-20


0.21
Further Tips and Information

 Batch input logs in DIR_GLOBAL


 Batch input sessions are stored in the database in
tablespace PSAPSTABD

 SAP AG 1999

 Logs:
The batch input logs are stored in the directory DIR_GLOBAL ( .../global) on the application server.
You should use the ABAP program RSBDCREO to reorganize these files.
 Tablespace size:
Depending on the size of the external data to be transferred to the R/3 System, the batch input
session may exceed the size of the tablespace. If this happens, the database administrator must
increase the size of tablespace PSAPSTABD.

© SAP AG BC420 13-21


0.22
Special Methods: Unit Summary

You are now able to:

 Use interactive lists for data transfer


 Read and process variable format for external
data records
 Estimate the effects of the SAP - LUW architecture
on external data transfer
 Transfer customer data using CALL
TRANSACTION
 Use BI service programs

 SAP AG 1999

© SAP AG BC420 13-22


Exercises
Unit: Special Methods
Topic: Interactive Lists and Batch Input

 Data transfer with interactive lists

Select the check boxes of an interactive list using the the batch input/call
transaction method. The transaction recorder first records a program and
then edits the recording.

Recording: ILIST_##
Transaction to be recorded: BC420

1 Recording of interactive lists.


1-1 The program SAPBC420_SPTD_LIST_CHECKBOXES displays customer
master data via an interactive list. Call this program, flag some of the
checkboxes and then click on the magnifying glass icon  Detailed display !
(The detailed display shows the debtor addresses)

1-2 Record this program (transaction code: BC420).

1-3 Execute the recording for test purposes! Have the processing of the list and the
setting of the check boxes been executed correctly?

__________

1-4 Edit and correct the recording, so that the check boxes can be set. You will find
the relevant information in the training course slides!

© SAP AG BC420 13-23


Solutions

Chapter: Special techniques


Solution to 1.3

1 Recording interactive lists


1-3 The list is not processed correctly. The checkboxes are not set in the recording.
If for example the fields seven and eight are checked, enter the following to the
recording below the module pool line SAPMSSY0, 120, X:

Field name Field value


"09/02" , "X" and
"10/02" , "X"

This marks the checkboxes seven and eight.


The two lines above the first checkbox (list header and underline) are added to
the line numbering in the output list, so the line numbers nine and ten in the
example mark the checkboxes seven and eight (the "02" is the column number).

© SAP AG BC420 13-24

Das könnte Ihnen auch gefallen