Posted: Mon Nov 05, 2007 1:07 pm Post subject: Demo: Representing Functions in SAP Statistical Graphics
Code:
*----------------------------------------------------------------------*
* Beispiel mit SAP Statistik Grafik Bui010791*
*----------------------------------------------------------------------*
REPORT GRSTAT_2.
DATA: D TYPE F,
W TYPE F,
F TYPE F,
X TYPE F,
PI TYPE F,
STEP TYPE F.
DATA REP_NAME LIKE SY-REPID.
DATA: BEGIN OF OPTS OCCURS 1,
C(80),
END OF OPTS.
DATA: BEGIN OF DATA OCCURS 1,
W TYPE F,
F TYPE F,
END OF DATA.
PARAMETER: FORMEL(40) DEFAULT 'x*cos(x)',
VON_X TYPE P DEFAULT '1',
BIS_X TYPE P DEFAULT '10',
ANZAHL TYPE P DEFAULT '100'.
MOVE SY-REPID TO REP_NAME.
STEP = ( BIS_X - VON_X ) / ( ANZAHL - 1 ).
PI = '3.1415'.
X = VON_X.
DO ANZAHL TIMES.
CALL FUNCTION 'EVAL_FORMULA'
EXPORTING
FORMULA = FORMEL
PROGRAM = REP_NAME
ROUTINE = 'VAR_GET'
IMPORTING
VALUE = DATA-F.
DATA-W = X. APPEND DATA.
X = X + STEP.
ENDDO.
DATA: P_TMP(6). "// GL 5.5.1993
UNPACK ANZAHL TO P_TMP.
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.