SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Demo: Example for the Function Module GFW_PRES_SHOW_MULT



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Dialog Programming -> Graphics
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1640

PostPosted: Mon Nov 05, 2007 3:11 pm    Post subject: Demo: Example for the Function Module GFW_PRES_SHOW_MULT Reply with quote

Code:
REPORT DEMO_GFW_PRES_SHOW_MULT .

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.

START-OF-SELECTION.

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

CALL SCREEN 100.

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

*
*&---------------------------------------------------------------------*
*&      Module  PBO_0100  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE PBO_0100 OUTPUT.
  SET PF-STATUS '100'.
  IF FIRST_CALL IS INITIAL.
*   assemble data
    REFRESH VALUES. REFRESH COLUMN_TEXTS.
    VALUES-ROWTXT = CO_GFW_PROG_ROW1. VALUES-VAL1 = 1. VALUES-VAL2 = 5.
    APPEND VALUES.
    VALUES-ROWTXT = CO_GFW_PROG_ROW2. VALUES-VAL1 = 2. VALUES-VAL2 = 6.
    APPEND VALUES.
    VALUES-ROWTXT = CO_GFW_PROG_ROW3. VALUES-VAL1 = 3. VALUES-VAL2 = 7.
    APPEND VALUES.
    COLUMN_TEXTS-COLTXT = CO_GFW_PROG_SAUSAGE. APPEND COLUMN_TEXTS.
    COLUMN_TEXTS-COLTXT = CO_GFW_PROG_CHEESE. APPEND COLUMN_TEXTS.
*   create first graphic
    CALL FUNCTION 'GFW_PRES_SHOW_MULT'
     EXPORTING
          CONTAINER         = 'CONTAINER1'
          PRESENTATION_TYPE = GFW_PRESTYPE_LINES
          HEADER            = 'title of graphic'
*          orientation       = gfw_orient_columns
          SHOW              = GFW_FALSE "//optional
     TABLES
          VALUES            = VALUES
          COLUMN_TEXTS      = COLUMN_TEXTS
     EXCEPTIONS
          ERROR_OCCURRED    = 1
          OTHERS            = 2.
    IF SY-SUBRC <> 0.
*     ...add your error handling here
      LEAVE PROGRAM.
    ENDIF.
*   create second graphic and display both
    CALL FUNCTION 'GFW_PRES_SHOW_MULT'
     EXPORTING
          CONTAINER             = 'CONTAINER2'
          PRESENTATION_TYPE     = GFW_PRESTYPE_LINES
          ORIENTATION           = GFW_ORIENT_COLUMNS
          SHOW                  = GFW_TRUE "//mandatory!!!
     TABLES
          VALUES            = VALUES
          COLUMN_TEXTS      = COLUMN_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.                 " PBO_0100  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  PAI_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE PAI_0100 INPUT.
  OK_CODE = SY-UCOMM.

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

****************************************************************
* This file was generated by Direct Download Enterprise. *
* Please do not change it manually. *
****************************************************************
%_DYNPRO
DEMO_GFW_PRES_SHOW_MULT
0100
620
40
%_HEADER
DEMO_GFW_PRES_SHOW_MULT 0100 0100 11 74192 35 0 0 10 73 0G E 20001113152431
%_DESCRIPTION
Main Screen
%_FIELDS
CONTAINER1 36 00 00 00 30 00 1 2 0 0 0 10 U 1 1 101
CONTAINER2 36 00 00 00 30 00 1 39 0 0 0
CHAR 20 80 10 00 00 00 255 1 O 0 0 0
%_FLOWLOGIC
PROCESS BEFORE OUTPUT.
MODULE PBO_0100.
*
PROCESS AFTER INPUT.
MODULE PAI_0100.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Dialog Programming -> Graphics All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.