Application Development and Automation 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: 
Read only

Graph and data on the same output screen

Former Member
0 Likes
990

Can we display graph, selected input and some text corresponding to the graph on the same output screen?..

I am using GFW_PRES_SHOW function to display the graph.

Thanks,

Sri

Can we display graph, selected input and some text corresponding to the graph on the same output screen?..

I am using GFW_PRES_SHOW function to display the graph.

Thanks,

Sri

4 REPLIES 4
Read only

Former Member
0 Likes
792

Hi,

Check this demo program GFW_DEMO_HIER2

Thanks.

Read only

Former Member
0 Likes
792

This message was moderated.

Read only

Former Member
0 Likes
792

Yes, it is possible to have multiple items (Grid, Pictures, graph, calendar, text editor etc) in the same output screen. This can be achieved using Control Frameworks. You can see the following code that is used to display a table and a graph in the same output screen. However a study on Control framework will give you a wider picture.<br /> <u>Steps involved:</u><br /> u2022Create different custom controls in the screen painter to hold the different items to be displayed.<br /> u2022Create objects for these containers<br /> u2022Link the application control ( graph, ALV, text editor etc) with the objects of the container control.<br /> <br /> TYPE-POOLS: GFW.

Data: cust1 TYPE REF TO cl_gui_custom_container,

cust2 TYPE REF TO cl_gui_custom_container,

grid1 TYPE REF TO cl_gui_alv_grid,

i_fieldcat1 TYPE lvc_t_fcat,

wa_fieldcat1 TYPE lvc_s_fcat.

&nbsp;

In PBO:

--&gt;&gt;Creating a container object to hold the table &nbsp;

IF cust1 IS INITIAL.

CREATE OBJECT cust1

EXPORTING

container_name = 'CUSTOM_TABLE'

EXCEPTIONS.

CREATE OBJECT grid1

EXPORTING

i_parent = cust1

EXCEPTIONS

ENDIF.

&nbsp;

*****Manually fill the field catalog

*******Fill the details <font color="navy"><b>for</b></font> grid1

CALL METHOD grid1-&gt;set_table_for_first_display

&nbsp;

                • Refresh the table data

CALL METHOD grid1-&gt;refresh_table_display

EXCEPTIONS.

--&gt;&gt; creating a container object to hold the graph

IF cust2 IS INITIAL.

CREATE OBJECT cust2

EXPORTING

container_name = 'CUSTOM_GRAPH'

EXCEPTIONS.

ENDIF.

</code></pre><br />

<br />

Then you can call the function Module 'GFW_PRES_SHOW' and pass the container object name (cust2) for PARENT parameter and display the graph.<br /> <br />

Note: Here 'CUSTOM_TABLE' & 'CUSTOM_GRAPH' are the names given to the Custom controls created in the screen painter of the output screen. <br /> <br /> It is important to free the containers once used. So in the PAI,<br /> **--&gt;&gt; free the containers<br />

CALL METHOD cust1-&gt;free<br />

CALL METHOD cust2-&gt;free<br />

CALL METHOD grid1-&gt;free.<br />

Read only

Former Member
0 Likes
792

Hi sri,

how to you process "Graph and data on the same output screen", i have the same issue.

thanks!

james

Edited by: james huang on Dec 28, 2009 10:51 AM