Wednesday, August 1, 2007

BDC & LSMW

1

What is BDC.

BDC means Batch Data Communication and is used to upload mass data at a given time.

2

What are the methods for uploading data.

a. Session method.

b. Call Transaction method.

c. Direct input method.

3.

How do we make a recording.

Through SHDB.

4

What is a typical BDC structure.

a. Program name

b. Screen No

c. Start of screen

d. Field name

e. Field value

5

What should be internal table type used for uploading data to BDC.

Table should be of type BDCDATA.

6

What are the FM used for BDC.

BDC_OPEN_GROUP

BDC_INSERT

BDC_CLOSE_GROUP

7

What thing(s) should we keep in mind while recording.

We should make sure that all the mandatory fields are included in the recording, else BDC will fail.

8

How do we handle currency or quantity field in BDC.

Use write statement with currency/quantity option.

9

Where is session stored.

SM35.

10

What are the modes of executing a BDC.

a. Fore ground.

b. Back ground.

c. Only error screen.

11

Are logs maintained in BDC.

Yes.

12

Is a session stored after execution.

It depends on the selection made by the user in FM BDC_OPEN_GROUP if he has selected the option of Keep = ‘X’ then session is stored else its deleted.

13

Can we generate programs from SHDB recording.

Yes we can, Just select the recording and click new program.

14

What is the difference between a call transaction and session method.

a. No logs are created in call transaction method.

b. No session is created here.

c. Need to execute records one by one in call transaction.

15

What type of internal table should be created for call transaction.

BDCDATA.

16

How can we see error messages during call transaction.

Create a internal table of type BDCMSGCOLL and use this in call transaction, this will return the messages during the call transaction.

17

What is a synchronous and asynchronous methos.

Synchronous method means simultaneous execution while asynchronous means at later stage the execution takes place.

18

Is BDC synchronous or asynchronous.

Session methods can be both Synchronous and Asynchronous but call transaction is always synchronous




LSMW



1

What is LSMW.

Legacy System Migration Workbench.

2

What is the difference between LSMW and BDC.

a. LSMW has least coding.

b. Very simple

c. Has got number of standard recordings.

d. We can group similar recordings forming Projects and Sub-Projects.

e. Documentation can be provided at every stage.

f. We can insert additional coding and rules in LSMW.

g. To run LSMW user does not need to have ABAP knowledge.

3.

What are different import types for data uploading in LSMW.

a. Standard Input.

b. Batch Input.

c. Bapi

d. IDOC

4

Can we upload a given range of records say from 10-80.

Yes we can.




Difference between BDC and LSMW



BDC

LSMW

1. Lots of coding

1. Minimal coding almost nil

2. Data can be uploaded through recording only

2. Has 4 methods for uploading data

a. Standard

b. Recording

c. Bapis

d. Idoc

3. Uploading cannot be done for specific set of records.

3. Uploading can be done for specific set of records.

4. We cannot group logically related BDC

4. We can group the LSMW as project /sub project / objects

5. Does require programming knowledge

5. Does not require programming knowledge

Modularization

1

What does modularization means.

Dividing the program in to sections so as to increase the appearance and readability of the code.

2

What are different modularizing techniques.

a. Includes.

b. Macros.

c. Subroutines.

d. Function Modules.

3

Are includes executables.

No.

4

Where do we create include.

IN SE38 just select type I instead of E as for reports in attributes.

5

Can includes be nested.

Yes.

6

What is a macro.

Macros are like small codes written inside the program or can be global , we can pass parameters to these macros.

7

How many parameters can we pass to the macros.

Maximum 9.

8.

Is it good practice to use macros.

Macros are inserted at the calling point during runtime which increase the length of the codes and hence the execution time so they should not be used frequently.

9

How do we define and call macros.

Definition.

Define <macro name>.

<Code>

End-of-Definition.

Calling a macro.

<Macro name > parameters.

10

What is a subroutine.

Subroutines are local calls made in the program which may or may not return a value.

11

Can parameter be passed to a subroutine.

Yes, They can be

a. Pass by value.

b. Pass by reference.

c. Pass by value and return or changing.

12

How are internal tables passed.

They are always passed as pass by reference.

13

Can a subroutine be called outside a program.

Yes, just put in the program name that contains the subroutine.

Syntax <Subroutine_name>(<Program_name)

14

What is a formal parameter and actual parameter.

Actual Parameter: This is the one that is actually passed to the subroutine.

Formal Parameter: Parameters that hold the values in the actual call in the subroutine are formal parameters.

15

What is a function group.

Logically related function modules are stored under one roof , function group. This is necessary for creating a function group.

16

What is the T-Code for creating function module.

SE37.

17

What are the types of function modules.

a. Normal.

b. Remote enables.

c. Update function module.

18

What are the important tabs in function module.

a. Import

b. Export

c. Changing

d. Tables

e. Exception

There are two more tabs

a. Source code

b. Attributes

19

What is an exception tab.

User can raise exception in the function using the raise statements these exceptions are stored in the exception tab and are handled where the function is called.

20

What is a remote enabled function module.

Function that can be called outside sap by any other application is a remote enabled function module.

21

What is an update function module and why is it used.

When user wants to update any data base table directly then we should use these FM as it work on the principal of commit all(If update is successful) or rollback all(If update fails).

Reports

1

What is the T-Code for creating a report.

SE38

2

Can reports be executed via any other option other than SE38 and its own T-code if any.

Yes,Via SA38

3

What are the basic types reports.

Classical & Interactive

4

What are the events in an reports

INITLIZATION

AT SELECTION-SCREEN ON FIELD

AT SELECTION-SCREEN OUTPUT

AT SELECTION-SCREEN ON BLOCK

START-OF-SELECTION

TOP-OF-PAGE

END-OF-PAGE

TOP-OF-PAGE DURING LINE SELECTION

AT LINE SELECTION

AT PF-STATUS

AT USER COMMAND

END-OF-SELECTION.

5

What is the difference between parameters and select-options.

Parameters are used for input of single values

Select-Options are used for input of multiple values.

6

Can select options be used as parameters .

Yes, with options of No-Intervals and No-extensions.

7

How do we design a selection screen.

Using Begin of block <block name> with frame title text-001.

This will format the selection screen and create a block at the output.

8

How is a report aligned.

Using pretty printer , make sure that intend option is selected in Utilities->Setting->Abap editor

It is always aligned w.r.t to the reports statement.

9

Which is the default event.

START-OF-SELECTION

10

What is Line-Count and Line-Size options.

Line-Count : No of lines in a page , new page is automatically triggered when line-count lines are

Encountered

Line-Size:No of characters in a line.

11

What is Message-ID in the report statement.

It is the default message class to be used throught the report.

12

How to assign a label to the selection screen object.

Use Selection-Text Goto->Text Element->Selection Text

`

What is a modif-id.

If we want to modify the screen at runtime based on the user id then we use a modif id with the screen element.

14

Why do we use a text element.

If we are logged on to different language and if a text element is maintained in that language then it is automatically picked up.

15

When does an event end.

When a new event start the previous event end.

16

My End-Of-Page event is not triggering.

You need to reserve no of lines needed for your page end in the LINE-COUNT(<specify no of lines here) which is used at the report header.

17

When is End-Of-Page event triggered.

It is triggered only when the line count as mentioned in the LINE-COUNT is reached and not before that , we can also trigger page end explicitly by appropriate logic.

18

Do we also need to reserve line for TOP-OF-PAGE

No.

19

What are different types of select statements.

Select single

Select up to

Nested select

Sub Queries

Select into

20

What is the difference between a select single and select up to 1 rows.

Select single retrieves the 1st records depending upon the where condition , where as as select up to 1 rows gives the exact records depending upon the where condition.

21

What are the steps to rember while writing a select stmt for better performance.

a. Always select only required fields from the data base table.

b. Always use where conditions.

c. Avoid using nested selects and sub-queries.

d. If selecting more that one records use internal tables.

e. Do not use inner joins for more than 3 tables at a given time.

f. Do not use move-corresponding unless required.

22

What if select stmt using for all entries of a certain internal table is initial.

It will retire all the records for that select stmt. This should be avoided using proper check.

23

What are the types of internal tables.

a. Standard

b. Sorted

c. Hashed

24

Give names of control loop statements.

a. At New

b. At Last

c. At First

d. At End of.

e. On Change of – Can be used outside loop also.

25

Do we have nested loops?

Yes we do but these should be avoided unless and until required as the performance is hit due to this.

26

Can we have a where condition with the loop.

Yes we can.

27

What if the difference between TOP-OF-PAGE and TOP-OF-PAGE DURING LINE SELECTION.

TOP-OF-PAGE is used for basic list

TOP-OF-PAGE DURING LINE SELECTION used for secondary list.

30

What is an interactive list.

A report which generated a basic list and using the basic list if we are able to generate a secondary list then it is called a interactive reports.

31

How many basic and secondary list do we have.

One basic and 20 Secondary list.

32

What is the system field for list index.

Sy-Lsind.

33

How do we store the clicked records.

Using the HIDE stmt in the Loop..EndLoop.

And then using AT LINE-SELECTION event.

34

How do I display Top of page for secondary list.

Use TOP-OF-PAGE-DURING LINE SELECTION and depending upon the generated list index display the appropriate heading.

35

Name few system variables.

a. Sy-Datum Date

b. Sy-Uzeit Time

c. Sy-Lsind List Index

d. Sy-Pagno Page No

e. Sy-Uname User Name

f. Sy-Sysid System Id

More of these can found in system table SYST.

36

What is a message class.

Message class contain message that are displayed during the program its created in SE91 and contains max of 1000 messages 000-999.

37

What are different types of messages.

a. A bandon

b. E xit

c. S tatus

d. I nformation

e. W Arning

38

Can we have a custom message at runtime.

Yes we can, we can pass maximum of 4 variable to the message class.

39

What is a FORMAT stmt.

FORMAT is used to format the report output.

Its options are

a. COLOR 0-7

b. INPUT 0-1

c. INTENSIFIED 0-1

d. HOTSPOT ON/OFF

e. RESET

40

How do I assign a T-CODE to a report.

Go to SE93 and create a T-CODE it will ask for a report name give the report name here.

41

How do I analyze my report performance.

Use ST05 or SE30 or use extended program check

Programs->Check->Extended program check/Code Inspector

42

What is a Short Dump.

An exception, that occurs in the programs are stored as short dump. You can see it in ST22.

43

How do we call an report from another report.

Using Submit statement.

44

Can we pass parameter to these report.

Yes we can, see the option with the submit statement.

45

What is a program statement.

It is equivalent to a report statement.

Data Dictionary

1

What is a domain?

Domain describes the technical attributes for a field.

2

What are in-build data type?

  1. ACCP Posting period YYYYMM
  2. CHAR Character String
  3. CLNT Client
  4. CUKY Currency key, referenced by CURR fields
  5. CURR Currency field, stored as DEC
  6. DATS Date field (YYYYMMDD) stored as char(8)
  7. DEC Counter or amount field with comma and sign
  8. FLTP Floating point number, accurate to 8 bytes
  9. INT1 1-byte integer, integer number <= 255
  10. INT2 2-byte integer, only for length field before LCHR or LRAW
  11. INT4 4-byte integer, integer number with sign
  12. LANG Language key
  13. LCHR Long character string, requires preceding INT2 field
  14. LRAW Long byte string, requires preceding INT2 field
  15. NUMC Character string with only digits
  16. PREC Precision of a QUAN field
  17. QUAN Quantity field, points to a unit field with format UNIT
  18. RAW Uninterrupted sequence of bytes
  19. RSTR Byte String of Variable Length
  20. SSTR Short Character String of Variable Length
  21. STRG Character String of Variable Length
  22. TIMS Time field (hhmmss), stored as char(6)
  23. VARC Long character string, no longer supported from Rel. 3.0
  24. UNIT Unit key for QUAN fields

3

What is a conversion routine in domains?

While writing a values or reading a values form the data base the abap interpreter uses conversion routines so as to retrieve / write values from the data base

E.g. MATNR has conversion routine MATN1 associated with it

and its length is 18 char but if value entered is only 10 char

then rest is padded by zeros and stored and completed 18 char

this is done by conversion routine and while reading the same

its read as 18 char but displayed as 10 char only.

Following FMs can be used for conversion while

programming.

  1. CONVERSION_EXIT_ALPHA_INPUT

Conversion exit ALPHA, external->internal

  1. CONVERSION_EXIT_ALPHA_OUTPUT

Conversion exit ALPHA, internal->external

4

What is value range?

When user press F4 help on a field a list of values appears in a pop up this is nothing but the value help that is provided at the domain level, this can be single value, range or another database table.

5

What is a data element?

Data element is those which can use domains and inherit the data type or can directly be associated with a data type and are used in table for assignment to a table field.

6

What is a parameter id in data element?

When a data element is being used, a memory space is allocated for that element which is recognized by parameter id.

7

Can documentation be provided in data element?

Yes, using the Documentation button and is displayed when user press F1 on that field.

8

What is the use of field labels in data element?

Displayed when these data elements are used in screens.

9

What are views?

A view is a logical view on one or more tables, that is, a view is not actually physically stored, instead being derived from one or more other tables.

10

What are the types of views?

a) Projection

b) Database

c) Maintenance

d) Help

11

What is the difference between database and projection view?

Projection view: Is formed on a single table.

Database view: Is formed on one or more tables.

12

What is the prerequisite for forming a database maintenance or help view?

If more than one table if used then there should exist a primary

foreign key relationship between them.

13

Can we give a condition while forming a view?

Yes in the selection criteria tab.

14

What is a search helps?

A search help is an object of the ABAP Dictionary with which input helps (F4 helps) can be defined.

15

What are types of search helps?

a) Elementary search helps implement a search path for determining the possible entries.

b) Collective search helps contain several elementary search helps. A collective search help therefore provides several alternative search paths for possible entries.

c) Append search helps can be used to enhance collective search helps delivered by SAP with customer-specific search paths without requiring a modification.

16

What is a Lock Object?

A lock object is a virtual link of several SAP tables which is used to synchronize simultaneous access by two users to the same set of data.

17

What are modes of locks?

a) Read lock (sharedlock)
Protects read access to an object. The read lock allows other transactions read access but not write access to the locked area of the table.

b) Write lock (exclusive lock)
Protects write access to an object. The write lock allows other transactions neither read nor write access to the locked area of the table.

c) Enhanced write lock (exclusive lock without cumulation)
Works like a write lock except that the enhanced write lock also protects from further accesses from the same transaction.

18

What is a table?

a) One that stores data at run time,

b) Should be client dependent,

c) Should have primary key associated with it.

19

What are types of tables?

a) Transparent Tables that we create normally are transparent tables.

b) Pooled tables can be used to store control data (e.g. screen sequences, program parameters or temporary data).

c) Clustered tables contain continuous text, for example, documentation.

20

What does client dependent mean?

When client field MANDT is associated with any object in sap then that object becomes client dependent.

21

What is a primary key?

Field on which a record can be uniquely identified in a data base table is called a primary key.

22

Can a table contain more than one field as primary key?

Yes, In that case the group of key field form a composite primary key.

23

What does technical setting contain?

The technical settings of a table define how the table will be handled when it is created in the database, that is whether the table will be buffered and whether changes to data records of the table will be logged.

a) Data class: The data class defines the physical area of the database (table space) in which the table should be created.

b) Size category: The size category defines the size of the extents created for the table.

24

What are secondary indexes and how are they created?

When a records is searched based on other primary key then the performance is hit badly so secondary key is formed which has group of field on which we can create a index for searching. There is a button called indexes which is used to create secondary key.

25

What is a append structure and Include?

a) Append Structure: An append structure is a structure that is assigned to exactly one table or structure. There can be more than one append structure for a table or structure. These should always start with YY or ZZ.

b) Include Structure: They are simple structure like append structures except that they are global and can be included in any tables. And can be included more than once in the same table.

26

What is a structure?

Is very similarly to a table except that it does not hold any data we can say its just a definition that carried fields and their declaration.

27

What is the difference between a structure and table?

a) Table Hold data at runtime structure do not.

b) Tables have keys associated with it structure do not.

28

What is a table type?

A table type describes the structure and functional attributes of an internal table in an ABAP program

29

What is type group?

IT contains all the definition for variable, tables, work areas which can be used in programs.

30

What are the different TCODES for accessing a data dictionary?

SE11: Change, Display and create

SE12:Display only

SE16:Table Display

SE17:General Table Display

31

What is the CURR and CUKY significance?

Sap provides the provision for making currency as country independent value so instead of specifying the values sap also make it mandatory to give a currency type reference to the field so that conversion can be handled easily.

Same applies for QUANT and UNIT type field also.

32

What are different approaches for creating a table?

Top Down and Bottom Up approach.

33

Can we modify standard tables?

Yes, But it is not recommended. We need the access key for this.

34

What is foreign key relationship?

A foreign key links two tables T1 and T2 by assigning fields of table T1 to the primary key fields of table T2. Table T1 is called the foreign key table (dependent table) and table T2 the check table (referenced table).