create ping alias for your lan

Create alias “/final_ip_range” for each ip of your lan

for i in {1..254};do echo 192.168.0.$i ..$i; done >> /etc/hosts

to test

ping ..7
Advertisements

make alv report with abap

DATA: table_data      TYPE TABLE OF kna1.
DATA: alv_table       TYPE REF TO   cl_salv_table.
DATA: alv_functions   TYPE REF TO   cl_salv_functions_list.

* Get data from database
SELECT * UP TO 10 ROWS FROM kna1 INTO TABLE table_data.

* Generate an instance of the ALV table object
CALL METHOD cl_salv_table=>factory
  IMPORTING
    r_salv_table = alv_table
  CHANGING
    t_table      = table_data.

* Get the reference to the ALV toolbar functions
alv_functions = alv_table->get_functions( ).

* Set all toolbar functions
alv_functions->set_all( abap_true ).

* Display the ALV table.
alv_table->display( ).

write statement abap

print 1 param

WRITE 'hello world'.

print new line “/” and 2 params “:”(for N params use “:”)

WRITE:/ 'hello world', 'mickey'.

print new line before each param

WRITE:/ 'one', /, 'two', /, 'three'.

print color

WRITE:/ 'yellow foreground COL_TOTAL INVERSE ON' RESET INVERSE ON COLOR COL_TOTAL.

WRITE:/ 'yellow background COL_TOTAL INTENSIFIED OFF' RESET INTENSIFIED OFF COLOR COL_TOTAL.

WRITE:/ 'yellow background COL_TOTAL INTENSIFIED ON' RESET INTENSIFIED ON COLOR COL_TOTAL.

print color using FORMAT statement

FORMAT RESET INVERSE ON COLOR COL_TOTAL.
WRITE:/ 'yellow foreground FORMAT COL_TOTAL INVERSE ON'.

FORMAT RESET INTENSIFIED OFF COLOR COL_TOTAL.
WRITE:/ 'yellow background FORMAT COL_TOTAL INTENSIFIED OFF'.

FORMAT RESET INTENSIFIED ON COLOR COL_TOTAL.
WRITE:/ 'yellow background FORMAT COL_TOTAL INTENSIFIED ON'.

colors and codes table

INVERSE ON (FOREGROUND COLOR) INTENSIFIED OFF (BACKGROUND COLOR) INTENSIFIED ON (BACKGROUND COLOR)
COL_NEGATIVE COL_NEGATIVE COL_NEGATIVE
COL_GROUP COL_GROUP COL_GROUP
COL_TOTAL COL_TOTAL COL_TOTAL
COL_NORMAL COL_NORMAL COL_NORMAL
COL_KEY COL_KEY COL_KEY
COL_HEADING COL_HEADING COL_HEADING
COL_BACKGROUND COL_BACKGROUND COL_BACKGROUND

align output text

WRITE:/(256) 'left' LEFT-JUSTIFIED RESET.
WRITE:/(256) 'center' CENTERED RESET INTENSIFIED OFF COLOR COL_TOTAL.
WRITE:/(256) 'right' RIGHT-JUSTIFIED RESET.