Posted: Mon Nov 05, 2007 1:13 pm Post subject: Demo: Mutual Updating of Bar Chart and Screen
Code:
REPORT BARCBO04.
DATA: BEGIN OF G_DATES OCCURS 0,
START LIKE SY-DATUM,
END LIKE SY-DATUM,
NODE_ID LIKE BCNODES-ID,
END OF G_DATES.
CONTROLS: TCTRL_DATES TYPE TABLEVIEW USING SCREEN 900.
INCLUDE SGRCCNST. "Allgemeine Konstanten der Grafik
INCLUDE LBARCCON. "Konstanten zum Balkenplan
INCLUDE BARCDATA. "Allgemeine Datendeklarationen
DATA: ACT_BOX_ID LIKE BCBOXES-ID,
ACT_NODE_ID LIKE BCNODES-ID,
CHART LIKE BCCHART-ID,
SECTION LIKE BCSECTION-ID,
FOCUS_FLAG LIKE NET_GRAPH-FLAG, "Fokussteuerung Grafik
WFI_FLAG LIKE NET_GRAPH-FLAG, "Wait-for-Input
ENTRY_ACT TYPE I,
TAB_INDEX LIKE SY-TABIX,
FLG_PLANTAFEL TYPE C, "Plantafel aktiv
FLG_UPDATE TYPE C, "Dynpro aktualisieren
TA_START LIKE BCSECTION-START VALUE '01.01.1997;',
TA_END LIKE BCSECTION-START VALUE '31.12.1997;',
ROW LIKE SY-TABIX,
VAL LIKE BCVALS-VAL,
PROG LIKE SY-REPID.
CASE SY-UCOMM.
WHEN 'BACK'. "Zurьck
IF NOT FLG_PLANTAFEL IS INITIAL.
ABAP_CMD = BC_CONST-ASK_FOR_EXIT.
PERFORM PLANTAFEL.
ENDIF.
SET SCREEN 0.
LEAVE SCREEN.
WHEN 'ENDE'. "Ende
IF NOT FLG_PLANTAFEL IS INITIAL.
ABAP_CMD = BC_CONST-ASK_FOR_EXIT.
PERFORM PLANTAFEL.
ENDIF.
SET SCREEN 0.
LEAVE SCREEN.
WHEN 'ABBR'. "Abbrechen
IF NOT FLG_PLANTAFEL IS INITIAL.
ABAP_CMD = BC_CONST-ASK_FOR_EXIT.
PERFORM PLANTAFEL.
ENDIF.
SET SCREEN 0.
LEAVE SCREEN.
WHEN 'GRAF'. "Balkenplan
IF FLG_PLANTAFEL IS INITIAL. "falls erster Aufruf
PERFORM CREATE_PLANTAFEL_OBJECTS. "Grafikobjekte erzeugen
ENDIF.
FOCUS_FLAG = 'x'. "Fokus auf Grafik setzen
WFI_FLAG = 'x'. "Grafik soll auf Eingabe warten
PERFORM PLANTAFEL.
ENDCASE.
*---------------------------------------------------------------------*
* FORM PLANTAFEL *
*---------------------------------------------------------------------*
FORM PLANTAFEL.
IF FLG_PLANTAFEL IS INITIAL. "falls erster Aufruf
FLG_PLANTAFEL = 'x'.
CLEAR: ABAP_CMD, STAT.
ELSE.
STAT = SGRC_CONST-STAT_4. "Wait for input
IF ABAP_CMD <BC_CONST> Demoprog.: gegenseitiges Aktualisieren von Grafik und Dynpro
* 100 --> Демонстр. программа: обоюдная актуализация графики и экрана
*Text elements
*----------------------------------------------------------
* 001 Horizontal bars
****************************************************************
* This file was generated by Direct Download Enterprise. *
* Please do not change it manually. *
****************************************************************
%_DYNPRO
BARCBO04
0900
620
40
%_HEADER
BARCBO04 0900 0900 8 22192 0 0 0 21 83 0G D 19970305154532
%_DESCRIPTION
Deadlines
%_FIELDS
TCTRL_DATES 22 E0 C4 00 00 00 1 2 E 101 1 0 8 T 0 0 101
TERMINE CHAR 7 00 00 00 30 40 1 0 T 101 1 1 7 0 0 Dates
START CHAR 5 00 00 00 30 80 1 1 T 101 1 1 10 0 0 Start
END CHAR 5 00 00 00 30 80 1 2 T 101 1 1 10 0 0 End
G_DATES-START DATS 10 80 00 80 40 00 1 1 T 101 1 1 10 0 0 __________
G_DATES-END DATS 10 80 00 80 40 00 1 2 T 101 1 1 10 0 0 __________
CHAR 4 80 10 00 00 00 255 5 O 0 0 0 0 0 0 ____
%_FLOWLOGIC
PROCESS BEFORE OUTPUT.
MODULE STATUS_0900.
LOOP AT G_DATES WITH CONTROL TCTRL_DATES
CURSOR ENTRY_ACT.
ENDLOOP.
*
PROCESS AFTER INPUT.
LOOP AT G_DATES.
FIELD G_DATES-START MODULE MODIFY_TAB_900 ON CHAIN-REQUEST.
FIELD G_DATES-END MODULE MODIFY_TAB_900 ON CHAIN-REQUEST.
ENDLOOP.
MODULE USER_COMMAND_0900.
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.