Colour Code for WRITE Statement:
Sometimes we need to show error message for specific situation. But we need to stay on that screen. To achieve this we can fix this into Information or Success message with display like Error.
REPORT zsr_test.
PARAMETERS p_inp TYPE char12.
IF p_inp = 'INFORMATION'.
MESSAGE 'Information Message' TYPE 'I'.
ELSEIF p_inp = 'ERROR'.
MESSAGE 'Error Information' TYPE 'I' DISPLAY LIKE 'E'.
ELSEIF p_inp = 'SUCCESS'.
MESSAGE 'Success' TYPE 'S'.
ELSEIF p_inp = 'FALSE'.
MESSAGE 'False' TYPE 'S' DISPLAY LIKE 'E'.
ENDIF.
Output options Field Catalog:
outputlen (column width)
Value range: 0 (initial), n
For fields with reference to the Data Dictionary you can leave this
parameter set to initial.
For fields without reference to the Data Dictionary (program fields)
you must set the parameter to the desired field output length on the
list (column width).
initial = The column width is derived from the output length of the
referenced field (domain) in the Data Dictionary.
n = The column width is n characters.
key (key column)
Value range: SPACE, 'X'
'X' = Key field (colored output for key fields)
Key fields cannot be hidden interactively by the user.
Parameter FIELDCAT-NO_OUT must be left set to initial.
For exceptions, see the documentation on parameter FIELDCAT-KEY_SEL.
key_sel (key column that can be hidden)
Value range: SPACE, 'X'
Only relevant if FIELDCAT-KEY = 'X'
Key field that can be hidden interactively by the user.
The user cannot interactively change the sequence of the key
columns.
As with non-key fields, output control is performed using parameter
FIELDCAT-NO_OUT.
no_out (field in the available fields list)
Value range: SPACE, 'X'
'X' = Field is not displayed on the current list.
The field is available to the user in the field list and can be
interactively selected as a display field.
At row level, the user can use the detail function to display the
content of these fields.
See also the documentation on the 'Detail screen' section of
parameter IS_LAYOUT.
no_zero (suppress zeros)
Value range: SPACE, 'X'
Only relevant to value fields
'X' = Supress zeros
no_sign (no +/- sign)
Value range: SPACE, 'X'
Only relevant to value fields
'X' = Value output without +/- signs.
tech (technical field)
Value range: SPACE, 'X'
'X' = Technical field
The field cannot be output on the list and cannot be shown
interactively by the user.
The field may only be used in the field catalog (not in IT_SORT,...).
emphasize (highlight column in color)
Value range: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off '1'=on)
'X' = The column is highlighted in the default color for color
highlighting.
'Cxyz' = The column is highlighted in the coded color:
- C: Color (coding must start with C)
- x: Color number
- y: Intensified
- z: Inverse
hotspot (column as hotspot)
Value range: SPACE, 'X'
'X' = The cells of the column are output as a hotspot.
do_sum (calculate totals for column)
Value range: SPACE, 'X'
'X' = Totals are calculated for this field of the internal output
table.
This function can also be used interactively by the user.
no_sum (totals calculation not allowed)
Value range: SPACE, 'X'
'X' = No totals may be calculated for this field although the data
type of the field allows totalling.
Formatting column contents
icon (icon)
Value range: SPACE, 'X'
'X' = The column contents are displayed as an icon.
The column contents of the internal output table must consist of
valid icon strings (@xx@).
The caller should consider the problem of printing icons.
symbol (symbol)
Value range: SPACE, 'X'
'X' = The column contents are output as a symbol.
The column contents of the internal output table must consist of
valid symbol characters.
The caller should consider the problem of printing symbols.
Although symbols can generally be printed, they are not always shown
correctly depending on the printer configuration.
just (justification)
Value range: SPACE, 'R', 'L', 'C'
Only relevant to fields of data type CHAR or NUMC
' ' = Default justification according to data type
'R' = Right-justified output
'L' = Left-justified output
'C' = Centered output
The justification of the column header depends on the justification
of the column contents. You cannot justify the column header
independently of the column contents.
lzero (leading zeros)
Value range: SPACE, 'X'
Only relevant to fields of data type NUMC
By default, NUMC fields are output in the ALV right-justified
without leading zeros.
'X' = Output with leading zeros
edit_mask (field formatting)
Value range: SPACE, mask
mask = See documentation on the WRITE formatting option
USING EDIT MASK mask
Using mask = '== conv' you can force an output conversion conv.
ALV Color Code:
* Colour code : *
* Colour is a 4-char field where : *
* - 1st char = C (color property) *
* - 2nd char = color code (from 0 to 7) *
* 0 = background color *
* 1 = blue *
* 2 = gray *
* 3 = yellow *
* 4 = blue/gray *
* 5 = green *
* 6 = red *
* 7 = orange *
* - 3rd char = intensified (0=off, 1=on) *
* - 4th char = inverse display (0=off, 1=on) *
* *
* Colour overwriting priority : *
* 0 = background color *
* 1. Line *
* 2. Cell *
* 3. Column *
Calling Standard Buttons in Custom PF Status:
- Go to program SAPLSLVC_FULLSCREEN
- Go to GUI status STANDARD_FULLSCREEN
- Add required standard code to your custom PF status
Fetching System Terminal Name:
DATA: opcode_usr_attr(1) TYPE x VALUE 5,
terminal TYPE usr41-terminal.
CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_usr_attr
ID 'TERMINAL' FIELD terminal.
WRITE:/ 'Terminal:', terminal.
Finding IP Address:
CALL METHOD cl_gui_frontend_services=>get_ip_address
RECEIVING
ip_address = ip (string)
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
How to unset MS word as editor:
Go to report RSCPSETEDITOR & execute. Unselect the Smartform as follows.
Different Viewing of Output as Modal Dialog:
cl_demo_output=>display( it_mara ).
Colour No. | Colour |
1 | Gray-blue (blue sky) |
2 | Light Gray (light cyan) |
3 | Yellow |
4 | Blue-green (between light cyan and blue sky) |
5 | Green |
6 | Red |
7 | Violet (orange) |
Sample:
COLOR 5 INTENSIFIED OFF
COLOR 5 INTENSIFIED ON
COLOR 5 INVERSE ON
Message Type:
Sometimes we need to show error message for specific situation. But we need to stay on that screen. To achieve this we can fix this into Information or Success message with display like Error.
REPORT zsr_test.
PARAMETERS p_inp TYPE char12.
IF p_inp = 'INFORMATION'.
MESSAGE 'Information Message' TYPE 'I'.
ELSEIF p_inp = 'ERROR'.
MESSAGE 'Error Information' TYPE 'I' DISPLAY LIKE 'E'.
ELSEIF p_inp = 'SUCCESS'.
MESSAGE 'Success' TYPE 'S'.
ELSEIF p_inp = 'FALSE'.
MESSAGE 'False' TYPE 'S' DISPLAY LIKE 'E'.
ENDIF.
Output options Field Catalog:
outputlen (column width)
Value range: 0 (initial), n
For fields with reference to the Data Dictionary you can leave this
parameter set to initial.
For fields without reference to the Data Dictionary (program fields)
you must set the parameter to the desired field output length on the
list (column width).
initial = The column width is derived from the output length of the
referenced field (domain) in the Data Dictionary.
n = The column width is n characters.
key (key column)
Value range: SPACE, 'X'
'X' = Key field (colored output for key fields)
Key fields cannot be hidden interactively by the user.
Parameter FIELDCAT-NO_OUT must be left set to initial.
For exceptions, see the documentation on parameter FIELDCAT-KEY_SEL.
key_sel (key column that can be hidden)
Value range: SPACE, 'X'
Only relevant if FIELDCAT-KEY = 'X'
Key field that can be hidden interactively by the user.
The user cannot interactively change the sequence of the key
columns.
As with non-key fields, output control is performed using parameter
FIELDCAT-NO_OUT.
no_out (field in the available fields list)
Value range: SPACE, 'X'
'X' = Field is not displayed on the current list.
The field is available to the user in the field list and can be
interactively selected as a display field.
At row level, the user can use the detail function to display the
content of these fields.
See also the documentation on the 'Detail screen' section of
parameter IS_LAYOUT.
no_zero (suppress zeros)
Value range: SPACE, 'X'
Only relevant to value fields
'X' = Supress zeros
no_sign (no +/- sign)
Value range: SPACE, 'X'
Only relevant to value fields
'X' = Value output without +/- signs.
tech (technical field)
Value range: SPACE, 'X'
'X' = Technical field
The field cannot be output on the list and cannot be shown
interactively by the user.
The field may only be used in the field catalog (not in IT_SORT,...).
emphasize (highlight column in color)
Value range: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off '1'=on)
'X' = The column is highlighted in the default color for color
highlighting.
'Cxyz' = The column is highlighted in the coded color:
- C: Color (coding must start with C)
- x: Color number
- y: Intensified
- z: Inverse
hotspot (column as hotspot)
Value range: SPACE, 'X'
'X' = The cells of the column are output as a hotspot.
do_sum (calculate totals for column)
Value range: SPACE, 'X'
'X' = Totals are calculated for this field of the internal output
table.
This function can also be used interactively by the user.
no_sum (totals calculation not allowed)
Value range: SPACE, 'X'
'X' = No totals may be calculated for this field although the data
type of the field allows totalling.
Formatting column contents
icon (icon)
Value range: SPACE, 'X'
'X' = The column contents are displayed as an icon.
The column contents of the internal output table must consist of
valid icon strings (@xx@).
The caller should consider the problem of printing icons.
symbol (symbol)
Value range: SPACE, 'X'
'X' = The column contents are output as a symbol.
The column contents of the internal output table must consist of
valid symbol characters.
The caller should consider the problem of printing symbols.
Although symbols can generally be printed, they are not always shown
correctly depending on the printer configuration.
just (justification)
Value range: SPACE, 'R', 'L', 'C'
Only relevant to fields of data type CHAR or NUMC
' ' = Default justification according to data type
'R' = Right-justified output
'L' = Left-justified output
'C' = Centered output
The justification of the column header depends on the justification
of the column contents. You cannot justify the column header
independently of the column contents.
lzero (leading zeros)
Value range: SPACE, 'X'
Only relevant to fields of data type NUMC
By default, NUMC fields are output in the ALV right-justified
without leading zeros.
'X' = Output with leading zeros
edit_mask (field formatting)
Value range: SPACE, mask
mask = See documentation on the WRITE formatting option
USING EDIT MASK mask
Using mask = '== conv' you can force an output conversion conv.
ALV Color Code:
* Colour code : *
* Colour is a 4-char field where : *
* - 1st char = C (color property) *
* - 2nd char = color code (from 0 to 7) *
* 0 = background color *
* 1 = blue *
* 2 = gray *
* 3 = yellow *
* 4 = blue/gray *
* 5 = green *
* 6 = red *
* 7 = orange *
* - 3rd char = intensified (0=off, 1=on) *
* - 4th char = inverse display (0=off, 1=on) *
* *
* Colour overwriting priority : *
* 0 = background color *
* 1. Line *
* 2. Cell *
* 3. Column *
Calling Standard Buttons in Custom PF Status:
- Go to program SAPLSLVC_FULLSCREEN
- Go to GUI status STANDARD_FULLSCREEN
- Add required standard code to your custom PF status
Fetching System Terminal Name:
DATA: opcode_usr_attr(1) TYPE x VALUE 5,
terminal TYPE usr41-terminal.
CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_usr_attr
ID 'TERMINAL' FIELD terminal.
WRITE:/ 'Terminal:', terminal.
Finding IP Address:
CALL METHOD cl_gui_frontend_services=>get_ip_address
RECEIVING
ip_address = ip (string)
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
How to unset MS word as editor:
Go to report RSCPSETEDITOR & execute. Unselect the Smartform as follows.
Different Viewing of Output as Modal Dialog:
cl_demo_output=>display( it_mara ).
35 comments:
I am very greatful to you that you share very informative post with us...
Simple Finance Online Training
SAP SD Online Training
Thanks for the great information in your blog on It was so nice article Thank you for valuable informationsap video tutorials
Thanks for sharing this informative blog..Your blog is really useful for me. sap videos tutorials
Fabulous..!!! The information you Provided is much useful. sap videos
Thank you for giving this best information. It’s a very nice topic. sap video
Thank you. sir, Really I like your post on. sap video
This article is really contains lot more information. sap training videos
Thank you. It is such a wonderful post. sap video training
Thanks for the interesting information. sap training videos
Thanks for sharing this informative blog..Your blog is really useful for me. sap video training
Thanks for the interesting information. sapvideos
Fabulous..!!! The information you Provided is much useful. sap videos tutorials
The information you have posted here is really useful and interesting too & here. pratap reddy sap hana videos
Thanks for the detailed info about SAP. pratap reddy sap hana videos
This article is really contains lot more information. pratap reddy sap hana videos
This article is really contains lot more information. pratap reddy sap hana videos
Well it Was Very Good Information. Thanks for sharing this Information. pratap reddy sap hana videos
This paragraph gives clear idea for the new viewers of blogging, Thanks you.
SAP HANA Training in Gurgaon
Nice post. Thanks for sharing such useful information.
SAP ABAP Training institute in Delhi
hi your blog Article is very nice & thanks for sharing the information.
sap sucess factor coaching in hyderabad
Good post! Thanks for sharing this Information.The information you Provided is much useful onsap hr abap online classes
very nice information provided thanks for sharing for more do visit
SAP ABAP Training in Texas
Fabulous..!!! The information you Provided is much useful
SAP FICO with S4 Hana Simple Finance Training in Hyderabad
Calfre finds the best training institute in Ameerpet for more details about sap abap training in ameerpet visit Click Here
hi, your blog is so helpful for me to learn SAP ABAP
https://www.calfre.com/India/Hyderabad/SAP-ABAP-Training/listingcity
nice blog thanks for sharing such a beautiful information
click here
Thanks for sharing this informative blog post. Nice video. easy to understand, really helpful for learning.
WorkFusion Training in Hyderabad
Thank you for sharing useful bolg details, its very informative, please visit us at
SAP ABAP Training in Austin
Hi SANDIP ROY,
The information have been given by this blog, which is very informative and truly helpful, for who are looking for SAP MM Training in Hyderabad. Sieve Software is the best institute for SAP MM training and placements in Hyderabad.
Thank you for posting the valuable information.
SAP hana Training in Hyderabad
Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
SAP reseller
sap business intelligence services
SAP FIORI Training in Chennai from the best and experienced SAP Consultants get trained and become the expert in SAP FIORI training in Chennai
reach us@ 8122241286 & 9003085882
http://thecreatingexperts.com/category/sap-fiori-training-in-chennai/
Great information. the information provided is of great
use as i got to learn new things. If you are looking for
real time training by industry experts with live projects
and placement support.kindly contact the creating experts
Reach our Technical Experts @ 8122241286 / 9003085882.
Thank you for sharing the article. The data that you provided in the blog is informative and effective.
Best DevOps Training Institute
Post a Comment