How to Display weeks in order in a chart
Hi All,
I have a chart plotted against the weeks and count. My weeks are available as 50/2009, 51/2009,52/2009,53/2009,54/2009, 01/2010,02/2010,03/2010. My user wants to see the display in the chart as -4, -3, -2, -1, 0, 1, 2, 3, 4 etc.
I have done the following in a Week_var formula as below.
NumberVar ww;
Numbervar nw;
ww = tonumber(DatePart ('ww',Currentdate));
nw = tonumber(trimleft({ZPO_TRKS_YZZPO_TRKS_BOE_P2P_Q15.D[ZBBDW]K},2));
both my current week and the value coming from my query are available in nw and ww. Now how will I make the value available in the Week_var , which is what defined as Formula Variable.
Any idea how I can do this?
Thanks,
Alex.
Edited by: Alex Arthur Samson on Dec 29, 2009 9:46 AM
I think I can fix it by myself.
Similar Messages
-
How to Display in Hierarcheal Order.
Hi,
I have a program that extracts the project related data Excel.
The program fetches the correct data but i want to displsy it in hierarchial order based on WBS element.
How can i display it.
There is a function module CALL FUNCTION 'AIPR_GET_HIERARCHY_TO_WBSELEM' used for this How can i use it in my program.
pls Help.
The Abap Code is as follows.
TABLES: COSP, " Primary CO data by Cost Element
COSS, " Secondary CO data by Cost Element
COSB, " Total Variances/Results Analyses
PROJ, " Project Definition
PRPS, " WBS element
PRHI,
AFVC, " Network operations
AFVU, " Network user fields
COBK, " CO header
CEPC, " Costcenter Names
BPGE, " CO Awards
AUFK, " Networks
COOI, " Commitments management: Line items
AFKO, " Network Header
crco,
crhd,
JEST. " Project Status
Internal table for projects
DATA:BEGIN OF ITAB_TEST OCCURS 0,
PSPID LIKE PROJ-PSPID,
UP LIKE PROJ-PSPID,
STUFE LIKE PRPS-STUFE,
POSID LIKE PRPS-POSID,
POST1 LIKE PRPS-POST1,
OBJNR LIKE PRPS-OBJNR,
PSPHI LIKE PRPS-PSPHI,
PRCTR LIKE PRPS-PRCTR,
FAKKZ LIKE PRPS-FAKKZ,
PSPNR LIKE PRPS-PSPNR,
PRART LIKE PRPS-PRART,
VERNA LIKE PROJ-VERNA,
END OF ITAB_TEST.
Internal table for final extract records
TYPES: BEGIN OF EXTRACTREC,
COL_01(40) TYPE C,
COL_02(40) TYPE C,
COL_03(40) TYPE C,
COL_04(40) TYPE C,
COL_05(40) TYPE C,
COL_06(40) TYPE C,
COL_07(40) TYPE C,
COL_08(40) TYPE C,
COL_09(40) TYPE C,
COL_10(40) TYPE C,
COL_11(40) TYPE C,
COL_12(40) TYPE C,
COL_13(40) TYPE C,
COL_14(40) TYPE C,
COL_15(40) TYPE C,
COL_16(40) TYPE C,
COL_17(40) TYPE C,
COL_18(40) TYPE C,
COL_19(40) TYPE C,
COL_20(40) TYPE C,
COL_21(40) TYPE C,
COL_22(40) TYPE C,
COL_23(40) TYPE C,
COL_24(40) TYPE C,
COL_25(40) TYPE C,
COL_26(40) TYPE C,
COL_27(40) TYPE C,
X_P20C(14) TYPE C, "Auth Cost (Plan 20 @ Cost)
X_ITDC(14) TYPE C, "ITD Costs
END OF EXTRACTREC.
Accumulators
DATA : JAN_TOT(14) TYPE C.
DATA : FEB_TOT(14) TYPE C.
DATA : MAR_TOT(14) TYPE C.
DATA : APR_TOT(14) TYPE C.
DATA : MAY_TOT(14) TYPE C.
DATA : JUN_TOT(14) TYPE C.
DATA : JUL_TOT(14) TYPE C.
DATA : AUG_TOT(14) TYPE C.
DATA : SEP_TOT(14) TYPE C.
DATA : OCT_TOT(14) TYPE C.
DATA : NOV_TOT(14) TYPE C.
DATA : DEC_TOT(14) TYPE C.
Miscellaneous
DATA: X1_PROJ-PRCTR(40) TYPE C.
DATA: COM_TOT(14) TYPE C.
DATA: EXTRACTDATA TYPE EXTRACTREC.
DATA: H_PROJMGR LIKE PRPS-VERNA, "project manager
H_PROJMGRCC LIKE CRCO-KOSTL. "PM costcenter
DATA: ITAB_EXT TYPE EXTRACTREC OCCURS 10 WITH HEADER LINE.
FIELD-SYMBOLS <MNT> .
Internal table of wbs line items for summarization
TYPES: BEGIN OF ZREC_WBS,
PERIOD LIKE RFSDO-BILABMON,
YEAR LIKE COSS-GJAHR,
PROJECT LIKE PRPS-POSID,
SALES LIKE BPGE-WTGES,
PLNDOLLARS LIKE BPGE-WTGES,
ACTDOLLARS LIKE BPGE-WTGES,
COMMIT LIKE BPGE-WTGES,
PLNHOURS LIKE BPGE-WTGES,
ACTHOURS LIKE BPGE-WTGES,
END OF ZREC_WBS.
DATA ITAB_WBS TYPE ZREC_WBS OCCURS 10 WITH HEADER LINE.
Accumulators
DATA HOLD_AWARD LIKE BPGE-WTGES.
DATA HOLD_PLAN13_SALES LIKE BPGE-WTGES.
DATA HOLD_PLAN13_COST LIKE BPGE-WTGES.
DATA HOLD_PLAN12_SALES LIKE BPGE-WTGES.
DATA HOLD_PLAN12_COST LIKE BPGE-WTGES.
DATA HOLD_COMM LIKE COOI-WTGBTR.
DATA ITAB_OBJLIST LIKE OBJLIST_PS OCCURS 10 WITH HEADER LINE.
Miscellaneous
DATA COUNT_RECORDS TYPE I.
DATA PROJ_STATUS(10) TYPE C.
DATA NET_STATUS(10) TYPE C.
DATA NETFLAG VALUE 'N'.
DATA HOLDDATE(10).
DATA HOLDDATE1(10).
DATA HOLDPERIOD(10).
DATA HOLDAMOUNT(15) TYPE C.
DATA JAMIS_END_DATE LIKE SY-DATUM.
DATA: BEGIN OF PLANDESC1,
FILLER1(5) TYPE C VALUE 'Plan ',
PLANVERSN(3),
FILLER2(6) TYPE C VALUE ' Hours',
END OF PLANDESC1.
DATA: BEGIN OF PLANDESC2,
FILLER1(5) TYPE C VALUE 'Plan ',
PLANVERSN(3),
FILLER2(2) TYPE C VALUE ' $',
END OF PLANDESC2.
DATA: MNT_INDX(20) TYPE C,
HLD_INDX(3) TYPE N,
YYYY_MM(10) TYPE C.
Selection screen
SELECTION-SCREEN SKIP 3.
SELECTION-SCREEN BEGIN OF BLOCK XEXTRPRJ WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN SKIP 2.
*PARAMETERS: SELPROJ LIKE PROJ-PSPID MATCHCODE OBJECT PRSM ."OBLIGATORY.
SELECT-OPTIONS: SELPROJ FOR PROJ-PSPID MATCHCODE OBJECT PRSM .
SELECTION-SCREEN SKIP 1.
PARAMETERS MONTH(2) TYPE N OBLIGATORY.
PARAMETERS YEAR(4) TYPE N OBLIGATORY.
*PARAMETER: SELVERSN LIKE COSS-VERSN DEFAULT '000'.
SELECT-OPTIONS: PRJTYP FOR PRPS-PRART. "Project Types (CO,GV,etc.)
SELECT-OPTIONS: PRFCTR for PROJ-PRCTR. "Range of Profit centers
SELECTION-SCREEN END OF BLOCK XEXTRPRJ.
Start of selection
START-OF-SELECTION.
Get Project Definition
SELECT * FROM PROJ WHERE PSPID IN SELPROJ
AND PRCTR IN PRFCTR.
Get WBS element
SELECT * FROM PRPS WHERE PRART IN PRJTYP
AND PSPHI EQ PROJ-PSPNR
AND STUFE GT '1'. .
MOVE-CORRESPONDING PRPS TO ITAB_TEST.
MOVE PROJ-PSPID TO ITAB_TEST-PSPID.
SELECT SINGLE * FROM PRHI WHERE POSNR EQ PRPS-PSPNR.
IF SY-SUBRC EQ '0'.
MOVE PRHI-UP TO ITAB_TEST-UP.
ENDIF.
APPEND ITAB_TEST.
CLEAR ITAB_TEST.
ENDSELECT.
ENDSELECT.
fetch higher wbs levels
LOOP AT ITAB_TEST.
SELECT SINGLE * FROM PRPS WHERE PSPNR EQ ITAB_TEST-UP.
IF PRPS-STUFE NE '2'.
SELECT SINGLE * FROM PRHI WHERE POSNR EQ PRPS-PSPNR.
IF SY-SUBRC EQ '0'.
MOVE PRHI-UP TO ITAB_TEST-UP.
ENDIF.
MODIFY ITAB_TEST.
ENDIF.
ENDLOOP.
LOOP AT ITAB_TEST.
SELECT SINGLE * FROM PRPS WHERE PSPNR EQ ITAB_TEST-UP.
MOVE PRPS-POSID TO ITAB_TEST-UP.
MODIFY ITAB_TEST.
ENDLOOP.
SORT ITAB_TEST BY PSPID.
Get Top level WBS element to determine hierarchy
SELECT * UP TO 1 ROWS FROM PRPS CLIENT SPECIFIED
WHERE MANDT = SY-MANDT
AND PSPHI = PROJ-PSPNR
AND STUFE = '1'.
ENDSELECT.
Get all object numbers of related elements in the hierarchy
CALL FUNCTION 'AIPR_GET_HIERARCHY_TO_WBSELEM'
EXPORTING
I_PR_TOP_OBJECT = PRPS-OBJNR
I_WITH_HIERARCHY = 'X'
I_WITH_NETWORK = 'X'
I_WITH_ORDERS = 'X'
TABLES
ET_OBJLIST_PS = ITAB_OBJLIST
EXCEPTIONS
OTHERS = 1.
Section 1. Project Data.
Get Group Head name from Profit Center from level 1
SELECT * FROM CEPC
WHERE KOKRS = 'DSRC'
AND DATBI GE SY-DATUM
AND PRCTR = PRPS-PRCTR.
CHECK CEPC-DATAB LE SY-DATUM.
ENDSELECT.
Load Project Data to internal table with headings
MOVE 'ProjectDef' TO ITAB_EXT-COL_01.
MOVE 'WBS Title' TO ITAB_EXT-COL_02.
MOVE 'WBS Element' TO ITAB_EXT-COL_03.
MOVE 'TY' TO ITAB_EXT-COL_04.
MOVE 'Prft Cntr' TO ITAB_EXT-COL_05.
MOVE 'Project open' TO ITAB_EXT-COL_06.
MOVE 'Project close' TO ITAB_EXT-COL_07.
MOVE 'Network open' TO ITAB_EXT-COL_08.
MOVE 'Network close' TO ITAB_EXT-COL_09.
MOVE 'Status' TO ITAB_EXT-COL_10.
MOVE 'ProjectMgr' TO ITAB_EXT-COL_11.
MOVE 'ProjectMgr_CC' TO ITAB_EXT-COL_12.
MOVE 'Auth20costs' TO ITAB_EXT-COL_13.
MOVE 'ITD Costs ' TO ITAB_EXT-COL_14.
MOVE 'Jan_costs' TO ITAB_EXT-COL_15.
MOVE 'Feb_costs' TO ITAB_EXT-COL_16.
MOVE 'Mar_costs' TO ITAB_EXT-COL_17.
MOVE 'Apr_costs' TO ITAB_EXT-COL_18.
MOVE 'May_costs' TO ITAB_EXT-COL_19.
MOVE 'Jun_costs' TO ITAB_EXT-COL_20.
MOVE 'Jul_costs' TO ITAB_EXT-COL_21.
MOVE 'Aug_costs' TO ITAB_EXT-COL_22.
MOVE 'Sep_costs' TO ITAB_EXT-COL_23.
MOVE 'Oct_costs' TO ITAB_EXT-COL_24.
MOVE 'Nov_costs' TO ITAB_EXT-COL_25.
MOVE 'Dec_costs' TO ITAB_EXT-COL_26.
MOVE 'Open_commits' TO ITAB_EXT-COL_27.
APPEND ITAB_EXT.
CLEAR ITAB_EXT.
Fetching values
LOOP AT ITAB_TEST.
Getting records for every new project
AT NEW PSPID.
select single * from proj where pspid eq itab_test-pspid.
MOVE PROJ-PSPID TO ITAB_EXT-COL_01.
MOVE PROJ-POST1 TO ITAB_EXT-COL_02.
MOVE PROJ-PSPID TO ITAB_EXT-COL_03.
SELECT SINGLE * FROM PRPS WHERE PSPHI EQ PROJ-PSPNR.
CLEAR EXTRACTDATA-COL_04.
EXTRACTDATA-COL_04 = PRPS-PRART.
MOVE EXTRACTDATA-COL_04 TO ITAB_EXT-COL_04.
*PROFIT CENTRE CORRECTION
IF PROJ-PRCTR(2) = '01'.
X1_PROJ-PRCTR = PROJ-PRCTR.
CONCATENATE SPACE PROJ-PRCTR INTO X1_PROJ-PRCTR
SEPARATED BY SPACE.
MOVE X1_PROJ-PRCTR TO ITAB_EXT-COL_05. "Employee's Cost Center
ELSE.
MOVE PROJ-PRCTR TO ITAB_EXT-COL_05. "Employee's Cost Center
ENDIF.
PERFORM CONVERT-DATE USING PROJ-PLFAZ.
MOVE HOLDDATE1 TO ITAB_EXT-COL_06.
PERFORM CONVERT-DATE USING PROJ-PLSEZ.
MOVE HOLDDATE1 TO ITAB_EXT-COL_07.
MOVE '00/00/0000' TO ITAB_EXT-COL_08.
MOVE '00/00/0000' TO ITAB_EXT-COL_09.
perform CHECK-PROJSTATUS.
move PROJ_STATUS to ITAB_EXT-COL_10.
CLEAR EXTRACTDATA-COL_11.
EXTRACTDATA-COL_11 = PROJ-VERNA .
MOVE EXTRACTDATA-COL_11 TO ITAB_EXT-COL_11.
manager CC
MOVE PROJ-VERNR+3(5) TO H_PROJMGR.
SELECT SINGLE * FROM CRHD
WHERE ARBPL = H_PROJMGR. "employee number
Assignment of Work Center to Cost Center
SELECT * FROM CRCO
WHERE OBJTY = CRHD-OBJTY
AND OBJID = CRHD-OBJID
AND LASET = 1
AND LANUM = '0001'.
IF CRCO-ENDDA > SY-DATUM.
EXIT.
ENDIF.
ENDSELECT.
insert space if cost center starts with 01
IF CRCO-KOSTL(2) = '01'.
H_PROJMGRCC = CRCO-KOSTL.
CONCATENATE SPACE H_PROJMGRCC
INTO H_PROJMGRCC SEPARATED BY SPACE.
ELSE.
H_PROJMGRCC = CRCO-KOSTL.
ENDIF.
MOVE H_PROJMGRCC TO ITAB_EXT-COL_12.
Award and Authorization (Revenue & Cost)
SELECT SINGLE * FROM PRPS
WHERE PSPHI EQ PROJ-PSPNR
AND STUFE EQ 1.
SELECT * FROM BPGE
WHERE OBJNR = PRPS-OBJNR
AND LEDNR = '0001' "Budget / Planning Ledger
AND TRGKZ = 'N' "Object indicator
AND WRTTP = '01' "Value Type
AND VERSN = '020' . "020 = Award
IF BPGE-VERSN = '020'. "Plan 20 = RA Authorization
CASE BPGE-VORGA.
WHEN 'KSTP'. "KSTP = Cost level
EXTRACTDATA-X_P20C = BPGE-WTGES.
move EXTRACTDATA-X_P20C to ITAB_EXT-COL_13.
ENDCASE.
ENDIF.
ENDSELECT. "BPGE
APPEND ITAB_EXT.
CLEAR ITAB_EXT.
ENDAT.
PERFORM GET-WBS-DATA.
ENDLOOP.
Dump Out to Excel.
Call a function for data download to an EXCEL file.
CALL FUNCTION 'Z_RH_START_EXCEL_DATA_OLE'
EXPORTING
DATA_NAME = 'ZCOSTS.XLS'
DATA_PATH_FLAG = 'W'
DATA_TYPE = 'DAT'
DATA_BIN_FILE_SIZE = 'ZCOSTS'
CHART_TITLE = 'ZCOSTS'
CHART_TYPE = 2
CATEGORY_TITLE = 'ZCOSTS'
VALUE_TITLE = 'ZCOSTS'
DATA_XTOP_COR = 0
DATA_YTOP_COR = 0
DATA_XBOT_COR = 0
DATA_YBOT_COR = 0
CATEGORY_XTOP_COR = 0
CATEGORY_YTOP_COR = 0
CATEGORY_XBOT_COR = 0
CATEGORY_YBOT_COR = 0
TABLES
DATA_TAB = ITAB_EXT
EXCEPTIONS
NO_BATCH = 1
DOWNLOAD_ERROR = 2
INVALID_TYPE = 3
INTERNAL_ERROR = 4
NO_OLE_SUPPORT = 5
OLE_FILE_ERROR = 6
OLE_ERROR = 7
NO_DATA = 8
COORDINATE_ERROR = 9
OTHERS = 10.
Function modules used for the program
*& Form CHECK-PROJSTATUS
FORM CHECK-PROJSTATUS.
CLEAR PROJ_STATUS.
Fetch status
SELECT * FROM JEST "use JEST to determine Status
WHERE OBJNR = PRPS-OBJNR
AND INACT EQ SPACE. "space denotes an active status
Last one found will be reported
CASE JEST-STAT. "find the system status (Ixxx)
WHEN 'I0001'.
PROJ_STATUS = 'CRTD'. "Created
WHEN 'I0002'.
PROJ_STATUS = 'REL'. "Released
WHEN 'I0045'.
PROJ_STATUS = 'TECO'. "Technically Complete
WHEN 'I0046'.
PROJ_STATUS = 'CLSD'. "Closed
WHEN 'I0076'.
PROJ_STATUS = 'DLFL'. "Deleted Flag Activated
ENDCASE.
ENDSELECT.
ENDFORM. " CHECK-PROJSTATUS
*& Form CONVERT-DATE
FORM CONVERT-DATE USING HOLDDATE.
MOVE HOLDDATE4(2) TO HOLDDATE10.
MOVE '/' TO HOLDDATE1+2.
MOVE HOLDDATE6(2) TO HOLDDATE13.
MOVE '/' TO HOLDDATE1+5.
MOVE HOLDDATE0(4) TO HOLDDATE16.
ENDFORM. " CONVERT-DATE
*& Form GET-WBS-DATA
FORM GET-WBS-DATA.
Fetch Operation within Order for status checking
SELECT SINGLE * FROM AFVC
WHERE OBJNR = ITAB_OBJLIST-OBJNR.
MOVE PROJ-PSPID TO ITAB_EXT-COL_01.
MOVE PRPS-POST1 TO ITAB_EXT-COL_02.
MOVE PRPS-POSID TO ITAB_EXT-COL_03.
Fetch WBS elements by hierarchy
SELECT SINGLE * FROM PRPS
WHERE OBJNR = ITAB_OBJLIST-OBJNR.
Check status of WBS element
PERFORM CHECK-PROJSTATUS.
If item has been deleted, skip
IF PROJ_STATUS = 'DLFL'.
EXIT.
ENDIF.
Fetch Authorization
PERFORM GET-AUTHORIZATION.
Load extract record.
MOVE PRPS-STUFE TO ITAB_EXT-COL_01.
MOVE PRPS-POSID TO ITAB_EXT-COL_02.
MOVE PRPS-POST1 TO ITAB_EXT-COL_03.
MOVE HOLD_PLAN13_COST TO ITAB_EXT-COL_04.
MOVE HOLD_PLAN13_SALES TO ITAB_EXT-COL_05.
MOVE HOLD_PLAN12_COST TO ITAB_EXT-COL_06.
MOVE HOLD_PLAN12_SALES TO ITAB_EXT-COL_07.
MOVE PROJ_STATUS TO ITAB_EXT-COL_10.
APPEND ITAB_EXT.
CLEAR ITAB_EXT.
CLEAR EXTRACTDATA-COL_04.
EXTRACTDATA-COL_04 = PRPS-PRART.
MOVE EXTRACTDATA-COL_04 TO ITAB_EXT-COL_04.
*PROFIT CENTRE
IF PROJ-PRCTR(2) = '01'.
ETAB-X_CNTR = PROJ-PRCTR. "Profit Center
X1_PROJ-PRCTR = PROJ-PRCTR.
CONCATENATE SPACE PROJ-PRCTR INTO X1_PROJ-PRCTR SEPARATED BY SPACE
MOVE X1_PROJ-PRCTR TO ITAB_EXT-COL_05. "Employee's Cost Center
ELSE.
MOVE PROJ-PRCTR TO ITAB_EXT-COL_05. "Employee's Cost Center
ENDIF.
PERFORM CONVERT-DATE USING PROJ-PLFAZ.
MOVE '00/00/0000' TO ITAB_EXT-COL_06.
PERFORM CONVERT-DATE USING PROJ-PLSEZ.
MOVE '00/00/0000' TO ITAB_EXT-COL_07.
Fetch order operations
SELECT SINGLE * FROM AFVC
WHERE PROJN = ITAB_TEST-PSPNR.
Fetch Order Master Data
SELECT SINGLE * FROM AUFK
WHERE PSPEL = AFVC-PROJN. " WBS element(external)
Fetch Order Header Data for start and end dates
SELECT SINGLE * FROM AFKO
WHERE AUFNR = AUFK-AUFNR. " Network # (external)
Fetch network user fields for Jamis end date
CLEAR JAMIS_END_DATE.
SELECT SINGLE * FROM AFVU WHERE
AUFPL = AFVC-AUFPL AND
APLZL = AFVC-APLZL.
SELECT SINGLE * FROM AFVC
WHERE OBJNR = ITAB_OBJLIST-OBJNR.
IF SY-SUBRC = 0.
JAMIS_END_DATE = AFVU-USR08.
ENDIF.
CLEAR EXTRACTDATA-COL_11.
EXTRACTDATA-COL_11 = PRPS-VERNA .
MOVE EXTRACTDATA-COL_11 TO ITAB_EXT-COL_11.
manager CC
MOVE PRPS-VERNR+3(5) TO H_PROJMGR.
SELECT SINGLE * FROM CRHD
WHERE ARBPL = H_PROJMGR. "employee number
Assignment of Work Center to Cost Center
SELECT * FROM CRCO
WHERE OBJTY = CRHD-OBJTY
AND OBJID = CRHD-OBJID
AND LASET = 1
AND LANUM = '0001'.
IF CRCO-ENDDA > SY-DATUM.
EXIT.
ENDIF.
ENDSELECT.
Insert space if cost center starts with 01
IF CRCO-KOSTL(2) = '01'.
H_PROJMGRCC = CRCO-KOSTL.
CONCATENATE SPACE H_PROJMGRCC
INTO H_PROJMGRCC SEPARATED BY SPACE.
ELSE.
H_PROJMGRCC = CRCO-KOSTL.
ENDIF.
MOVE H_PROJMGRCC TO ITAB_EXT-COL_12.
Auth 20 costs for WBS elements
clear EXTRACTDATA-X_P20C.
SELECT * FROM BPGE
WHERE OBJNR = PRPS-OBJNR
AND LEDNR = '0001' "Budget / Planning Ledger
AND TRGKZ = 'N' "Object indicator
AND WRTTP = '01' "Value Type
AND VERSN = '020' . "020 = Award
IF BPGE-VERSN = '020'. "Plan 20 = RA Authorization
CASE BPGE-VORGA.
WHEN 'KSTP'. "KSTP = Cost level
EXTRACTDATA-X_P20C = BPGE-WTGES.
ENDCASE.
ENDIF.
ENDSELECT.
move EXTRACTDATA-X_P20C to ITAB_EXT-COL_13.
PERFORM CONVERT-DATE USING AFKO-GSTRP.
MOVE HOLDDATE1 TO ITAB_EXT-COL_08.
IF JAMIS_END_DATE IS INITIAL.
PERFORM CONVERT-DATE USING AFKO-GLTRP.
ELSE.
PERFORM CONVERT-DATE USING JAMIS_END_DATE.
ENDIF.
MOVE HOLDDATE1 TO ITAB_EXT-COL_09.
perform CHECK-PROJSTATUS.
MOVE PROJ_STATUS TO ITAB_EXT-COL_10.
SELECT SINGLE * FROM PRPS
WHERE OBJNR = ITAB_TEST-OBJNR.
PERFORM GET-ACTUALDOLLARS.
ITD COST MOVED
IF EXTRACTDATA-X_ITDC CA '-'.
SHIFT EXTRACTDATA-X_ITDC RIGHT CIRCULAR.
ENDIF.
move EXTRACTDATA-X_ITDC to ITAB_EXT-COL_14.
MONTH BREAK-UP FOR CURRENT YEAR COST MOVED
IF JAN_TOT CA '-'.
SHIFT JAN_TOT RIGHT CIRCULAR.
ENDIF.
move JAN_TOT to ITAB_EXT-COL_15.
IF FEB_TOT CA '-'.
SHIFT FEB_TOT RIGHT CIRCULAR.
ENDIF.
move FEB_TOT to ITAB_EXT-COL_16.
IF MAR_TOT CA '-'.
SHIFT MAR_TOT RIGHT CIRCULAR.
ENDIF.
move MAR_TOT to ITAB_EXT-COL_17.
IF APR_TOT CA '-'.
SHIFT APR_TOT RIGHT CIRCULAR.
ENDIF.
move APR_TOT to ITAB_EXT-COL_18.
IF MAY_TOT CA '-'.
SHIFT MAY_TOT RIGHT CIRCULAR.
ENDIF.
move MAY_TOT to ITAB_EXT-COL_19.
IF JUN_TOT CA '-'.
SHIFT JUN_TOT RIGHT CIRCULAR.
ENDIF.
move JUN_TOT to ITAB_EXT-COL_20.
IF JUL_TOT CA '-'.
SHIFT JUL_TOT RIGHT CIRCULAR.
ENDIF.
move JUL_TOT to ITAB_EXT-COL_21.
IF AUG_TOT CA '-'.
SHIFT AUG_TOT RIGHT CIRCULAR.
ENDIF.
move AUG_TOT to ITAB_EXT-COL_22.
IF SEP_TOT CA '-'.
SHIFT SEP_TOT RIGHT CIRCULAR.
ENDIF.
move SEP_TOT to ITAB_EXT-COL_23.
IF OCT_TOT CA '-'.
SHIFT OCT_TOT RIGHT CIRCULAR.
ENDIF.
move OCT_TOT to ITAB_EXT-COL_24.
IF NOV_TOT CA '-'.
SHIFT NOV_TOT RIGHT CIRCULAR.
ENDIF.
move NOV_TOT to ITAB_EXT-COL_25.
IF DEC_TOT CA '-'.
SHIFT DEC_TOT RIGHT CIRCULAR.
ENDIF.
move DEC_TOT to ITAB_EXT-COL_26.
open commits
COM_TOT = 0.
SELECT * FROM COOI
WHERE OBJNR = PRPS-OBJNR
AND WRTTP = '22'
AND WTGBTR <> 0.
COM_TOT = COM_TOT + COOI-WTGBTR .
ENDSELECT.
move COM_TOT to ITAB_EXT-COL_27.
CLEAR : EXTRACTDATA-X_ITDC,
JAN_TOT,
FEB_TOT,
MAR_TOT,
APR_TOT,
MAY_TOT,
JUN_TOT,
JUL_TOT,
AUG_TOT,
SEP_TOT,
OCT_TOT,
NOV_TOT,
DEC_TOT.
APPEND ITAB_EXT.
CLEAR ITAB_EXT.
ENDFORM. " GET-WBS-DATA
*& Form GET-ACTUALDOLLARS
FORM GET-ACTUALDOLLARS.
*BREAK-POINT.
Costs - DPC and legacy load
SELECT * FROM COSP CLIENT SPECIFIED
WHERE MANDT = SY-MANDT
AND OBJNR = PRPS-OBJNR
AND WRTTP = '04'
AND ( BEKNZ = 'S' OR BEKNZ = 'H' )
AND ( KSTAR GE '0000600001' AND KSTAR LE '0000601999' ).
IF YEAR = COSP-GJAHR.
DO.
IF SY-INDEX LE MONTH.
MOVE SY-INDEX TO HLD_INDX.
MNT_INDX = 'COSP-WKGXXX'.
REPLACE 'XXX' WITH HLD_INDX INTO MNT_INDX.
ASSIGN (MNT_INDX) TO <MNT>.
EXTRACTDATA-X_ITDC = EXTRACTDATA-X_ITDC + <MNT>.
if sy-index = 01.
JAN_TOT = JAN_TOT + <MNT>.
endif.
if sy-index = 02.
FEB_TOT = FEB_TOT + <MNT>.
endif.
if sy-index = 03.
MAR_TOT = MAR_TOT + <MNT>.
endif.
if sy-index = 04.
APR_TOT = APR_TOT + <MNT>.
endif.
if sy-index = 05.
MAY_TOT = MAY_TOT + <MNT>.
endif.
if sy-index = 06.
JUN_TOT = JUN_TOT + <MNT>.
endif.
if sy-index = 07.
JUL_TOT = JUL_TOT + <MNT>.
endif.
if sy-index = 08.
AUG_TOT = AUG_TOT + <MNT>.
endif.
if sy-index = 09.
SEP_TOT = SEP_TOT + <MNT>.
endif.
if sy-index = 10.
OCT_TOT = OCT_TOT + <MNT>.
endif.
if sy-index = 11.
NOV_TOT = NOV_TOT + <MNT>.
endif.
if sy-index = 12.
DEC_TOT = DEC_TOT + <MNT>.
endif.
ELSE.
EXIT.
ENDIF.
ENDDO.
ELSEIF YEAR > COSP-GJAHR.
EXTRACTDATA-X_ITDC = EXTRACTDATA-X_ITDC +
COSP-WKG001 + COSP-WKG002 +
COSP-WKG003 + COSP-WKG004 +
COSP-WKG005 + COSP-WKG006 +
COSP-WKG007 + COSP-WKG008 +
COSP-WKG009 + COSP-WKG010 +
COSP-WKG011 + COSP-WKG012 +
COSP-WKG013 + COSP-WKG014 +
COSP-WKG015 + COSP-WKG016.
ELSE.
EXIT.
ENDIF.
ENDSELECT.
Costs - Shared DPC's
SELECT * FROM COSS CLIENT SPECIFIED
WHERE MANDT = SY-MANDT
AND OBJNR = PRPS-OBJNR
AND WRTTP = '04' AND
BEKNZ = 'S'.
IF YEAR = COSS-GJAHR.
DO.
IF SY-INDEX LE MONTH.
MOVE SY-INDEX TO HLD_INDX.
MNT_INDX = 'COSS-WKGXXX'.
REPLACE 'XXX' WITH HLD_INDX INTO MNT_INDX.
ASSIGN (MNT_INDX) TO <MNT>.
EXTRACTDATA-X_ITDC = EXTRACTDATA-X_ITDC + <MNT>.
if sy-index = 01.
JAN_TOT = JAN_TOT + <MNT>.
endif.
if sy-index = 02.
FEB_TOT = FEB_TOT + <MNT>.
endif.
if sy-index = 03.
MAR_TOT = MAR_TOT + <MNT>.
endif.
if sy-index = 04.
APR_TOT = APR_TOT + <MNT>.
endif.
if sy-index = 05.
MAY_TOT = MAY_TOT + <MNT>.
endif.
if sy-index = 06.
JUN_TOT = JUN_TOT + <MNT>.
endif.
if sy-index = 07.
JUL_TOT = JUL_TOT + <MNT>.
endif.
if sy-index = 08.
AUG_TOT = AUG_TOT + <MNT>.
endif.
if sy-index = 09.
SEP_TOT = SEP_TOT + <MNT>.
endif.
if sy-index = 10.
OCT_TOT = OCT_TOT + <MNT>.
endif.
if sy-index = 11.
NOV_TOT = NOV_TOT + <MNT>.
endif.
if sy-index = 12.
DEC_TOT = DEC_TOT + <MNT>.
endif.
ELSE.
EXIT.
ENDIF.
ENDDO.
ELSEIF YEAR > COSS-GJAHR.
EXTRACTDATA-X_ITDC = EXTRACTDATA-X_ITDC +
COSS-WKG001 + COSS-WKG002 +
COSS-WKG003 + COSS-WKG004 +
COSS-WKG005 + COSS-WKG006 +
COSS-WKG007 + COSS-WKG008 +
COSS-WKG009 + COSS-WKG010 +
COSS-WKG011 + COSS-WKG012 +
COSS-WKG013 + COSS-WKG014 +
COSS-WKG015 + COSS-WKG016.
ELSE.
EXIT.
ENDIF.
ENDSELECT.
ENDFORM.>
S. Rajesh Paul wrote:
> Hi Experts,
>
> I have a requirement to display the sales order in the line item of t-code FBO3, could anybody suggest an userexit or BADI for the same.
>
> Thanks in advance.
>
> RP.
I assume, you want to display sales order number in accounting document..... .
This is not something you can do it through the BADI..
You will have to change the G/L account field group (if it is already not there). you can then assign sales order number when posting to FI. In the field group, better choose sales order number and item number as optional fields.
If you can see the sales order field (may be empty) - you have to enter the sales order number when you post it.
Good luck -
CM21 - How to display only released orders in CM21
Hi,
I want to display only released orders in trasaction CM21. Currently it is displaying both created and released orders.
could you please guide me how to proceed?
BR/
Laxmikant LandeHi lax,
By the way this problem is solved by assigning set for released order to the filter set in selection profile.
That's great. Taking a cue from you i also tried that but could not find that appropriate set name/identification which i may assign to the filter set to get only the released orders by default in CM21. Can you share your experience?
On CM21 Filter screen, there is no std field to control order status ...
You're right. Actually what i meant was that in the filter screen you get the order number as an input field. If you press f4 you will have the different matchcodes available to choose the order. If you select the order information system as the input help you will arrive at the standard COOIS or COOISPI screen where you can choose the released orders by giving REL as the input in sys status. This will pick up all the released orders.
Regards
Sm.
Edited by: Sm on Sep 2, 2010 12:27 PM -
How to display the sales order in the line item in FB03
Hi Experts,
I have a requirement to display the sales order in the line item of t-code FBO3, could anybody suggest an userexit or BADI for the same.
Thanks in advance.
RP.>
S. Rajesh Paul wrote:
> Hi Experts,
>
> I have a requirement to display the sales order in the line item of t-code FBO3, could anybody suggest an userexit or BADI for the same.
>
> Thanks in advance.
>
> RP.
I assume, you want to display sales order number in accounting document..... .
This is not something you can do it through the BADI..
You will have to change the G/L account field group (if it is already not there). you can then assign sales order number when posting to FI. In the field group, better choose sales order number and item number as optional fields.
If you can see the sales order field (may be empty) - you have to enter the sales order number when you post it.
Good luck -
How to display two waveforms in one waveform chart?
hellow!anyone can tell me how to display two waveform together in one waveform chart? thanks!
Hello,
An easy way to tell how to make multi-plot charts and graphs is to hold your mouse over the chart/graph terminal on the block diagram and make sure Context Help (Help >> Show Context Help) is enabled. This screen will tell you how to connect the indicator for a multiple-plot display.
You might want to take a look at my attached screenshots of a working multi-plot chart.
Hope this helps!
Liz F
National Instruments
Attachments:
Multi-plot_chart.bmp 902 KB -
How to display week wise data in ssrs report
Hi,
I want my report to fetch data from Financial year starting to till date.
i.e Apr 2013 to till date.
till date means Today() minus 8 days and @Fromdate includes last week of march also
i.e Mar 29 2013 to Apr 4 2013 - this week data will also be included
So data from Mar 29 2013 - Apr 4 2013 to today() minus 8 days need to be displayed
How to fetch data for this.
Pls advise.The column corresponding to this looks like "2013-11-01 ~~ 2013 - 11- 07"Hi, Well your requirement is very vague. I would probably have you create a calendar table according to your requirements and use it in your dataset. If you could better explain this with an example we could help you a lot better.
Hope this helps.......
Ione -
How to Display values in order when Multiple values are selected in the Parameter List
<p>Hi</p><p>I have a report which runs on the parameter(SalesPersonName) selected.<br />Report has a group section where for each SalesPersonName we have different actions(Lead,Prospect,Active and so on) he had performed which is the basis for the group.</p><p>Now if i need multiple Value selection in the parameter,which i am able to acheive but the order in which it gets printed is not the right one.</p><p>I want intially all the actions performed by one sales person printed and then the second one should start.</p><p>Can any one help me in this aspect.</p><p>Thanks in advance</p>
<p>If I understand your report structure correctly - you have one Grouping on Actions. So could you not add another grouping on SalesPersonName above the Actions grouping that you currently have?</p><p>So the new structure would be:</p><p>G1 - SalesPersonName</p><p>G2 - Actions (current grouping you have)</p><p> </p><p>Whether or not you suppress or don't suppress the new grouping is your choice, but it will then force the ordering that you are asking about (assuming I understood) </p>
-
How to display week number in a report
Hi,
I need to show the week number in a report and related sales data for that week. For example, starting from 01-JUL-2009 the week1 should show total of sales from 01-JUL-08-JUL.
Help please....
Thanks
A/AIf you are trying to extract the week number of the calender year...you can use..
sql> select to_char(sysdate,'WW') from dual;
TO
05and then group the sales figures by week...
sql> create table t(
2 target_date date,
3 sales number);
Table created.
sql> begin
2 for i in 1..30 loop
3 insert into t values (sysdate-i,100*i);
4 end loop;
5 commit;
6 end;
7 /
PL/SQL procedure successfully completed.
sql> select week, sum(sales) from (
2 select sales, to_char(target_date,'WW') week from t)
3 group by week;
WE SUM(SALES)
05 2100
02 16800
01 8800
04 7000
03 11900However, if your week calculation starts with a particular date like a calender year starting with 01-june-2010, then you would need to calculate the (relative) week number using something like...
1 select target_date,
2 trunc(((target_date - to_date('01-june-2010','DD-MON-YYYY'))/7)) week_number
3* from t
sql> /In the above code, 01-june-2010 is the date from which my calender year starts.
Please note that since this is relative, you might get negative numbers for weeks. -
How to display dynamic datas and double datas (chart)
Hi all !
I would like to display dynamic datas and double datas by using charts.
However, it doesn't work and I don't understand why.
Can you help me to fix that ?
Best regards,
- John
Attachments:
double_dynamics_data.vi 54 KBHi John,
the sine looks like it should look with your VI!
You convert the DDT to a scalar DBL. That conversion will only use the first sample of the generated sine waveform - usually this is always the same (offset) value when you generate full periods… Or to put it in a mathematical expression: sin(0°)+4 = 4!
When you want to display waveform you should work with waveforms!
Actually, I have used Dynamic data type in order to simulate an signal.
Well, I also simulated a signal in my example VI. I didn't use any ExpressVI to do so…
In a few weeks, I will receive a sensor. I will use in LabView 'DAQ Assistant' whose the ouput is a Dynamic Data.
Nobody forces you to use the DAQAssistent ExpressVI. There are nice DAQmx functions available and LabVIEW comes with a lot of ready-to-use example VIs…
That's why, I used in first place, the 'Simulate signal'. So I think I should keep Dynamic Data Type
I do think you don't need to use the DDT. I think it's better to understand what is going on in your VI. And I think the DDT will be no help for you…
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
How to display multiple signals on the same chart/graph
Hello,
I have a text file that has 21 different signals acquired through NI DAQ. I am able to read the file and display on the chart but the problem is all the signals have the same dynamic range -6 to +6 so when plotted they all show up on top of each other and one cannot really discern whats going on. Please see the attached image.
I am trying to ask the community for help on how could I display all 21 signals separate from each other so that the user can easily differentiate between signals. I thought about adding offsets to the signals but I dont really want to change the actual data and the data set is already large enough that I donot want to creat copies of data.
I am running Labview 10.0.
Any creative ideas.
Attachments:
Graph Question.PNG 19 KBUsing Stack Plots was my first thought too but it appears to be buggy these days. I know I've used it before with no problems but I can't get it to work now at all. In any case, stacking 21 plots will be futile since you won't be able to see any detail (unless you have a VERY tall monitor). Your best bet is to use property nodes to make the plot of interest become highlighted in some way.
EDIT: I think stacking only works with charts. You can select it on the right-click pop-up menu. Then, expanding the plot legend determines the number of stacked plots shown. Again, since there is so much wasted vertical space when stacking, you'll never be able to see 21 plots concurrently with any detail visible.
Using LabVIEW: 7.1.1, 8.5.1 & 2013 -
JDEV 10G: how to display the value of the line chart using jChart in JSP
I have draw the line chart in JSP using the JChart and now I wan to display the value label in the line there..
but the value wasn't show..
anyone can help me..
thx..Hi,
what I do understand, you want to display the value of each point in your Line Graph.
I guess you will be having BIGraph.xml file. In this file check the "Show Data Tips When Mouse is over bars" checkbox.
Lets try with this.
--Abhijit -
How to display labels ( vertically) in a column Chart
Hi,
As per my requirement I want to show labels inside the column charts & they must be aligned verically
say ABC is id i want display i want A
B
C
I have tried with Column Charts properties like showvertically =" true" & extendLabelToEnd="true".But i am not getting them vertically aligned .Is that something else also must be done.
Regards
Kalavati singh
[email protected]Take a look at this blog: http://gerardnico.com/wiki/dat/obiee/presentation_variable
Try it out by providing a default format.
Thanks,
BIPuser -
How to display values inside the Pie chart?
Hi Expert,
How to display the values inside the Pie chart, instead of Mouse over values. Can u pls help me to do this one.
Is it possible can we use mentioned below kind of pie charts in Xcelsius 2008.
Thanks & Regards,
Tamil
Edited by: Rajesh Kumar Thoppe on Dec 13, 2010 10:41 AMHi A G,
Thank You for quick response!!!
in this Text tab I am able to see below check box only
1) Chart Title
2) Sub Title
3) Legend
4) Mouse-Over
Kindly advise me if i am wrong and let me know how to achieve this.
Note: We have Xcelsius 2008 environment
Thanks & Regards,
Tamil
Edited by: Rajesh Kumar Thoppe on Dec 13, 2010 1:58 PM -
I have multiple email accounts on my iPad. How do I control the order in which the accounts are displayed?
In landscape mode, the mailbox list is automatically displayed (in portrait mode, you will need to tap the button to,show it).
To edit the list, tap edit as shown below. -
How to display the results in order by based on search value
Hi All,
how to display the results in the below order.
CREATE TABLE TEST( SONGID NUMBER, TITLE VARCHAR2(200))
INSERT INTO TEST(SONGID,TITLE) VALUES (10,'AHMADZAI, MIRWAIS (CA)/ MADONNA (CA)');
INSERT INTO TEST(SONGID,TITLE) VALUES (11,'CICCONE, MADONNA (CA)');
INSERT INTO TEST(SONGID,TITLE) VALUES (12,'DALLIN, MADONNA LOUISE/STOCK');
INSERT INTO TEST(SONGID,TITLE) VALUES (13,'MADONNA');
INSERT INTO TEST(SONGID,TITLE) VALUES (14,'MADONNA (A)/ AHMADZAI, MIRWAIS (C)');
INSERT INTO TEST(SONGID,TITLE) VALUES (15,'MADONNA (CA)');
INSERT INTO TEST(SONGID,TITLE) VALUES (16,'MIRWAIS AHMADZAI, MADONNA');
INSERT INTO TEST(SONGID,TITLE) VALUES (17,'MIRWAIS (CA)/ MADONNA (CA),AHMADZAI');
INSERT INTO TEST(SONGID,TITLE) VALUES (18,'MADONNA (CA),CICCONE');
SELECT *FROM TEST WHERE INSTR (TITLE, 'MADONNA') > 0
output:
SONGID TITLE
10 AHMADZAI, MIRWAIS (CA)/ MADONNA (CA)
11 CICCONE, MADONNA (CA)
12 DALLIN, MADONNA LOUISE/STOCK
13 MADONNA
14 MADONNA (A)/ AHMADZAI, MIRWAIS (C)
15 MADONNA (CA)
16 MIRWAIS AHMADZAI, MADONNA
17 MIRWAIS (CA)/ MADONNA (CA),AHMADZAI
18 MADONNA (CA),CICCONE
Expected output :
13 MADONNA
14 MADONNA (A)/ AHMADZAI, MIRWAIS (C)
15 MADONNA (CA)
18 MADONNA (CA),CICCONE
...if user searches with 'MADONNA' , I have to display the results like title starts with 'MADONNA' first then rest of the records.
Please let me know is it possible to display the results in that order.
Regards,
RajasekharThis may be a bit more accurate:
SQL> SELECT *
2 FROM TEST
3 WHERE INSTR (TITLE, 'MADONNA') > 0
4 ORDER BY INSTR (TITLE, 'MADONNA')
5 ,TITLE
6 ;
SONGID TITLE
13 MADONNA
14 MADONNA (A)/ AHMADZAI, MIRWAIS (C)
15 MADONNA (CA)
18 MADONNA (CA),CICCONE
12 DALLIN, MADONNA LOUISE/STOCK
11 CICCONE, MADONNA (CA)
17 MIRWAIS (CA)/ MADONNA (CA),AHMADZAI
16 MIRWAIS AHMADZAI, MADONNA
10 AHMADZAI, MIRWAIS (CA)/ MADONNA (CA)
Maybe you are looking for
-
Friends, I am getting the following error while deploying a web dynpro application through NWDS. Aborted: development component 'WebDynpro_ErrorBehavior'/'local'/'LOKAL'/'0.2007.05.29.17.02.04'/'1':Cannot login to the SAP J2EE Engine using user and p
-
Dialog box to get values during shipment
hi gurus, when ever i save the shipment after changing , i should get a pop up and this pop up contains few fields which are populated by user and once he presses enter then it should save the entreis in the z table, how cna it be acheived can i call
-
Premiere 8.0.1 patch now available by direct download
http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=4653&fileID=4342 Cheers, Neale Insanity is hereditary, you get it from your children
-
Can some one help me configuring orcle alerts(Alert manager) we are using exchange as an SMTP the workflow mailer has been configured with the same exhcnage
-
Hyperlinks dreamweaver in outlook
I've to edit each month a newsletter on dreamweaver and make it received by clients by outlook mail. So in order to keep links with named anchor inside the mail I need to add outbind in the field link before #and the name of my anchor. This has been