11-08-2007 9:46 AM
1.What is the advantage of structures ?How du u use them in the Abap Pgms?
2.what are the exceptions in function module?
3.what transaction do use for data analysis ?
4.What are internaltables?How do u get the no of lines in an internal tables?How to use a specific no occur statement?
5.Sales no is 1 ,2 ,3 is there delivery no is 4 ,5,6 is there How to write select statement?
11-08-2007 10:40 AM
Hi,
Try using the search functionality.
And good luck getting the job.
Gareth.
11-08-2007 11:44 AM
> Try using the search functionality.
> And good luck getting the job.
You made my day. Thought i'm the only one thinking like this.
11-08-2007 12:13 PM
HI
1.What is the advantage of structures ?How du u use them in the Abap Pgms?
Advantage of Strucures :
You use structures in ABAP programs to group work areas that logically belong together. Since the elements of a structure can have any data type, structures can have a large range of uses. For example, you can use a structure with elementary data types to display lines from a database table within a program.
Just like tables you have to declare in the program there is no such difference
2.what are the exceptions in function module?
A:Exceptions are situations that occur while an ABAP program is being executed, in which normal continuation of the program does not make any sense. Exceptions can be raised either implicitly in the ABAP runtime environment or explicitly in the ABAP program. For example, division by zero leads to an exception in the ABAP runtime environment. It is possible to determine this situation through a query in the ABAP program and to trigger an exception there.
There are two main types of exceptions: those that can be handled and those that cannot be handled.
· Exceptions that can be handled occur in error situations in the runtime environment or in the ABAP program, where the program can continue executing after the ABAP program has handled the exception, without the system ending up in a critical state. If such an exception is not handled, a runtime error occurs.
· The second type of exceptions are those that cannot be handled. These are critical error situations in the runtime environment. Handling with ABAP means is not possible and they always cause a runtime error.
As of Release 6.10, exceptions and their handling are generally based on exception classes. This concept covers the functions of the preceding concepts, enhances them, and thus replaces them.
For More Info,
http://help.sap.com/saphelp_nw04s/helpdata/en/a0/ff934258a5c76ae10000000a155106/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/f2bbc8142c11d3b93a0000e8353423/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/83/636d1d12fc11d5991e00508b5d5211/frameset.htm
RAISE EXECPTION NAME
in report program
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:NARESHNARESH.TXT'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = ITAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
.
IF SY-SUBRC .
INTERNAL TABLE WITHOUT HEADER LINE:
DATA: BEGIN OF HEADER,
BOOKNO(4) TYPE N,
BOOKNAME(5) TYPE C,
BOOKADD(10) TYPE C,
END OF HEADER.
DATA: BODY LIKE HEADER OCCURS 0.
HEADER-BOOKNO = '1234'.
HEADER-BOOKNAME = 'SAP'.
HEADER-BOOKADD = 'TNAGAR'.
APPEND HEADER TO BODY.
CLEAR HEADER.
HEADER-BOOKNO = '1235'.
HEADER-BOOKNAME = 'ABAP'.
HEADER-BOOKADD = 'ANNANAGAR'.
APPEND HEADER TO BODY.
CLEAR HEADER.
HEADER-BOOKNO = '1236'.
HEADER-BOOKNAME = 'ERP'.
HEADER-BOOKADD = 'ADYAR'.
APPEND HEADER TO BODY.
CLEAR HEADER.
LOOP AT BODY INTO HEADER.
WRITE:/ HEADER-BOOKNO,HEADER-BOOKNAME,HEADER-BOOKADD.
ENDLOOP.
internal tables are generally of two types only.
1. INTERNAL TABLES WITH HEADER LINE
2. INTERNAL TABLES WITH OUT HEADER LINE
for internal tables with out header line u need to explicitly create a work area and do record processing from it. where as for internal tables with header line a header is created for u while creating an internal table.
n one of dictionary objects are internal table types
1. standard
2. sorted
3. hashed
1. standard: tables which u use frequently.
follows index and allows data with out any condition
for most situations
2.sorted: while entering data only data is sorted
follows index and keys are used as index.
retreiving data from this table is faster than standard tables
3.hashed tables: uses a hashed algorithm for logic
no index n keys used
fatser than remaining two tables for accessing data
You should declare your internal tables like so.
Types: begin of ttab,
fld1 type c,
fld2 type c,
end of ttab.
data: itab type table of ttab.
data: wa like line of itab.
5.Sales no is 1 ,2 ,3 is there delivery no is 4 ,5,6 is there How to write select statement?
A: Declare your sales No & delivery no in an internal table and then use this write statement
write:/ 'Sales No' itab1.
write:/ 'delivery no' itab2.
Regards
Pavan