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_port function help

Former Member
0 Likes
1,859

Hi experts,

Please have a look of attached picture, I want to remove the object which is in the red area.

How can I remove that object. The code is as below.

REPORT  zgraph1.

DATA: BEGIN OF objt OCCURS 1.

include structure gpoobjt.

DATA: END OF objt.

DATA: BEGIN OF area_tab OCCURS 1.

include structure gpoarea.

DATA: END OF area_tab.

DATA: BEGIN OF col_text OCCURS 1,

c(40),

END OF col_text.

DATA: BEGIN OF values OCCURS 1,

p1 TYPE p,

p2 TYPE p,

p3 TYPE p,

p4 TYPE p,

p5 TYPE p,

p6 TYPE p,

p7 TYPE p,

p8 TYPE p,

p9 TYPE p,

END OF values.

DATA: BEGIN OF axis OCCURS 4.

         INCLUDE STRUCTURE gpoaxis.

DATA: END OF axis.

DATA save LIKE sy-tabix.

DEFINE mac_axis.

   axis-pos     = &1.

   axis-backclr = &2.

   axis-textclr = &3.

   axis-scalclr = &4.

   axis-shadow  = &5.                 

   axis-ticks   = &6.                

   axis-start   = &7.                

   axis-end     = &8.              

   append axis.

END-OF-DEFINITION.

DEFINE MAC_TXT.

   APPEND &1 TO COL_TEXT.

END-OF-DEFINITION.

SET PF-STATUS 'graf'.

MAC_TXT :'Coil Length'.

* Attributes for $AXIS

MAC_AXIS  'RIGHT'  'DARKGRAY'  'WHITE'  'WHITE'  'N'  '50'  '10'  '100' .

MAC_AXIS  'TOP'  'DARKGRAY'  'WHITE'  'WHITE'  space '50'  '0'  '100' .

MAC_AXIS 'LEFT'  'DARKGRAY'  'WHITE'  'WHITE'  'N'  '10'  '0'  '100' .

MAC_AXIS 'BOTTOM'  'DARKGRAY'  'WHITE'  'WHITE'  'N'  '50'  '0' '100' .

* 1. Trend linE

objt-form = 'RECTANGLE' .

objt-fillclr = 'GRAY' .

OBJT-LINECLR = 'GRAY'.

values-p1 = 120.

APPEND objt.

APPEND values.

area_tab-form = 'RECTANGLE' .

area_tab-fillclr = 'DARKGRAY' .

area_tab-xfrom = '0' .

area_tab-xto = '100' .

area_tab-yfrom = '5' .

area_tab-yto = '100' .

*area_tab-title = 'winner takes ALL' .

APPEND area_tab.

area_tab-form = 'RECTANGLE' .

area_tab-fillclr = 'GRAY' .

area_tab-xfrom = '0' .

area_tab-xto = '50' .

area_tab-yfrom = '5' .

area_tab-yto = '10' .

area_tab-title = 'Trim' .

area_tab-textclr = 'BLUE'.

area_tab-ALIGN = 'BOTTOMCENTER'.

APPEND area_tab.

area_tab-form = 'RECTANGLE' .

area_tab-fillclr = 'GRAY' .

area_tab-xfrom = '0' .

area_tab-xto = '50' .

area_tab-yfrom = '95' .

area_tab-yto = '100' .

area_tab-title = 'Trim' .

area_tab-textclr = 'BLUE'.

area_tab-ALIGN = 'BOTTOMCENTER'.

APPEND area_tab.

   CALL FUNCTION 'GRAPH_PORT'

     EXPORTING

       title_title     = 'Graphical View of Coil'

*      title_info      = 'the two OBJECTS over several years'

       title_textclr   = 'BLUE'

       title_backclr   = 'DARKGRAY'

       title_size      = '6'

       frm_backclr     = 'GRAY'

       frm_scalclr     = 'WHITE'

       frm_scalmod     = 'LONGDASH'

       frm_gridx       = '10'

       frm_gridy       = '10'

       frm_shadow      = 'X'

       obj_xval        = '0'

       obj_yval        = '1'

       obj_sval        = '2'

       obj_xarr        = '3'

       obj_yarr        = '4'

     TABLES

       axis            = axis

       col_text        = col_text

       objt            = objt

       VALUES          = VALUES

       area_tab        = area_tab.

12 REPLIES 12
Read only

Former Member
0 Likes
1,823

Hi Narendra,

As per your Code i getting different Output .

Removing that arrow which is u pointing in ur Screen Shot , Click on View Option and Select the Check box :"Hide Trend Arrows"

Regard's

Smruti

Read only

0 Likes
1,823

Dear Smruti,

I know about that check box.

But I want to do this by program code.

Read only

0 Likes
1,823

Update some line in ur code as below ....

* 1. Trend linE

objt-form = '0' .

objt-fillclr = ' ' .

OBJT-LINECLR = ' '.

values-p1 = ' ' .            "120.

APPEND objt.

APPEND values.

Then Check ..

Regard's

Smruti



Read only

0 Likes
1,823

Dear Smruti,

Thank you very much for quick help.

I am not able to understand about the different output of the same code.

In your uploaded image there are no any outer light gray area but in my image I have outer light gray area how can I remove that area.

I want the graph exact that you have uploaded.

Is there any code to populate the graph exact like your graph.

Read only

0 Likes
1,823

This is same which u provided , no changes in code .

Read only

0 Likes
1,823

OK but may be it is the difference of SAP GUI or SAP Version.

I am using SAP ECC 6.0 EHP5 and SAP GUI 7.30.

would like to tell me about your softwares versions.

or any other code to remove that area.

Thanks.

Read only

0 Likes
1,823

mine SAP GUI 7.2 , (ECC 6.0 incl. EHP6)

Regard's

Smruti

Read only

0 Likes
1,823

Hi experts,

How can I get return Picture file to use in Smartforms.

Is there any way to get the picture file and also I want to change the font size and remove the shadow of graph title.

Plz HELP.

Read only

Former Member
0 Likes
1,823

Hi experts,

How can I get return Picture file to use in Smartforms.

Is there any way to get the picture file and also I want to change the font size and remove the shadow of graph title.

Plz reply.

Read only

Former Member
0 Likes
1,823

Plz reply,

I want to print the graph image in smartforms.

is there any way to get the image file and print it in the smartforms.

help its urgent.

thanks

Read only

0 Likes
1,823

Hi experts,

Plz reply.

Read only

0 Likes
1,823

experts plz reply.....................

its urgent........ thanks