Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALV GRID

Former Member
0 Kudos

I need function module for display 2 ALV grid in one page.And also, a function module for displaying end-of-page.(like for top-of-page ,we use REUSE_ALV_COMMENTARY_WRITE)

Please reply imm

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You can do it if you create the containers:

have a look at this code:

PERFORM f_seleciona_dados .

PERFORM f_monta_saida .

SET PF-STATUS 'MENU'.

SET TITLEBAR 'T01'.

CALL METHOD cl_gui_cfw=>flush.

      • Cria o objeto para o top-of-page

CREATE OBJECT ob_top

EXPORTING style = 'ALV_GRID'.

      • Container principal

IF container IS INITIAL .

CREATE OBJECT container

EXPORTING

side =

cl_gui_docking_container=>dock_at_left

ratio = 95

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

lifetime_dynpro_dynpro_link = 5

OTHERS = 6

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

ENDIF .

      • Spliter, para fazer a divisão

CREATE OBJECT ob_splitter

EXPORTING parent = container

rows = 3

columns = 1.

      • Chamo o método que retorna os containers do TOP e do GRID e grid 2

CALL METHOD ob_splitter->get_container

EXPORTING

row = 1

column = 1

RECEIVING

container = g_parent_html.

CALL METHOD ob_splitter->get_container

EXPORTING

row = 2

column = 1

RECEIVING

container = g_parent_grid.

CALL METHOD ob_splitter->get_container

EXPORTING

row = 3

column = 1

RECEIVING

container = g_parent_grid_2.

    • Seta o tamanho do TOP-OF-PAGE

CALL METHOD ob_splitter->set_row_height

EXPORTING

id = 1

height = 19.

      • Seta o tamanho do Grid 1

CALL METHOD ob_splitter->set_row_height

EXPORTING

id = 2

height = 81.

PERFORM f_exibe_grid_1 .

PERFORM f_exibe_grid_2 .

*&----


*

*& Form f_exibe_grid_1

*&----


*

FORM f_exibe_grid_1 .

      • Instancia o objeto para o grid GRID

CREATE OBJECT ob_alvgrid

EXPORTING

  • i_appl_events = 'X'

  • i_parent = container.

i_parent = g_parent_grid.

      • Registra o evento TOP-OF-PAGE

CREATE OBJECT ob_event_handler .

SET HANDLER ob_event_handler->handle_top_of_page FOR

ob_alvgrid .

  • SET HANDLER ob_event_handler->print_top_of_page FOR

  • ob_alvgrid .

      • Monta o catálogo de campo para o ALV GRID

PERFORM monta_fieldcat .

      • Define ordenação para o ALV GRID

PERFORM monta_sortfield .

      • Define o layout do ALV GRID

CLEAR eg_layout .

MOVE: 'A' TO eg_layout-sel_mode ,

'X' TO eg_layout-zebra ,

'X' TO eg_layout-cwidth_opt .

      • Chama a exibição do ALV_GRID

CALL METHOD ob_alvgrid->set_table_for_first_display

EXPORTING

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

  • I_CONSISTENCY_CHECK =

  • I_STRUCTURE_NAME =

  • IS_VARIANT =

  • I_SAVE =

  • I_DEFAULT = 'X'

is_layout = eg_layout

  • IS_PRINT =

  • IT_SPECIAL_GROUPS =

  • IT_TOOLBAR_EXCLUDING =

  • IT_HYPERLINK =

  • IT_ALV_GRAPHICS =

CHANGING

it_outtab = tg_saida[]

it_fieldcatalog = tg_fieldcat

it_sort = tg_sortfields

  • IT_FILTER =

EXCEPTIONS

invalid_parameter_combination = 1

program_error = 2

too_many_lines = 3

OTHERS = 4

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

      • REGISTRAR OS EVENTOS

SET HANDLER lcl_event_handler=>on_toolbar FOR ob_alvgrid .

SET HANDLER lcl_event_handler=>on_user_command FOR ob_alvgrid .

SET HANDLER lcl_event_handler=>on_double_click FOR ob_alvgrid .

CALL METHOD ob_alvgrid->set_toolbar_interactive .

CALL METHOD ob_top->initialize_document .

CALL METHOD ob_alvgrid->list_processing_events

EXPORTING

i_event_name = 'TOP_OF_PAGE'

i_dyndoc_id = ob_top.

PERFORM monta_html_header .

CALL METHOD ob_alvgrid->set_html_header.

ENDFORM. " f_exibe_grid_1

*&----


*

*& Form f_exibe_grid_2

*&----


*

FORM f_exibe_grid_2 .

DATA: tl_exclude TYPE ui_functions.

CREATE OBJECT ob_event_handler_2 .

      • Instancia o objeto para o grid GRID

CREATE OBJECT ob_alvgrid_2

EXPORTING

  • i_appl_events = 'X'

  • i_parent = container.

i_parent = g_parent_grid_2.

      • Monta o catálogo de campo para o ALV GRID

PERFORM monta_fieldcat_2 .

      • Define ordenação para o ALV GRID

PERFORM monta_sortfield_2 .

PERFORM f_exclui_botoes_menu CHANGING tl_exclude .

      • Define o layout do ALV GRID

CLEAR eg_layout_2 .

MOVE: 'A' TO eg_layout_2-sel_mode ,

text-t02 TO eg_layout_2-grid_title ,

'X' TO eg_layout_2-cwidth_opt .

      • Chama a exibição do ALV_GRID

CALL METHOD ob_alvgrid_2->set_table_for_first_display

EXPORTING

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

  • I_CONSISTENCY_CHECK =

  • I_STRUCTURE_NAME =

  • IS_VARIANT =

  • I_SAVE =

  • I_DEFAULT = 'X'

is_layout = eg_layout_2

  • IS_PRINT =

  • IT_SPECIAL_GROUPS =

it_toolbar_excluding = tl_exclude

  • IT_HYPERLINK =

  • IT_ALV_GRAPHICS =

CHANGING

it_outtab = tg_saida_2[]

it_fieldcatalog = tg_fieldcat_2

it_sort = tg_sortfields_2

  • IT_FILTER =

EXCEPTIONS

invalid_parameter_combination = 1

program_error = 2

too_many_lines = 3

OTHERS = 4

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

      • REGISTRAR OS EVENTOS

SET HANDLER lcl_event_handler_2=>on_toolbar FOR ob_alvgrid_2 .

SET HANDLER lcl_event_handler_2=>on_user_command FOR ob_alvgrid_2 .

CALL METHOD ob_alvgrid_2->set_toolbar_interactive .

CALL METHOD ob_alvgrid_2->register_edit_event

EXPORTING

i_event_id = cl_gui_alv_grid=>mc_evt_enter.

SET HANDLER ob_event_handler_2->handle_data_changed FOR ob_alvgrid_2.

ENDFORM. " f_exibe_grid_2

9 REPLIES 9

Former Member
0 Kudos

Hi,

For top-of-page, end-of-page, commentry write follow this link.

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm

For displaying 2 ALV grid in single report you need to take container and call the FM in it.

I will check the Example and will post shortly.

Thanks.

If this helps you award points.

Former Member
0 Kudos

You can do it if you create the containers:

have a look at this code:

PERFORM f_seleciona_dados .

PERFORM f_monta_saida .

SET PF-STATUS 'MENU'.

SET TITLEBAR 'T01'.

CALL METHOD cl_gui_cfw=>flush.

      • Cria o objeto para o top-of-page

CREATE OBJECT ob_top

EXPORTING style = 'ALV_GRID'.

      • Container principal

IF container IS INITIAL .

CREATE OBJECT container

EXPORTING

side =

cl_gui_docking_container=>dock_at_left

ratio = 95

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

lifetime_dynpro_dynpro_link = 5

OTHERS = 6

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

ENDIF .

      • Spliter, para fazer a divisão

CREATE OBJECT ob_splitter

EXPORTING parent = container

rows = 3

columns = 1.

      • Chamo o método que retorna os containers do TOP e do GRID e grid 2

CALL METHOD ob_splitter->get_container

EXPORTING

row = 1

column = 1

RECEIVING

container = g_parent_html.

CALL METHOD ob_splitter->get_container

EXPORTING

row = 2

column = 1

RECEIVING

container = g_parent_grid.

CALL METHOD ob_splitter->get_container

EXPORTING

row = 3

column = 1

RECEIVING

container = g_parent_grid_2.

    • Seta o tamanho do TOP-OF-PAGE

CALL METHOD ob_splitter->set_row_height

EXPORTING

id = 1

height = 19.

      • Seta o tamanho do Grid 1

CALL METHOD ob_splitter->set_row_height

EXPORTING

id = 2

height = 81.

PERFORM f_exibe_grid_1 .

PERFORM f_exibe_grid_2 .

*&----


*

*& Form f_exibe_grid_1

*&----


*

FORM f_exibe_grid_1 .

      • Instancia o objeto para o grid GRID

CREATE OBJECT ob_alvgrid

EXPORTING

  • i_appl_events = 'X'

  • i_parent = container.

i_parent = g_parent_grid.

      • Registra o evento TOP-OF-PAGE

CREATE OBJECT ob_event_handler .

SET HANDLER ob_event_handler->handle_top_of_page FOR

ob_alvgrid .

  • SET HANDLER ob_event_handler->print_top_of_page FOR

  • ob_alvgrid .

      • Monta o catálogo de campo para o ALV GRID

PERFORM monta_fieldcat .

      • Define ordenação para o ALV GRID

PERFORM monta_sortfield .

      • Define o layout do ALV GRID

CLEAR eg_layout .

MOVE: 'A' TO eg_layout-sel_mode ,

'X' TO eg_layout-zebra ,

'X' TO eg_layout-cwidth_opt .

      • Chama a exibição do ALV_GRID

CALL METHOD ob_alvgrid->set_table_for_first_display

EXPORTING

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

  • I_CONSISTENCY_CHECK =

  • I_STRUCTURE_NAME =

  • IS_VARIANT =

  • I_SAVE =

  • I_DEFAULT = 'X'

is_layout = eg_layout

  • IS_PRINT =

  • IT_SPECIAL_GROUPS =

  • IT_TOOLBAR_EXCLUDING =

  • IT_HYPERLINK =

  • IT_ALV_GRAPHICS =

CHANGING

it_outtab = tg_saida[]

it_fieldcatalog = tg_fieldcat

it_sort = tg_sortfields

  • IT_FILTER =

EXCEPTIONS

invalid_parameter_combination = 1

program_error = 2

too_many_lines = 3

OTHERS = 4

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

      • REGISTRAR OS EVENTOS

SET HANDLER lcl_event_handler=>on_toolbar FOR ob_alvgrid .

SET HANDLER lcl_event_handler=>on_user_command FOR ob_alvgrid .

SET HANDLER lcl_event_handler=>on_double_click FOR ob_alvgrid .

CALL METHOD ob_alvgrid->set_toolbar_interactive .

CALL METHOD ob_top->initialize_document .

CALL METHOD ob_alvgrid->list_processing_events

EXPORTING

i_event_name = 'TOP_OF_PAGE'

i_dyndoc_id = ob_top.

PERFORM monta_html_header .

CALL METHOD ob_alvgrid->set_html_header.

ENDFORM. " f_exibe_grid_1

*&----


*

*& Form f_exibe_grid_2

*&----


*

FORM f_exibe_grid_2 .

DATA: tl_exclude TYPE ui_functions.

CREATE OBJECT ob_event_handler_2 .

      • Instancia o objeto para o grid GRID

CREATE OBJECT ob_alvgrid_2

EXPORTING

  • i_appl_events = 'X'

  • i_parent = container.

i_parent = g_parent_grid_2.

      • Monta o catálogo de campo para o ALV GRID

PERFORM monta_fieldcat_2 .

      • Define ordenação para o ALV GRID

PERFORM monta_sortfield_2 .

PERFORM f_exclui_botoes_menu CHANGING tl_exclude .

      • Define o layout do ALV GRID

CLEAR eg_layout_2 .

MOVE: 'A' TO eg_layout_2-sel_mode ,

text-t02 TO eg_layout_2-grid_title ,

'X' TO eg_layout_2-cwidth_opt .

      • Chama a exibição do ALV_GRID

CALL METHOD ob_alvgrid_2->set_table_for_first_display

EXPORTING

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

  • I_CONSISTENCY_CHECK =

  • I_STRUCTURE_NAME =

  • IS_VARIANT =

  • I_SAVE =

  • I_DEFAULT = 'X'

is_layout = eg_layout_2

  • IS_PRINT =

  • IT_SPECIAL_GROUPS =

it_toolbar_excluding = tl_exclude

  • IT_HYPERLINK =

  • IT_ALV_GRAPHICS =

CHANGING

it_outtab = tg_saida_2[]

it_fieldcatalog = tg_fieldcat_2

it_sort = tg_sortfields_2

  • IT_FILTER =

EXCEPTIONS

invalid_parameter_combination = 1

program_error = 2

too_many_lines = 3

OTHERS = 4

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

      • REGISTRAR OS EVENTOS

SET HANDLER lcl_event_handler_2=>on_toolbar FOR ob_alvgrid_2 .

SET HANDLER lcl_event_handler_2=>on_user_command FOR ob_alvgrid_2 .

CALL METHOD ob_alvgrid_2->set_toolbar_interactive .

CALL METHOD ob_alvgrid_2->register_edit_event

EXPORTING

i_event_id = cl_gui_alv_grid=>mc_evt_enter.

SET HANDLER ob_event_handler_2->handle_data_changed FOR ob_alvgrid_2.

ENDFORM. " f_exibe_grid_2

0 Kudos

Thanks Alexandria.Good work.

But I need to put 2 ALV grid in a screen without using OBJECTS ORIENTED CONCEPTS.

kindly help me imm

0 Kudos

Jayasree,

Without using OO I don't think its possible.

Regards,

Ravi

0 Kudos

Jayasree,

Without using OO I don't think its possible.

Regards,

Ravi

Former Member
0 Kudos

Hi Jayasree,

i think to get two alv in one page then you need to use <b>splitter container</b>

see the demo prgoramme <b>Report RSDEMO_SPLITTER_CONTROL</b> this may help you.

for 2

check this links it may help you...

http://help.sap.com/saphelp_erp2005/helpdata/en/22/a3f5f5d2fe11d2b467006094192fe3/frameset.htm

hope this helps you.

regards,

venu.

Former Member
0 Kudos

Hi Jayasree,

You can use block list to dispaly to ALV in one report.

Looa at the demo program <b>BALVBT01</b>

Or if you are familiar with object oriented concepts.

In the screen take two containers and try calling the

grdis on them.

Look at the demo program <b>BCALV_GRID_01</b>. which tell you how to place grid in a container,In the same way you can do for two grids using two containers.

Thanks& Regards,

Siri.

former_member358074
Discoverer
0 Kudos

Hi Alexandre,

your reply helped me in triggering the top_of_page event in the OOPS ALV.

Now the next thing, is that How can we write at this event using formattings, like used in classic ALV using function module 'RUSE_ALV_COMMENTRARY_WRITE'.

As a matter of fact, I am not using container control.

thanks,

Ravi

0 Kudos

you have to use containers, and you have to develop a class handle with the events of cl_gui_alv_grid, because the top-of-page is an event.

Take a look in this code:

these are the most important parts of the code.

*----


*

      • Variaveis Globias

*----


*

data:

      • Objetos para o grid alv

ob_container type ref to cl_gui_docking_container , " Container

ob_alvgrid type ref to cl_gui_alv_grid , " ALV GRID

vg_pos type i ,

ok_code(4) type c ,

vg_code(4) type c ,

ob_top type ref to cl_dd_document ,

g_parent_html type ref to cl_gui_container,

g_parent_grid type ref to cl_gui_container,

ob_html_cntrl type ref to cl_gui_html_viewer,

ob_splitter type ref to cl_gui_splitter_container .

*----


*

      • Includes

*----


*

include .

include zimm0007 .

data: ob_event_handler type ref to lcl_event_handler .

*&----


*

*& Module status_0100 OUTPUT

*&----


*

  • text

*----


*

module status_0100 output.

set pf-status 'MENU'.

set titlebar 'T01'.

      • Cria o objeto para o top-of-page

create object ob_top

exporting style = 'ALV_GRID'.

      • Container principal

if ob_container is initial .

create object ob_container

exporting

side =

cl_gui_docking_container=>dock_at_left

ratio = 95

exceptions

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

lifetime_dynpro_dynpro_link = 5

others = 6

.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

endif .

      • Spliter, para fazer a divisão

create object ob_splitter

exporting parent = ob_container

rows = 2

columns = 1.

      • Chamo o método que retorna os containers do TOP e do GRID

call method ob_splitter->get_container exporting

row = 1

column = 1

receiving container = g_parent_html.

call method ob_splitter->get_container exporting

row = 2

column = 1

receiving container = g_parent_grid.

      • Seta o tamanho do TOP-OF-PAGE

call method ob_splitter->set_row_height

exporting

id = 1

height = 25 .

      • Instancia o objeto para o grid GRID

create object ob_alvgrid

exporting

  • i_appl_events = 'X'

  • i_parent = container.

i_parent = g_parent_grid.

      • Registra o evento TOP-OF-PAGE

create object ob_event_handler .

set handler ob_event_handler->handle_top_of_page for

ob_alvgrid .

      • Monta o catálogo de campo para o ALV GRID

perform monta_fieldcat .

      • Define ordenação para o ALV GRID

perform monta_sortfield .

      • Define o layout do ALV GRID

clear eg_layout .

move:'A' to eg_layout-sel_mode .

  • text-011 to eg_layout-grid_title .

call method ob_alvgrid->set_table_for_first_display

exporting

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

  • I_CONSISTENCY_CHECK =

  • I_STRUCTURE_NAME =

  • IS_VARIANT =

  • I_SAVE =

  • I_DEFAULT = 'X'

is_layout = eg_layout

  • IS_PRINT =

  • IT_SPECIAL_GROUPS =

  • IT_TOOLBAR_EXCLUDING =

  • IT_HYPERLINK =

  • IT_ALV_GRAPHICS =

changing

it_outtab = tg_saida

it_fieldcatalog = tg_fieldcat

it_sort = tg_sortfields

  • IT_FILTER =

exceptions

invalid_parameter_combination = 1

program_error = 2

too_many_lines = 3

others = 4

.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

call method ob_top->initialize_document .

call method ob_alvgrid->list_processing_events

exporting i_event_name = 'TOP_OF_PAGE'

i_dyndoc_id = ob_top .

perform monta_html_header .

call method ob_alvgrid->set_html_header.

endmodule. " status_0100 OUTPUT

*&----


*

*& Form monta_html_header

*&----


*

form monta_html_header.

data: vl_length type i .

if ob_html_cntrl is initial.

create object ob_html_cntrl

exporting

parent = g_parent_html.

endif.

free memory .

  • reuse_alv_grid_commentary_set

call function 'REUSE_ALV_GRID_COMMENTARY_SET'

exporting

document = ob_top

bottom = space

importing

length = vl_length.

if vl_length > 0 .

call method ob_splitter->set_row_mode exporting mode =

cl_gui_splitter_container=>mode_absolute.

call method ob_splitter->set_row_height exporting

height = vl_length

id = 1.

endif.

  • get TOP->HTML_TABLE ready

call method ob_top->merge_document.

  • set wallpaper

  • call method gt_grid-top->set_document_background

  • exporting picture_id = i_background_id.

  • export to Memory for HTML Conversion

export grid_top_html from ob_top->html_table

      • put in next line as soon as 5.0(B20) has cl_dd_area->table_of_pictu

  • top_pictures from gt_grid-top->table_of_pictures

to memory id 'TOP_HTML_FOR_ALV'.

  • connect TOP document to HTML-Control

ob_top->html_control = ob_html_cntrl.

  • display TOP document

call method ob_top->display_document

exporting reuse_control = 'X'

parent = g_parent_html

exceptions html_display_error = 1.

if sy-subrc ne 0.

  • ??????????

endif.

endform. " monta_html_header

THIS IS THE CLASS THAT YOU HAVE TO USE TO HANDLE WITH THE EVENTS:

$$********************************************************************

$$ *

$$ PROGRAMA : Definição da classe de implementação de eventos *

$$ DESCRIÇÃO: Este include contém a definição e a implementação de *

$$ uma classe para tratar dos eventos da classe *

$$ CL_GUI_ALV_GRID *

$$ *

$$ TIPO : INCLUDE *

$$ AUTOR : Alexandre Noguueira(Accenture) *

$$ DATA : 12/02/2004 *

$$ *

$$********************************************************************

$$ HISTÓRICO DAS MODIFICAÇÕES *

$$----

-


*

$$ DATA | AUTOR | DESCRIÇÃO *

$$----

-


*

$$ | | *

$$********************************************************************

*----


*

  • INCLUDE ZIMM0007 *

*----


*

class lcl_event_handler definition .

public section .

methods handle_top_of_page

for event top_of_page of cl_gui_alv_grid

importing e_dyndoc_id.

endclass .

*----


*

  • CLASS lcl_event_handler IMPLEMENTATION

*----


*

  • ........ *

*----


*

class lcl_event_handler implementation .

      • TOP-OF-PAGE

method handle_top_of_page.

data: tab type ref to cl_dd_table_element,

col1 type ref to cl_dd_area ,

col2 type ref to cl_dd_area,

col3 type ref to cl_dd_area .

data: vl_text type sdydo_text_element ,

l_object_key type bds_typeid value

'LOGO_SPAIPA'.

call method cl_gui_cfw=>flush.

call method e_dyndoc_id->initialize_document .

      • Cria uma tabela com duas colunas.

call method e_dyndoc_id->add_table exporting no_of_columns = 2

border = '0'

width = '100%'

cell_background_transparent = 'X'

importing table = tab.

call method tab->add_column exporting width = '40%'

importing column = col1.

call method tab->add_column exporting width = '30%'

importing column = col2.

call method tab->add_column exporting width = '30%'

importing column = col3.

call method tab->set_column_style exporting

col_no = 1

sap_align = 'LEFT'

sap_valign = 'TOP' .

                                            • COLUNA 1 ******************************

vl_text = 'Controle de proc. de jobs' .

      • Cabeçalho

call method col1->add_text exporting text = vl_text

sap_style = 'HEADING' .

      • Underline

call method col1->underline .

      • Faz continuar na mesma linha a cada chamada do método add_text

call method col1->no_linebreak .

call method col1->new_line .

      • Empresa(texto)

clear vl_text .

vl_text = 'Empresa: ' .

call method col1->add_text exporting text = vl_text

sap_emphasis = cl_dd_area=>strong .

***Empresa

clear vl_text.

vl_text = 'SPPR' .

call method col1->add_text exporting text = vl_text

sap_style = 'NORMAL' .

call method col1->new_line .

      • Data(texto)

vl_text = 'Data: ' .

call method col1->add_text exporting text = vl_text

sap_emphasis = cl_dd_area=>strong .

      • Data

clear vl_text.

concatenate sy-datlo+6(2) '/'

sy-datlo+4(2) '/'

sy-datlo(4)

into vl_text .

call method col1->add_text exporting text = vl_text

sap_style = 'NORMAL' .

call method col1->new_line .

      • Usuário(texto)

vl_text = 'Usuário: ' .

call method col1->add_text exporting text = vl_text

sap_emphasis = cl_dd_area=>strong .

      • Usuário

clear vl_text.

vl_text = sy-uname .

call method col1->add_text exporting text = vl_text

sap_style = 'NORMAL' .

                                          • COLUNA 2 *******************************

call method tab->set_column_style exporting

col_no = 2

sap_align = 'LEFT'

sap_valign = 'TOP' .

call method col2->no_linebreak .

      • Legenda de Status

vl_text = 'Legnda de Status: ' .

call method col2->add_text exporting text = vl_text

sap_emphasis = cl_dd_area=>strong .

call method col2->new_line .

call method col2->new_line .

      • Icone verde - liberado

call method col2->add_icon exporting sap_icon = 'ICON_LED_GREEN' .

clear vl_text .

vl_text = '--> Liberado para processamento' .

call method col2->add_text exporting text = vl_text

sap_style = 'NORMAL' .

call method col2->new_line .

      • Icone amarelo - processando

call method col2->add_icon exporting sap_icon = 'ICON_LED_YELLOW' .

clear vl_text .

vl_text = '--> Em processamento' .

call method col2->add_text exporting text = vl_text

sap_style = 'NORMAL' .

call method col2->new_line .

      • Icone vermelho - terminado com erro

call method col2->add_icon exporting sap_icon = 'ICON_LED_RED' .

clear vl_text .

vl_text = '--> Terminado com erro' .

call method col2->add_text exporting text = vl_text

sap_style = 'NORMAL' .

                                          • COLUNA 3 *******************************

call method col3->add_picture

exporting picture_id = l_object_key .

endmethod.

endclass .

Alexandre Nogueira