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: 

Vertical lines in graph is not displaying

former_member770121
Participant
0 Kudos

Lines is not showing in Vertical chart? what is reason behind it lies is not displaying in graph? Kindly its urgent

Thanks in advance

but I draw the pie chart it is displaying well I also attached snip.

And kindly recommend any article in which chart is displaying with internal table value ?in which we can draw the chart with dynamics value ?

17 REPLIES 17

Sandra_Rossi
Active Contributor
0 Kudos

What means "vertical chart"? You mean the bar chart = your 2nd screenshot?

How do you run that? What is your code?

former_member770121
Participant
0 Kudos

sorry for vertical chart, I mean vertical lines in graph/chart. I also share the code kindly copy the code and check vertical lines in your system in graph is not showing .I share the link and u will be know the parameter.

link : https://sapcodes.com/2015/11/23/business-graphical-chart/

I just change the type of chart, nothing other changes

Link is.

Kindly reply soon.

Sandra_Rossi
Active Contributor
0 Kudos

IMPORTANT

The OP code is based on GFW_PRES_SHOW.

I don't know the rest of OP code, I don't know which value has PRESENTATION_TYPE and which values have other parameters.

Sandra_Rossi
Active Contributor
0 Kudos

Why don't you try the standard demo program DEMO_GFW_PRES_SHOW on your system?

None of the six PRESENTATION_TYPE values give your screenshot:

    CALL FUNCTION 'GFW_PRES_SHOW'
     EXPORTING
          CONTAINER         = 'CONTAINER'
*          PRESENTATION_TYPE = gfw_prestype_area
          PRESENTATION_TYPE = gfw_prestype_horizontal_bars
*          PRESENTATION_TYPE = gfw_prestype_time_axis
*          PRESENTATION_TYPE = gfw_prestype_vertical_bars
*          PRESENTATION_TYPE = GFW_PRESTYPE_LINES
*          PRESENTATION_TYPE = GFW_PRESTYPE_PIE_CHART
*          orientation       = gfw_orient_columns
     TABLES
          VALUES            = VALUES
          COLUMN_TEXTS      = COLUMN_TEXTS
     EXCEPTIONS
          ERROR_OCCURRED    = 1
          OTHERS            = 2.

former_member770121
Participant
0 Kudos

Thank u so much half of the issue is resolved by the Program ( DEMO_GFW_PRES_SHOW) which u told me , further issue is now: when I not add the line in FM ( " orientation = gfw_orient_columns ) but I want both Order measure on graph (Vertical lines should be separate ) should be at some space in between the vertical lines .

Second case is :

When I add the line in FM ( orientation = gfw_orient_columns )then graph is show some like this I also attach the screenshot which is : Both vertical lines display in the same color

Kindly Recommend any solution I want my graph vertical bar should like this (there should be space between them )

former_member770121
Participant
0 Kudos

I want my graph should display like this in different color lines and Space should like this graph . Kimdly Recommed any solution its urgent

Sandra_Rossi
Active Contributor
0 Kudos

Sorry to say that, for information nobody else but you cares about "urgent".

To get answers quickly, you should post your code so that people can run it on their system and explain to you what you are doing wrong.

NB: there are not so many possibilities with the FM parameters, with little more effort you should be able to find by yourself.

xiswanto
Active Participant
0 Kudos

if you want a better customization on chart display, explore the class CL_GUI_CHART_ENGINE on internet as it might suit your requirement ( such as special color )

xiswanto
Active Participant
0 Kudos

*look at program GRAPHICS_GUI_CE_DEMO for example of the cl_gui_chart_engine

Sandra_Rossi
Active Contributor
0 Kudos

xiswanto You're right, but the OP has just change to change few parameter values (should be simple), versus learning a brand new solution (which I agree is much better than using obsolete technologies).

former_member770121
Participant
0 Kudos
code-of-glass-and-cup.txt

kindly check it and provide solution .pleas

Sandra_Rossi
Active Contributor
0 Kudos

Took me 1 minute to find the solution, I must be genius...

That said, you'll probably understand by reading the code, I guess I don't need to explain, right?

REPORT.
TYPE-POOLS: GFW."
"INCLUDE GFW_PROG_TEXT.

DATA: OK_CODE TYPE SY-UCOMM, FIRST_CALL TYPE I.
     " VALUES TYPE TABLE OF GPRVAL WITH HEADER LINE,
      "COLUMN_TEXTS TYPE TABLE OF GPRTXT WITH HEADER LINE.

      DATA: Y_VALUES       TYPE TABLE OF GPRVAL WITH HEADER LINE,
X_TEXTS        TYPE TABLE OF GPRTXT WITH HEADER LINE.

START-OF-SELECTION.

* USAGE allowed in SAP internal test reports, only
  include applg_auto_test_init.


CALL SCREEN 200.

   include applg_auto_test_form.
*&---------------------------------------------------------------------*
*& Module STATUS_0200 OUTPUT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
MODULE STATUS_0200 OUTPUT.
 SET PF-STATUS 'HAF'.
* SET TITLEBAR 'xx'.
  IF FIRST_CALL IS INITIAL.
*Y_VALUES-ROWTXT = 'CUP Order'.
Y_VALUES-VAL1 = 8.
Y_VALUES-VAL2 = 10.
APPEND Y_VALUES.

*Y_VALUES-ROWTXT = 'Glass Order'.
*Y_VALUES-VAL1 = 10.
*APPEND Y_VALUES.


 X_TEXTS-COLTXT = 'CUP'.
APPEND X_TEXTS.
X_TEXTS-COLTXT = 'GLASS'.
APPEND X_TEXTS.

        CALL FUNCTION 'GFW_PRES_SHOW'
     EXPORTING
          CONTAINER         = 'CONT1'
     "    PRESENTATION_TYPE = GFW_PRESTYPE_LINES
          PRESENTATION_TYPE = 1
          orientation       = gfw_orient_columns
          HEADER            = 'Today Order of Cup&GLASS'
     TABLES
          VALUES            = Y_VALUES
          COLUMN_TEXTS      = X_TEXTS
     EXCEPTIONS
          ERROR_OCCURRED    = 1
          OTHERS            = 2.
    IF SY-SUBRC <> 0.
*     ...add your error handling here
      LEAVE PROGRAM.
    ENDIF.
    FIRST_CALL = 1.
  ENDIF. "//firstcall initial

* USAGE allowed in SAP internal test reports, only
  perform auto_test_pbo USING 'EXIT'.
ENDMODULE.
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0200  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0200 INPUT.
  "MODULE PAI_0100 INPUT.
  OK_CODE = SY-UCOMM.

  CASE OK_CODE.
    WHEN 'EXIT' OR 'BACK'.
      LEAVE PROGRAM.
  ENDCASE.
ENDMODULE.

former_member770121
Participant
0 Kudos

Thank you output is I attach in screenshot .but the last issue it is possible this like cup vertical bar we can reduce the width of bar and increase the length and space in between the vertical bar is possible ,kindly recommend the solution.

Sandra_Rossi
Active Contributor
0 Kudos

You can see in the demos what is possible.

You can see that the parameters don't provide any option for this kind of thing.

You are using an obsolete technology, maybe a newest one can do better.

former_member770121
Participant
0 Kudos

ok it possible to add color in module pool screen ?

Sandra_Rossi
Active Contributor
0 Kudos

module pool is one of the 3 types to work with dynpro (the others are executable program, function group).

I guess your question is a completely new question (not about charts and GFW), so you should search in the forum first and ask a new question if you don't find an answer. NB: I don't understand your question anyway, you should explain what kind of element you want to define color.

former_member770121
Participant
0 Kudos

Hi expert:

Can we add value in graph in horizontal /vertical bar that show the value on graph ?it is possible ?

kindly recommend any solution .