Showing posts with label BDC FAQ. Show all posts
Showing posts with label BDC FAQ. Show all posts

Tuesday, May 6, 2008

SAP BDC INTERVIEW QUESTIONS & ANSWERS

1. What is full form of BDC Session?

Batch Data Communication Session.

2. What are the steps in a BDC session?

The first step in a BDC session is to identify the screens of the transaction that the program will process. Next step is to write a program to build the BDC table that will be used to submit the data to SAP. The final step is to submit the BDC table to the system in the batch mode or as a single transaction by the CALL TRANSACTION command.

3. How do you find the information on the current screen?

The information on the current screen can be found by SYSTEM à STATUS command from any menu.

4. 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’.

5. 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’.

6. 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.

7. 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).

8. Write the BDC table structure.

BDC table structure

FIELD TYPE DESCRIPTION

Program CHAR (8) Program name of transaction.

DynPro CHAR (4) Screen number of transaction.

DynBegin CHAR (1) Indicator for new screen.

Fnam CHAR (35) Name of database field from screen.

Fval CHAR (80) Value to submit to field.

9. Does the CALL TRANSACTION method allow multiple transactions to be processed by SAP?

No. The CALL TRANSACTION method allows only a single transaction to be processed by SAP.

10. Does the BDC-INSERT function allow multiple transactions to be processed by SAP?

Yes.

11. What is the syntax for ‘CALL TRANSACTION’?

CALL TRANSACTION trans [using bdctab MODE mode].

Three possible entries are there for MODE.

A - Show all screens.

E - Show only screens with errors.

N - Show no screens.

Sunday, December 2, 2007

Creating Update Function Modules-BDC

To create a function module, you first need to start the Function Builder. Choose Tools -> ABAP Workbench, Function Builder. For more information about creating function modules, refer to the ABAP Workbench Tools documentation.

To be able to call a function module in an update work process, you must flag it in the Function Builder. When you create the function module, set the Process Type attribute to one of the following values:
  • Update with immediate start
    Set this option for high priority ("V1") functions that run in a shared (SAP LUW). These functions can be restarted by the update task in case of errors.
  • Update w. imm. start, no restart
    Set this option for high priority ("V1") functions that run in a shared (SAP LUW). These functions may not be restarted by the update task.
  • Update with delayed start
    Set this option for low priority ("V2") functions that run in their own update transactions. These functions can be restarted by the update task in case of errors.

To display the attributes screen in the Function Builder, choose Goto -> Administration.

Defining the Interface

Function modules that run in the update task have a limited interface:
  • Result parameters or exceptions are not allowed since update-task function modules cannot report on their results.
  • You must specify input parameters and tables with reference fields or reference structures defined in the ABAP Dictionary.
Calling Update Functions

Synchronous or Asynchronous Processing?

Function modules that run in the update task can run synchronously or asynchronously. You determine this by the form of the commit statement you use:
  • COMMIT WORK
    This is the standard form, which specifies asynchronous processing. Your program does not wait for the requested functions to finish processing.
  • COMMIT WORK AND WAIT
    This form specifies synchronous processing. The commit statement waits for the requested functions to finish processing. Control returns to your program after all high priority (V1) function modules have run successfully.
    The AND WAIT form is convenient for switching old programs to synchronous processing without having to re-write the code. Functionally, using AND WAIT for update-task updates is just the same as dialog-task updates with PERFORM ON COMMIT.

Parameter Values at Execution
In ABAP, you can call update-task function modules in two different ways. The way you choose determines what parameter values are used when the function module is actually executed. Parameter values can be set either at the time of the CALL FUNCTION statement, or at the time of the COMMIT WORK.

The examples in these sections show asynchronous commits with COMMIT WORK.

Calling Update Functions Directly

To call a function module directly, use CALL FUNCTION IN UPDATE TASK directly in your code.

CALL FUNCTION 'FUNCTMOD' IN UPDATE TASK EXPORTING...
The system then logs your request and executes the function module when the next COMMIT WORK statement is reached. The parameter values used to execute the function module are those current at the time of the call.

a = 1.
CALL FUNCTION 'UPD_FM' IN UPDATE TASK EXPORTING PAR = A...
a = 2.
CALL FUNCTION 'UPD_FM' IN UPDATE TASK EXPORTING PAR = A...
a = 3.
COMMIT WORK.

Here, the function module UPD_FM is performed twice in the update task: the first time, with value 1 in PAR, the second time with value 2 in PAR.

Adding Update-Task Calls to a Subroutine

You can also put the CALL FUNCTION IN UPDATE TASK into a subroutine and call the subroutine with:

PERFORM SUBROUT ON COMMIT.
If you choose this method, the subroutine is executed at the commit. Thus the request to run the function in the update task is also logged during commit processing. As a result, the parameter values logged with the request are those current at the time of the commit.

a = 1.
PERFORM F ON COMMIT.
a = 2. PERFORM F ON COMMIT.
a = 3. COMMIT WORK. FORM f.
CALL FUNCTION 'UPD_FM' IN UPDATE TASK EXPORTING PAR = A.
ENDFORM.

In this example, the function module UPD_FM is carried out with the value 3 in PAR. The update task executes the function module only once, despite the two PERFORM ON COMMIT statements. This is because a repeatedly registered one can only be executed once in the case of COMMIT WORK. The subroutine itself, containing the function module call, may not have parameters.

The method described here is not suitable for use inside dialog module code.

BDC Faqs

1. What is full form of BDC Session?

Batch Data Communication Session.

2. What are the steps in a BDC session?

The first step in a BDC session is to identify the screens of the transaction that the program will process. Next step is to write a program to build the BDC table that will be used to submit the data to SAP. The final step is to submit the BDC table to the system in the batch mode or as a single transaction by the CALL TRANSACTION command.

3. How do you find the information on the current screen?

The information on the current screen can be found by SYSTEM à STATUS command from any menu.

4. 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’.

5. 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’.

6. 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.

7. 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).

8. Write the BDC table structure.

BDC table structure

FIELD TYPE DESCRIPTION

Program CHAR (8) Program name of transaction.

DynPro CHAR (4) Screen number of transaction.

DynBegin CHAR (1) Indicator for new screen.

Fnam CHAR (35) Name of database field from screen.

Fval CHAR (80) Value to submit to field.

9. Does the CALL TRANSACTION method allow multiple transactions to be processed by SAP?

No. The CALL TRANSACTION method allows only a single transaction to be processed by SAP.

10. Does the BDC-INSERT function allow multiple transactions to be processed by SAP?

Yes.

11. What is the syntax for ‘CALL TRANSACTION’?

CALL TRANSACTION trans [using bdctab MODE mode].

Three possible entries are there for MODE.

A - Show all screens.

E - Show only screens with errors.

N - Show no screens.



Blog Archive