Tuesday, October 12, 2010

BDC FAQ - Frequently Asked Questions

BDC FAQ - Frequently Asked Questions

Explain BDC.

BDC stands for batch data communication is used to tranfer data from non sap system to sap system.
There are two method used 2 transfer data using BDC
1 DIRECT METHOD
2 BATCH INPUT METHOD it is also of two type :-
i) CALL TRANSACTION METHOD
ii) SESSION METHOD

The major difference b/w call transaction and session method is that in call transaction method data is updated Synchronously but session method is asynchronously session is generated in session method but session is not generated in call transaction method

BDC is all about automating the screen flow. for example, lets say we send an IDoc to external system using transcation we19. If the requirement is to automate it , then BDC can be used.
Procedure:
1. record the transaction with tcode shdb
2. copy the transaction recording program code from where you want to execute it
3. use the method to call : call transaction or session method

The above are the ways to automate those screen flows for which recording is performed.

Once you are done.. in the field values of BDC recording, put the values as input values whatever you want to mention.

How to handle errors in call transaction method and session method.

You can try this code to handle your BDC errors and display the corresponding error messages:

if session ne 'X'.
call transaction tcode using itab_bdc mode 'N' UPDATE 'S' MESSAGES INTO i_errors.

* N - no display
* E - errors only
* A - display ALL screens
elseif session = 'X'.
call function 'BDC_INSERT'
exporting
tcode = tcode
tables
dynprotab = itab_bdc
exceptions
internal_error = 1
not_open = 2
queue_error = 3
tcode_invalid = 4
printing_invalid = 5
posting_invalid = 6
others = 7

*Check SY-SUBRC
if sy-subrc <> 0. "Unsuccessful
loop at i_errors.
MESSAGE ID i_errors-msgid TYPE i_errors-msgtyp NUMBER
i_errors-msgnr WITH i_errors-msgv1 i_errors-msgv2
i_errors-msgv3 i_errors-msgv4 INTO i_error_messages-message.

append i_error_messages.
endloop.
endif.
endif.

interview questions faqs freshers sap abap java

What an table cluster?
an table cluster combines several logical tables in the ABAP/D Dictionary.
Several logical rows D m different cluster tables r brought together
in the an single physical record. records D m cluster tables
assigned B an cluster r thus stored in the an single common table in the the
database.




What database utility ?
Database utility interface between ABAP/D Dictionary and underlying SAP system.

The database utility interface between ABAP/D Dictionary and relational database underlying SAP system. You could call database utility D m initial screen off ABAP/D Dictionary with Utilities ® Database utility.
The database utility allows you B create, delete and convert objects D m ABAP/D Dictionary in the database
MODULARIZATION

What Modularization and its benefits?
If program contains same or similar blocks off statements or it required B process same function several times, we could avoid redundancy by using modularization techniques. By modularizing ABAP/D programs we make them easy B read and improve their structure. Modularized programs r also easier B maintain and B update.

How could we create callable modules off program code within one ABAP/D Program?
A. By defining macros.
By creating include programs in the library.

What r subroutines?
Subroutines r program modules which could B called D m other ABAP/D programs or within same program.

What r types off Subroutines?

Internal Subroutines source code off internal subroutines will B in the same ABAP/D program as calling procedure (internal call).
External Subroutines source code off external subroutines will B in the an ABAP/D program other than calling procedure.

What r different types off parameters?

Formal parameters Parameters which r defined during definition off subroutine with FORM statement.

Actual parameters Parameters which r specified during call off an subroutine with PERFORM statement.

How could one distinguish between different kinds off parameters?
A. Input parameters r used B pass data B subroutines.
Output parameters r used B pass data D m subroutines.

What r different methods off passing data?

Calling by reference During an subroutine call, only address off actual parameter transferred B formal parameters. formal parameter has no memory off its own, and we work with field off calling program within subroutine. If we change formal parameter, field contents in the calling program also change.
Calling by value During an subroutine call, formal parameters r created as copies off actual parameters. formal parameters have memory off their own. Changes B formal parameters have no effect on actual parameters.
Calling by value and result During an subroutine call, formal parameters r created as copies off actual parameters. formal parameters have their own memory space. Changes B formal parameters r copied B actual parameters at end off subroutine.
The method by which internal tables r passed By Reference.




What difference between function module and an normal ABAP/D subroutine?
In contrast B normal subroutines function modules have uniquely defined interface.
Sub routines do not return values.
Sub routines do not return exceptions.
Sub routines cannot B tested independently.
Declaring data as common parts not possible for function modules. Function modules r stored in the an central library.

What an function group?
A function group an collection off logically related modules that share global data with each other. All modules in the group r included in the same main program. When an ABAP/D program contains an CALL FUNCTION statement, system loads entire function group in the with program code at runtime. Every function module belongs B an function group.

What difference between internal tables and extract datasets?

The lines off an internal table always have same structure. By using extract datasets, you could handle groups off data with different structure and get statistical figures D m grouped data.
You have B define structure off internal table at begining. You need not define structure off extract dataset.
In contrast B internal tables, system partly compresses extract datasets when storing them. This reduces storage space required.
Internal tables require special work area for interface whereas extract datasets do not need an special work area for interface.


LOGICAL DATABASE.

What r logical databases ? ?? What r advantages/disadvantages off logical databases?
Ans - an Logical Database an hierarchical structure off tables. Use GET statement B process Logical Databases.
LDB consists off logically related tables grouped together – used for reading and processing data.
Advantages = A . No need off programming for retrieval , meaning for data selection
B . Easy B use standard user interface, have check completeness off user input.

Disadvantages = A . Fast in the case off lesser no. off tables But if table in the lowest level off hierarchy, all upper level tables should B read so performance slower.

Preparation off data records by L.D.B and reading off data records in the actual report r accomplished with command pair.
- Put and Get.

The three main elements off LDB r
- Structure, Selections, Database Program.

What sort off tables one could use in the designing hierarchy off an LDB ?
- Tables which r having Foreign key relations.

The structure off Logical Databases relfects ________________ dependencies off hierarchical tables in the SAP System.
- Foreign key
If you want B improve response time ( time B access data ) Logical DataBases permits you B achieve this using ______________
- VIEWS.
What r advantages off Logical DataBases ?
- It offers an easy-to-use selection screen. You could modify pre-generated selection screen B your needs. It offers check functions B check whether user input complete, correct, and plausible. It offers reasonable data selections. It contains central authorization checks for database accesses. Enhancements such as improved performance immediately apply B all report programs that use logical database.


Report FORMATTING

In order B suppress leading zeros off an number field keywords used r
NO-ZERO.

The Command that allows for vertical alignment off fields one below other.
UNDER.

In order B concatenate strings only for output purposes command _________ could B used in the conjunction with 'Write' statement.
NO-GAP.

Data could B moved D m one field B another using an 'Write ' Statement and stored in the desired format.
TRUE. Write Date_A B Date_B format DD/MM/YY.

In order B have boldfaced text as output command used
Write (f) INTENSIFIED.

Background and foreground colors could B interchanged using command
Format inverse.

Which datatype cannot B used B define parameters.
Type F.

For each new event, system resets all formatting options B their default values. TRUE.



The processing block following END-OF-PAGE processed only if you reserve lines for footer in the LINE-COUNT option off REPORT statement.

To execute an page break under condition that less than an certain number off lines left on an page acheived by ________________________.
RESERVE n lines.

What limit for length off an page if page length not specified in the report statement.
F 0,000 Lines.

How could Symbols or R/C icons B output on screen?
WRITE (symbol-name) AS SYMBOL.
WRITE (icon-name) AS ICON.

No comments:

Tutorials on SAP-ABAP

Adobe Interactive Forms Tutorials

Business Server Pages (BSP)

Userexits/BADIs

Web Dynpro for ABAP (Step by step procedure for web dynpro,Tutorials on Web Dynpro,)

ALV Tutorials

Blog Archive

goodsites