Anda di halaman 1dari 62

##################>###

#############.#####################################################
#################################j ##k ##l ##m ##n ##o ##p ##q
##r ####Z###[#######
###I###J###K############o############?######?
###

#7 ###################p####bjbjU#U################### ###) #7|##7|


##V####################################################################l####
#
######
##
######
###################################&#######`0######`0######`0##8###0######7##
##&#######m#####D##K##p########################h###k##~### ##j!
##x###oZ#####|\######|\######|\##7###\##L###d##L###Km##$###bo##
###q#####om#############################1######################B##"###d######
1######1######om######4$######
######
#########################m######4$######4$######4$######1##L`##
##R#########j###8#########AG##.###########4$###################################
###################1######oZ######4$## ##4$######-######5##
###H###"##################################################################Q7######
######D##
###/###&###:###`0######.##_##
7##"###########e7#####m##0###m######/7##"####s########h2###s######e7######4$##
#######H###########
######
######
######
###########Reference: PROC032.DOC (Word 7.0a)Title: Common Programming
Procedures Author: Richard HarperDate: November '99Version:
5.0SAP Version: 30F...40F #Introduction.This document details the
procedures available within a series of include files called YRBINC, YREPINC,
YBDCINC and YGRAPH. They are common utilities for Reporting utilities, BDC
utilities and Graphing utilities respectively.These routines are written so that
the maintenance aspect of using them within any program is minimal. Parameters are
passed to and from the routines using arguments to the procedure call. This
eliminates the need to know the internal structure of the various routines
providing Black Box programming.The following pages of this document detail one
routine per page.Table Of Contents# TOC \o "1-3" #1. About this document. #
PAGEREF _Toc17450490 \h ##21#1.1. Procedure Format. # PAGEREF _Toc17450491 \h
##21#1.2. Running the macro. # PAGEREF _Toc17450492 \h ##23#2. Using the
Routines. # PAGEREF _Toc17450493 \h ##24#3. Dependancies # PAGEREF
_Toc17450494 \h ##28#4. BDC Operations. # PAGEREF _Toc17450495 \h ##29#4.1. MANDT.
# PAGEREF _Toc17450496 \h ##29#4.2. FUNCNAME # PAGEREF _Toc17450497 \h
##29#4.3. BDCMODE. # PAGEREF _Toc17450498 \h ##29#4.4. BDCUPMODE. # PAGEREF
_Toc17450499 \h ##29#4.5. CRBATCH. # PAGEREF _Toc17450500 \h ##29#4.6.
INHIBITCHK. # PAGEREF _Toc17450501 \h ##29#4.7. DUMPBDC. # PAGEREF
_Toc17450502 \h ##30#4.8. DUMPMSG. # PAGEREF _Toc17450503 \h ##30#4.9.
GENMAIL. # PAGEREF _Toc17450504 \h ##30#4.10. MAILPROG. # PAGEREF
_Toc17450505 \h ##30#5. Macros and Forms. # PAGEREF _Toc17450506 \h ##31#5.1. An
Example. # PAGEREF _Toc17450507 \h ##31#6. Drill Down Reports. # PAGEREF
_Toc17450508 \h ##33#7. Arrays. # PAGEREF _Toc17450509 \h ##34#7.1. Tables
Within Tables. # PAGEREF _Toc17450510 \h ##34#7.1.1. Defining An Array.
# PAGEREF _Toc17450511 \h ##34#7.1.2. Accessing An Array. # PAGEREF
_Toc17450512 \h ##35#8. Select-Options. # PAGEREF _Toc17450513 \h ##36#9.
Authorisation Checks. # PAGEREF _Toc17450514 \h ##37#10. Sub-Totals. #
PAGEREF _Toc17450515 \h ##38#11. Real-Time Displays. # PAGEREF
_Toc17450516 \h ##39#11.1. Pushing Keys in ABAP. # PAGEREF _Toc17450517 \h
##39#12. Information Sources. # PAGEREF _Toc17450518 \h ##41#13. AddRange,
AddDiscrete, AddConsec - Macros # PAGEREF _Toc17450519 \h ##42#13.1.
Location. # PAGEREF _Toc17450520 \h ##42#13.2. Purpose. # PAGEREF
_Toc17450521 \h ##42#13.3. Entry. # PAGEREF _Toc17450522 \h ##42#13.3.1.
Item To Add. # PAGEREF _Toc17450523 \h ##42#13.3.2. Range Table to add
to. # PAGEREF _Toc17450524 \h ##42#13.3.3. Item High, Item Low. # PAGEREF
_Toc17450525 \h ##42#13.4. Exit. # PAGEREF _Toc17450526 \h ##42#13.5. Called
By. # PAGEREF _Toc17450527 \h ##42#13.6. Calls. # PAGEREF
_Toc17450528 \h ##42#13.7. Tables. # PAGEREF _Toc17450529 \h ##42#13.8.
System Variables. # PAGEREF _Toc17450530 \h ##42#13.9. Description.
# PAGEREF _Toc17450531 \h ##42#13.10. Examples. # PAGEREF
_Toc17450532 \h ##42#13.11. Source. # PAGEREF _Toc17450533 \h ##43#13.12.
See Also. # PAGEREF _Toc17450534 \h ##43#14. Begin_Of_Block, End_of_Block
- Macros # PAGEREF _Toc17450535 \h ##44#14.1. Location. # PAGEREF
_Toc17450536 \h ##44#14.2. Purpose # PAGEREF _Toc17450537 \h ##44#14.3.
Entry # PAGEREF _Toc17450538 \h ##44#14.3.1. Begin_Of_Block - Block name
and Frame title. # PAGEREF _Toc17450539 \h ##44#14.3.2. End_Of_Block - Block
name # PAGEREF _Toc17450540 \h ##44#14.4. Exit # PAGEREF _Toc17450541 \h
##44#14.5. Called By # PAGEREF _Toc17450542 \h ##44#14.6. Calls # PAGEREF
_Toc17450543 \h ##44#14.7. Tables. # PAGEREF _Toc17450544 \h ##44#14.8.
System Variables. # PAGEREF _Toc17450545 \h ##44#14.9. Description.
# PAGEREF _Toc17450546 \h ##44#14.10. Examples. # PAGEREF
_Toc17450547 \h ##44#14.11. Source. # PAGEREF _Toc17450548 \h ##44#14.12.
See Also. # PAGEREF _Toc17450549 \h ##46#15. BLANKLINE - Macro # PAGEREF
_Toc17450550 \h ##47#15.1. Location. # PAGEREF _Toc17450551 \h ##47#15.2.
Purpose. # PAGEREF _Toc17450552 \h ##47#15.3. Entry. # PAGEREF
_Toc17450553 \h ##47#15.4. Exit. # PAGEREF _Toc17450554 \h ##47#15.5. Called
By. # PAGEREF _Toc17450555 \h ##47#15.6. Calls. # PAGEREF
_Toc17450556 \h ##47#15.7. Tables. # PAGEREF _Toc17450557 \h ##47#15.8.
System Variables. # PAGEREF _Toc17450558 \h ##47#15.9. Description.
# PAGEREF _Toc17450559 \h ##47#15.10. Examples. # PAGEREF
_Toc17450560 \h ##47#15.11. SourceCode. # PAGEREF _Toc17450561 \h ##47#15.12.
See Also. # PAGEREF _Toc17450562 \h ##47#16. CHECKLEFT, CHECKRIGHT - Macro
# PAGEREF _Toc17450563 \h ##48#16.1. Location. # PAGEREF
_Toc17450564 \h ##48#16.2. Purpose. # PAGEREF _Toc17450565 \h ##48#16.3.
Entry. # PAGEREF _Toc17450566 \h ##48#16.3.1. Position. # PAGEREF
_Toc17450567 \h ##48#16.3.2. Title Length. # PAGEREF _Toc17450568 \h ##48#
16.3.3. Title # PAGEREF _Toc17450569 \h ##48#16.3.4. Parameter # PAGEREF
_Toc17450570 \h ##48#16.4. Exit. # PAGEREF _Toc17450571 \h ##48#16.5. Called
By. # PAGEREF _Toc17450572 \h ##48#16.6. Calls. # PAGEREF
_Toc17450573 \h ##48#16.7. Tables. # PAGEREF _Toc17450574 \h ##48#16.8.
System Variables. # PAGEREF _Toc17450575 \h ##48#16.9. Description.
# PAGEREF _Toc17450576 \h ##48#16.10. Examples. # PAGEREF
_Toc17450577 \h ##48#16.11. SourceCode. # PAGEREF _Toc17450578 \h ##49#16.12.
See Also. # PAGEREF _Toc17450579 \h ##49#17. RADIOLEFT, RADIORIGHT - Macro
# PAGEREF _Toc17450580 \h ##50#17.1. Location. # PAGEREF
_Toc17450581 \h ##50#17.2. Purpose. # PAGEREF _Toc17450582 \h ##50#17.3.
Entry. # PAGEREF _Toc17450583 \h ##50#17.3.1. Position. # PAGEREF
_Toc17450584 \h ##50#17.3.2. Title Length. # PAGEREF _Toc17450585 \h ##50#
17.3.3. Title # PAGEREF _Toc17450586 \h ##50#17.3.4. Parameter # PAGEREF
_Toc17450587 \h ##50#17.3.5. Group. # PAGEREF _Toc17450588 \h ##50#17.4.
Exit. # PAGEREF _Toc17450589 \h ##50#17.5. Called By. # PAGEREF
_Toc17450590 \h ##50#17.6. Calls. # PAGEREF _Toc17450591 \h ##50#17.7.
Tables. # PAGEREF _Toc17450592 \h ##50#17.8. System Variables. #
PAGEREF _Toc17450593 \h ##50#17.9. Description. # PAGEREF _Toc17450594 \h
##50#17.10. Examples. # PAGEREF _Toc17450595 \h ##50#17.11. SourceCode. #
PAGEREF _Toc17450596 \h ##51#17.12. See Also. # PAGEREF _Toc17450597 \h ##51#18.
COPYBOOK - Macro # PAGEREF _Toc17450598 \h ##52#18.1. Location. #
PAGEREF _Toc17450599 \h ##52#18.2. Purpose. # PAGEREF _Toc17450600 \h ##52#
18.3. Entry. # PAGEREF _Toc17450601 \h ##52#18.3.1. Table name to use.
# PAGEREF _Toc17450602 \h ##52#18.4. Exit. # PAGEREF _Toc17450603 \h
##52#18.5. Called By. # PAGEREF _Toc17450604 \h ##52#18.6. Calls. #
PAGEREF _Toc17450605 \h ##52#18.7. Tables. # PAGEREF _Toc17450606 \h ##52#
18.8. System Variables. # PAGEREF _Toc17450607 \h ##52#18.9. Description.
# PAGEREF _Toc17450608 \h ##52#18.10. Examples. # PAGEREF
_Toc17450609 \h ##52#18.11. SourceCode. # PAGEREF _Toc17450610 \h ##52#18.12.
See Also. # PAGEREF _Toc17450611 \h ##53#19. COPY_STRUCTURE - Macro #
PAGEREF _Toc17450612 \h ##54#19.1. Location. # PAGEREF _Toc17450613 \h ##54#
19.2. Purpose. # PAGEREF _Toc17450614 \h ##54#19.3. Entry. # PAGEREF
_Toc17450615 \h ##54#19.3.1. Structure Name to extract from the data dictionary.
# PAGEREF _Toc17450616 \h ##54#19.3.2. Internal table name to copy
strcuture to. # PAGEREF _Toc17450617 \h ##54#19.4. Exit. # PAGEREF
_Toc17450618 \h ##54#19.5. Called By. # PAGEREF _Toc17450619 \h ##54#19.6.
Calls. # PAGEREF _Toc17450620 \h ##54#19.7. Tables. # PAGEREF
_Toc17450621 \h ##54#19.8. System Variables. # PAGEREF _Toc17450622 \h ##54#
19.9. Description. # PAGEREF _Toc17450623 \h ##54#19.10. Examples. #
PAGEREF _Toc17450624 \h ##54#19.11. SourceCode. # PAGEREF _Toc17450625 \h ##54#
19.12. See Also. # PAGEREF _Toc17450626 \h ##55#20. Format_Selects - Macro
# PAGEREF _Toc17450627 \h ##56#20.1. Location. # PAGEREF
_Toc17450628 \h ##56#20.2. Purpose. # PAGEREF _Toc17450629 \h ##56#20.3.
Entry. # PAGEREF _Toc17450630 \h ##56#20.3.1. Select Option Tables to
use. # PAGEREF _Toc17450631 \h ##56#20.4. Exit. # PAGEREF _Toc17450632 \h
##56#20.5. Called By. # PAGEREF _Toc17450633 \h ##56#20.6. Calls. #
PAGEREF _Toc17450634 \h ##56#20.7. Tables. # PAGEREF _Toc17450635 \h ##56#
20.8. System Variables. # PAGEREF _Toc17450636 \h ##56#20.9. Description.
# PAGEREF _Toc17450637 \h ##56#20.10. Examples. # PAGEREF
_Toc17450638 \h ##56#20.11. SourceCode. # PAGEREF _Toc17450639 \h ##56#20.12.
See Also. # PAGEREF _Toc17450640 \h ##57#21. INIT_FUNC - Macro # PAGEREF
_Toc17450641 \h ##58#21.1. Location. # PAGEREF _Toc17450642 \h ##58#21.2.
Purpose. # PAGEREF _Toc17450643 \h ##58#21.3. Entry. # PAGEREF
_Toc17450644 \h ##58#21.4. Exit. # PAGEREF _Toc17450645 \h ##58#21.5. Called
By. # PAGEREF _Toc17450646 \h ##58#21.6. Calls. # PAGEREF
_Toc17450647 \h ##58#21.6.1. Functions: # PAGEREF _Toc17450648 \h ##58#21.6.2.
Forms: # PAGEREF _Toc17450649 \h ##58#21.7. Tables. # PAGEREF
_Toc17450650 \h ##58#21.8. System Variables. # PAGEREF _Toc17450651 \h ##58#
21.9. Description. # PAGEREF _Toc17450652 \h ##58#21.10. Examples. #
PAGEREF _Toc17450653 \h ##59#21.11. SourceCode. # PAGEREF _Toc17450654 \h ##59#
21.12. See Also. # PAGEREF _Toc17450655 \h ##61#22. PSUB - Macro #
PAGEREF _Toc17450656 \h ##62#22.1. Location. # PAGEREF _Toc17450657 \h ##62#
22.2. Purpose. # PAGEREF _Toc17450658 \h ##62#22.3. Entry. # PAGEREF
_Toc17450659 \h ##62#22.3.1. Select Option Tables to use. # PAGEREF
_Toc17450660 \h ##62#22.3.2. Description of data held in select options table.
# PAGEREF _Toc17450661 \h ##62#22.4. Exit. # PAGEREF _Toc17450662 \h
##62#22.5. Called By. # PAGEREF _Toc17450663 \h ##62#22.6. Calls. #
PAGEREF _Toc17450664 \h ##62#22.7. Tables. # PAGEREF _Toc17450665 \h ##62#
22.8. System Variables. # PAGEREF _Toc17450666 \h ##62#22.9. Description.
# PAGEREF _Toc17450667 \h
##62#22.10. Examples. # PAGEREF _Toc17450668 \h ##62#22.11. SourceCode.
# PAGEREF _Toc17450669 \h ##63#22.12. See Also. # PAGEREF
_Toc17450670 \h ##64#23. WRITETABLE - Macro # PAGEREF _Toc17450671 \h
##65#23.1. Location. # PAGEREF _Toc17450672 \h ##65#23.2. Purpose. #
PAGEREF _Toc17450673 \h ##65#23.3. Entry. # PAGEREF _Toc17450674 \h ##65#
23.3.1. Table to use # PAGEREF _Toc17450675 \h ##65#23.3.2. Field name
of column to put text in.. # PAGEREF _Toc17450676 \h ##65#23.4. Exit. #
PAGEREF _Toc17450677 \h ##65#23.5. Called By. # PAGEREF _Toc17450678 \h ##65#
23.6. Calls. # PAGEREF _Toc17450679 \h ##65#23.7. Tables. # PAGEREF
_Toc17450680 \h ##65#23.8. System Variables. # PAGEREF _Toc17450681 \h ##65#
23.9. Description. # PAGEREF _Toc17450682 \h ##65#23.10. Examples. #
PAGEREF _Toc17450683 \h ##65#23.11. SourceCode. # PAGEREF _Toc17450684 \h ##65#
23.12. See Also. # PAGEREF _Toc17450685 \h ##66#24. ZAP - Macro # PAGEREF
_Toc17450686 \h ##67#24.1. Location. # PAGEREF _Toc17450687 \h ##67#24.2.
Purpose. # PAGEREF _Toc17450688 \h ##67#24.3. Entry. # PAGEREF
_Toc17450689 \h ##67#24.3.1. Table to clear # PAGEREF _Toc17450690 \h ##67#
24.4. Exit. # PAGEREF _Toc17450691 \h ##67#24.5. Called By. # PAGEREF
_Toc17450692 \h ##67#24.6. Calls. # PAGEREF _Toc17450693 \h ##67#24.7.
Tables. # PAGEREF _Toc17450694 \h ##67#24.8. System Variables. #
PAGEREF _Toc17450695 \h ##67#24.9. Description. # PAGEREF _Toc17450696 \h
##67#24.10. Examples. # PAGEREF _Toc17450697 \h ##67#24.11. SourceCode. #
PAGEREF _Toc17450698 \h ##67#24.12. See Also. # PAGEREF _Toc17450699 \h ##68#25.
ALLHDRS # PAGEREF _Toc17450700 \h ##69#25.1. Location. # PAGEREF
_Toc17450701 \h ##69#25.2. Purpose. # PAGEREF _Toc17450702 \h ##69#25.3.
Entry. # PAGEREF _Toc17450703 \h ##69#25.4. Exit. # PAGEREF
_Toc17450704 \h ##69#25.5. Called By. # PAGEREF _Toc17450705 \h ##69#25.6.
Calls. # PAGEREF _Toc17450706 \h ##69#25.7. Tables. # PAGEREF
_Toc17450707 \h ##69#25.8. System Variables. # PAGEREF _Toc17450708 \h ##69#
25.9. Description. # PAGEREF _Toc17450709 \h ##69#25.10. Examples. #
PAGEREF _Toc17450710 \h ##69#25.11. SourceCode. # PAGEREF _Toc17450711 \h ##69#
25.12. See Also. # PAGEREF _Toc17450712 \h ##70#26. ASCCHAR # PAGEREF
_Toc17450713 \h ##71#26.1. Location. # PAGEREF _Toc17450714 \h ##71#26.2.
Purpose. # PAGEREF _Toc17450715 \h ##71#26.3. Entry. # PAGEREF
_Toc17450716 \h ##71#26.3.1. Character to return Ascii code for # PAGEREF
_Toc17450717 \h ##71#26.4. Exit. # PAGEREF _Toc17450718 \h ##71#26.5. Called
By. # PAGEREF _Toc17450719 \h ##71#26.6. Calls. # PAGEREF
_Toc17450720 \h ##71#26.7. Tables. # PAGEREF _Toc17450721 \h ##71#26.8.
System Variables. # PAGEREF _Toc17450722 \h ##71#26.9. Description.
# PAGEREF _Toc17450723 \h ##71#26.10. Examples. # PAGEREF
_Toc17450724 \h ##71#26.11. SourceCode. # PAGEREF _Toc17450725 \h ##72#26.12.
See Also. # PAGEREF _Toc17450726 \h ##72#27. BUILDREPORT # PAGEREF
_Toc17450727 \h ##73#27.1. Location. # PAGEREF _Toc17450728 \h ##73#27.2.
Purpose. # PAGEREF _Toc17450729 \h ##73#27.3. Entry. # PAGEREF
_Toc17450730 \h ##73#27.3.1. Data-field name. # PAGEREF _Toc17450731 \h ##73#
27.3.2. Data field title. # PAGEREF _Toc17450732 \h ##73#27.3.3. Data field
length. # PAGEREF _Toc17450733 \h ##73#27.3.4. FormatType. 'Unit' or
'Currency' or Format mask. # PAGEREF _Toc17450734 \h ##73#27.3.5. Format
field. # PAGEREF _Toc17450735 \h ##78#27.4. Exit. # PAGEREF
_Toc17450736 \h ##78#27.5. Called By. # PAGEREF _Toc17450737 \h ##78#27.6.
Calls. # PAGEREF _Toc17450738 \h ##79#27.7. Tables. # PAGEREF
_Toc17450739 \h ##79#27.8. System Variables. # PAGEREF _Toc17450740 \h ##79#
27.9. Description. # PAGEREF _Toc17450741 \h ##79#27.10. Examples. #
PAGEREF _Toc17450742 \h ##79#27.11. SourceCode. # PAGEREF _Toc17450743 \h ##79#
27.12. See Also. # PAGEREF _Toc17450744 \h ##82#28. CENTREREPORT #
PAGEREF _Toc17450745 \h ##83#28.1. Location. # PAGEREF _Toc17450746 \h ##83#
28.2. Purpose. # PAGEREF _Toc17450747 \h ##83#28.3. Entry. # PAGEREF
_Toc17450748 \h ##83#28.3.1. True or False # PAGEREF _Toc17450749 \h ##83#
28.4. Exit. # PAGEREF _Toc17450750 \h ##83#28.5. Called By. # PAGEREF
_Toc17450751 \h ##83#28.6. Calls. # PAGEREF _Toc17450752 \h ##83#28.7.
Tables. # PAGEREF _Toc17450753 \h ##83#28.8. System Variables. #
PAGEREF _Toc17450754 \h ##83#28.9. Description. # PAGEREF _Toc17450755 \h
##83#28.10. Examples. # PAGEREF _Toc17450756 \h ##83#28.11. SourceCode. #
PAGEREF _Toc17450757 \h ##83#28.12. See Also. # PAGEREF _Toc17450758 \h ##84#29.
CHECKBOX # PAGEREF _Toc17450759 \h ##85#29.1. Location. # PAGEREF
_Toc17450760 \h ##85#29.2. Purpose. # PAGEREF _Toc17450761 \h ##85#29.3.
Entry. # PAGEREF _Toc17450762 \h ##85#29.3.1. Data-field table. #
PAGEREF _Toc17450763 \h ##85#29.3.2. Data field title. # PAGEREF
_Toc17450764 \h ##85#29.3.3. Data field length. # PAGEREF _Toc17450765 \h
##85#29.4. Exit. # PAGEREF _Toc17450766 \h ##85#29.5. Called By. # PAGEREF
_Toc17450767 \h ##85#29.6. Calls. # PAGEREF _Toc17450768 \h ##85#29.7.
Tables. # PAGEREF _Toc17450769 \h ##85#29.8. System Variables. #
PAGEREF _Toc17450770 \h ##85#29.9. Description. # PAGEREF _Toc17450771 \h
##86#29.10. Examples. # PAGEREF _Toc17450772 \h ##86#29.11. SourceCode. #
PAGEREF _Toc17450773 \h ##86#29.12. See Also. # PAGEREF _Toc17450774 \h ##87#30.
CHECKBREAKS # PAGEREF _Toc17450775 \h ##88#30.1. Location. # PAGEREF
_Toc17450776 \h ##88#30.2. Purpose. # PAGEREF _Toc17450777 \h ##88#30.3.
Entry. # PAGEREF _Toc17450778 \h ##88#30.4. Exit. # PAGEREF
_Toc17450779 \h ##88#30.5. Called By. # PAGEREF _Toc17450780 \h ##88#30.6.
Calls. # PAGEREF _Toc17450781 \h ##88#30.7. Tables. # PAGEREF
_Toc17450782 \h ##88#30.8. System Variables. # PAGEREF _Toc17450783 \h ##88#
30.9. Description. # PAGEREF _Toc17450784 \h ##88#30.10. Examples. #
PAGEREF _Toc17450785 \h ##88#30.11. SourceCode. # PAGEREF _Toc17450786 \h ##89#
30.12. See Also. # PAGEREF _Toc17450787 \h ##90#31. CHECK_DOMAIN_VALUES
# PAGEREF _Toc17450788 \h ##91#31.1. Location. # PAGEREF
_Toc17450789 \h ##91#31.2. Purpose. # PAGEREF _Toc17450790 \h ##91#31.3.
Entry. # PAGEREF _Toc17450791 \h ##91#31.3.1. Domain Name To Check
# PAGEREF _Toc17450792 \h ##91#31.3.2. Value To Check # PAGEREF
_Toc17450793 \h ##91#31.4. Exit. # PAGEREF _Toc17450794 \h ##91#31.5. Called
By. # PAGEREF _Toc17450795 \h ##91#31.6. Calls. # PAGEREF
_Toc17450796 \h ##91#31.7. Tables. # PAGEREF _Toc17450797 \h ##91#31.8.
System Variables. # PAGEREF _Toc17450798 \h ##91#31.9. Description.
# PAGEREF _Toc17450799 \h ##91#31.10. Examples. # PAGEREF
_Toc17450800 \h ##91#31.11. SourceCode. # PAGEREF _Toc17450801 \h ##91#31.12.
See Also. # PAGEREF _Toc17450802 \h ##92#32. COLUMN_COLOUR # PAGEREF
_Toc17450803 \h ##93#32.1. Location. # PAGEREF _Toc17450804 \h ##93#32.2.
Purpose. # PAGEREF _Toc17450805 \h ##93#32.3. Entry. # PAGEREF
_Toc17450806 \h ##93#32.3.1. Column width # PAGEREF _Toc17450807 \h ##93#
32.3.2. Colour to set # PAGEREF _Toc17450808 \h ##93#32.3.3. Value to
write # PAGEREF _Toc17450809 \h ##93#32.3.4. Actual colour code to use. #
PAGEREF _Toc17450810 \h ##93#32.4. Exit. # PAGEREF _Toc17450811 \h ##93#32.5.
Called By. # PAGEREF _Toc17450812 \h ##93#32.6. Calls. # PAGEREF
_Toc17450813 \h ##93#32.7. Tables. # PAGEREF _Toc17450814 \h ##93#32.8.
System Variables. # PAGEREF _Toc17450815 \h ##93#32.9. Description.
# PAGEREF _Toc17450816 \h ##93#32.10. Examples. # PAGEREF
_Toc17450817 \h ##93#32.11. SourceCode. # PAGEREF _Toc17450818 \h ##94#32.12.
See Also. # PAGEREF _Toc17450819 \h ##94#33. DUMP_TABLE # PAGEREF
_Toc17450820 \h ##95#33.1. Location. # PAGEREF _Toc17450821 \h ##95#33.2.
Purpose. # PAGEREF _Toc17450822 \h ##95#33.3. Entry. # PAGEREF
_Toc17450823 \h ##95#33.3.1. None # PAGEREF _Toc17450824 \h ##95#33.3.2.
Tables: Unstructured table for dump # PAGEREF _Toc17450825 \h
##95#33.4. Exit. # PAGEREF _Toc17450826 \h ##95#33.4.1. None # PAGEREF
_Toc17450827 \h ##95#33.5. Called By. # PAGEREF _Toc17450828 \h ##95#33.6.
Calls. # PAGEREF _Toc17450829 \h ##95#33.7. Tables. # PAGEREF
_Toc17450830 \h ##95#33.8. System Variables. # PAGEREF _Toc17450831 \h ##95#
33.9. Description. # PAGEREF _Toc17450832 \h ##95#33.10. Examples. #
PAGEREF _Toc17450833 \h ##95#33.11. SourceCode. # PAGEREF _Toc17450834 \h ##95#
33.12. See Also. # PAGEREF _Toc17450835 \h ##96#33.13. Location. #
PAGEREF _Toc17450836 \h ##97#33.14. Purpose. # PAGEREF _Toc17450837 \h ##97#
33.15. Entry. # PAGEREF _Toc17450838 \h ##97#33.15.1. Direction to move
the first column of the report. # PAGEREF _Toc17450839 \h ##97#33.16. Exit.
# PAGEREF _Toc17450840 \h ##97#33.17. Called By. # PAGEREF
_Toc17450841 \h ##97#33.18. Calls. # PAGEREF _Toc17450842 \h ##97#33.19.
Tables. # PAGEREF _Toc17450843 \h ##97#33.20. System Variables. #
PAGEREF _Toc17450844 \h ##97#33.21. Description. # PAGEREF _Toc17450845 \h
##97#33.22. Examples. # PAGEREF _Toc17450846 \h ##97#33.23. SourceCode. #
PAGEREF _Toc17450847 \h ##98#33.24. See Also. # PAGEREF _Toc17450848 \h ##98#34.
FORMATKEY # PAGEREF _Toc17450849 \h ##99#34.1. Location. # PAGEREF
_Toc17450850 \h ##99#34.2. Purpose. # PAGEREF _Toc17450851 \h ##99#34.3.
Entry. # PAGEREF _Toc17450852 \h ##99#34.3.1. Value to format #
PAGEREF _Toc17450853 \h ##99#34.4. Exit. # PAGEREF _Toc17450854 \h ##99#34.4.1.
Formatted value # PAGEREF _Toc17450855 \h ##99#34.5. Called By. #
PAGEREF _Toc17450856 \h ##99#34.6. Calls. # PAGEREF _Toc17450857 \h ##99#
34.7. Tables. # PAGEREF _Toc17450858 \h ##99#34.8. System Variables. #
PAGEREF _Toc17450859 \h ##99#34.9. Description. # PAGEREF _Toc17450860 \h
##99#34.10. Examples. # PAGEREF _Toc17450861 \h ##99#34.11. SourceCode. #
PAGEREF _Toc17450862 \h ##100#34.12. See Also. # PAGEREF _Toc17450863 \h
##100#35. FORMATREPORT # PAGEREF _Toc17450864 \h ##101#35.1. Location.
# PAGEREF _Toc17450865
\h ##101#35.2. Purpose. # PAGEREF _Toc17450866 \h ##101#35.3. Entry.
# PAGEREF _Toc17450867 \h ##101#35.4. Exit. # PAGEREF _Toc17450868 \h
##101#35.5. Called By. # PAGEREF _Toc17450869 \h ##101#35.6. Calls. #
PAGEREF _Toc17450870 \h ##101#35.7. Tables. # PAGEREF _Toc17450871 \h ##101#
35.8. System Variables. # PAGEREF _Toc17450872 \h ##101#35.9. Description.
# PAGEREF _Toc17450873 \h ##101#35.10. Examples. # PAGEREF
_Toc17450874 \h ##101#35.11. SourceCode. # PAGEREF _Toc17450875 \h ##102#35.12.
See Also. # PAGEREF _Toc17450876 \h ##103#36. GETMASK # PAGEREF
_Toc17450877 \h ##104#36.1. Location. # PAGEREF _Toc17450878 \h ##104#36.2.
Purpose. # PAGEREF _Toc17450879 \h ##104#36.3. Entry. # PAGEREF
_Toc17450880 \h ##104#36.3.1. Variable or literal mask # PAGEREF
_Toc17450881 \h ##104#36.4. Exit. # PAGEREF _Toc17450882 \h ##104#36.4.1. Actual
mask to use. # PAGEREF _Toc17450883 \h ##104#36.5. Called By. # PAGEREF
_Toc17450884 \h ##104#36.6. Calls. # PAGEREF _Toc17450885 \h ##104#36.7.
Tables. # PAGEREF _Toc17450886 \h ##104#36.8. System Variables. #
PAGEREF _Toc17450887 \h ##104#36.9. Description. # PAGEREF _Toc17450888 \h
##104#36.10. Examples. # PAGEREF _Toc17450889 \h ##104#36.11. SourceCode.
# PAGEREF _Toc17450890 \h ##105#36.12. See Also. # PAGEREF
_Toc17450891 \h ##105#37. GET_LOCAL_HOST # PAGEREF _Toc17450892 \h ##106#
37.1. Location. # PAGEREF _Toc17450893 \h ##106#37.2. Purpose. # PAGEREF
_Toc17450894 \h ##106#37.3. Entry. # PAGEREF _Toc17450895 \h ##106#37.4.
Exit. # PAGEREF _Toc17450896 \h ##106#37.4.1. Host Name # PAGEREF
_Toc17450897 \h ##106#37.4.2. Server Name # PAGEREF _Toc17450898 \h ##106#37.5.
Called By. # PAGEREF _Toc17450899 \h ##106#37.6. Calls. # PAGEREF
_Toc17450900 \h ##106#37.7. Tables. # PAGEREF _Toc17450901 \h ##106#37.8.
System Variables. # PAGEREF _Toc17450902 \h ##106#37.9. Description.
# PAGEREF _Toc17450903 \h ##106#37.10. Examples. # PAGEREF
_Toc17450904 \h ##106#37.11. SourceCode. # PAGEREF _Toc17450905 \h ##106#37.12.
See Also. # PAGEREF _Toc17450906 \h ##107#38. GIVELINE # PAGEREF
_Toc17450907 \h ##108#38.1. Location. # PAGEREF _Toc17450908 \h ##108#38.2.
Purpose. # PAGEREF _Toc17450909 \h ##108#38.3. Entry. # PAGEREF
_Toc17450910 \h ##108#38.3.1. Line Number of required line in text. # PAGEREF
_Toc17450911 \h ##108#38.3.2. Width of column. # PAGEREF _Toc17450912 \h ##108#
38.3.3. Text to split # PAGEREF _Toc17450913 \h ##108#38.4. Exit. #
PAGEREF _Toc17450914 \h ##108#38.4.1. Line N # PAGEREF _Toc17450915 \h
##108#38.5. Called By. # PAGEREF _Toc17450916 \h ##108#38.6. Calls. #
PAGEREF _Toc17450917 \h ##108#38.7. Tables. # PAGEREF _Toc17450918 \h ##108#
38.8. System Variables. # PAGEREF _Toc17450919 \h ##108#38.9. Description.
# PAGEREF _Toc17450920 \h ##108#38.10. Examples. # PAGEREF
_Toc17450921 \h ##108#38.11. SourceCode. # PAGEREF _Toc17450922 \h ##109#38.12.
See Also. # PAGEREF _Toc17450923 \h ##110#39. ICON, SYMBOL or GRAPHIC
# PAGEREF _Toc17450924 \h ##111#39.1. Location. # PAGEREF
_Toc17450925 \h ##111#39.2. Purpose. # PAGEREF _Toc17450926 \h ##111#39.3.
Entry. # PAGEREF _Toc17450927 \h ##111#39.3.1. Icon: Icon Name to
print # PAGEREF _Toc17450928 \h ##111#39.3.2. Symbol: Symbol Name to print
# PAGEREF _Toc17450929 \h ##111#39.3.3. Graphic: Icon/symbol name, name
type # PAGEREF _Toc17450930 \h ##111#39.4. Exit. # PAGEREF _Toc17450931 \h
##111#39.4.1. None # PAGEREF _Toc17450932 \h ##111#39.5. Called By. #
PAGEREF _Toc17450933 \h ##111#39.6. Calls. # PAGEREF _Toc17450934 \h ##111#
39.7. Tables. # PAGEREF _Toc17450935 \h ##111#39.8. System Variables. #
PAGEREF _Toc17450936 \h ##111#39.9. Description. # PAGEREF _Toc17450937 \h
##111#39.10. Examples. # PAGEREF _Toc17450938 \h ##112#39.11. SourceCode.
# PAGEREF _Toc17450939 \h ##112#39.12. See Also. # PAGEREF
_Toc17450940 \h ##113#40. GROUPHEADER # PAGEREF _Toc17450941 \h ##114#40.1.
Location. # PAGEREF _Toc17450942 \h ##114#40.2. Purpose. # PAGEREF
_Toc17450943 \h ##114#40.3. Entry. # PAGEREF _Toc17450944 \h ##114#40.3.1.
Group Header Title. # PAGEREF _Toc17450945 \h ##114#40.3.2. Group Header
Value. # PAGEREF _Toc17450946 \h ##114#40.4. Exit. # PAGEREF
_Toc17450947 \h ##114#40.5. Called By. # PAGEREF _Toc17450948 \h ##114#40.6.
Calls. # PAGEREF _Toc17450949 \h ##114#40.7. Tables. # PAGEREF
_Toc17450950 \h ##114#40.8. System Variables. # PAGEREF _Toc17450951 \h ##114#
40.9. Description. # PAGEREF _Toc17450952 \h ##114#40.10. Examples. #
PAGEREF _Toc17450953 \h ##115#40.11. SourceCode. # PAGEREF _Toc17450954 \h
##115#40.12. See Also. # PAGEREF _Toc17450955 \h ##116#41. INITBREAK #
PAGEREF _Toc17450956 \h ##117#41.1. Location. # PAGEREF _Toc17450957 \h ##117#
41.2. Purpose. # PAGEREF _Toc17450958 \h ##117#41.3. Entry. # PAGEREF
_Toc17450959 \h ##117#41.3.1. Field to break on. # PAGEREF _Toc17450960 \h
##117#41.3.2. Title of field. # PAGEREF _Toc17450961 \h ##117#41.4. Exit.
# PAGEREF _Toc17450962 \h ##117#41.5. Called By. # PAGEREF
_Toc17450963 \h ##117#41.6. Calls. # PAGEREF _Toc17450964 \h ##117#41.7.
Tables. # PAGEREF _Toc17450965 \h ##117#41.8. System Variables. #
PAGEREF _Toc17450966 \h ##117#41.9. Description. # PAGEREF _Toc17450967 \h
##117#41.10. Examples. # PAGEREF _Toc17450968 \h ##117#41.11. SourceCode.
# PAGEREF _Toc17450969 \h ##117#41.12. See Also. # PAGEREF
_Toc17450970 \h ##118#42. INIT_GLOBAL # PAGEREF _Toc17450971 \h ##119#42.1.
Location. # PAGEREF _Toc17450972 \h ##119#42.2. Purpose. # PAGEREF
_Toc17450973 \h ##119#42.3. Entry. # PAGEREF _Toc17450974 \h ##119#42.4.
Exit. # PAGEREF _Toc17450975 \h ##119#42.5. Called By. # PAGEREF
_Toc17450976 \h ##119#42.6. Calls. # PAGEREF _Toc17450977 \h ##119#42.7.
Tables. # PAGEREF _Toc17450978 \h ##119#42.8. System Variables. #
PAGEREF _Toc17450979 \h ##119#42.9. Description. # PAGEREF _Toc17450980 \h
##119#42.10. Examples. # PAGEREF _Toc17450981 \h ##119#42.11. SourceCode.
# PAGEREF _Toc17450982 \h ##120#42.12. See Also. # PAGEREF
_Toc17450983 \h ##121#43. IS_SERVICE_ACTIVE # PAGEREF _Toc17450984 \h ##122#
43.1. Location. # PAGEREF _Toc17450985 \h ##122#43.2. Purpose. # PAGEREF
_Toc17450986 \h ##122#43.3. Entry. # PAGEREF _Toc17450987 \h ##122#43.3.1.
Service Name to Check # PAGEREF _Toc17450988 \h ##122#43.4. Exit. #
PAGEREF _Toc17450989 \h ##122#43.4.1. True - Service Active # PAGEREF
_Toc17450990 \h ##122#43.4.2. False - Service not available # PAGEREF
_Toc17450991 \h ##122#43.5. Called By. # PAGEREF _Toc17450992 \h ##122#43.6.
Calls. # PAGEREF _Toc17450993 \h ##122#43.7. Tables. # PAGEREF
_Toc17450994 \h ##122#43.8. System Variables. # PAGEREF _Toc17450995 \h ##122#
43.9. Description. # PAGEREF _Toc17450996 \h ##122#43.10. Examples. #
PAGEREF _Toc17450997 \h ##122#43.11. SourceCode. # PAGEREF _Toc17450998 \h
##122#43.12. See Also. # PAGEREF _Toc17450999 \h ##124#44. NEWBDC #
PAGEREF _Toc17451000 \h ##125#44.1. Location. # PAGEREF _Toc17451001 \h ##125#
44.2. Purpose. # PAGEREF _Toc17451002 \h ##125#44.3. Entry. # PAGEREF
_Toc17451003 \h ##125#44.3.1. None # PAGEREF _Toc17451004 \h ##125#44.4. Exit.
# PAGEREF _Toc17451005 \h ##125#44.5. Called By. # PAGEREF
_Toc17451006 \h ##125#44.6. Calls. # PAGEREF _Toc17451007 \h ##125#44.7.
Tables. # PAGEREF _Toc17451008 \h ##125#44.8. System Variables. #
PAGEREF _Toc17451009 \h ##125#44.9. Description. # PAGEREF _Toc17451010 \h
##125#44.10. Examples. # PAGEREF _Toc17451011 \h ##125#44.11. SourceCode.
# PAGEREF _Toc17451012 \h ##125#44.12. See Also. # PAGEREF
_Toc17451013 \h ##126#45. PRINTTITLES # PAGEREF _Toc17451014 \h ##127#45.1.
Location. # PAGEREF _Toc17451015 \h ##127#45.2. Purpose. # PAGEREF
_Toc17451016 \h ##127#45.3. Entry. # PAGEREF _Toc17451017 \h ##127#45.4.
Exit. # PAGEREF _Toc17451018 \h ##127#45.5. Called By. # PAGEREF
_Toc17451019 \h ##127#45.6. Calls. # PAGEREF _Toc17451020 \h ##127#45.7.
Tables. # PAGEREF _Toc17451021 \h ##127#45.8. System Variables. #
PAGEREF _Toc17451022 \h ##127#45.9. Description. # PAGEREF _Toc17451023 \h
##127#45.10. Examples. # PAGEREF _Toc17451024 \h ##127#45.11. SourceCode.
# PAGEREF _Toc17451025 \h ##128#45.12. See Also. # PAGEREF
_Toc17451026 \h ##129#46. PRINTTOTALS # PAGEREF _Toc17451027 \h ##130#46.1.
Location. # PAGEREF _Toc17451028 \h ##130#46.2. Purpose. # PAGEREF
_Toc17451029 \h ##130#46.3. Entry. # PAGEREF _Toc17451030 \h ##130#46.3.1.
Data tables to print totals for # PAGEREF _Toc17451031 \h ##130#46.3.2.
Current total level # PAGEREF _Toc17451032 \h ##130#46.4. Exit. #
PAGEREF _Toc17451033 \h ##130#46.5. Called By. # PAGEREF _Toc17451034 \h ##130#
46.6. Calls. # PAGEREF _Toc17451035 \h ##130#46.7. Tables. # PAGEREF
_Toc17451036 \h ##130#46.8. System Variables. # PAGEREF _Toc17451037 \h ##130#
46.9. Description. # PAGEREF _Toc17451038 \h ##130#46.10. Examples. #
PAGEREF _Toc17451039 \h ##130#46.11. SourceCode. # PAGEREF _Toc17451040 \h
##131#46.12. See Also. # PAGEREF _Toc17451041 \h ##132#47. PRG_DOC_HELP
# PAGEREF _Toc17451042 \h ##133#47.1. Location. # PAGEREF
_Toc17451043 \h ##133#47.2. Purpose. # PAGEREF _Toc17451044 \h ##133#47.3.
Entry. # PAGEREF _Toc17451045 \h ##133#47.4. Exit. # PAGEREF
_Toc17451046 \h ##133#47.5. Called By. # PAGEREF _Toc17451047 \h ##133#47.6.
Calls. # PAGEREF _Toc17451048 \h ##133#47.7. Tables. # PAGEREF
_Toc17451049 \h ##133#47.8. System Variables. # PAGEREF _Toc17451050 \h ##133#
47.9. Description. # PAGEREF _Toc17451051 \h ##133#47.10. Examples. #
PAGEREF _Toc17451052 \h ##133#47.11. SourceCode. # PAGEREF _Toc17451053 \h
##133#47.12. See Also. # PAGEREF _Toc17451054 \h ##134#48. READ_SCREEN_VALUES
# PAGEREF _Toc17451055 \h ##135#48.1. Location. # PAGEREF
_Toc17451056 \h ##135#48.2. Purpose. # PAGEREF _Toc17451057 \h ##135#48.3.
Entry. # PAGEREF _Toc17451058 \h ##135#48.4. Exit. # PAGEREF
_Toc17451059 \h ##135#48.5. Called By. # PAGEREF _Toc17451060 \h ##135#48.6.
Calls. #
PAGEREF _Toc17451061 \h ##135#48.7. Tables. # PAGEREF _Toc17451062 \h
##135#48.8. System Variables. # PAGEREF _Toc17451063 \h ##135#48.9. Description.
# PAGEREF _Toc17451064 \h ##135#48.10. Examples. # PAGEREF
_Toc17451065 \h ##135#48.11. SourceCode. # PAGEREF _Toc17451066 \h ##135#48.12.
See Also. # PAGEREF _Toc17451067 \h ##136#49. READ_YDCSET # PAGEREF
_Toc17451068 \h ##137#49.1. Location. # PAGEREF _Toc17451069 \h ##137#49.2.
Purpose. # PAGEREF _Toc17451070 \h ##137#49.3. Entry. # PAGEREF
_Toc17451071 \h ##137#49.3.1. Function Name # PAGEREF _Toc17451072 \h ##137#
49.3.2. User Name. # PAGEREF _Toc17451073 \h ##137#49.4. Exit. # PAGEREF
_Toc17451074 \h ##137#49.4.1. YDCSET structure populated # PAGEREF
_Toc17451075 \h ##137#49.5. Called By. # PAGEREF _Toc17451076 \h ##137#49.6.
Calls. # PAGEREF _Toc17451077 \h ##137#49.7. Tables. # PAGEREF
_Toc17451078 \h ##137#49.8. System Variables. # PAGEREF _Toc17451079 \h ##137#
49.9. Description. # PAGEREF _Toc17451080 \h ##137#49.10. Examples. #
PAGEREF _Toc17451081 \h ##137#49.11. SourceCode. # PAGEREF _Toc17451082 \h
##138#49.12. See Also. # PAGEREF _Toc17451083 \h ##139#50. REPHEADER #
PAGEREF _Toc17451084 \h ##140#50.1. Location. # PAGEREF _Toc17451085 \h ##140#
50.2. Purpose. # PAGEREF _Toc17451086 \h ##140#50.3. Entry. # PAGEREF
_Toc17451087 \h ##140#50.3.1. Company Code # PAGEREF _Toc17451088 \h ##140#
50.3.2. Report Title # PAGEREF _Toc17451089 \h ##140#50.4. Exit. #
PAGEREF _Toc17451090 \h ##140#50.4.1. Report header produced for current report
# PAGEREF _Toc17451091 \h ##140#50.5. Called By. # PAGEREF
_Toc17451092 \h ##140#50.6. Calls. # PAGEREF _Toc17451093 \h ##140#50.7.
Tables. # PAGEREF _Toc17451094 \h ##140#50.8. System Variables. #
PAGEREF _Toc17451095 \h ##140#50.9. Description. # PAGEREF _Toc17451096 \h
##140#50.10. Examples. # PAGEREF _Toc17451097 \h ##140#50.11. SourceCode.
# PAGEREF _Toc17451098 \h ##141#50.12. See Also. # PAGEREF
_Toc17451099 \h ##142#51. RUNTOTALS # PAGEREF _Toc17451100 \h ##143#51.1.
Location. # PAGEREF _Toc17451101 \h ##143#51.2. Purpose. # PAGEREF
_Toc17451102 \h ##143#51.3. Entry. # PAGEREF _Toc17451103 \h ##143#51.4.
Exit. # PAGEREF _Toc17451104 \h ##143#51.5. Called By. # PAGEREF
_Toc17451105 \h ##143#51.6. Calls. # PAGEREF _Toc17451106 \h ##143#51.7.
Tables. # PAGEREF _Toc17451107 \h ##143#51.8. System Variables. #
PAGEREF _Toc17451108 \h ##143#51.9. Description. # PAGEREF _Toc17451109 \h
##143#51.10. Examples. # PAGEREF _Toc17451110 \h ##143#51.11. SourceCode.
# PAGEREF _Toc17451111 \h ##143#51.12. See Also. # PAGEREF
_Toc17451112 \h ##144#52. SAVEREPORT # PAGEREF _Toc17451113 \h ##145#52.1.
Location. # PAGEREF _Toc17451114 \h ##145#52.2. Purpose. # PAGEREF
_Toc17451115 \h ##145#52.3. Entry. # PAGEREF _Toc17451116 \h ##145#52.3.1.
Report Name # PAGEREF _Toc17451117 \h ##145#52.4. Exit. # PAGEREF
_Toc17451118 \h ##145#52.5. Called By. # PAGEREF _Toc17451119 \h ##145#52.6.
Calls. # PAGEREF _Toc17451120 \h ##145#52.7. Tables. # PAGEREF
_Toc17451121 \h ##145#52.8. System Variables. # PAGEREF _Toc17451122 \h ##145#
52.9. Description. # PAGEREF _Toc17451123 \h ##145#52.10. Examples. #
PAGEREF _Toc17451124 \h ##145#52.11. SourceCode. # PAGEREF _Toc17451125 \h
##146#52.12. See Also. # PAGEREF _Toc17451126 \h ##146#53. SETCOLOUR #
PAGEREF _Toc17451127 \h ##147#53.1. Location. # PAGEREF _Toc17451128 \h ##147#
53.2. Purpose. # PAGEREF _Toc17451129 \h ##147#53.3. Entry. # PAGEREF
_Toc17451130 \h ##147#53.3.1. Colour to set # PAGEREF _Toc17451131 \h ##147#
53.4. Exit. # PAGEREF _Toc17451132 \h ##147#53.5. Called By. # PAGEREF
_Toc17451133 \h ##147#53.6. Calls. # PAGEREF _Toc17451134 \h ##147#53.7.
Tables. # PAGEREF _Toc17451135 \h ##147#53.8. System Variables. #
PAGEREF _Toc17451136 \h ##147#53.9. Description. # PAGEREF _Toc17451137 \h
##147#53.10. Examples. # PAGEREF _Toc17451138 \h ##147#53.11. SourceCode.
# PAGEREF _Toc17451139 \h ##147#53.12. See Also. # PAGEREF
_Toc17451140 \h ##148#54. SHOW_PROGRESS # PAGEREF _Toc17451141 \h ##149#
54.1. Location. # PAGEREF _Toc17451142 \h ##149#54.2. Purpose. # PAGEREF
_Toc17451143 \h ##149#54.3. Entry. # PAGEREF _Toc17451144 \h ##149#54.3.1.
Message to display # PAGEREF _Toc17451145 \h ##149#54.4. Exit. #
PAGEREF _Toc17451146 \h ##149#54.5. Called By. # PAGEREF _Toc17451147 \h ##149#
54.6. Calls. # PAGEREF _Toc17451148 \h ##149#54.7. Tables. # PAGEREF
_Toc17451149 \h ##149#54.8. System Variables. # PAGEREF _Toc17451150 \h ##149#
54.9. Description. # PAGEREF _Toc17451151 \h ##149#54.10. Examples. #
PAGEREF _Toc17451152 \h ##149#54.11. SourceCode. # PAGEREF _Toc17451153 \h
##149#54.12. See Also. # PAGEREF _Toc17451154 \h ##150#55. SORTREP #
PAGEREF _Toc17451155 \h ##151#55.1. Location. # PAGEREF _Toc17451156 \h ##151#
55.2. Purpose. # PAGEREF _Toc17451157 \h ##151#55.3. Entry. # PAGEREF
_Toc17451158 \h ##151#55.3.1. Table to sort. # PAGEREF _Toc17451159 \h ##151#
55.4. Exit. # PAGEREF _Toc17451160 \h ##151#55.4.1. Table Sorted. # PAGEREF
_Toc17451161 \h ##151#55.4.2. Report column table sorted on # PAGEREF
_Toc17451162 \h ##151#55.4.3. Sort direction 'A' or 'D' # PAGEREF
_Toc17451163 \h ##151#55.5. Called By. # PAGEREF _Toc17451164 \h ##151#55.6.
Calls. # PAGEREF _Toc17451165 \h ##151#55.7. Tables. # PAGEREF
_Toc17451166 \h ##151#55.8. System Variables. # PAGEREF _Toc17451167 \h ##151#
55.9. Description. # PAGEREF _Toc17451168 \h ##151#55.10. Examples. #
PAGEREF _Toc17451169 \h ##151#55.11. SourceCode. # PAGEREF _Toc17451170 \h
##152#55.12. See Also. # PAGEREF _Toc17451171 \h ##153#56. STRIPSTRING #
PAGEREF _Toc17451172 \h ##154#56.1. Location. # PAGEREF _Toc17451173 \h ##154#
56.2. Purpose. # PAGEREF _Toc17451174 \h ##154#56.3. Entry. # PAGEREF
_Toc17451175 \h ##154#56.3.1. String to remove characters from. # PAGEREF
_Toc17451176 \h ##154#56.3.2. String of characters to remove # PAGEREF
_Toc17451177 \h ##154#56.4. Exit. # PAGEREF _Toc17451178 \h ##154#56.4.1. Entry
string with strip chars removed # PAGEREF _Toc17451179 \h ##154#56.5. Called
By. # PAGEREF _Toc17451180 \h ##154#56.6. Calls. # PAGEREF
_Toc17451181 \h ##154#56.7. Tables. # PAGEREF _Toc17451182 \h ##154#56.8.
System Variables. # PAGEREF _Toc17451183 \h ##154#56.9. Description.
# PAGEREF _Toc17451184 \h ##154#56.10. Examples. # PAGEREF
_Toc17451185 \h ##154#56.11. SourceCode. # PAGEREF _Toc17451186 \h ##154#56.12.
See Also. # PAGEREF _Toc17451187 \h ##155#57. SUBTITLES # PAGEREF
_Toc17451188 \h ##156#57.1. Location. # PAGEREF _Toc17451189 \h ##156#57.2.
Purpose. # PAGEREF _Toc17451190 \h ##156#57.3. Entry. # PAGEREF
_Toc17451191 \h ##156#57.4. Exit. # PAGEREF _Toc17451192 \h ##156#57.5. Called
By. # PAGEREF _Toc17451193 \h ##156#57.6. Calls. # PAGEREF
_Toc17451194 \h ##156#57.7. Tables. # PAGEREF _Toc17451195 \h ##156#57.8.
System Variables. # PAGEREF _Toc17451196 \h ##156#57.9. Description.
# PAGEREF _Toc17451197 \h ##156#57.10. Examples. # PAGEREF
_Toc17451198 \h ##156#57.11. SourceCode. # PAGEREF _Toc17451199 \h ##156#57.12.
See Also. # PAGEREF _Toc17451200 \h ##158#58. TABLELINE # PAGEREF
_Toc17451201 \h ##159#58.1. Location. # PAGEREF _Toc17451202 \h ##159#58.2.
Purpose. # PAGEREF _Toc17451203 \h ##159#58.3. Entry. # PAGEREF
_Toc17451204 \h ##159#58.4. Exit. # PAGEREF _Toc17451205 \h ##159#58.4.1. Global
flag w__line printed set to true. # PAGEREF _Toc17451206 \h ##159#58.5. Called
By. # PAGEREF _Toc17451207 \h ##159#58.6. Calls. # PAGEREF
_Toc17451208 \h ##159#58.7. Tables. # PAGEREF _Toc17451209 \h ##159#58.8.
System Variables. # PAGEREF _Toc17451210 \h ##159#58.9. Description.
# PAGEREF _Toc17451211 \h ##159#58.10. Examples. # PAGEREF
_Toc17451212 \h ##159#58.11. SourceCode. # PAGEREF _Toc17451213 \h ##160#58.12.
See Also. # PAGEREF _Toc17451214 \h ##160#59. UNDERLINE # PAGEREF
_Toc17451215 \h ##161#59.1. Location. # PAGEREF _Toc17451216 \h ##161#59.2.
Purpose. # PAGEREF _Toc17451217 \h ##161#59.3. Entry. # PAGEREF
_Toc17451218 \h ##161#59.3.1. Start position # PAGEREF _Toc17451219 \h ##161#
59.3.2. Width # PAGEREF _Toc17451220 \h ##161#59.4. Exit. # PAGEREF
_Toc17451221 \h ##161#59.4.1. Global flag w__line printed set to true. # PAGEREF
_Toc17451222 \h ##161#59.5. Called By. # PAGEREF _Toc17451223 \h ##161#59.6.
Calls. # PAGEREF _Toc17451224 \h ##161#59.7. Tables. # PAGEREF
_Toc17451225 \h ##161#59.8. System Variables. # PAGEREF _Toc17451226 \h ##161#
59.9. Description. # PAGEREF _Toc17451227 \h ##161#59.10. Examples. #
PAGEREF _Toc17451228 \h ##161#59.11. SourceCode. # PAGEREF _Toc17451229 \h
##162#59.12. See Also. # PAGEREF _Toc17451230 \h ##162#60. USEREPORT #
PAGEREF _Toc17451231 \h ##163#60.1. Location. # PAGEREF _Toc17451232 \h ##163#
60.2. Purpose. # PAGEREF _Toc17451233 \h ##163#60.3. Entry. # PAGEREF
_Toc17451234 \h ##163#60.3.1. Report Name # PAGEREF _Toc17451235 \h ##163#60.4.
Exit. # PAGEREF _Toc17451236 \h ##163#60.5. Called By. # PAGEREF
_Toc17451237 \h ##163#60.6. Calls. # PAGEREF _Toc17451238 \h ##163#60.7.
Tables. # PAGEREF _Toc17451239 \h ##163#60.8. System Variables. #
PAGEREF _Toc17451240 \h ##163#60.9. Description. # PAGEREF _Toc17451241 \h
##163#60.10. Examples. # PAGEREF _Toc17451242 \h ##163#60.11. SourceCode.
# PAGEREF _Toc17451243 \h ##163#60.12. See Also. # PAGEREF
_Toc17451244 \h ##164#61. WLINE # PAGEREF _Toc17451245 \h ##165#61.1.
Location. # PAGEREF _Toc17451246 \h ##165#61.2. Purpose. # PAGEREF
_Toc17451247 \h ##165#61.3. Entry. # PAGEREF _Toc17451248 \h ##165#61.3.1.
Dataline to print # PAGEREF _Toc17451249 \h ##165#61.3.2. Colour of line.
# PAGEREF _Toc17451250 \h ##165#61.4. Exit. # PAGEREF _Toc17451251 \h
##166#61.5. Called By. # PAGEREF _Toc17451252 \h ##166#61.6. Calls. #
PAGEREF _Toc17451253 \h ##166#61.7. Tables. # PAGEREF _Toc17451254 \h ##166#
61.8. System Variables. # PAGEREF _Toc17451255 \h ##166#61.9. Description.
#
PAGEREF _Toc17451256 \h ##166#61.10. Examples. # PAGEREF _Toc17451257 \h
##166#61.11. SourceCode. # PAGEREF _Toc17451258 \h ##166#61.12. See Also.
# PAGEREF _Toc17451259 \h ##167#62. WRITECENTRE # PAGEREF _Toc17451260 \h
##168#62.1. Location. # PAGEREF _Toc17451261 \h ##168#62.2. Purpose. #
PAGEREF _Toc17451262 \h ##168#62.3. Entry. # PAGEREF _Toc17451263 \h ##168#
62.3.1. Text to centre # PAGEREF _Toc17451264 \h ##168#62.4. Exit. #
PAGEREF _Toc17451265 \h ##168#62.5. Called By. # PAGEREF _Toc17451266 \h ##168#
62.6. Calls. # PAGEREF _Toc17451267 \h ##168#62.7. Tables. # PAGEREF
_Toc17451268 \h ##168#62.8. System Variables. # PAGEREF _Toc17451269 \h ##168#
62.9. Description. # PAGEREF _Toc17451270 \h ##168#62.10. Examples. #
PAGEREF _Toc17451271 \h ##168#62.11. SourceCode. # PAGEREF _Toc17451272 \h
##168#62.12. See Also. # PAGEREF _Toc17451273 \h ##169#63. WRITECOL #
PAGEREF _Toc17451274 \h ##170#63.1. Location. # PAGEREF _Toc17451275 \h ##170#
63.2. Purpose. # PAGEREF _Toc17451276 \h ##170#63.3. Entry. # PAGEREF
_Toc17451277 \h ##170#63.3.1. Data line and column to print # PAGEREF
_Toc17451278 \h ##170#63.3.2. Column to use. # PAGEREF _Toc17451279 \h ##170#
63.4. Exit. # PAGEREF _Toc17451280 \h ##170#63.5. Called By. # PAGEREF
_Toc17451281 \h ##170#63.6. Calls. # PAGEREF _Toc17451282 \h ##170#63.7.
Tables. # PAGEREF _Toc17451283 \h ##170#63.8. System Variables. #
PAGEREF _Toc17451284 \h ##170#63.9. Description. # PAGEREF _Toc17451285 \h
##170#63.10. Examples. # PAGEREF _Toc17451286 \h ##170#63.11. SourceCode.
# PAGEREF _Toc17451287 \h ##170#63.12. See Also. # PAGEREF
_Toc17451288 \h ##171#64. WRITELINE # PAGEREF _Toc17451289 \h ##172#64.1.
Location. # PAGEREF _Toc17451290 \h ##172#64.2. Purpose. # PAGEREF
_Toc17451291 \h ##172#64.3. Entry. # PAGEREF _Toc17451292 \h ##172#64.3.1.
Table work area containing report data # PAGEREF _Toc17451293 \h ##172#
64.3.2. Colour to use to print the data in. # PAGEREF _Toc17451294 \h ##172#
64.4. Exit. # PAGEREF _Toc17451295 \h ##172#64.5. Called By. # PAGEREF
_Toc17451296 \h ##172#64.6. Calls. # PAGEREF _Toc17451297 \h ##172#64.7.
Tables. # PAGEREF _Toc17451298 \h ##172#64.8. System Variables. #
PAGEREF _Toc17451299 \h ##172#64.9. Description. # PAGEREF _Toc17451300 \h
##172#64.10. Examples. # PAGEREF _Toc17451301 \h ##173#64.11. SourceCode.
# PAGEREF _Toc17451302 \h ##173#64.12. See Also. # PAGEREF
_Toc17451303 \h ##175#65. WRITESYMBOL # PAGEREF _Toc17451304 \h ##176#65.1.
Location. # PAGEREF _Toc17451305 \h ##176#65.2. Purpose. # PAGEREF
_Toc17451306 \h ##176#65.3. Entry. # PAGEREF _Toc17451307 \h ##176#65.3.1.
Symbol name to use. # PAGEREF _Toc17451308 \h ##176#65.3.2. Hotspot
flag. # PAGEREF _Toc17451309 \h ##176#65.4. Exit. # PAGEREF _Toc17451310 \h
##176#65.5. Called By. # PAGEREF _Toc17451311 \h ##176#65.6. Calls. #
PAGEREF _Toc17451312 \h ##176#65.7. Tables. # PAGEREF _Toc17451313 \h ##176#
65.8. System Variables. # PAGEREF _Toc17451314 \h ##176#65.9. Description.
# PAGEREF _Toc17451315 \h ##176#65.10. Examples. # PAGEREF
_Toc17451316 \h ##176#65.11. SourceCode. # PAGEREF _Toc17451317 \h ##176#65.12.
See Also. # PAGEREF _Toc17451318 \h ##177#66. WRITEVALUE # PAGEREF
_Toc17451319 \h ##178#66.1. Location. # PAGEREF _Toc17451320 \h ##178#66.2.
Purpose. # PAGEREF _Toc17451321 \h ##178#66.3. Entry. # PAGEREF
_Toc17451322 \h ##178#66.3.1. Width of output field # PAGEREF _Toc17451323 \h
##178#66.3.2. Value to write # PAGEREF _Toc17451324 \h ##178#66.3.3.
Conversion exit routine # PAGEREF _Toc17451325 \h ##178#66.3.4. Currency
Field # PAGEREF _Toc17451326 \h ##178#66.3.5. Unit field # PAGEREF
_Toc17451327 \h ##178#66.3.6. Other Format field. # PAGEREF _Toc17451328 \h
##178#66.4. Exit. # PAGEREF _Toc17451329 \h ##178#66.5. Called By. # PAGEREF
_Toc17451330 \h ##178#66.6. Calls. # PAGEREF _Toc17451331 \h ##178#66.7.
Tables. # PAGEREF _Toc17451332 \h ##179#66.8. System Variables. #
PAGEREF _Toc17451333 \h ##179#66.9. Description. # PAGEREF _Toc17451334 \h
##179#66.10. Examples. # PAGEREF _Toc17451335 \h ##179#66.11. SourceCode.
# PAGEREF _Toc17451336 \h ##179#66.12. See Also. # PAGEREF
_Toc17451337 \h ##180#67. ZBDC_BATCH_ON # PAGEREF _Toc17451338 \h ##181#
67.1. Location. # PAGEREF _Toc17451339 \h ##181#67.2. Purpose. # PAGEREF
_Toc17451340 \h ##181#67.3. Entry. # PAGEREF _Toc17451341 \h ##181#67.4.
Exit. # PAGEREF _Toc17451342 \h ##181#67.5. Called By. # PAGEREF
_Toc17451343 \h ##181#67.6. Calls. # PAGEREF _Toc17451344 \h ##181#67.7.
Tables. # PAGEREF _Toc17451345 \h ##181#67.8. System Variables. #
PAGEREF _Toc17451346 \h ##181#67.9. Description. # PAGEREF _Toc17451347 \h
##181#67.10. Examples. # PAGEREF _Toc17451348 \h ##181#67.11. SourceCode.
# PAGEREF _Toc17451349 \h ##181#67.12. See Also. # PAGEREF
_Toc17451350 \h ##182#68. ZBDC_CLOSE_GROUP # PAGEREF _Toc17451351 \h ##183#
68.1. Location. # PAGEREF _Toc17451352 \h ##183#68.2. Purpose. # PAGEREF
_Toc17451353 \h ##183#68.3. Entry. # PAGEREF _Toc17451354 \h ##183#68.3.1.
None. # PAGEREF _Toc17451355 \h ##183#68.4. Exit. # PAGEREF
_Toc17451356 \h ##183#68.4.1. Status 0 - Ok. # PAGEREF _Toc17451357 \h ##183#
68.5. Called By. # PAGEREF _Toc17451358 \h ##183#68.6. Calls. # PAGEREF
_Toc17451359 \h ##183#68.7. Tables. # PAGEREF _Toc17451360 \h ##183#68.8.
System Variables. # PAGEREF _Toc17451361 \h ##183#68.9. Description.
# PAGEREF _Toc17451362 \h ##183#68.10. Examples. # PAGEREF
_Toc17451363 \h ##183#68.11. SourceCode. # PAGEREF _Toc17451364 \h ##184#68.12.
See Also. # PAGEREF _Toc17451365 \h ##184#69. ZBDC_DUMP_ON # PAGEREF
_Toc17451366 \h ##185#69.1. Location. # PAGEREF _Toc17451367 \h ##185#69.2.
Purpose. # PAGEREF _Toc17451368 \h ##185#69.3. Entry. # PAGEREF
_Toc17451369 \h ##185#69.3.1. None # PAGEREF _Toc17451370 \h ##185#69.4. Exit.
# PAGEREF _Toc17451371 \h ##185#69.4.1. None # PAGEREF _Toc17451372 \h
##185#69.5. Called By. # PAGEREF _Toc17451373 \h ##185#69.6. Calls. #
PAGEREF _Toc17451374 \h ##185#69.7. Tables. # PAGEREF _Toc17451375 \h ##185#
69.8. System Variables. # PAGEREF _Toc17451376 \h ##185#69.9. Description.
# PAGEREF _Toc17451377 \h ##185#69.10. Examples. # PAGEREF
_Toc17451378 \h ##185#69.11. SourceCode. # PAGEREF _Toc17451379 \h ##185#69.12.
See Also. # PAGEREF _Toc17451380 \h ##186#70. ZBDC_FIELD # PAGEREF
_Toc17451381 \h ##187#70.1. Location. # PAGEREF _Toc17451382 \h ##187#70.2.
Purpose. # PAGEREF _Toc17451383 \h ##187#70.3. Entry. # PAGEREF
_Toc17451384 \h ##187#70.3.1. Field name # PAGEREF _Toc17451385 \h ##187#70.3.2.
Field Value # PAGEREF _Toc17451386 \h ##187#70.4. Exit. # PAGEREF
_Toc17451387 \h ##188#70.5. Called By. # PAGEREF _Toc17451388 \h ##188#70.6.
Calls. # PAGEREF _Toc17451389 \h ##188#70.7. Tables. # PAGEREF
_Toc17451390 \h ##188#70.8. System Variables. # PAGEREF _Toc17451391 \h ##188#
70.9. Description. # PAGEREF _Toc17451392 \h ##188#70.10. Examples. #
PAGEREF _Toc17451393 \h ##188#70.11. SourceCode. # PAGEREF _Toc17451394 \h
##188#70.12. See Also. # PAGEREF _Toc17451395 \h ##189#71. ZBDC_FILLSCREEN
# PAGEREF _Toc17451396 \h ##190#71.1. Location. # PAGEREF
_Toc17451397 \h ##190#71.2. Purpose. # PAGEREF _Toc17451398 \h ##190#71.3.
Entry. # PAGEREF _Toc17451399 \h ##190#71.3.1. Program name, #
PAGEREF _Toc17451400 \h ##190#71.3.2. Screen number/actual screen No #
PAGEREF _Toc17451401 \h ##190#71.3.3. Structure to use. # PAGEREF
_Toc17451402 \h ##190#71.4. Exit. # PAGEREF _Toc17451403 \h ##190#71.5. Called
By. # PAGEREF _Toc17451404 \h ##190#71.6. Calls. # PAGEREF
_Toc17451405 \h ##190#71.7. Tables. # PAGEREF _Toc17451406 \h ##190#71.8.
System Variables. # PAGEREF _Toc17451407 \h ##190#71.9. Description.
# PAGEREF _Toc17451408 \h ##190#71.10. Examples. # PAGEREF
_Toc17451409 \h ##191#71.11. SourceCode. # PAGEREF _Toc17451410 \h ##191#71.12.
See Also. # PAGEREF _Toc17451411 \h ##193#72. ZBDC_INSERT # PAGEREF
_Toc17451412 \h ##194#72.1. Location. # PAGEREF _Toc17451413 \h ##194#72.2.
Purpose. # PAGEREF _Toc17451414 \h ##194#72.3. Entry. # PAGEREF
_Toc17451415 \h ##194#72.3.1. Transaction code # PAGEREF _Toc17451416 \h ##194#
72.4. Exit. # PAGEREF _Toc17451417 \h ##194#72.4.1. Status of Insert # PAGEREF
_Toc17451418 \h ##194#72.5. Called By. # PAGEREF _Toc17451419 \h ##194#72.6.
Calls. # PAGEREF _Toc17451420 \h ##194#72.7. Tables. # PAGEREF
_Toc17451421 \h ##194#72.8. System Variables. # PAGEREF _Toc17451422 \h ##194#
72.9. Description. # PAGEREF _Toc17451423 \h ##194#72.10. Examples. #
PAGEREF _Toc17451424 \h ##194#72.11. SourceCode. # PAGEREF _Toc17451425 \h
##194#72.12. See Also. # PAGEREF _Toc17451426 \h ##195#73. ZBDC_OPEN_GROUP
# PAGEREF _Toc17451427 \h ##196#73.1. Location. # PAGEREF
_Toc17451428 \h ##196#73.2. Purpose. # PAGEREF _Toc17451429 \h ##196#73.3.
Entry. # PAGEREF _Toc17451430 \h ##196#73.3.1. Group Name to use for
batch # PAGEREF _Toc17451431 \h ##196#73.4. Exit. # PAGEREF _Toc17451432 \h
##196#73.4.1. Status of open: # PAGEREF _Toc17451433 \h ##196#73.5. Called
By. # PAGEREF _Toc17451434 \h ##196#73.6. Calls. # PAGEREF
_Toc17451435 \h ##196#73.7. Tables. # PAGEREF _Toc17451436 \h ##196#73.8.
System Variables. # PAGEREF _Toc17451437 \h ##196#73.9. Description.
# PAGEREF _Toc17451438 \h ##196#73.10. Examples. # PAGEREF
_Toc17451439 \h ##196#73.11. SourceCode. # PAGEREF _Toc17451440 \h ##197#73.12.
See Also. # PAGEREF _Toc17451441 \h ##197#74. ZBDC_SCREEN # PAGEREF
_Toc17451442 \h ##198#74.1. Location. # PAGEREF _Toc17451443 \h ##198#74.2.
Purpose. # PAGEREF _Toc17451444 \h ##198#74.3. Entry. # PAGEREF
_Toc17451445 \h ##198#74.3.1. Program name to run. # PAGEREF _Toc17451446 \h
##198#74.3.2. Screen number to use. # PAGEREF _Toc17451447 \h ##198#74.4.
Exit. # PAGEREF _Toc17451448 \h ##198#74.5. Called By. # PAGEREF
_Toc17451449 \h ##198#74.6. Calls. # PAGEREF _Toc17451450 \h ##198#74.7.
Tables. # PAGEREF
_Toc17451451 \h ##198#74.8. System Variables. # PAGEREF _Toc17451452 \h ##198#
74.9. Description. # PAGEREF _Toc17451453 \h ##198#74.10. Examples. #
PAGEREF _Toc17451454 \h ##198#74.11. SourceCode. # PAGEREF _Toc17451455 \h
##198#74.12. See Also. # PAGEREF _Toc17451456 \h ##199#75. ZBDC_SCROLL #
PAGEREF _Toc17451457 \h ##200#75.1. Location. # PAGEREF _Toc17451458 \h ##200#
75.2. Purpose. # PAGEREF _Toc17451459 \h ##200#75.3. Entry. # PAGEREF
_Toc17451460 \h ##200#75.3.1. Program name. # PAGEREF _Toc17451461 \h ##200#
75.3.2. Screen number. # PAGEREF _Toc17451462 \h ##200#75.3.3. BDC Code for
'One down'. # PAGEREF _Toc17451463 \h ##200#75.3.4. Maximum number of lines
displayed on the screen. # PAGEREF _Toc17451464 \h ##200#75.3.5. The position
of the required record in the displayed table. # PAGEREF _Toc17451465 \h ##200#
75.4. Exit. # PAGEREF _Toc17451466 \h ##200#75.4.1. The offset on the current
page of the required record. # PAGEREF _Toc17451467 \h ##200#75.5. Called By.
# PAGEREF _Toc17451468 \h ##200#75.6. Calls. # PAGEREF
_Toc17451469 \h ##200#75.7. Tables. # PAGEREF _Toc17451470 \h ##200#75.8.
System Variables. # PAGEREF _Toc17451471 \h ##200#75.9. Description.
# PAGEREF _Toc17451472 \h ##200#75.10. Examples. # PAGEREF
_Toc17451473 \h ##201#75.11. SourceCode. # PAGEREF _Toc17451474 \h ##201#75.12.
See Also. # PAGEREF _Toc17451475 \h ##202#76. ZBDC_SUBSCRIPT # PAGEREF
_Toc17451476 \h ##203#76.1. Location. # PAGEREF _Toc17451477 \h ##203#76.2.
Purpose. # PAGEREF _Toc17451478 \h ##203#76.3. Entry. # PAGEREF
_Toc17451479 \h ##203#76.3.1. Field name as a string # PAGEREF _Toc17451480 \h
##203#76.3.2. Subscript to use # PAGEREF _Toc17451481 \h ##203#76.3.3. Value
to use # PAGEREF _Toc17451482 \h ##203#76.4. Exit. # PAGEREF
_Toc17451483 \h ##203#76.4.1. BDC Table updated. # PAGEREF _Toc17451484 \h
##203#76.5. Called By. # PAGEREF _Toc17451485 \h ##203#76.6. Calls. #
PAGEREF _Toc17451486 \h ##203#76.7. Tables. # PAGEREF _Toc17451487 \h ##203#
76.8. System Variables. # PAGEREF _Toc17451488 \h ##203#76.9. Description.
# PAGEREF _Toc17451489 \h ##203#76.10. Examples. # PAGEREF
_Toc17451490 \h ##203#76.11. SourceCode. # PAGEREF _Toc17451491 \h ##203#76.12.
See Also. # PAGEREF _Toc17451492 \h ##204#77. ZDO_BDC # PAGEREF
_Toc17451493 \h ##205#77.1. Location. # PAGEREF _Toc17451494 \h ##205#77.2.
Purpose. # PAGEREF _Toc17451495 \h ##205#77.3. Entry. # PAGEREF
_Toc17451496 \h ##205#77.3.1. Transaction Code # PAGEREF _Toc17451497 \h ##205#
77.3.2. Mode # PAGEREF _Toc17451498 \h ##205#77.3.3. Update Type # PAGEREF
_Toc17451499 \h ##205#77.3.4. Table - p_messages - contains batch msgs # PAGEREF
_Toc17451500 \h ##205#77.4. Exit. # PAGEREF _Toc17451501 \h ##205#77.4.1. MsgId,
Error and message if failed. # PAGEREF _Toc17451502 \h ##205#77.5. Called By.
# PAGEREF _Toc17451503 \h ##205#77.6. Calls. # PAGEREF
_Toc17451504 \h ##205#77.7. Tables. # PAGEREF _Toc17451505 \h ##205#77.8.
System Variables. # PAGEREF _Toc17451506 \h ##205#77.9. Description.
# PAGEREF _Toc17451507 \h ##206#77.10. Examples. # PAGEREF
_Toc17451508 \h ##206#77.11. SourceCode. # PAGEREF _Toc17451509 \h ##206#77.12.
See Also. # PAGEREF _Toc17451510 \h ##208#78. Z_CALL_BDC # PAGEREF
_Toc17451511 \h ##209#78.1. Location. # PAGEREF _Toc17451512 \h ##209#78.2.
Purpose. # PAGEREF _Toc17451513 \h ##209#78.3. Entry. # PAGEREF
_Toc17451514 \h ##209#78.3.1. Message Table # PAGEREF _Toc17451515 \h ##209#
78.3.2. Transaction to use # PAGEREF _Toc17451516 \h ##209#78.3.3. Table
- p_messages - contains batch msgs # PAGEREF _Toc17451517 \h ##209#78.4. Exit.
# PAGEREF _Toc17451518 \h ##209#78.4.1. Table p_messages filled with BDC
Messages # PAGEREF _Toc17451519 \h ##209#78.5. Called By. # PAGEREF
_Toc17451520 \h ##209#78.6. Calls. # PAGEREF _Toc17451521 \h ##209#78.7.
Tables. # PAGEREF _Toc17451522 \h ##209#78.8. System Variables. #
PAGEREF _Toc17451523 \h ##209#78.9. Description. # PAGEREF _Toc17451524 \h
##209#78.10. Examples. # PAGEREF _Toc17451525 \h ##209#78.11. SourceCode.
# PAGEREF _Toc17451526 \h ##209#78.12. See Also. # PAGEREF
_Toc17451527 \h ##210##List Of Tables# TOC \c "Table" #Table 1 - List of Routines
# PAGEREF _Toc480086097 \h ##25#Table 2 -YDCSET Table Structure # PAGEREF
_Toc480086098 \h ##29#Table 3 - System Variables Affected By Drill Down Reports
# PAGEREF _Toc480086099 \h ##33#Table 4 - Custom Authorisation Objects #
PAGEREF _Toc480086100 \h ##37#Table 5 Common BDC OK Codes # PAGEREF
_Toc480086101 \h ##188##Changes Pending.
About this document.This document is in itself an aid to documentation, and can be
used to easily document routines written by yourself.Within this document are a
series of Macros which were used to extract and format the pages which detail the
routines shown in the following pages.These routines are callable as a routine
that will provide almost complete documentation on a specified routine.These
routines are not perfect, and in some cases contain bugs, however, they do 99%
of the work in providing procedure documentation.Procedure Format.These routines
rely on the SAP routines conforming to the following constraints:Each routine has a
header that is as follows:*EJECT
**********************************************************************
Procedure: ** Purpose: ** Entry: ** Exit:
** Called By: ** Calls:** Modification History:** Date
Reason Version Who*The macros search for
various keywords and extract the relevant text from the header. The sections can
be formatted as follows:Procedure.The procedure heading can only occupy one line,
and is used as a trigger for the start of all routines that require to search the
procedure. This should be the same as the name specified in the Forms Statement.
Purpose.The Purpose header can extend across multiple lines up to the first
'Entry' statement.. The text 'Purpose:' and all comment markers up to this line
are removed and the remaining texts concatenated into a single string. This
string is then output as a single paragraph under the 'Purpose' Sub heading.Entry.
There must be an 'Entry:' heading for each 'TABLE' or 'USING' parameter defined on
the form. These have the comment markers stripped and the word 'Entry:' removed
from them and are used as the Level 3 sub headings under the heading 'Entry'.Any
text below the line containing the word 'Entry:', up until the next 'Entry:', or
the first 'Exit:' line will be concatenated together, minus the comment markers
and extra spaces to form an explanation for the parameter that has just been
specified.Exit.There must be an 'Exit:' heading for each 'CHANGING' defined on the
form. These have the comment markers stripped and the word 'Exit:' removed from
them and are used as the Level 3 sub headings under the heading 'Exit'.Any text
below the line containing the word 'Exit:', up until the next 'Exit:', or the
first 'Called By:' line will be concatenated together, minus the comment markers
and extra spaces to form an explanation for the parameter that has just been
specified.Called By.The Called by line contains all the procedures that are
dependant on the current procedure being documentented. However... the macros DO
NOT take any entries in the 'Called By' lines as gospel, but scans the supplied
source file for references to the procedure and enters these references into the
documentation instead. The documentation also contains a 'model' procedure call
for the the form being called, however this 'model' call needs manual formating.
Calls.The Calls Line again is not used by the macros, but can be updated by the
results of the macros if you wish. The macros scan the source code and extract and
'PERFORM' calls between the Form Declaration and the next 'ENDFORM'.These are then
output under a Level 2 heading 'CALLS'. Other Entries.Other entries appear in the
documentation that are not required in the header. These are:TablesSystem
VariablesDescriptionExampleSource CodeSee AlsoTables:The macros will scan the
source code for the routine and parse any tables statements between the
FORM...ENDFORM statements into a comma seperated list as a Level 2 paragraph.System
Variables.The next heading in the document is 'System variables'. This contains a
list of all system variables, and a truncated description, or all system
variables referenced in the form.Description.This entry in the documentation should
describe the routine, how and why it works, any funnies or occasions when it will
not work. The level 2 header is entered, but no text. This is for you to do.
Examples.The example is taken from the file that you specify for example files. In
my own copy, I have the routine run Grep, searching all directories for
occurances below the main directory, and then read the file produced to retrieve
the file name. The routine then scans this file and extracts the source code 7
lines either side of the reference to the routine and inserts it into the document.
The number of lines that are extracted for the example can be modified by changing
the subscript in the line: Dim SourceBuffer(7) As StringIn subroutine
'Examples'.Source Code.The macro then extracts the source code from the source file
and inserts it into the document.See Also.A place where you can insert references
to other similarly minded forms.Running the macro.For each section in a procedure
document, there is a macro. The main entry point for these routines is a macro
called 'NewRoutine', which can be seen on the menu at the top on the menu bar.All
files accessed have to have been downloaded to a directory somewhere under the
'C_HEADDIR' directory specified in the macro codes definition module.Clicking this
button will request three items:The Routine to documentThe file containing the
routineThe file containing an example of that routine.Enter the routine name to
document. Clickng the cancel button, or leaving the input field blank will cause
the routine to exit.Enter the name of the file containing the routine. This does
not have to be the only routine in the file.Enter the name of the file containing
the example that you wish to use for the usage of the routine.Ta-dahhhh....
Using the Routines.The routines used have been split into functional modules as
they have grown quite monolithic since they were created. No doubt other splits
will occur as time goes on. There are four include routines. One is mandatory and
contains constant definitions used by both the other include routines.YREPINC
contains routines that apperation to reporting. They include such things as
formatting a report, report breaks, title printing and so forth. YBDCINC
contains routines that are aimed at BDC programming such as loading the report
table, debugging routines, and filling entire screens in one call. YGRAPH
contains macros aimed at making the writing of packages using SAP Graphics a little
more pain free. To make the routines available to your program, include the
lines:Include Yrbinc.Include YREPINC|YBDCINC|YGRAPH.At the top of your program
after the Report statement. All three includes can be included if required.The
table below shows the split of the various functions across the include files.
Include File#Routine Name#Function##YRBINC#Constants#Various constants defined
here. The ones with single underscores can be used in your own
programs.##YREPINC#Allhdrs#Prints all group headers for a report###Buildreport#Adds
columns to a report definition, locates column titles and format from data
dictionary.###CentreReport#Centres a report or leaves it left
justified###Checkbox#Prints a report element as a check box###Checkbreaks#Checks
column breaks and prints totals if required###Firstcol#Sets the first column
displayed###Formatreport#Takes a defined report and calculates the required
spacing.###Getmask#Gets a Unit or Currency mask###Giveline#Returns the Nth line of
a string of text to fit a column M characters wide.###Graphic#Inserts an icon or
symbol graphic on a report###Groupheader#Prints out group headers.###Icon#Inserts
an Icon on a report###Initbreak#Initialises Report breaks.###Printtitles#Prints the
column titles on a report###Printtotals#Prints break totals###Psub#Macro. Prints
select option sub titles###Repheader#Prints a Report Header###Runtotals#Prints the
run totals for a report###Savereport#Saves report format on report
stack###Setcolour#Sets the output colour###Sortrep#Sorts a report by a specified
column###Stripstring#Removes specified characters from a string###Subtitle.#Called
by PSUB to print subtitles containing selection criteria for a
report###Symbol#Inserts a symbol on a report###Tableline.#Draws a line across the
current report.###Underline#Draws a line of specified width from a specified
startpoint###Usereport#Uses a previously stacked report###Wline#Outputs a line to
the report###Writecol#Writes to a specific column on the
report###Writecentre#Prints the specified text centrally on a defined
report.###Writeline#Outputs a line of data onto the report###WriteSymbol#Writes a
symbol to the report###Writevalue#Writes a single value to a
report##YBDCINC#Get_Local_Host#Gets the name of the local SAP
host###Init_Global#Initialises Global variables###Is_Service_Active#Checks to see
if a named service is active###Newbdc#Initialises a BDC session###Read_YDCSET#Reads
BDC Defaults settings###Zbdc_Batch_On#Sets Batch create for BDC's
on###Zbdc_Close_Group#Closes an SM35 session###Zbdc_Dump_On#Sets BDC Dump table
on###Zbdc_Field#Inserts a BDC Field###ZBDC_Fillscreen#Completes a BDC screen from
screen name/number and structure###Zbdc_Insert#Inserts a BDC
session###Zbdc_Open_Group#Opens a new SM35 session###Zbdc_Screen#Inserts a new
screen into a BDC session###Zbdc_Scroll#Scrolls a table in place of
=POPO###Zdo_BDC#Runs a BDC Transaction###Z_Call_BDC#Runs a BDC transaction making
use of YDC Set.##YGRAPH#Curve_Category#Defines the typeof curve to be
displayed###Curve_Colour#The colour of the curve###Curve_Type#The type of curve
solid, dashed###Curve_Width#The width of the line used to make up the
curve###Legend_Text#Specifies the legend text###Next_Curve#Introduces the next
curve on the graph##Table # SEQ Table \* ARABIC #1# - List of RoutinesBelow is an
example of how the routines are used:*Eject
*************************************************************************
Procedure: Build_Revenue_Report** Purpose: Formats the standard
revenue report.** Entry:** Exit:** Called By:** Calls:**
Modification History:** Date Reason
Version Who*Form Build_Revenue_Report.* Zap ReportTable. Perform
BuildReport using 'TSPACE' '' 40 '' ''. Perform BuildReport using 'CATSDB-
WORKDATE' '' 0 'DD/MM/YY' ''. Perform BuildReport using 'CHOURS' Text-013 5 ''
''. Perform BuildReport using 'BUYC' Text-002 11 '' ''. Perform
BuildReport using 'BUYTOTAL' text-003 15 'CURRENCY'
'BWAERK'. Perform BuildReport using 'BWAERK' Text-012 0 '' ''. Perform
BuildReport using 'SELLC' Text-004 11 '' ''. Perform BuildReport using
'SELLTOTAL' text-005 15 'CURRENCY' 'WAERK'.
Perform BuildReport using 'NETWR' text-014 15
'CURRENCY' 'WAERK'. Perform BuildReport using 'WAERK' Text-012 0 '' ''.
Perform FormatReport. Read Table t_revenue Index 1. Perform InitBreak
using 'T_REVENUE-CENDNG' Text-015 c_no c_yes. Perform InitBreak using
'T_REVENUE-VB' Text-006 c_no c_yes. Perform InitBreak using 'T_REVENUE-
ENAME' Text-007 c_no c_yes. Perform InitBreak using 'T_REVENUE-ABTEI'
Text-008 c_no c_yes. Perform InitBreak using 'T_REVENUE-KTEXT' Text-009
c_no c_yes. Perform SaveReport using c_main_report.** And the billing
report.* Zap ReportTable. Perform BuildReport using 'VBELN0' Text-019 10 ''
''. Perform BuildReport using 'ERDAT0' Text-020 8 'DD/MM/YY' ''. Perform
BuildReport using 'CREDT0' Text-021 11 '' ''. Perform BuildReport using
'DEBIT0' Text-022 11 '' ''. Perform BuildReport using 'VBELN1' Text-019 10 ''
''. Perform BuildReport using 'ERDAT1' Text-020 8 'DD/MM/YY' ''. Perform
BuildReport using 'CREDT1' Text-021 11 '' ''. Perform BuildReport using
'DEBIT1' Text-022 11 '' ''. Perform BuildReport using 'VBELN2' Text-019 10 ''
''. Perform BuildReport using 'ERDAT2' Text-020 8 'DD/MM/YY' ''. Perform
BuildReport using 'CREDT2' Text-021 11 '' ''. Perform BuildReport using
'DEBIT2' Text-022 11 '' ''. Perform FormatReport. Perform SaveReport using
c_billing_rep.EndForm.*Eject
*************************************************************************
Procedure: Print_Revenue_Report** Purpose: Prints the standard
revenue report.** Entry:** Exit:** Called By:** Calls:**
Modification History:** Date Reason
Version Who*Form Print_Revenue_Report.* Data: w_lines type i,
w_prted type i, w_vbeln like vbak-vbeln.* Read Table t_revenue index
1.** Initial group headers.* Set pf-status '001'. Perform UseReport
using c_main_report. Perform GroupHeader using Text-009 T_REVENUE-KTEXT.
Perform GroupHeader using Text-008 T_REVENUE-ABTEI. Perform GroupHeader using
Text-007 T_REVENUE-ENAME. Perform GroupHeader using Text-006 T_REVENUE-VB.
Perform GroupHeader using Text-015 T_REVENUE-CENDNG. Move t_revenue-vbeln to
w_vbeln.* Loop at t_revenue.** Change in Vbeln ?? Check if there are
any unprinted billing* docs.* If w_vbeln <> t_revenue-vbeln.
Perform billing_rep using 0 changing w_prted. Move t_revenue-vbeln to
w_vbeln. EndIf. Perform CheckBreaks using t_revenue.
Perform WriteLine using t_revenue col_normal.** Any billing information ?
* If t_revenue-netwr <> 0. Perform Billing_Rep using
t_revenue-workdate changing w_prted. EndIf.
EndLoop. Perform RunTotals.** Any unprinted documents ?* Describe table
t_bill_rep lines w_lines. If w_prted <> w_lines. Perform UseReport using
c_billing_rep. Move Text-023 to sy-title. New-Page. Loop at
t_bill_rep Where prted = False. Perform WriteLine
using t_bill_rep col_background. Endloop. Perform TableLine.
EndIf. Perform WriteCentre using Text-011.EndForm.
DependanciesShould it be required to track all uses of routines defined in
ZBOSSINC, open a program containing references to the routines and place the
cursor on the Perform calling the routine.Click the Where Used #EMBED PBrush###
button. This will locate all occurances of that routine in any ABAP program and
display it.
BDC Operations.The BDC routines have the ability to modify their behaviour without
changing any code. This enables such operations as debugging, or e-mail
notification to be carried out. Note that at the present time some options are not
operation.In order to support this, a table called YDCSET has to be built and
populated. The structure of this table is as follows:Field Name#Key#Data
Element#Type#Length##MANDT#X#MANDT#CHAR#3##FUNCNAME#X#RS38L_FNAM#CHAR#30##BDCMODE##
BDCMODE#CHAR#1##BDCUPMODE##BDCUPMODE#CHAR#1##CRBATCH###CHAR#1##INHIBITCHK###CHAR#1#
#DUMPBDC###CHAR#1##DUMPMSG###CHAR#1##GENMAIL###CHAR#64##MAILPROG##PNAME#CHAR#8##Tab
le # SEQ Table \* ARABIC #2# -YDCSET Table StructureMANDT.Client, the standard
client field for SAPFUNCNAMEThis is the function name of the RFC that this record
applies to. BDCMODE. The BDC Mode is the standard screen mode that you wish the
BDC to run in. This can be:'A'. Display all screens and wait for <enter> between
each screen'E'. Display only erroneous screens.'N'. Display no screens.BDCUPMODE.
This is the standard BDC database update mode for the function. This can be
either:'A'. Asynchronous update - ie update in the back ground'S'. Synchronous
update. Wait for the database update to occur before returning from the BDC.
CRBATCH.The CRBATCH field is a single character field, and can have two values,
'X' or ' '. If the field contains an X, the BDC routines will create an SM35
batch session should the BDC fail.INHIBITCHK.In some cases, it can be helpful to
inhibit validation checks within a BDC, for example where the validation becomes
too long or is not required in certain circumstances. This field is again a single
character field with a value of 'X' or ''. If the field has a value of 'X', then
data validation can be controlled using the following type of code: If
W__Ydcset-Inhibitchk = False. Select Lgnum From T320 Into W_Lgnm1
Up To 1 Rows Where Werks = W_Werks And
Lgnum = W_Lgnum. Endselect. If Sy-Subrc <> 0. Move
C_Invalid_Warehouse To Pc_Status. Endif. Endif.DUMPBDC.During the
development of BDC sessions, it can be useful to see what is actually in the BDC
table itself prior to the call. Again, a single character field, this field
determines whether a rudimentary report detailing the contents of the BDC table
should be printed out. 'X' causes the system to print the table, '' not.DUMPMSG.
In the same manner that DUMPBDC causes the BDC table to be dumped to the nearest
printer, this flag causes the message table to be dumped to the printer should the
BDC fail. 'X' causes the system to dump the table, '' not.GENMAIL.This field
contains a procedure name. This procedure name coupled with the MailProg field is
used to call a specified procedure, passing as parameters the transaction code,
the error message and the user name. The Procedure call is error trapped so that
if the procedure cannot be found, the program still continues.MAILPROG.This field
contains the name of the file which holds the procedure used to send mail.
Macros and Forms.What is the difference between a macro and a Perform ?In technical
terms, macros are expanded in-line, whereas a Perform is out of line.....#EMBED
PBrush###Macros have to be defined in the same way that Performs have to be with
Define and End-Of-Definition. They are generally used for short pieces of
code that cannot be called using a perform.An Example.The subroutine Subtitles
prints the report criteria based upon the values passed to in by the caller.The
caller has to loop around the select-options table and pass the relevant data.
This is due to the fact that although Select-Options tables have the same field
names, the field definitions differ depending on the table you have set the select
options up for. As you have to specify the structure in the Perform definition,
this makes the writing of a generic routine using Performs impossible: Form
Subtitles Tables p_selects structure s_vkorg using p_title.The actual definition
is:FORM SUBTITLES using p_text p_sign p_option p_low p_high.This requires the
calling program to loop around the relevant select options table: Loop at
s_vkorg. Perform Subtitles using Title Text
s_vkorg-sign s_vkorg-option s_vkorg-low
s_vkorg-high. EndLoop.Obviously when this occurs once, the few extra lines
of code are no problem, however, eight or nine selection options can become a
bore. By using a macro, this problem can be alleviated by expanding the code in-
line so that all variables etc are available as normal.Define PSub.
Loop at &1.
Perform Subtitles using &2
&1-Sign &1-option &1-low
&1-high. EndLoop.
End-Of-Definition.The macro expands any arguments by replacing the &n
parameter with the relevant parameter passed by the calling program.Therefore, the
lines of code above become: Psub s_vkorg Text-021.In a real application, this
would look like:Top-Of-Page.
* * If Only
one company, use that otherwise use Boss Group Holding. *
Describe table s_vkorg lines w_lines. if
w_lines > 1. Perform
Repheader using 'BG00' w_title. Else.
if s_vkorg-high = ''.
Perform RepHeader using s_vkorg-low w_title. Else.
Perform Repheader using 'BG00' w_title.
endif. endif.
* * Print
out the selection criteria *
Psub s_vkorg text-023. Psub
s_vkgrp text-024. Psub s_vkbur
text-025. Psub s_vtweg text-026.
Psub s_spart text-027. *
* Material Selections *
Perform Matsub. PSub
s_audat text-029. Perform
PrintTitles.See Psub (# REF _Ref470488799 \r \p \h ##23 below#) for more
information.
Drill Down Reports.SAP has the ability to provide a Drill Down capability where
clicking a column on the report provides further information on the item clicked.
This is catered for by these routines. Clicking an item on the report will call
(if present) the At Line-Selection.routine of the calling program.The routines
return all variables used to construct the report line to the state when the
report line was produced. In addition, the following system variables are set:
Variable Name#Contents##Runtime###SY-TITLE#The title of the report##List
Generation###SY-COLNO#The current column in the list.##SY-LINCT#Page length in
lines##SY-LINNO#Current line in list##SY-LINSZ#Page width in columns##SY-
PAGNO#Current page in list##SY-SCOLS#Number of columns in window##SY-SROWS#Number
of lines in window##Interactive Reporting###SY-CPAGE#Current Page Number##SY-
CUCOL#Cursor column position on screen.##SY-CUROW#Cursor Row position on
screen.##SY-LILLI#Number of selected list line##SY-LISEL#Contents of the selected
line as a string##SY-LISTI#Index of selected list (0 = base, 1=detail 1 etc)##SY-
LSIND#Index of displayed list (0=base, 1=detail 1 etc)##SY-LSTAT#Status
information for each list level##SY-MSGLI#Contents of the message line##SY-
STACO#Number of first displayed column##SY-STARO#Number of first displayed line on
this page##SY-UCOMM#Command field function entry.##Table # SEQ Table \* ARABIC #3#
- System Variables Affected By Drill Down Reports
Arrays.Arrays are available in ABAP disguised as internal tables. However, the
problem occurs when you try to define an Array within an existing table.This is
handy when you are dealing series of data that are identical but perhaps are part
of a time series for instance. By using an array the amount of program code can be
cut down quite considerably.As a simple example, the psuedo code below shows how
the invoice totals for each month can be totalled. Assume that a record has a
customer number, an invoice total and a month number.For Each Record In The File
Do InvoiceTotal(MonthNumber):=InvoiceTotal(MonthNumber)+This Invoice EndDo
Without subscripts, the code would look like this:For Each Record In The File
do case MonthNumber When 1 InvoiceTotal1 :=
InvoiceTotal1 + This Invoice When 2 InvoiceTotal2 :=
InvoiceTotal2 + This Invoice When 3 InvoiceTotal3 :=
InvoiceTotal3 + This Invoice When .... When 12
InvoiceTotal12 := InvoiceTotal12 + This Invoice end case enddoAs you can
see, the amount of code increases dramatically without arrays. Arrays (or tables)
can be referenced like so: Read Table t_mytab index w_index.This will place the
w_indexth record from t_mytab in the tables header line so that the information
can be accessed directly.Tables Within Tables.An array can be implemented in ABAP
within a table by using a second table. The methods used are obscure and thanks
goes to Harald Mauchert [hmauchert@mbase.de] for this information.Defining An
Array.The procedure for defining an array (Ill use the word array to denote a
table within a table) is simple (and logical) you just define another internal
table...Data: Begin Of MyTab Occurs 0, kunnr like vbak-kunnr,
Data Dict definition count type i, Normal definition...
totals type i occurs 0, Internal table. End Of MyTab. Accessing An
Array.Accessing these arrays is not as simple as above. Basically, the data in
the array is transferred to an internal table, any operations carried out on the
internal table and then the whole table is moved back into the array:Data: i_totals
type i occurs 0 with header line.Loop at MyTab.** Get at the data in the array*
Refresh i_totals. Move MyTab-Totals[] to i_totals[].* Write: / MyTab-kunnr,
MyTab-Count, at 50 . Loop At i_totals Write i_totals.
Write /50 . EndLoop.EndLoop.To Get data out of an array to process:
Move TableName-ArrayName[] to InternalTable[].To store data back to the
array:Move InternalTable[] to TableName-ArrayName[].
Select-Options.Select Options provide a very flexible method of defining the report
search criteria. Select Options are available on any field where this icon is
displayed: #EMBED PBrush###The user can then select a wide range of criteria. By
using these criteria, reports can be produced that can contain contiguous ranges,
discrete records, exclusions and even pattern matched results.Selection criteria
are stored in a table created when the program runs. There can be many seperate
selection criteria within one selection option table.Due to this, reports should
have the selection criteria printed at the top of each page so that the user can
see what selection criteria were used to produce the report.In order to do this, a
routine called Subtitle should be used. This will print out in plain language
what the report criteria for a specific record in the selection criteria table has.
It is not possible to actually pass the table to the routine as the structure has
to be declared as a separate statement. Each selection criteria table, although
having the same field names has a different definition.For more information on
Selection criteria see below.
Authorisation Checks.SAP has the ability to provide authorisation checks for users
to enable them to access differing parts of programs or reports based upon their
access code.To carry out an authorisation check, use the following code:Authority-
Check Object 'AuthorisationObject' ID
Authorisation-id' Field 'Authorisation Field'.
if sy-subrc = 0.** User has authorised access to this object* Else.**
User is not authorised for this object.*
endif.If the user has authorisation for this object, SY-SUBRC will be 0. Any
other value means that the user is not authorised. (Some values mean that the
object is not present, but if you are protecting sensitive data then treating that
as unauthorised as well is good practice).There are a huge number of predefined
Authorisation Objects, so before creating one of your own, check in Tools-
>Administration->Maintain Users->Authorization to see if an appropriate object
exists. If one does not exist there, create your authorisation object and complete
the table below which details in house authorisations:Authorisation Check#Object
Class#Object#Technical Name#Authorisation ID#Field#JSB Aware##Is the user a
dealer ?#Sales & Distribution#Dealer
Authorisation#ZDEALER#USR10_1#V:ZDEAL+DI#Y##Table # SEQ Table \* ARABIC #4# -
Custom Authorisation Objects
Sub-Totals.The majority of reports require totals at certain places. ABAP provides
the AT NEW commands which are difficult, if not exasperatingly impossible to
use. YREPINC implements a set of routines that will provide sub-totals for
columnar style reports.After formatting the report using BuildReport and
FormatReport, a list of break points is setup using InitBreak. Break points are
listed in reverse order - ie the lowest break point first working up to a report
total. As the report is printed, calling CheckBreaks before the printing of each
line causes the break points to be checked and updated, with sub-totals and new
group headings being printed as required.Once the report has been printed, calling
RunTotals prints the final set of totals for the report.All numeric columns on the
report will be sub-totalled. The code below shows how this should be implemented:
Perform BuildReport using 'TSPACE' '' 40 '' ''. Perform BuildReport using
'CATSDB-WORKDATE' '' 0 'DD/MM/YY' ''. Perform BuildReport using 'CHOURS' Text-
013 5 '' ''. Perform BuildReport using 'BUYC' Text-002 11 '' ''. Perform
BuildReport using 'BUYTOTAL' text-003 15 'CURRENCY'
'BWAERK'. Perform BuildReport using 'BWAERK' Text-012 0 '' ''. Perform
BuildReport using 'SELLC' Text-004 11 '' ''. Perform BuildReport using
'SELLTOTAL' text-005 15 'CURRENCY' 'WAERK'.
Perform BuildReport using 'NETWR' text-014 15
'CURRENCY' 'WAERK'. Perform BuildReport using 'WAERK' Text-012 0 '' ''.
Perform FormatReport. Read Table t_revenue Index 1. Perform InitBreak
using 'T_REVENUE-CENDNG' Text-015 c_no c_yes. Perform InitBreak using
'T_REVENUE-VB' Text-006 c_no c_yes. Perform InitBreak using 'T_REVENUE-
ENAME' Text-007 c_no c_yes. Perform InitBreak using 'T_REVENUE-ABTEI'
Text-008 c_no c_yes. Perform InitBreak using 'T_REVENUE-KTEXT' Text-009
c_no c_yes.
Real-Time Displays.There may be occasions where a report is showing real time data
(for example the status of a queue). If the operator used the data displayed on the
screen, invalid decisions may be made due to the data not being up to date.This
can be alleviated by having a Refresh button on the button bar which the operator
must remember to press if they require the latest information.This however places
the onus for getting the correct information on the operator.There is however, a
way to provide an Auto-Refresh capability within a report, which can be expanded
to include other functions.Primarily, a timer is set running as a totally separate
task, even in a different processor. SAP provides the ability to notify the
calling program when this Remote Function Call (RFC) completes.Function
Z_WAIT_X_SECS has been written as an RFC capable function which waits a defined
number of seconds before it exits. As this is a remote function call, the
original program continues rather than waiting for the RFC to complete.The call to
Z_WAIT_X_SECS looks like this:Call Function 'Z_WAIT_X_SECS'
Starting New Task 'IF' Performing
Start_Refresh On End Of Task Exporting
WAIT_TIME = w_pollrate Exceptions
COMMUNICATION_FAILURE = 1 Message w_RFCText
SYSTEM_FAILURE = 2 Message w_RFCText OTHERS
= 3.This introduces some new parameters to the Call Function statement.Starting
New Task:This addition starts a new task with the task id specified in quotes.
This is a separate remote process to run this function.Performing . On End Of Task
This addition signifies that a call back is required when the task completes.
The routine specified (in this case start_refresh) is called when this routine
exits.MessageAny explanatory text will be placed in this variable if there is an
exception.Once the time limit has been reached, the RFC exits. The calling
program is then notified of this and takes appropriate action. Pushing Keys in
ABAP.Having set up the timer, using the statement : Set User-Command RFSH.Will
cause the button RFSH to be pushed. By including this statement in the On End
Of Task call causes the program to automatically carry out whatever action is
specified by the function code.Thanks to Ted Hoffman [hoffmantt@hotmail.com] for
this information
Information Sources.http://www.sapfans.com/sapfans/ SAP User group
with forums on all areas of SAPhttp://src.thehub.com.au/ SAP Resource
Centre.http://207.105.30.51/simpweb/index.html SAP Simplification CentreHarald
Mauchert # HYPERLINK mailto:hmauchert@mbase.de ##hmauchert@mbase.de#Section 1.1
Information on Arrays within ABAPTed Hoffman # HYPERLINK
mailto:hoffmantt@hotmail.com ##hoffmantt@hotmail.com# Section 5 -
Z_WAIT_X_SECSJohn Campbell # HYPERLINK mailto:John.campbell@54marine-
avenue.freeserve.co.uk ##johnallancampbell@hotmail.com#The CHR/Ascii convertion
routine in Initialise_Function.
AddRange, AddDiscrete, AddConsec - MacrosLocation.YREPINC.Purpose.Adds entries to
a Range tableEntry. Item To Add.This is the range value that you wish to add to the
range table. Applicable to AddRange, AddDiscrete and AddConsec. Range Table to
add to.This is the name of the range table that you want the entry added to.
Applicable to AddRange, AddDiscrete and AddConsec. Item High, Item Low.This is
the range that you wish to use. Applicable to AddConsec only.Exit.Called By.
AddDiscrete 'ABC' r_mara.AddConsec 'A' 'Z' r_range. Calls.Tables.System
Variables.Description.These three macros add records to a select option table. The
Macro AddRange is obsolete, replaced by AddDiscrete, however, it has been left in
the code for backwards compatability.AddDiscrete adds single entries to a range
table.AddConsec adds a consecutive Range to a range table.Examples.Move i_matnr to
w_matnr.Move c_ok to w_status.Move '' to e_text.Move '' to e_xchpf.Zap
t_ekpo.** Document types to include in the search:*Addrange: 'NB' r_fbsart,
'UB' r_fbsart, 'ZUB' r_fbsart, 'LP' r_lbsart.** Check Valid
material, and that the material has been provided.*Source.*Eject
*************************************************************************
macro: AddRange, AddDiscrete, AddConsec.** Purpose: Adds an
'EQ' entry to a range table* AddDiscrete - copied version of
addrange for* backwards compatability.*
AddConsec - adds a 'BT' entry to a range table** Entry: Value to add,
* Range table to use** Exit:*** Called By:
AddRange r_value r_table.** Calls:** Modification History:** Date
Reason Version Who*Define AddRange.
Move 'I' to &2-sign. Move 'EQ' to &2-option. Move &1 to &2-low.
Append &2.End-Of-Definition.*Define AddDiscrete. Move 'I' to &2-sign.
Move 'EQ' to &2-option. Move &1 to &2-low. Append &2.End-Of-
Definition.*Define AddConsec. Move 'I' to &3-sign. Move 'BT' to &3-
option. Move &1 to &3-low. Move &2 to &3-high. Append &3.End-
Of-Definition. See Also.
Begin_Of_Block, End_of_Block - MacrosLocation.YREPINC.PurposeSimplifies the typing
when constructing Selection screen blocks. Note these macros are used by SAP-AG
(Well.that's where I got them from.)EntryBegin_Of_Block - Block name and Frame
title.These are the standard parameters that you would use when you write the
'Selection Screen Begin Of Block' statement in full.End_Of_Block - Block name
These are the standard parameters that you would use when you write the 'Selection
Screen End Of Block' statement in full.ExitCalled ByBegin_Of_Block BlockName Text-
012CallsNoneTables.None System Variables.NoneDescription.These two macros simplify
the coding required to set up block structures within a selection screen.Examples.
Begin_of_block PARAMS Text-001. Selection-
Screen Comment 1(17) Text-016. Select-options: s_kdgrp
for vbkd-kdgrp, s_kostl for pa0001-kostl
no-extension, s_pernr for pa0001-pernr no-extension,
s_vbeln for vbak-vbeln no-extension, s_wdate for
catsdb-workdate obligatory. BlankLine.
Selection-Screen Comment 1(17) Text-017. CheckLeft 1 19
Text-018 p_summry. End_Of_Block PARAMS.Source.*Eject
*************************************************************************
macro: Various Macros for Selection Screens.** Macro
Arguments Function* Begin_Of_Block, Block Name
Simplifies creation of* Block Title Screen
blocks** BlankLine None Puts a line on a screen**
End_Of_Block Block Name Simplifies creation of*
Screen blocks** RadioLeft Position Places a radio
button* Title Length on a selection screen*
Title with comment to left.* Parameter*
Group.** RadioRight Position Places a radio button*
Title Length on a selection screen* Title
with comment to right* Parameter*
Group.** CheckLeft Position Places a check box*
Title Length on a selection screen* Title
with comment to left.* Parameter** CheckRight
Position Places a check box* Title Length
on a selection screen* Title with comment
to right* ParameterDefine Begin_Of_Block. Selection-
Screen Begin Of Block &1 With Frame Title &2.End-Of-Definition.*Define BlankLine.
Selection-Screen Uline. Selection-Screen Skip 1.End-Of-Definition.*Define
End_Of_Block. Selection-Screen End Of Block &1.End-Of-Definition.*Define
RadioLeft. Selection-Screen Begin Of Line. Selection-Screen Position
&1. Selection-Screen Comment (&2) &3 Parameter &4 as RadioButton
Group &5. Selection-Screen End Of Line.End-Of-Definition.*Define RadioRight.
Selection-Screen Begin Of Line. Selection-Screen Position &1.
Parameter &4 RadioButton Group &5. Selection-Screen Comment (&2) &3.
Selection-Screen End Of Line.End-Of-Definition.*Define CheckLeft. Selection-
Screen Begin Of Line. Selection-Screen Position &1. Selection-
Screen Comment (&2) &3. Parameter &4 as CheckBox. Selection-Screen
End Of Line.End-Of-Definition.*Define CheckRight. Selection-Screen Begin Of
Line. Selection-Screen Position &1. Parameter &4 as checkbox.
Selection-Screen Comment (&2) &3. Selection-Screen End Of Line.End-Of-
Definition.See Also.BlankLineCheckLeftCheckRightRadioLeftRadioRight
BLANKLINE - MacroLocation.YREPINC.Purpose.Inserts a line across a selection screen.
Entry.Exit.Called By.BlankLineCalls.Tables.System Variables.Description.This macro
simplifies report screen generation by removing cimbersome commands. Itis used to
place a line on the screen.Examples.SourceCode.See Begin_Of_Block. See Also.
Begin_Of_BlockEnd_of_BlockCheckLeftCheckRightRadioLeftRadioRight
CHECKLEFT, CHECKRIGHT - MacroLocation.YREPINC.Purpose.This macro inserts a check
box into a selection screen with the text to the left or right of the check box.
Entry.Position.The position in characters to the start of the comment or check box
from the left edge of the screen or block.Title Length.The length of the title in
charactersTitleThe Title or comment to be applied to the check boxParameterThe
parameter name for the check box.Exit.Called By.CheckLeft 40 15 Text-015 p_check.
Calls.Tables.System Variables.Description.This macro handles the required screen
statements to place a check box on a selection screen with the text to the left of
the check box.Examples.Begin_of_block PARAMS Text-001.
Selection-Screen Comment 1(17) Text-016. Select-
options: s_kdgrp for vbkd-kdgrp, s_kostl
for pa0001-kostl no-extension, s_pernr for pa0001-pernr
no-extension, s_vbeln for vbak-vbeln no-extension,
s_wdate for catsdb-workdate obligatory. BlankLine.
Selection-Screen Comment 1(17) Text-017. CheckLeft 1 19
Text-018 p_summry. End_Of_Block PARAMS.SourceCode.See
Begin_Of_BlockSee Also.Begin_Of_BlockEnd_of_BlockBlankLineRadioLeftRadioRight
RADIOLEFT, RADIORIGHT - MacroLocation.YREPINC.Purpose.This macro inserts a radio
button into a selection screen with the text to the left or right of the check box.
Entry.Position.The position in characters to the start of the comment or radio
button from the left edge of the screen or block.Title Length.The length of the
title in charactersTitleThe Title or comment to be applied to the radio button
ParameterThe parameter name for the radio button Group.The group that the radio
button belongs to.Exit.Called By.RadioLeft 40 15 Text-015 p_check Group_One.Calls.
Tables.System Variables.Description.This macro handles the required screen
statements to place a radio button on a selection screen with the text to the left
of the check box.Examples.Begin_of_block PARAMS Text-001.
Selection-Screen Comment 1(17) Text-016. Select-
options: s_kdgrp for vbkd-kdgrp, s_kostl
for pa0001-kostl no-extension, s_pernr for pa0001-pernr
no-extension, s_vbeln for vbak-vbeln no-extension,
s_wdate for catsdb-workdate obligatory. BlankLine.
Selection-Screen Comment 1(17) Text-017. RadioLeft 1 19
Text-018 p_summry group_1. RadioLeft 1 19 text-019 p_detail group_1.
End_Of_Block PARAMS.SourceCode.See Begin_Of_BlockSee Also.Begin_Of_Block
End_of_BlockBlankLineCheckLeftCheckRight
COPYBOOK - MacroLocation.YRBINC.Purpose.This macro copys the structure of an SAP
table into an internal table of the same name prefixed by tb_.Entry. Table name to
use.This is the table name that should be copied from the data dictionaryExit.
Called By.CopyBook Lqua.Calls.Tables.System Variables.Description.This macro takes
the repetitiveness out of creating an internal table for a dictionary structure.
Examples.Form Unload_Docs Using Pu_Funcname Pu_Outdir Pu_Program. *
CopyBook: dokhl, doktl.
SourceCode.*eject
*************************************************************************
macro: CopyBook** Purpose: Copies the structure of a specified
table into* an internal table of the same name prefixed with*
t_** Entry: Table name to copy** Exit: Declaration for
table t_nnnnnn** Called By:** Calls:** Modification History:**
Date Reason Version Who*Define
CopyBook. Copy_Structure &1 &1.End-Of-Definition.See Also.Copy_Structure
COPY_STRUCTURE - MacroLocation.YRBINC.Purpose.Copies a data dictionary structure
into a specified internal tableEntry.Structure Name to extract from the data
dictionary.Internal table name to copy strcuture to.Exit.Called By.Copy_Structure
Lqua Lqua_Copy.Calls.Tables.System Variables.Description.Examples.SourceCode.*eject
*************************************************************************
macro: Copy_Structure** Purpose: Copies the structure of a
specified table into* an internal table of a specified name
prefixed* with a t_** Entry: Table name to copy*
Internal declaration name minus t_ prefix** Exit: Declaration for
table t_nnnnnn** Called By:** Calls:** Modification History:**
Date Reason Version Who*Define
Copy_Structure. Data Begin of t_&1 occurs 0. Include
Structure &2. Data End Of t_&1.End-Of-Definition.See Also.CopyBook.
END_OF_REPORT - MacroLocation.YREPINC.Purpose. Performs End of Report Processing.
Entry.Select option table to useThis parameter is the select option table the code
is to process. These are the same arguments that are used in PSUB.Title for this
selection block.The title used for the selection blockExit.Report Footer printed
Called By.End_Of_Report s_selopt t_title.Calls.RUNTOTALSTABLELINESUBTITLES
WRITECENTRETables.System Variables.SY-SUBRCDescription.This macro performs all end
of report processing, including the printing of select option values that have
more than 5 entries. This prevents a recursive call to the page heading routines
due to the subtitles filling complete pages.Examples.* Read Table t_sflight index
1. Perform InitBreak using 'T_SFLIGHT-CARRID' Text-002 c_no c_yes. Loop at
t_sflight. Perform CheckBreaks using t_sflight. Perform WriteLine
using t_sflight col_normal. EndLoop. End_Of_Report: s_carrid text-002.
SourceCode.*EJECTDefine End_Of_Report.** If there are any totals to print then
reportbrreaks record count* will be > 1......* Read Table Reportbreaks
index 2. If sy-subrc = 0. Perform RunTotals. Else.
Perform TableLine. EndIf. Perform WriteCentre using 'End Of Report'.**
Any select options ?* Describe table &1 lines w__sublines. If
w__sublines > 4. Skip 1. If w__eor_done = False.
Write :/ 'The following select options were also used',
'during the selection process:'. Move True to w__eor_done.
Else. Perform TableLine. Skip 1. EndIf.
Loop at &1. Perform Subtitles using &2
&1-Sign &1-option &1-low &1-high
true. EndLoop. EndIf.End-Of-Definition.See Also.Psub
Format_Selects - MacroLocation.YREPINC.Purpose.Formats a select table using
'FormatKey'.Entry.Select Option Tables to use.Exit.All select options for that
specified table formattedCalled By.Format_Selects select-optionstable.Calls.
FormatKeyTables.System Variables.Description.Select Options tables although they
have the same field names, have a structure dependant on the table specified in
the select options statement and therefore cannot be passed to a generic subroutine
as the structure of the passed table has to be specified.Format_Selects provides
the loop to call FormatKey so that the programmer does not have to be concerned
with this.Examples.SourceCode.*Eject
*************************************************************************
macro: Format_Selects** Purpose: Formats Select options using
fornmat key** Entry: Select option to format** Exit:
Select options formatted as per format key** Called By: Format_Selects
s_options** Calls:** Modification History:** Date Reason
Version Who*Define Format_Selects. Loop at &1. Perform formatkey using
&1-low changing &1-low. Perform formatkey using &1-high changing &1-high.
Modify &1. EndLoop.End-Of-Definition.See Also.Psub.FormatKey.SubTitles.
INIT_FUNC - MacroLocation.YBDCINC.Purpose.Initialises a function's parameters when
called via RFC from a different language other than SAP.Entry.The Function name to
be initialised in QuotesExit.Entry parameters to the function that are optional,
have a proposed value and are passed in empty are set to the proposed value.
Entry parameters that are strings are changed to upper case. Exit parameters are
cleared to their initial state. Global parameters are initialised.Called By.
Init_Func 'Y_MOVE_FIBER_TO_BIN_RFC'.Calls.Functions: Function_Get.Forms:
Init_GlobalRead_YDCSetTables.System Variables.SY-UNAME CHAR C 12
Session: SAP user from SADescription.Functions can be called with a variety of
parameters. These parameters can be optional, they can also have a proposal or
default associated with them, so that if they are not provided by the calling
routine, then SAP provides them with the value defined in the proposal.However,
when functions are called as RFC's, from another language, more often than not,
the languages do not support named parameters, rather they support positional
parameters in which the meaning of the parameter is defined by it's position in the
argument list rather than the name.As all the parameters must be specified in the
call to the RFC, SAP does not carry out the default processing correctly.This
macro will carry out that default processing and also, initailise any exported
parameters with INITIAL.Many thanks to John Campbell, (John.campbell@54marine-
avenue.freeserve.co.uk) for the Ascii/Char translation.Examples.FUNCTION
Y_CHECK_PO_AND_RETURN_SPLR_RFC.
*"----------------------------------------------------------------------*"*"Local
interface:*" IMPORTING*" VALUE(I_EBELN) LIKE YFIBER-EBELN*"
EXPORTING*" VALUE(E_LIFNR) LIKE YFIBER-LIFNR*" EXCEPTIONS*"
X_NO_PO_NUMBER*" X_PO_NOT_FOUND
*"----------------------------------------------------------------------**Data:
w_status type status_code, " RFC Status w_ebeln like
i_ebeln, " P/O Number w_lifnr like e_lifnr,
" Supplier code w_text type status_text.*Init_func
'Y_CHECK_PO_AND_RETURN_SPLR_RFC'.*Move c_ok to w_status.Move i_ebeln to
w_ebeln.Move '' to w_lifnr.*SourceCode.*Eject
*************************************************************************
macro: Init_Func** Purpose: Initialises a function where it is
called by* an RFC that uses positional parameters.**
ABAP uses named parameters when communicating* with a
function. If any of these parameters are* specified as
optional they do not need to be* passed. If these parameters
also have a* Proposal, then the value of the parameter that*
has not been passed is set to the value of the* proposal.**
However, when calling RFC's, many languages* do not have
named parameters. As such these* languages which use
positional parameters cannot* exclude any parameters at all.**
This then causes SAP to think that the parameter* has been
passed (which it has), and that it is* blank (which it is),
and not substitute the* proposal.** This
macro will collect the various optional* parameters and if the
parameter passed is initial* will set it to the default.**
Additionally all export variables are initialised** Entry: 'Function
Name'** Exit:** Called By: Init_Func 'FUNCTION_NAME'** Calls:
** Modification History:** Date Reason
Version Who*Define Init_Func.* Constants: c_param_import like
catfu-paramtype value '1', "Import parameter flag c_param_export
like catfu-paramtype value '2', "Export parameter flag.*
c_apostrophe type x value 39. " String delimiter* Field-Symbols: <f_param>.*
Data: Begin of t__prmtab occurs 0. Include Structure CatFu. Data:
End Of t__prmtab,* w__impdefault like catfu-impdefault, w__name
like catfu-name, w__dump(30) type c, w__apost like
c_apostrophe, w__fname like tfdir-funcname.* Perform Init_Global.
Move &1 to w__fname. Translate w__fname to upper case. Perform Read_YDCSET
using w__fname sy-uname changing w__ydcset. Zap t_bdcmsg.** Get the function
details and loop through the parameter list. If* the variable is an export
variable then initialise it. If it is an* import variable that is optional with a
proposal, set the variable* to the value of the proposal if the value passed is
blank.* Call Function 'FUNCTION_GET' Exporting Funcname
= W__Fname Tables Prmtab = T__Prmtab
Exceptions Fm_Not_Found = 1 Nametab_Fault
= 2 Ref_Field_Missing = 3 Ref_Structure_Missing = 4
Others = 5. If sy-subrc <> 0. Message E000 with 'FUNCTION_GET
Failure ' &1 '' ''. Exit. EndIf. Loop at t__prmtab.** If this
parameter is an export parameter then initialise it.* If it's an import,
check the proposal...* Case t__prmtab-paramtype. When
c_param_import.** Proposal here ??* Assign
(t__prmtab-name) to <f_param>. If not t__prmtab-impdefault is
initial. If <f_param> is initial.** Is
this a quote ? (The start of a string)* Perform AscChar
using t__prmtab-impdefault+0(1) changing w__apost.
If w__apost = c_apostrophe.** This is a string. Get rid
of the quotes...* Move t__prmtab-impdefault+1 to
w__impdefault. Split w__impdefault
at t__prmtab-impdefault+0(1) into <f_param>
w__dump. Else. Move t__prmtab-
impdefault to <f_param>. EndIf. EndIf.
EndIf.** If this parameter has a character component then*
change it to upper case.* If not C__Numeric Cs T__Prmtab-Inttype.
Translate <f_param> to upper case. EndIf. When
c_param_export. Assign (t__prmtab-name) to <f_param>.
Clear <f_param>. EndCase. EndLoop.End-of-Definition.See Also.Init_Global
Read_YDCSet.
PSUB - MacroLocation.YREPINC.Purpose.Prints all select options for a given select-
options table.Entry.Select Option Tables to use.Description of data held in select
options table.Exit.All select options for that specified table printed.Called By.
Psub select-optionstable Datadescription.Calls.SubTitlesTables.System Variables.
Description.Select Options tables although they have the same field names, have a
structure dependant on the table specified in the select options statement and
therefore cannot be passed to a generic subroutine as the structure of the passed
table has to be specified.Psub provides the loop to call Subtitles so that the
programmer does not have to be concerned with this. Psub will not print select
options with more than 5 entries. (See End_Of_Report).Examples.*eject
************************************************************************
Procedure: RHeader** Purpose: Prints report
header/sub titles etc** Entry:** Exit:** Called By:**
Calls:** Modification History:** Date Reason
Version Who*Form RHeader using p_sortby p_sortdir.* Data: w_sutitle(50) type
c, " Sub title string. w_srttitle(50) type c, "
Sorted by w_textno(3) type n, " Sort field text no
w_srtfld(10) type c. " Sort by text field* Field-Symbols
<F_ColText>. " Sort text pointer.* Perform RepHeader Using c_vkorg
sy-title.** Search Criteria* Psub s_kondm text-019. Concatenate Text-007
p_pltyp into w_sutitle separated by ' '. Perform WriteCentre using w_sutitle.
Psub s_lifnr Text-024. Psub s_ekgrp Text-025. Psub s_maabc Text-026.**
Exceptions.* If Not p_prat9 is Initial. Perform WriteCentre using text-
011. Endif. If Not p_prata is Initial. Perform WriteCentre using
Text-012. EndIf. If Not p_nil is Initial. Perform WriteCentre using
Text-013. EndIf.** Sorted By ...* Compute w_textno = p_sortby + 16.
Concatenate 'TEXT-' w_textno into w_srtfld. Assign (w_srtfld) to <F_ColText>.
Concatenate Text-014 <F_ColText> Into w_srttitle
Separated by ' '. if w_sortdir = 'A'. Concatenate w_srttitle text-015
into w_srttitle separated by ' '. else. Concatenate
w_srttitle text-016 into w_srttitle separated
by ' '. endif. Perform WriteCentre using w_srttitle. Perform TableLine.
Skip 1. Perform PrintTitles. Perform GHeader using p_sortby.EndForm.
SourceCode.*Eject
*************************************************************************
macro: Psub.** Purpose: Prints a set of sub titles.**
Entry: Select option table to use* Entry: Title for this
selection block.** Exit: Report header produced for current report**
* Called By: Psub s_vkorg text-021** Calls: Subtitles.**
Modification History:** Date Reason
Version Who*Define PSub.** Note that these are normally printed in the top of
page event.** In some cases where there are loads of criteria (more than a page*
length then this will cause a top of page longer than one page* which means that
the top of page is called again... and so on and* so forth.** Check how many
lines there are and if there are more than a* pages worth then display them at
the end of the report.* Describe table &1 lines w__sublines. If w__sublines <
5. Loop at &1. Perform Subtitles using &2
&1-Sign &1-option &1-low &1-high
False. EndLoop. Else.** Too many options here - print them at the end
of the report.* Perform Param_Subtitle using &2
'See option list at end of report'. EndIf.End-Of-Definition.See Also.
Ednd_Of_ReportSubTitles.
WRITETABLE - MacroLocation.YREPINC.Purpose.Writes an entire table to a specified
column on a reportEntry.Table to use Field name of column to put text in..Exit.
Called By.WriteTable TableName fieldname.Calls.WriteColTables.System Variables.
Description.This Macro will write a sub-table to a defined column on a report. The
macro loops around the table calling WriteCol for each entry.Examples.SourceCode.
*eject************************************************************************
Procedure: WriteTable** Purpose: Writes a table into
asingle column** Entry: Table to print*
Column to use.* Exit:** Called By: WriteTable t_table
'vbeln'.** Calls:** Modification History:** Date Reason
Version Who*Define WriteTable. Loop at &1. Perform WriteCol using
&1 &2. EndLoop.End-Of-Definition.See Also.WriteCol.
ZAP - MacroLocation.YREPINC.Purpose.Clears the header area and the table area of an
internal user defined table.Entry.Table to clearExit.Called By.Zap internal_table.
Calls.Tables.System Variables.Description.Two statements are required completely
clear an internal table. These are Clear (for the header area) and refresh for the
main table. Zap allows these to be specified in one go.Examples.Zap t_vbbp.
SourceCode.*Eject
*************************************************************************
macro: Zap.** Purpose: Clears and refreshes a table**
Entry: Table to clear** Exit: Table header cleared*
Table contents deleted** Called By: Zap t_table** Calls:**
Modification History:** Date Reason
Version Who*Define Zap. Clear &1. Refresh &1.End-Of-Definition.See
Also.
ALLHDRSLocation.YREPINC.Purpose.Prints all group headers Entry.Exit.Called By.
Calls.GROUPHEADER Tables.System Variables.Description.Prints any group headers
defined by InitBreakExamples.SourceCode.*EJECT
*************************************************************************
Procedure: AllHdrs.** Purpose: Prints all group headers**
Entry:** Exit:** Called By:** Calls:** Modification
History:** Date Reason Version Who*
FORM AllHdrs.*Data w__lines type i. Describe Table ReportBreaks Lines w__lines.
** Don't print run totals here.* While w__lines > 0. Read table
ReportBreaks Index w__lines. Perform GroupHeader Using
ReportBreaks-Title ReportBreaks-Value. Compute w__lines = w__lines - 1.
EndWhile.EndForm.See Also.
ASCCHARLocation.YRBINC.Purpose.Ascii(C$) or Chr$(N) Entry.Character to return Ascii
code forOr Number to return character forExit.Opposite of aboveCalled By.Calls.
Tables.System Variables.Description.This routine provides the same facility as that
provided by the "ASC" and the "CHR$" functions in Basic. ie it returns the Ascii
value of a character or the character associated with an Ascii value.In ALL
languages that enable structures to be used, the value of a structure is always a
character string. The values of the individual fields within the structure are
always the correct type.By defining a structure of a single byte, Asc/Char
conversion becomes easy. By assigning a character to the structure, and reading
the field you obtain the ascii value. By assigning the field a value and reading
the structure you obtain the character.Examples.* Assign
(t__prmtab-name) to <f_param>. If not t__prmtab-impdefault is
initial. If <f_param> is initial.** Is
this a quote ? (The start of a string)* Perform AscChar
using t__prmtab-impdefault+0(1) changing w__apost.
If w__apost = c_apostrophe.** This is a string. Get rid
of the quotes...* Move t__prmtab-impdefault+1 to
w__impdefault. Split w__impdefaultSourceCode.*EJECT
*************************************************************************
Procedure: AscChar** Purpose: Ascii(C$) or Chr$(N)** Entry:
Character to return Ascii code for* Or Number to return
character for** Exit: Opposite of above*** Called By:
Perform AscChar using 98 changing w_char* Perform AscChar
using 'A' changing w_num.** Calls:** Modification History:** Date
Reason Version Who*Form AscChar Using
pu_in changing pc_out.* Data: Begin of t__chr, "ASCII/CHR
Converter asc type x, End of t__chr,* w__len
type i, w__type(1) type c.** If pu_in is a character, return the
ascii value, if it's* a value return the character.* Move 0 to pc_out.
Describe field pu_in type w__type. Case w__type. When 'C'.
Compute w__len = strlen( pu_in ). If w__len = 1. Move
pu_in to t__chr. Move t__chr-asc to pc_out. EndIf.
When Others. If pu_in > 0 and pu_in < 256.
Move pu_in to t__chr-asc. Move t__chr to pc_out.
EndIf. EndCase.EndForm.See Also.
BUILDREPORTLocation.YREPINC.Purpose.Adds report data field to table Entry.Data-
field name.This is the name of the table field that should be included in the
report. If you include a valid SAP table name as part of the field name, the
routine matches up the field with the corresponding field in the data table, but
at the same time obtains default values from the Data Dictionary for the full
Table-Field combination. If the field does not occur anywhere other than in the
internal table, then the only specification required is the field nameData field
title.This parameter contains the title that you wish to apply to the column. If
this field is blank and the field name contains a valid table-field combination,
then a title is supplied from the SAP data Dictionary.Data field length.This
parameter contains the output length for the field. If this field is zero, and
the field name contains a valid table-field combination, then a length is supplied
from the SAP data Dictionary.FormatType. 'Unit' or 'Currency' or Format mask.This
field defines the format of the output field. If the field is blank, then the
output is via the conversion exit defined for the data-type of the field name in
the Data Dictionary.If the format type is a valid format type, then the format is
applied to the data field value before output.When the keyword 'Unit' or 'Currency'
is specified, the Format Field (See 24.3.5 below) specifies the Unit or Currency
format code. This may either be a literal code such as 'M', or a field which
contains the relevant code within either the internal table used provide the report
data, or a global variable.This field is optional and can be left blank if
required. Abap Documentation - Format Types. WRITE - Formatting options
Options: ... NO-ZERO ... NO-SIGN ...
DD/MM/YY ... MM/DD/YY ... DD/MM/YYYY ...
MM/DD/YYYY ... DDMMYY ... MMDDYY ...
YYMMDD ... CURRENCY w ... DECIMALS d ...
ROUND r ... UNIT u ... EXPONENT e ...
USING EDIT MASK mask ... USING NO EDIT MASK ... UNDER g
(only with WRITE) ... NO-GAP (only with WRITE) ...
LEFT-JUSTIFIED ... CENTERED ... RIGHT-JUSTIFIED Note
The formatting options UNDER g and NO-GAP are intended only output to
lists and therefore cannot be used with WRITE ... TO. Option ... NO-ZERO
Effect If the contents of f are equal to zero, only blanks are output;
if f is of type C or N, leading zeros are replaced by blanks. Option ... NO-
SIGN Effect The leading sign is not output if f is of type I, P or F. Option
... DD/MM/YY Option ... MM/DD/YY Effect If f is a date field (type
D), the date is output with a 2-character year as specified in the
user's master record. Both of these formatting options have the same
value. Option ... DD/MM/YYYY Option ... MM/DD/YYYY Effect If f
is a date field (type D), the date is output with a 4-character year
as specified in the user's master record. Both of these formatting
options have the same value. Option ... DDMMYY Option ... MMDDYY
Effect Date formatting like the additions ... DD/MM/YY and ...
MM/DD/YY, but without separators. Option ... YYMMDD Effect If f is a
date field (type D), the date is output in the format YYMMDD (YY =
year, MM = month, DD = Day). Option ... CURRENCY w Effect Correct
format for currency specified in the field w. Treats the contents of
f as a currency amount. The currency specified in w determines how
many decimal places this amount should have. The
contents of w are used as a currency key for the table TCURX; if
there is no entry for w, the system assumes that the currency amount
has 2 decimal places. Option ... DECIMALS d Effect d specifies the
number of decimal places for a number field (type I, P or F) in d. If
this value is smaller than the number of decimal places in the
number, the number is rounded. If the value is greater, the number is
padded with zeros. Since accuracy with floating point arithmetic is
up to about 15 decimal places (see ABAP/4 number types), up to 17
digits are output with floating point numbers (type F). (In some
circumstances, 17 digits are needed to differentiate between two
neighboring floating point numbers.) If the output length is not
sufficient, as many decimal places as possible are output. Negative
DECIMALS specifications are treated as DECIMALS 0. Example
Effect of different DECIMALS specifications: DATA: X TYPE P DECIMALS
3 VALUE '1.267', Y TYPE F VALUE '125.456E2'.
WRITE: /X DECIMALS 0, "output: 1 /X DECIMALS 2, "output:
1.27 /X DECIMALS 5, "output: 1.26700 /Y
DECIMALS 1, "output: 1.3E+04 /Y DECIMALS 5, "output:
1.25456E+04 /Y DECIMALS 20. "output: 1.25456000000000E+04
Option ... ROUND r Effect Scaled output of a field of type P.
The decimal point is first moved r places to the left (r > 0) or to
the right (r < 0); this is the same as dividing with the appropriate
exponent 10**r. The value determined in this way is output with the
valid number of digits before and after the decimal point. If the
decimal point is moved to the left, the number is rounded.
For further information about the interaction between the formatting
options CURRENCY and DECIMALS, see the notes below. Effect of
different ROUND specifications: DATA: X TYPE P DECIMALS 2 VALUE
'12493.97'. WRITE: /X ROUND -2, "output: 1,249,397.00
/X ROUND 0, "output: 12,493,97 /X ROUND 2, "output:
124.94 /X ROUND 5, "output: 0.12 Option ...
UNIT u Effect Formats a value according to the unit specified in the field
u. The contents of f are treated as a quantity. The unit specified
in u determines how many decimal places should be output. If f has
more places after the decimal point than determined in u, the output
value will only have the number of decimal places determined by u,
unless the operation truncates digits other than zero.
If f has fewer places after the decimal point than determined by u,
the option has no effect. The contents of u are used as a unit in the
table T006, but if there is no entry, the formatting option has no
effect. The field f which is to be output must have the type P. This
option is used for table fields which have the Dictionary type QUAN,
or for fields defined with reference to such fields (DATA ...
LIKE ...). This formatting option excludes the options DECIMALS and
ROUND. Example Suppose the unit 'STD' has 3 decimals DATA HOUR
TYPE P DECIMALS 3 VALUE '1.200'. WRITE (6) HOUR UNIT 'STD'. "output:
1,2 HOUR = '1.230'. WRITE (6) HOUR UNIT 'STD'. "output:
1,230 Option ... EXPONENT e Effect The field e defines a fixed
exponent for a floating point number (type F). The mantissa is
adjusted to the exponent by moving the decimal point and padding with
zeros. With EXPONENT 0, the exponent specification is suppressed.
However, if the output length is too short to accommodate all digits
before the decimal point, the standard output format is used. Example
Effect of different EXPONENT specifications: DATA: X TYPE P VALUE
'123456789E2'. WRITE: /X EXPONENT 0, "output:
12345678900,000000 /X(10) EXPONENT 0, "output: 1,235E+10
/X EXPONENT 3, "output: 12345678,90000000E+03 /Y
EXPONENT -3, "output: 12345678900000,00E-03 /Y EXPONENT
9, "output: 12,34567890000000E+09 /Y EXPONENT 2
/Y DECIMALS 4. "output: 123456789,0000E+02 Option ... USING EDIT
MASK mask Effect Outputs f according to the formatting template mask.
Without this addition, f is output in the standard format for that
particular type or with a format defined in the ABAP/4 Dictionary.
The addition allows you to define a different format.
You can specify the formatting template as follows: - '_'
represents one character of the field f or one digit
with type P or I - 'V' only with fields of type P or I:
output of leading sign - 'LL' at beginning of template:
- left justify (standard) - 'RR' at
beginning of template: - right justify -
'==conv' perform output conversion conv - ':', ... separator
- (all other characters) When formatting, the characters
'_' in the template are replaced from the left ('LL') or from the
right ('RR') by the characters or digits (type P or I) of the field
f. Notes 1. When using a template, you must specify the an explicit
output length because otherwise the implicit output length of the
field f is used. Usually, the template is longer than the implicit
output length. 2. If the leading sign is to be output with a field of
type P or I, you must specify the wildcard character V at the
desired place. If this character does not appear in the template,
no leading sign will be output if the value of f is negative.
3. When formatting a field of type P with decimal places, the
value is not aligned with a character in the template representing
the decimal point (either a period or a comma). If you want to
have this character in the output, you must insert it in the
correct position in the template and define the formatting from
the right. If there is no character for the decimal point in the
template, no such character is output. 4. Fields of
type F are first converted to the standard format and the
resulting sequence is then copied to the template in the case of a
field of type C. 5. You implement the user-specific conversion conv
with a function module called CONVERSION_EXIT_conv_OUTPUT, e.g.
COONVERSION_EXIT_ALPHA_OUTPUT for the conversion of numeric values
with leading zeros to a format without leading zeros for type C
fields. If a Dictionary field is output and the domain of that
field defines a conversion routine, this is executed
automatically. For a description of the conversion, refer to the
documentation of the appropriate function module. Example
Formatted output of the time: DATA TIME TYPE T VALUE '154633'.
WRITE (8) TIME USING EDIT MASK '__:__:__'. "Output: 15:46:33 If the
output length "(8)" was not specified here, the output would be
"15:46:" because the implicit output length for the type T is 6.
Option ... USING NO EDIT MASK Effect Switches off a conversion
routine specified in the ABAP/4 Dictionary. Option ... UNDER g
Effect Output of the field f begins at the column from which the field
g was output. If this happens in the same output line, the output of
the field g is overwritten. Note After UNDER, the field g must be written
exactly as the reference field in the previous WRITE statement, i.e.
with an offset and length if necessary. The exception to this rule is
if g is a text symbol. In this case, the reference field is
determined by the number of the text symbol (not by the text stored
there). Example Align output to the reference fields: FIELD-
SYMBOLS <FNAME>. ASSIGN 'First Name' TO <FNAME>. WRITE:
/3 'Name'(001), 15 <FNAME>, 30 'RoomNo', 40 'Age'(002). ...
WRITE: / 'Peterson' UNDER 'Name'(001), 'Ron' UNDER
<FNAME>, '5.1' UNDER 'RoomNo',
(5) 24 UNDER TEXT-002. This produces the following output
(numbers appear right-justified in their output fields!):
Name First Name RoomNo Age Peterson Ron
5.1 24 Option ... NO-GAP Effect Suppresses the blank after
the field f. Fields output one after the other are then displayed
without gaps. Example Output several literals without gaps:
WRITE: 'A' NO-GAP, 'B' NO-GAP, 'C'. "Output: ABC If NO-GAP was not
specified here, the output would have been "A B C" because one blank
is always implicitly generated between consecutive output fields.
Option ... LEFT-JUSTIFIED ... CENTERED ...
RIGHT-JUSTIFIED Effect Left-justified, centered or right-justified output.
For number fields (types I, P and F), RIGHT-JUSTIFIED is the standard
output format, but LEFT-JUSTIFIED is used for all other types, as
well as for templates. Examples Output to a list (WRITE): DATA:
FIELD(10) VALUE 'abcde'. WRITE: / '|' NO-GAP, FIELD LEFT-JUSTIFIED
NO-GAP, '|', / '|' NO-GAP, FIELD CENTERED NO-GAP,
'|', / '|' NO-GAP, FIELD RIGHT-JUSTIFIED NO-GAP, '|'.
* Output: |abcde | * | abcde | *
| abcde| Formatting in a program field (WRITE...TO...)
DATA: TARGET_FIELD1(10), TARGET_FIELD2 LIKE TARGET-FIELD1,
TARGET_FIELD3 LIKE TARGET-FIELD1. WRITE: '123' LEFT-JUSTIFIED TO
TARGET-FIELD1, '456' CENTERED TO TARGET-FIELD2,
'789' RIGHT-JUSTIFIED TO TARGET-FIELD3. WRITE: / '|' NO-GAP,
TARGET_FIELD1 NO-GAP, '|', / '|' NO-GAP, TARGET-FIELD2 NO-GAP, '|',
/ '|' NO-GAP, TARGET_FIELD3 NO-GAP, '|'. * Output: |123 | * |
456 | * | 789| Note Setting date format und decimal
character Every user can specify in his/her master record (User
defaults) how the date is to be formatted on output and whether the
decimal character should be a comma or a period. You can also set
these output parameters for a particular program by using the
statement SET COUNTRY. Notes Specifying several formatting options
You can use the additions of the first group (NO-ZERO, NO-SIGN,
DD/MM/YY etc., CURRENCY, DECIMALS, ROUND, EXPONENT) simultaneously,
provided it makes sense. You can combine the additions UNDER and NO-
GAP with all other additions in any permutation; however, they are
not taken into account until the field f has been formatted according
to all the other options. Templates, conversion routines and
alignment If you want to format a field using a special conversion
routine, all the other additions (apart from UNDER and NO-GAP) are
ignored. This also applies if the conversion routine is not
explicitly specified, but comes from the ABAP/4 Dictionary. If you
want to format a field using a template, the system first takes into
account the options of the first group, and then places the result in
the template. However, if you specify one of the date-related
formatting options (DD/MM/YY etc.), the template is ignored.
Finally, the formatted field or the template is copied to the target
field according to the requested alignment. For type C fields, it is
the occupied length that is relevant, not the defined length; this
means that trailing blanks are not taken into account.
Combined usage of CURRENCY, DECIMALS and ROUND The rounding factor
(from the right) in WRITE price CURRENCY c ROUND r DECIMALS
d results from the formula rounding factor = c +
r - d. If DECIMALS is not specified, d = c applies. You
read this formula in the following manner: The field price is
supposed to be of ABAP/4 type P (or I); it contains a currency
amount. The CURRENCY specification expresses how many decimal places
price is to have and may differ from the definition of price (the
decimal point is not stored internally, but comes from the type
attributes of price). Normally, price is output with as many decimal
places as the field has internally according to the type attributes
or the CURRENCY specification. You can override this number of
output decimal places with DECIMALS. The addition ROUND addition
moves the decimal point r places to the left, if r is positive,
otherwise to the right. This means that a $ amount is output with
ROUND 3 in the unit 1000 $. According to the above formula, there can
also be a "negative" rounding factor; then, the corresponding number
of zeros is appended to the amount price on the right using the
"rounding factor". However, the value of "rounding factor" must be at
least equal to -14.
Currency fields and DATA with DECIMALS If the field
price is normally formatted with decimal places (e.g. fields for
currency amounts), these are treated like a CURRENCY specification
when rounding, if CURRENCY was not expressly specified.
If present, the DECIMALS specification defines how many decimal
places are to be output after rounding. If the DECIMALS and the
(explicit or implicit) CURRENCY specifications are different,
rounding takes place according to the above formula, even if no ROUND
specification was made (i.e. r = 0). If a field in the
DATA statement was declared with DECIMALS n, WRITE treats it like a
currency field with n decimal places. Examples Sales in pfennigs or lira:
246260 Unit TDM or TLira with 1 decimal place. DATA
SALES TYPE P VALUE 246260. WRITE SALES CURRENCY 'DEM' ROUND 3
DECIMALS 1. " 2,5 TDM WRITE SALES CURRENCY 'ITL' ROUND 3 DECIMALS
1. " 246,3 TLira Sales in pfennigs or lira: 99990
Unit TDM or TLira with 1 decimal place. SALES = 99990.
WRITE SALES CURRENCY 'DEM' ROUND 3 DECIMALS 1. " 1,0 TDM WRITE
SALES CURRENCY 'ITL' ROUND 3 DECIMALS 1. " 100,0 TLira Sales in
pfennigs or lira: 93860 Unit 100 DM or 100 lira with 2 decimal
places: SALES = 93860. WRITE SALES CURRENCY 'DEM' ROUND
2 DECIMALS 2. " 9,38 HDM WRITE SALES CURRENCY 'ITL' ROUND 2
DECIMALS 2. " 938,60 HLira Sales in pfennigs: 93840
Unit 1 DM without decimal places. SALES = 93860 WRITE
SALES CURRENCY 'DEM' DECIMALS 0. " 938 DM Sales in
pfennigs: 93860 Unit 1 DM without decimal places. SALES
= 93860. WRITE SALES CURRENCY 'DEM' DECIMALS 0. " 939 DM
Note Runtime errors: - WRITE_CURRENCY_ILLEGAL_TYPE:
CURRENCY parameter with WRITE is not type C -
WRITE_ROUND_TOO_SMALL: Rounding parameter is less than -14 -
WRITE_UNIT-ILLEGAL_TYPE: UNIT parameter with WRITE is not type C
Return -> ABAP/4 EditorOther additional formats are available. These are
generally colour specifications. The following colours can be used by specifying
the text shown:# EMBED PBrush ###Figure # SEQ Figure \* ARABIC #1# - Colour Codes
Format field.This field is used in conjunction with the Format Type field see # REF
_Ref470488559 \r \p \h ##28.3.4 above#. If the Format type field contains the
words 'Unit' or 'Currency', then this field should contain either a valid Unit or
Currency Code, or a variable that contains one of these codes. The variable may
either be a field in the same record of the internal table that holds the data
being reported on, or a variable defined within the report itself.Abap
Documentation - Unit.Option ... UNIT u

Effect Formats a value according to the unit specified in the field u.


The contents of f are treated as a quantity. The unit specified in u
determines how many decimal places should be output. If f has
more places after the decimal point than determined in u, the output
value will only have the number of decimal places determined by u,
unless the operation truncates digits other than zero.
If f has fewer places after the decimal point than determined
by u, the option has no effect. The
contents of u are used as a unit in the table T006, but if there is
no entry, the formatting option has no effect. The field f
which is to be output must have the type P. This option is used
for table fields which have the Dictionary type QUAN, or for fields
defined with reference to such fields (DATA ... LIKE ...).
This formatting option excludes the options DECIMALS and ROUND.
Example Suppose the unit 'STD' has 3 decimals
DATA HOUR TYPE P DECIMALS 3 VALUE '1.200'.
WRITE (6) HOUR UNIT 'STD'. "output: 1,2
HOUR = '1.230'. WRITE
(6) HOUR UNIT 'STD'. "output: 1,230 Abap Documentation - Currency. Option
... CURRENCY w
Effect Correct format for currency specified in the field w.
Treats the contents of f as a currency amount. The currency
specified in w determines how many decimal places this amount should
have. The contents
of w are used as a currency key for the table TCURX; if there is
no entry for w, the system assumes that the currency amount has 2
decimal places. Exit.NoneCalled By.
CHECKBOXPerform BuildReport using p_name p_title p_length '' ''.Calls.Tables.dd01l
- Domains dd03l - Table Fieldsdd04t - R/3 DD: Data
element textsSystem Variables.SY-SUBRC INT4 X 4 Return value after
specifSY-LANGU LANG C 1 SAP logon language key Description.
BuildReport populates an internal table prior to using the data stored in the table
to format a report.Field and table names are converted to upper case before being
stored in the table. The Table name if present and the field name are then used to
locate the field entry in the SAP Data dictionary.The Data dictionary provides a
Domain name for the variable which is used to access the Domains table. The
domains table provides the physical attributes of the field such as print width and
conversion routines.The routine also uses information obtained from the Data
dictionary to locate the field title. If the title parameter passed to the routine
is blank, then the title retrieved is stored for use.In any case, the print
parameters (Width and conversion routines) are stored in the table.The routine then
examines the title of the field (either that passed, or that retrieved) to make
sure that the column width is at least wide enough to accommodate the longest word
in the title.The table used by this routine must be initialised before adding the
first entry by using:Refresh ReportTable.There must be one call to this routine for
each column of information in the report.Examples.Form Report_BadData Tables
t_zisid Structure t_zisid.* Data: w_ermsg like t_zisid-ermsg, " Group
heading.... w_matnr like t_zisid-matnr, w_text like dd04t-
ddtext. " Concatenate Group hdr* Zap ReportTable. Perform
BuildReport using 'ZISID-ZZSHIPNO' '' 0 '' ''. Perform BuildReport using
'ZISID-PRONU' '' 0 '' ''. Perform BuildReport using 'ZISID-EBELN' '' 0 ''
''. Perform BuildReport using 'ZISID-EBELP' '' 0 '' ''. Perform
BuildReport using 'EKBE-MENGE' '' 0 '' ''. Perform BuildReport using 'MSEG-
MBLNR' '' 0 '' ''. Perform BuildReport using 'MSEG-MJAHR' '' 0 '' ''.
Perform BuildReport using 'MSEG-ZEILE' '' 0 '' ''.SourceCode.*EJECT
*************************************************************************
Procedure: BuildReport.** Purpose: Adds report data field to table*
* Entry: Data-field name* Data field title*
Data field length* FormatType. 'Unit' or 'Currency' or format
mask* Format field** Exit: None** Called
By: Perform BuildReport* using field title format
field* Format-field** Calls:**
Modification History:** Date Reason
Version Who*FORM BUILDREPORT using p_field p_title
like dd04t-ddtext p_len like dd03l-leng
p_formattype like datatype-char0016 p_formatfield like
dd03l-fieldname.* Tables: dd01l, dd03l, dd04t. Data: Begin Of t_dd01l
occurs 0, DataType like dd01l-datatype,
Convexit like dd01l-convexit, End Of t_dd01l,* Begin of
t_dd03l occurs 0, Domname like dd03l-domname,
As4local like dd03l-as4local, As4vers like dd03l-as4vers,
Rollname like dd03l-rollname, leng like dd03l-leng,
End Of t_dd03l,* Begin Of SplitTab occurs 0, word(50)
type c, End Of SplitTab,*
w__table like dd03l-tabname, w__field like dd03l-
fieldname, w__fmask(30) type c, w__ffield(30) type c,
w__tlen type i.* clear ReportTable.** Check for table-field name or
just field name.....* Search p_field for '-'. If sy-subrc = 0. Split
p_field at '-' into w__table w__field. Else. Move p_field to w__field.
EndIf. Translate w__table to upper case. Translate w__field to upper case.*
Move p_formattype to w__fmask. Translate w__fmask to upper case. Move
p_formatfield to w__ffield. Translate w__ffield to upper case.*
ReportTable-Table = w__table. ReportTable-FieldName = w__field.
ReportTable-Title = p_title. ReportTable-ColWidth = p_len. ReportTable-
Startpos = 0. ReportTable-ConvExit = ''. ReportTable-DataType = ''.
Case w__fmask. When 'UNIT'. Move w__ffield to ReportTable-Unit.
When 'CURRENCY'. Move w__ffield to ReportTable-Currency. When Others.
Move w__fmask to ReportTable-Format. EndCase.** Get the details from the
data dictionary ?* if w__table <> ' '. Zap t_dd01l. Zap t_dd03l.
Select domname as4local as4vers rollname leng into corresponding fields
of table t_dd03l from dd03l where tabname = w__table
and fieldname = w__field and as4local = 'A' and as4vers
= '0000'.** Variable Characteristics* Read Table t_dd03l index 1.
Select single datatype convexit into corresponding fields of t_dd01l
from dd01l where domname = t_dd03l-domname and as4local =
t_dd03l-as4local and as4vers = t_dd03l-as4vers.** Title Texts*
Read Table t_dd01l index 1. if ReportTable-Title = ' '. Select
ddtext Up to 1 rows Into ReportTable-Title
From dd04t where rollname = t_dd03l-rollname and
ddlanguage = sy-langu and as4local = 'A'. EndSelect.
endif. if p_len = 0. Move t_dd03l-leng to ReportTable-
ColWidth. else. Move p_len to ReportTable-ColWidth.
EndIf. If not t_dd01l-convexit is initial. Concatenate '=='
t_dd01l-convexit into ReportTable-Convexit. EndIf. Move t_dd01l-
datatype to ReportTable-DataType. endif.** Is column width less than an
individual word in the title ?* Clear SplitTab. Split ReportTable-Title at
' ' into table SplitTab. Loop at SplitTab. Compute w__tlen =
strlen( SplitTab-Word ). if w__tlen >= ReportTable-ColWidth.
ReportTable-ColWidth = w__tlen + 2. endif. endloop. Append
ReportTable.ENDFORM. "BUILDREPORT.See Also.CheckBoxCheckBreaks
FormatReportInitBreaksWriteLinePrintTotals
CENTREREPORTLocation.YREPINC.Purpose. Sets a flag to tell formatreport to centre
the report on the page or not. Entry.True or FalseExit.Called By.NEWREPORT.Perform
CentreReport using True.Calls.Tables.System Variables.Description.Examples.*
Modification History:** Date Reason
Version Who*Form NewReport. Zap ReportTable. Zap ReportBreaks. Perform
CentreReport using True. Move True to w__runtotal. Move False to
w__grouphdr. Move False to w__lineprinted.EndForm.*Eject
************************************************************************SourceCode.
*EJECT*************************************************************************
Procedure: CentreReport.** Purpose: Sets a flag to tell
formatreport to centre the* report on the page or not.**
Entry: True or False** Exit:** Called By: Perform
CentreReport using True** Calls:** Modification History:** Date
Reason Version Who**Form CentreReport
using pu_centre like true. Move pu_centre to w__centre.EndForm.See Also.
CHECKBOXLocation.YREPINC.Purpose.Adds report data field to table as a check box .
#EMBED PBrush###Figure # SEQ Figure \* ARABIC #2#Report With Check Boxes.Entry.
Data-field table.This is the name of the table field that should be included in the
report. If you include a valid SAP table name as part of the field name, the
routine matches up the field with the corresponding field in the data table, but
at the same time obtains default values from the Data Dictionary for the full
Table-Field combination. If the field does not occur anywhere other than in the
internal table, then the only specification required is the field nameData field
title.This parameter contains the title that you wish to apply to the column. If
this field is blank and the field name contains a valid table-field combination,
then a title is supplied from the SAP data Dictionary.Data field length.This is the
width of the column you wish the Check box to be centred in. The minimum (and the
default width is 3)Exit.NoneCalled By.Calls.BUILDREPORT Tables.System Variables.
SY-SUBRC INT4 X 4 Return value after specifSY-TABIX INT4 X 4
Runtime: Current line of Description.CheckBox inserts a check box onto a
report. The check box will appear in a column with a minimum width of three
spaces. The check box can be used to allow end-users to select multiple lines from
a report.Examples. EndIf. Psub s_bname 'Developer'. Perform PrintTitles.EndForm.
*Form UserRep. Zap ReportTable. Perform CheckBox using 'Selct' 'Process'
3. Perform BuildReport using 'usr01-bname' '' 0 '' ''. Perform BuildReport
using 'Fulln' 'Full Name' 40 '' ''. Perform FormatReport. Set Pf-Status
'ZDLARTHR'. Move '0' to w_state. Loop at t_users. Perform
WriteLine using t_users col_normal.SourceCode.*EJECT
*************************************************************************
Procedure: CheckBox.** Purpose: Adds report data field to table as
a check box** Entry: Data-field table* Data
field title* Data field length** Exit: None**
Called By: Perform CheckBox* using table name
title length** Calls: BuildReport** Modification History:**
Date Reason Version Who*Form CheckBox
using p_name like dd03l-fieldname p_title like dd04t-ddtext
p_length like dd03l-leng.* Constants: c__cboxwidth type i value 3.* Data:
w__table(20) type c, w__name(20) type c.* Perform BuildReport using
p_name p_title p_length '' ''.** Locate this record and set the check box flag.*
Search p_name for '-'. If sy-subrc = 0. Split p_name at '-' into
w__table w__name. Else. Move p_name to w__name. EndIf. Translate
w__table to upper case. Translate w__name to upper case. Read Table
ReportTable with key Table = w__table
FieldName = w__name. if sy-subrc = 0. Move True to ReportTable-CheckBox.
If ReportTable-ColWidth < c__cboxwidth. Move c__cboxwidth to ReportTable-
ColWidth. EndIf. Modify ReportTable Index sy-tabix. EndIf.
EndForm.See Also.BuildReportCheckBreaksInitBreaksWriteLinePrintTotals
CHECKBREAKSLocation.YREPINC.Purpose.Checks and prints total breaks Entry.ReportData
Table.Exit.Called By.Perform CheckBreaks tables datatable.Calls.TABLELINE
GROUPHEADER Tables.System Variables.SY-TABIX INT4 X 4 Runtime:
Current line ofSY-INDEX INT4 X 4 Number of loop passesSY-SUBRC INT4
X 4 Return value after specifDescription.CheckBreaks examines the table
initialised by sequential calls to InitBreak. The values stored against the
various break levels are checked. If these are the same as the current data line
the numeric values on the data line are accumulated against the relevant break
level.If a value in the break table is different from the corresponding value in
the data line, the search terminates and all sub totals up to and including the
subtotal check value that has changed are printed and the variables reset.The
initial call to CheckBreaks also prints any group headers required.If any subtotals
are printed, the corresponding group headers are then printed.Examples.*
if w_repid = c_zso0620. Perform CheckBreaks tables t_repdata.
Endif. Perform Writeline tables t_repdata using Col_Normal. EndLoop.**
Final totals.* Perform RunTotals Tables t_repdata.SourceCode.*Eject
*************************************************************************
Procedure: Checkbreaks** Purpose: Checks and prints total breaks**
Entry: breakTotals table established* Entry ReportData
Table.** Exit:** Called By: Perform CheckBreaks using p_datatable.*
* Calls:** Modification History:** Date Reason
Version Who*Form Checkbreaks using p_datatable.* Field-Symbols: <F_Group>.
Data: t__coltotals type Decimal_Value occurs 0 with header line,
t__carry type Decimal_Value occurs 0 with header line, w__breaklevel
type i value -1, w__totprint type i, W__Pos Type i,
W__Ffeed like c_yes, w__datatable(2000) type c.* Move
p_datatable to w__datatable. If w__allhdr_done = False. Perform AllHdrs.
Move True to w__allhdr_done. EndIf. Loop at ReportBreaks.** Any
value from a lower sub total ?* Don't do run totals here....* if
ReportBreaks-Title <> 'Run Total:'. Assign (ReportBreaks-field) to
<F_Group>. if <F_group> <> ReportBreaks-value.** Print a
group total.* Move sy-tabix to w__breaklevel.** Form
Feed ?* If ReportBreaks-Ffeed = c_yes. Move c_yes
to w__ffeed. Endif. Endif. Endif. EndLoop.*
* Break at what level ?* If w__breaklevel <> -1. Zap t__carry.
Compute w__totprint = w__breaklevel + 1. do w__totprint times.**
Add the totals from the previous level.* Read Table ReportBreaks Index
sy-index. Move Reportbreaks-Totals[] to t__coltotals[]. Loop at
t__coltotals. Move sy-tabix to w__pos. Read Table
t__carry index w__pos. if sy-subrc = 0. Compute
t__coltotals = t__coltotals + t__carry. Modify t__coltotals index
w__pos. Move t__coltotals to t__carry. Modify
t__carry index w__pos. else. Clear t__carry.
Move t__coltotals to t__carry. Append t__carry.
Endif. EndLoop. Move t__coltotals[] to ReportBreaks-Totals[].
Modify ReportBreaks Index sy-index.** Print the totals at this level.*
if sy-index <= w__breaklevel. Perform PrintTotals using sy-index.
Read Table ReportBreaks Index sy-index.** Update the break value and
set the totals to 0.* Assign (ReportBreaks-field) to <F_Group>.
Move <F_group> to ReportBreaks-value. Loop at t__coltotals.
Clear t__coltotals. Modify t__coltotals. EndLoop.
Move t__coltotals[] to Reportbreaks-totals[]. Modify ReportBreaks
index sy-index. EndIf. EndDo.** Form feed required ?*
If w__ffeed = c_yes. Perform TableLine. New-Page. EndIf.
** Group Headers.* Compute w__totprint = w__breaklevel.
while w__totprint > 0. Read Table ReportBreaks Index w__totprint.
Perform GroupHeader using ReportBreaks-Title ReportBreaks-
Value. Compute w__totprint = w__totprint - 1. EndWhile.
EndIf. Move w__datatable to p_datatable.EndForm.See Also.AllHdrsBuildReport
CheckBoxInitBreaksWriteLinePrintTotals
CHECK_DOMAIN_VALUESLocation.YRBINC.Purpose.This routine checks a domains entities
to see if the specified value exists is one of those entities.Entry. Domain Name To
Check Value To CheckExit.One parameter is returned by this routine and can have the
following values: True: The domain contains the value specified False:
The Domain name is wrong, or the value does not existCalled By.Calls.Tables.
System Variables.SY-SUBRC INT4 X 4 Return value after specif
Description.This routine can be used to check values passed into functionns and
forms via RFC's and so forth, rather than the more normal method of entry via a
screen.Examples.SourceCode.*Exit
************************************************************************
Procedure: Check_Domain_Values** Purpose: Checks that
a value exists in the* specified domain** Entry:
Domain name to use* Value to check** Exit:
True - domain contains value* False - domain does not
contain value** Called By: Perform Check_Domain_Values*
using w_domain w_value* changing w_valid.**
Calls:** Modification History:** Date Reason
Version Who*Form check_domain_values using pu_domain like dd07l-domname
pu_value like dd07l-domvalue_l Changing pc_valid like true.*
Call Function 'CHECK_DOMAIN_VALUES' Exporting domname
= pu_domain value = pu_value Exceptions
no_domname = 1 wrong_value = 2 dom_not_found = 3
Others = 4. If sy-subrc = 0. Move true To pc_valid. Else.
Move false To pc_valid. Endif.Endform.See Also.
COLUMN_COLOURLocation.YREPINC.Purpose. Sets the colour of a specific column Entry.
Column widthColour to setValue to writeActual colour code to use.Exit.Called By.
WRITEVALUEPerform Column_Colour using p_width p_value p_format col_heading.Calls.
SETCOLOUR Tables.System Variables.Description.This procedure sets the back ground
colour for the currently selected column.Examples.* Colours....
* When 'COL_BACKGROUND' or 'GREY'.
Perform Setcolour using Col_background. Write at
(p_width) p_value no-gap. Perform SetColour using
w__last_colour. When 'COL_HEADING' or 'BLUE' or 'DARK_BLUE'.
Perform Column_Colour using p_width
p_value p_format
col_heading. When 'COL_NORMAL' or 'WHITE' or 'BEIGE'.
If p_format <> 'BEIGE'. Perform Column_Colour using
p_width p_valueSourceCode.
*EJECT*************************************************************************
Procedure: Column_Colour** Purpose: Sets the colour of a specific
column** Entry: Column width* Entry: Colour to set*
Entry: Value to write* Entry: Actual colour code to use.**
Exit: Actual mask to use.** Called By: Perform Getmask using
mask_in changing mask_out** Calls:** Modification History:** Date
Reason Version Who*Form Column_Colour
using p_width p_value p_format p_colour.** Need to set intensified on for dark
colours ??* Data w__format(20) type c.* Move p_format to w__format. If
w__format+0(4) = 'DARK'. Format Intensified on. Else. Format
Intensified off. EndIf.* Perform Setcolour using p_colour. Write at
(p_width) p_value no-gap.** Ok, put intensity back to what it should be.....**
w__intense_flag is the NEXT not the CURRENT intensity setting* for the
line....so if it's False, intensity is already on,* If it's True then
intensity is off.....** oh my gawd.....* If w__format+0(4) = 'DARK'.
If w__intense_flag = True. Format Intensified off. EndIf.
Else. If w__intense_flag = False. Format Intensified on.
EndIf. EndIf. Perform SetColour using w__last_colour.EndForm.See Also.
DUMP_TABLELocation.YREPINC.Purpose. This routine dumps the specified table one full
record at a time. Entry.None Tables: Unstructured table for dumpExit.None
Called By.Calls.SAVEREPORT NEWREPORT BUILDREPORTTables.System Variables.SY-
LINSZ INT4 X 4 Line size of listSY-INDEX INT4 X 4
Number of loop passesSY-SUBRC INT4 X 4 Return value after specifSY-
LSIND INT4 X 4 Number of secondary listDescription.A debugging tool
that will dump as much of the table as possible to the screen.Examples.
SELECT SINGLE WRKST FROM MARA INTO
T_COLOR_LIST-WRKST WHERE MATNR = TB_RESERVE-PMTNR.
APPEND T_COLOR_LIST. ENDIF. ENDLOOP.PERFORM DUMP_TABLE TABLES
TB_RESERVE.EXIT.** Send any non-coloured fiber to the colouring shop.**
Find the coloring shop order first. Take the first shop order* that has an
order type of CLOR and the dates are this month.*SourceCode.*EJECT
*************************************************************************
Procedure: Dump_Table** Purpose: This routine dumps the specified
table* one full record at a time.** Entry: None*
* Tables: Unstructured table for dump** Exit: None**
Called By: Perform DumpTable Tables t_tabname.** Calls:**
Modification History:** Date Reason
Version Who*Form Dump_Table tables t_dumptable.* Field-Symbols
<f_table_field>.* Data: w__fwidth like dd03l-leng, w__twidth like
w__fwidth, w__nwidth like w__fwidth, w__linsz like sy-linsz.*
Move sy-linsz to w__linsz. Perform SaveReport using 'DumpTab'. Perform
NewReport.** Get the table field details.* Read Table t_dumptable index 1.
Do. Assign component sy-index of structure t_dumptable
to <f_table_field>. If sy-subrc = 0. Describe field
<f_table_field> output-length w__fwidth. Compute w__nwidth = w__twidth +
w__fwidth + 2. If w__nwidth < 255. Perform BuildReport
using sy-index '' w__fwidth '' ''. Move w__nwidth to w__twidth.
Else. Exit. EndIf. Else. Exit.
EndIf. EndDo. New-page line-size 255. Perform FormatReport.* Loop
at t_dumptable. Perform WriteLine using t_dumptable col_normal.
EndLoop. Move 1 to sy-lsind. New-Page line-size w__linsz.EndForm.See Also.
FIRSTCOLLocation.YREPINC.Purpose.Sets the first column of the report Entry.
Direction to move the first column of the report.The first column displayed for the
report is set in a relative fashion. Either the first or last column on the
report, or plus or minus one column. These movements are decided upon by the
value of this parameter:'<<' - Move to the left margin.'<' - Move Left 0ne column
'>' - Move Right one column.'>>' - Move to Right margin.Exit.Called By.Calls.
Tables.System Variables.Description.This routine sets the first column displayed at
the left edge of the screen. This is the Report Column, rather than the column of
characters. If for example the 2nd column of the report starts at physical column
20 of the display, then perfoming Firstcol once with a value of '>' will display
the 19th actual column as the first column of the display. Examples. Case w_ucomm.
When 'PROCESS'. Perform Process_Selections using w_mode.
Perform Message_Report. Perform Setup_Proposal. When
'PICK'. Break-Point. When 'SELECT'. Perform Chngall using 'X'.
When 'DESELECT'. Perform Chngall using ' '. When 'LEFTMARGIN'. Perform
FirstCol using '<<'. When 'ONEL'. Perform FirstCol using '<'.
When 'ONER'. Perform FirstCol using '>'. When 'RIGHTMARGI'. Perform
FirstCol using '>>'. EndCase.*Start-Of-Selection.*SourceCode.*EJECT
*************************************************************************
Procedure: FirstCol.** Purpose: Sets the first column of the report
** Entry: '<<' - Move to the left margin.* '<'
- Move Left 0ne column* '>' - Move Right one column.*
'>>' - Move to Right margin.** Exit:** Called By: Perform FirstCol
using '>>'.** Calls:** Modification History:*Form FirstCol using
p_action.* Statics: w__macol like sy-macol, " Current Margin
w__Cols type i. " Number of columns* Data: w__newm like sy-
macol. " New column* Move 0 to w__newm. if w__macol is Initial.
Move 1 to w__macol. Describe Table reportTable lines w__cols. EndIf.
Case p_action. When '<<'. Move 0 to w__macol. " Left Margin
When '<'. If w__macol > 0. Subtract 1 from w__macol.
EndIf. When '>'. If w__macol < w__cols. Add 1 to
w__macol. EndIf. When '>>'. Move w__cols to w__macol.
" Right Margin EndCase. If w__macol <> 0. Read Table ReportTable
Index w__macol. Compute w__newm = ReportTable-StartPos + 2. Scroll
List To Column w__newm. Else. Scroll List to Column 0. EndIf.
EndForm.See Also.
FORMATKEYLocation.YRBINC.Purpose.Formats a key. If it is all zeroes, then it is
right justfied and padded with zeroes If it is alpha-numeric then it is left
justified and padded with spaces Entry.Value to formatExit.Formatted valueCalled
By.Calls.Tables.System Variables.Description.When reading rows from SAP tables, it
can happen that even though you specifiy a valid key, the relevant rows are not
returned. This is due to the formatting of the key, and primarily happens with
numeric type variables that are prefixed with zeroes.Having checked if the string
contains only numbers, the routine then puts the key in an N type variable, and
then takes the rightmost number of