View previous topic :: View next topic
Author
Message
admin Администратор Joined: 01 Sep 2007 Posts: 1640
Posted: Mon Nov 05, 2007 3:10 pm Post subject: Demo: Example for the Function Module GFW_PRES_SHOW
Code:
REPORT DEMO_GFW_PRES_SHOW .
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.
* display graphic
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.
CALL FUNCTION 'GFW_PRES_SHOW'
EXPORTING
CONTAINER = 'CONTAINER'
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.
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
0100
620
40
%_HEADER
DEMO_GFW_PRES_SHOW 0100 0100 20 75192 35 0 0 21 83 0G E 20001113152431
%_DESCRIPTION
Main Screen
%_FIELDS
CONTAINER 74 00 00 00 30 00 1 2 0 0 0 19 U 1 1 102
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
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.