0% found this document useful (0 votes)
25 views

ABAP Chapter 6: Message Debugging File Transfer Type Group

This document provides an overview of messages, debugging, and file transfer in ABAP. It discusses the different types of messages (A, E, W, I, S) and how to create dynamic messages. It explains debugging modes, how to set breakpoints, and use the debugger. It also covers opening, writing, reading, appending, and deleting files in ABAP as well as downloading and uploading data to and from files. Finally, it mentions type groups and includes exercises on user masters and drill-down reports.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

ABAP Chapter 6: Message Debugging File Transfer Type Group

This document provides an overview of messages, debugging, and file transfer in ABAP. It discusses the different types of messages (A, E, W, I, S) and how to create dynamic messages. It explains debugging modes, how to set breakpoints, and use the debugger. It also covers opening, writing, reading, appending, and deleting files in ABAP as well as downloading and uploading data to and from files. Finally, it mentions type groups and includes exercises on user masters and drill-down reports.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 41

ABAP Chapter 6

Message Debugging File Transfer Type Group

Message in ABAP

User Messages

If user has entered inconsistent values,you output a dialog message with MESS GE statement Dialog messages are stored in table T!"" report ztest. #Transaction $ SE%!& .
AT SELECTION-SCREEN. message e000(38) with ---- --- --- ---.

Message Type

Syntax
Message [ A<nnn> ](message class) with <field1> <field2>

E, W, I, S

Messages Type - A(A en!)


Message A"""(#$)%%% &r'gra( Start

Se)e*ti'n S*reen

A Message

Exit

Messages Type - E(Err'r)


Message E000(38) ..%

&r'gra( Start

Se)e*ti'n S*reen

+ew inp,t -e.,ire

E Message

Messages Type - W(Warning)


Message W000(38)..% &r'gra( Start

Se)e*ti'n S*reen W Message Enter /ist

+ew inp,t p'ssi )e

Messages Type - I(In0'r(ati'n)


Message I000(38)..% &r'gra( Start

Se)e*ti'n S*reen I Message Enter /ist

Messages Type - S(S,**ess)


Message S000(38)..% &r'gra( Start

Se)e*ti'n S*reen

/ist (+ext S*reen)

1yna(i* Message

t (test!) meters today li+e sy,datum) ection,screen) oday -. sy,datum) message e"""#/0& with 1*lease enter today $2 if) of,selection) e$ 4 1Today is $2, today)

sy,da

Debugging

1e ,gging M'!e

1e ,gging M'!e 2 Interna) Ta )e

1e ,gging M'!e 2 Interna) Ta )e

1e ,gging M'!e 2 Wat*hp'int

Wat*hp'int 2 SA& E33 4%"

5'w t' Set 1e ,gging M'!e

If you want to test transaction,enter 4h in the command field,press E5TE' and e6ecute the transaction Set brea+points in the program 7tilities,.8rea+points,.Set 7ses 8'E 9,*:I5T statement

ABAP Practice

File Transfer

6i)e Trans0er (App)i*ati'n Ser7er)

There are / steps for file transfer :pen File 'ead43rite File ;lose File

6i)e Trans0er

are Internal Table l=customers li+e customers occurs " with heade msg=t6t#>"&) eters filename#!?0& default 1customersdata)t6t2 low ,selection) ct < from customers into table all=customers)

6i)e Trans0er

:pening a file pen dataset filename for output in te6t mode encoding default message msg=t6t) sy,subrc -. ") 3rite$ 1File cannot be opened )'eason $2,msg= se)

6i)e Trans0er
< Transferring data to a file @oop at all=customers) Transfer all=customers to Endloop) < ;losing a file ;lose dataset filename) Endif)

filename)

Transaction : AL11

6i)e Trans0er (Appen!ing 1ata)

:pening a file

en dataset filename for appending in te6t m encoding default message msg=t6t) sy,subrc -. ") 3rite$ 1File cannot be opened )'eason $2,msg= e)

-ea!ing 1ata 0r'( 8S 6i)e


< 'eading data from a file *arameters filename#!?0& default 1customersdata)t6t2 lower case) Data msg=t6t#>"&) Data all=customers li+e customers occurs " with header line) Start,of,selection) :pen dataset filename for input in te6t mode encoding default message msg=t6t) If sy,subrc -. ") 3rite$ 1File cannot be opened )'eason $2,msg=t6t) else)

-ea!ing 1ata 0r'( 8S 6i)e


'ead dataset filename into all=customers) if sy,subrc -. ") E6it) endif) ppend all=customers) Enddo) ;lose dataset filename) Endif) Do)

1e)eting 8S 6i)e

ters filename#!?0& default 1customersdata)t6t2 low :F,SE@E;TI:5) dataset filename) ubrc A ") $ 4 1Delete :92)

Working !er"er

ith File on Presentation

1'wn)'a! 1ata t' &3

Download data from *; rameters filename li+e rlgrap,filename default 1c$Bcustomers)t6t2) ta all=customers li+e customers occurs " with header li 'T,:F,SE@E;TI:5) elect < from customers into table all=customres)

1'wn)'a! 1ata t' &3


; @@ F75;TI:5 1D:35@: D2 E6porting filename A filename Tables data=tab A all=customers E6ceptions file=open=error A ! C others A >)

1'wn)'a! 1ata t' &3


;ase sy,subrc) 3hen !) 3rite$ 1Error when file opened2) 3hen ?) 3rite$ 1Error during data transfer2) C 3hen ") 3rite$ 4 1Data Download Finish2) Endcase)

Up)'a! 1ata 0r'( &3

oad data to *; meters filename li+e rlgrap,filename efault 1c$Bcustomers)t6t2) all=customers li+e customers occurs " with hea 'T,:F,SE@E;TI:5)

Up)'a! 1ata 0r'( &3

F75;TI:5 17*@: D2 E6porting filename A filename Tables data=tab A all=customers E6ceptions file=open=error A ! C others A >)

Up)'a! 1ata 0r'( &3


;ase sy,subrc) 3hen !) 3rite$ 1Error when file opened2) 3hen ?) 3rite$ 1Error during data transfer2) C 3hen ") Insert customers from table all=customers) C Endcase)

Up)'a!91'wn)'a! 1ata in :a*;gr',n!


;all function 13S=D:35@: D2 E6porting filename A filename

;all function 13S=7*@: D2 E6porting filename A filename

and

)))

)))

T#pe $roup : !%11

T#pe $roup
8 * *rogram

%&ercise '(

%&ercise ''' : )ser Master


usr02-tr$"t usr02- !"#e "$%&-te'(!u# er

%&ercise '( : Drill*Do n +eport

You might also like