Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

BDC Notes

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

BDC Notes

What is BDC and why do we use BDC


BDC (Batch Data Communication) also known as batch input is a technique by which large
volumes of data can be transferred from Non Sap or Legacy systems to SAP systems.

Example: A Legacy system that is to be replaced by SAP has say 1000 Customers, 2000
vendors and 3000 materials. All this data needs to be transferred to SAP. In such cases, we can
use BDC.

If the old system is replaced by SAP, such a transfer is called Conversion.


If the old system runs along with SAP, in that case the transfer is called an Interface.

The two methods for BDC are:

 Session Method
 Call TRANSACTION Method
 CALL DIALOG (Outdated)

What is the difference between Call Transaction Method and the Session method?

Session Method Call Transaction


Session method id generally used when the Call transaction method is when the data
data volume is huge. volume is low
Session method is slow as compared to Call Call Transaction method is relatively faster
transaction. than Session method.
SAP Database is updated when you process SAP Database is updated during the
the sessions. You need to process the execution of the batch input program.
sessions separately via SM35.
Errors are automatically handled during the Errors should be handled in the batch input
processing of the batch input session. program.
What is LSMW (Legacy System Migration Workbench)
LSMW is a tool that supports the transfer of data from non-SAP systems ("Legacy Systems") to
SAP R/3 systems. This can be a one-time transfer as well as a periodic one.

Is there any method apart from BDC for data upload to SAP?

Apart from BDC and LSMW, you can use BAPIs to upload data into SAP.
BAPIs should be preferred over BDCs, because they process data faster than BDC.
A BAPI is faster since it updates Database "directly". Whereas BDC calls transaction and goes
through the whole screen sequence as any user would do.

BAPI BDC
BAPI is faster than BDC. BDC is relatively slower than BAPI.
BAPI directly updates database. BDC goes through all the screens as a normal
user would do and hence it is slower.
No such processing options are available in Background and Foreground processing
BAPI. options are available for BDC.
BAPI would generally used for small data BDCs would be preferred for large volumes
uploads. of data upload since background processing
option is available.
For processing errors, the Return Parameters Errors can be processed in SM35 for session
for BAPI should be used. This parameter method and in the batch input program for
returns exception messages or success Call Transaction method.
messages to the calling program.

What is the structure of the BDC table?


The BDCDATA consists of the following fields:

PROGRAM [CHAR 40] - Online program name.


DYNPRO [NUMC 4] - Screen number.
DYNBEGIN [CHAR 1] - Flag to indicate the start of a new screen.
FNAM [CHAR 132] - Field name of a screen field to be filled with data.
FVAL [CHAR 132] - The actual value to be filled into the specified screen field.
Sample Screenshot:
What is the difference between BDC_OKCODE and BDC_CURSOR?

BDC_OKCODE: is used for storing commands during the recording. Like '/00' is the
command for 'ENTER' Key.

BDC_CURSOR: contains the cursor position. it contains the field in which cursor will be.

Example code:
perform bdc_field using 'BDC_CURSOR'
'PROJ-PSPID'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.

What is the transaction for Recording BDC?

The T-code is SHDB.

What is the t-code to display batch input sessions?

SM35

What is the ABAP program name to process the batch input session automatically?

RSBDCSUB

How do you read files from the Application server?

You can use the commands:

OPEN DATASET ---> opens the file (dataset) either in read /write mode.

READ DATASET ---> Read the file

CLOSE DATASET ---> Close the dataset once the date has been read.

How do you read files from the presentation server?

You can use the Function Modules:

GUI_UPLOAD --> to read data from file into an internal table

GUI_DOWNLOAD --> to write data from internal table to a file on presentation server
What is the function modules used to create batch input session?

Function Module Name Purpose


BDC_OPEN_GROUP Used to create session
BDC_INSERT Used to insert batch input data
Used to close session. We can process the
BDC_CLOSE_GROUP session only after is closed

What are the parameters in BDC_OPEN_GROUP?

Parameters Purpose
CLIENT Client in which session to be processed
GROUP Name of the session
HOLDDATE Lock date
KEEP Keep session even after successful processing
This is used to check the user authorizations to
USER run the transactions

What are the parameters in BDC_INSERT?

Parameters Purpose
TCODE Transaction Code
DYNPROTAB

Can we use call transaction and session method in the same program? Explain?

Yes, we can call call transaction and session method in same program, generally we use call
transaction for updating and session method for logging errors in the same program.
What is the last entry in all BDC tables?
In all BDC tables the last entry is to save the data by using the field name BDC_OKCODE and a
field value of ‘/11’

How do you save data in BDC tables?


The data in BDC tables is saved by using the field name ‘BDC_OKCODE’ and field value of
‘/11’.
What are the available OK Codes that can be utilized during batch input processing?
/n – terminates current batch input transaction and marks as incorrect.
/bdel – delete current batch input transaction from session.
/bend – terminate batch input processing and mark session as incorrect.
/bda – change display mode to process the session on screen instead of displaying only errors.
/bde – change display mode to display only errors instead of processing the session on the
screen.

What is the use of program RSBDCSUB?


There are two ways to process the BDC sessions:
1) Go to SM35 ---> Choose session ---> hit process.

2) Use program RSBDCSUB.


RSBDCSUB schedules the session to be processed in background.

Report Notes

What is a report?
Report is a program used to fetch data from the database tables and display it on the screen. It
has 2 screens
1) selection screen (optional)
2) list or output screen

When the TOP-OF-PAGE event does get triggered?


TOP-OF-PAGE event will be triggered when the first ULINE, WRITE or SKIP statement occurs
in a program.

What is the difference between SKIP and RESERVE?


SKIP provides empty space between lines, while RESERVE executes a page break on the
current page if the number of lines between current line and the page footer is less than the
number specified in RESERVE statement.

What is the difference between SKIP and NEW-LINE?

SKIP generates a blank line, while the NEW-LINE causes the control to move to next line.
What is hotspot?

Hotspot is an area on the list where the mouse pointer turns into an upright hand symbol. A
single click on the hotspot does the same thing as a double-click.

What does HIDE statement do?

The HIDE statement hides the contents of the line along with the line numbers in a system
defined HIDE area. This is used in interactive reporting.

What are the events in classical reports?

INITIALIZATION

AT SELECTION-SCREEN

START-OF-SELECTION

END-OF-SELECTION

TOP-OF-PAGE

END-OF-PAGE

How many detail lists can be created in interactive reporting?

20

What is the name of the system variable that holds the contents of the selected line in
interactive reporting?

SY-LISEL

Can we set page headers to details lists?

Yes. Use TOP-OF-PAGE DURING LINE-SELECTION event.


ALV Notes

What is ALV?

ALV stands for ABAP List Viewer. ALV gives us a standard List format and user interface to all
our ABAP reports. ALV is created by a set of standard function modules provided by SAP.
What are the uses of ALV reports?

Sorting of records

Filtering of records

Totals and Sub-totals

Download the report output to Excel/HTML

Changing the order of the columns in the report

Hide the unwanted columns from the report

What is standard function modules used to create ALV?

REUSE_ALV_LIST_DISPLAY Display an ALV list


REUSE_ALV_GRID_DISPLAY Display an ALV grid
REUSE_ALV_COMMENTARY_WRITE Output List header information
REUSE_ALV_VARIANT_F4 Display variant selection dialog box
REUSE_ALV_VARIANT_EXISTENCE Checks whether a variant exists
REUSE_ALV_FIELDCATALOG_MERGE Create field catalog from dictionary structure or
Internal table

How to use 'DOUBLE_CLICK' event in ALV?

DOUBLE_CLICK it is an Event. it is used for to print Interactive Report. This is mainly used in alv
report for ex. Dc event for double-clicks for e_row. (E_row is parameter).
How to make use of 'EDIT', and 'SAVE' option in ALV?

EDIT field is used to edit data at output screen. This is declaring in Feildcat Level only for ex: EDIT
= 'X'.

You might also like