ABAP Chapter 6: Message Debugging File Transfer Type Group
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
Se)e*ti'n S*reen
A Message
Exit
&r'gra( Start
Se)e*ti'n S*reen
E Message
Se)e*ti'n 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
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
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
: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)
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
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)
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)
F75;TI:5 17*@: D2 E6porting filename A filename Tables data=tab A all=customers E6ceptions file=open=error A ! C others A >)
and
)))
)))
T#pe $roup
8 * *rogram
%&ercise '(