Vous êtes sur la page 1sur 7

1. 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.
2. 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.
3. What is a multiple line field?
A multiple line field is a special kind of field which allows the user to enter multiple lines of data into it.
4. How do you populate data into a multiple line field?
To populate data into a multiple line field, an index is added to the field name to indicate which line is
to be populated by the BDC session (Line index).
5. 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)
6. What is the difference between Call Transaction Method and the Session
method ?

Session Method
Session method id generally used
when the data volume is huge.
Session method is slow as
compared to Call transaction.
SAP Database is updated when you
process the sessions. You need to
process the sessions separately via
SM35.
Errors are automatically handled
during the processing of the batch
input session.

Call Transaction
Call transaction method is when the
data volume is low
Call Transaction method is relatively
faster than Session method.
SAP Database is updated during the
execution of the batch input
program.
Errors should be handled in the
batch input program.

7. How do you do BDC for a table control?


With other things as usual, there is a special trick that you have to use while doing BDC
for table control.
You need to use the BDC OKCODE '=P+'.
Its the BCD_OKCODE for Page down that can be used for scrolling down in table control.
8. 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
BAPI is faster than BDC.
BAPI directly updates database.

No such processing options are


available in BAPI.
BAPI would generally used for small
data uploads.

For processing errors, the Return


Parameters for BAPI should be
used.This parameter returns
exception messages or success
messages to the calling program.

BDC
BDC is relatively slower than BAPI.
BDC goes through all the screens as
a normal user would do and hence it
is slower.
Background and Foreground
processing options are available for
BDC.
BDCs would be preferred for large
volumes of data upload since
background processing option is
available.
Errors can be processed in SM35 for
session method and in the batch
input program for Call Transaction
method.

9. How do you process errors in Call Transaction method ?


Let's have a look at the syntax for CALL TRANSACTION method.
Sample code:

DATA: BEGIN OF G_T_MESSTAB OCCURS 0.


INCLUDE STRUCTURE BDCMSGCOLL.
DATA: END OF G_T_MESSTAB.
CALL TRANSACTION 'MB11'
USING G_T_BDCDATA
MODE 'E'
UPDATE 'S'
MESSAGES INTO G_T_MESSTAB.
All the error messages will be trapped inside G_T_MESSTAB.

10. What is the use of program RSBDCSUB?


There are two ways to process the BDC sessions:
1) Go to SM35 ---> Choose session ---> hit process.
Now See Question no. 10.
2) Use program RSBDCSUB.
RSBDCSUB schedules the session to be processed in background.
Let's take an example to understand this.
The sessions are created at one point of time and processed at other point of time and
this may create a problem: For example: a BDC program creates a session for updating
1500 customers in SAP. However , before this session is processed via SM35 , a user
inserts 100 customers in the system manually. In this case , the session will have at least
100 errors when the session is processed from SM35.
One way to avoid this is to use the program "RSBDCSUB" in the batch input program
itself so that the session is processed as soon as it is created.
RSBDCSUB schedules the session to be processed in background.
11. 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:

BDCDATA table structure

12. 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 contians the field in which cursor will be.
Example code:
perform bdc_field
perform bdc_field

using 'BDC_CURSOR'
'PROJ-PSPID'.
using 'BDC_OKCODE'
'=BU'.

13. What are the 3 methods that we use in sequence in a Batch input session
method ?
1) BDC_OPEN_GROUP for opening the Batch Input Session
2) BDC_INSERT for inserting the transactional data into SAP
3) BDC_CLOSE_GROUP for closing the Batch Input Session

If there are n records , the BDC_INSERT method should be called n times.


BDC_OPEN_GROUP and BDC_CLOSE_GROUP are called only once.
General Information about a session is stored in table APQI.
Transaction data for a session is stored in table APQD.

14. What is your approach for writing a BDC program?


Identify the Tcode and do the recording in SHDB to populate the BDCDATA.

Once the recording is done , one can Transfer it to the Batch input program.

In the batch Input program , The transactional data is read from the file to an internal
table.
Then one can loop over the transactional data in the internal table and start uploading
the data in SAP either by CALL TRANSACTION method or by creating sessions through
the batch input program.
15. How do you process errors in Session method ?
You can go to Transaction SM35 , Choose the session name and click on Process.

16. What are the different modes of processing batch input sessions?

The three modes are:


Foreground
Display Errors Only
Background

17. What is the difference between Synchronous and Asynchronous Update ?


In Synchronous update , the database is updated before the next transaction is taken
for processing in a batch input.
In Asynchronous update , the system doesn't wait for updating the database before
the next transaction is taken for processing in a batch input.
18. What is the transaction for Recording BDC ?
The Tcode is SHDB.
19. 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 .
20. 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
21. Difference between /N and /BEND ?

/BEND terminates the batch input processing and sets the session to be failed.
/N terminates the current batch input transaction.
22. SM35 transaction . How to automate BDC ?

After execution of batch input program , the session created is placed in the session queqe which can be
viewed using SM35 transaction executing / Releseing the session will start the transfer of the data from
the session into the database tables./
23. Open datasets, Read datasets ( Reading and writing data to files)?

Date Sets are nothing but files on Application Server,they can even be called as Sequential files.
Open Dataset
Is used to open required file on the application Server.
Read Dataset.
Is used to read the contents required file on the application Server.
24. How to read files and process BDCs automatically?

To read file from Presentation server use Upload or GUI Upload or WS upload and to read file from
Application server use Opend Dataset,Read dataset and Close dataset.
25. wht table stores online messages?

T100.
26. I am uploading 1000 records using session method, and I have a error in 950 th record. So,
what will happen and how many records have been uploaded.
Similarly, I am uploading 100- records in call transaction method, I have an error in 950 th record.
So, what will happen and how many records have been uploaded.??
For session method, 949 have been uploaded.
For call transaction, 950 have been uploaded.
27. how to generate and process the session in the same program?
Write a BDCprogram & then call brite bdc program

Vous aimerez peut-être aussi