Need help in control break
I'm a beginner in ABAP and wanted to know how to write a control break statement for an internal table and also wanted to know if there is a function module that can give me TIME in HH:MM AM/PM (12 hours clock).
Please let me know where i can find control break statement for internal tables with good examples.
Thanks in advance.
Pramod Manjunath replied
There are many control break statements in ABAP used for internal tables (You can use the regular control break statements too, but these are exclusively for Internal Tables ).
Few of them to be named are
AT END OF
ON CHANGE OF...
The best guide for you will be the F1 help for these statements. Just write these statements in the ABAP editor and press F1. The documentation is enough to help you write a comrehensive code.
Also please make use of the transaction ABAPDOCU Where there are examples given which you can execute and check for yourself.
and regarding the FM for converting Hour format to AM PM format.
You can use the following code.
Data : w_time type sy-uzeit,
w_ampm(2) type c.
w_time = sy-uzeit ( current app server time ).
if w_time+0(2) GE 12.
w_time = w_time - 43200 ( 12 hours converted to seconds)
w_ampm = 'PM'.
w_ampm = 'AM'.
write: w_time, w_ampm.
Eg : if the time now is 16:00
it will show 4:00 PM.