Authorization to BOM Display in Prodction order
Greetings..
Is it possible to Hide the icon of BOM in Produciton order.
Actually my client want that BOM should not be displayed in Prodcution Order.
Is it possible?? HOw
Dear,
SHD0 is used to create transaction variants. With this transaction you can control this,
Please refer this thread also,
change production order screen selection
Regards,
R.Brahmankar
Similar Messages
-
Hi,
Please tell me we have creating Production order without BOM(Bill of Material) & post the BOM Component of Production Order Manually. when developing the report Material Number wise then BOM not found in the report. So, i want to know that how to relate BOM Component with Material Number & which will be table to use in this report.
AmAnHi Aman,
which report?
If you don't select the BOM, then certainly there is no BOM component.
Furthermore, BOM are not referenced in the production order, but the components copied into the order, i.e. these are saved in table AFPO.
But if the components are not maintained manually in the production order (same table), and only the consumption posted directly as unplanned consumption, then you will have trouble getting a link. Possibly only in MSEG by identifying the production order number as the cost collector.
Regards,
Kay -
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 -
hello, friends.
when selecting the BOM in the sales order, the selection screen displays alternative BOMs for 1 usage type only, and will show the other usages one at a time only if the first type does not exist. the sequence depends on the priorities (access sequence) set in IMG, and settings in item category.
my questions are:
1. does the 'next page' button in the selection screen refer to additional BOMs of the only same usage type?
2. is it possible to show other usage types in the same selection screen? if yes, where do we configure this
many thanks for your inputs.hello, Rags.
actually, BOM selection is working fine for us. my question was more of a theoretical one. to clarify the issue, let me cite an example:
1. for material A001, i create 5 alternative BOMs.
2. of these 5 BOMs, 3 have usage type SD, and 2 have usage type Production.
3. when you enter your BOM header material in the sales order, a selection screen will appear. because of the priorities set in IMG, it will show you only the 3 alternate BOMs of the SD usage type.
3. the system will display the 2 other production BOMs only if there are no SD usage BOMs or if these have been deactivated, or if you change the order of priority in IMG.
4. you cannot change the usage type in the BOM selection screen because this field is not available for input. there are "next page" buttons, and i'm wondering if this is or is not just for long lists of alternate BOMs with a single usage type.
my question: is it possible to show all 5 BOMs regardless of usage in the same list, or in different pages?
many thanks.
Edited by: jonathan y on Apr 3, 2009 7:55 PM -
Can some one bring our the difference between BOM usage in the creation of a material bom and a Sales order BOM - To be more specific, when you are creating a BOM using the tcode cs01, I get a field called BOM usage where I can select it as 5 and define it as relevant to Sales and Distribution. I can also create a BOM which is Sales order specific using CS61 tcode. what is the difference between the two? When will the bom created using CS61 explode and when will the other one explode?
Thanks for your reply in advance....Hi
while using the material in each dept. the usage differs so for that sap provided this function. for sales bom is used only sales and also that material already exist in the plant. and mm bom the material has to procure from the some third party that all functionality will control throgh the maitaning bom usage.
further your explanation i give below info.
Text
BOM Usage
Definition
This key defines the area (such as engineering/design or production) where a BOM can be used.
Use
By setting various indicators, you can define the maximum configuration of the item status and define whether an item must be or cannot be processed in a particular area (such as production).
Examples
A material is used in the areas production and costing in a company. For each area, you maintain a separate BOM with different items:
Production BOM:
This BOM contains items that are relevant to production. These items are copied to the planned order. Dependent requirements are generated for them, and they are copied to the production order.
Costing BOM:
This BOM contains items that are relevant to determining the material costs of a product.
When you calculate production costs using a quantity structure, the system automatically determines the BOM and all the BOM items that are relevant to costing, in order to calculate manufacturing costs.
pls find the config table which will give u clear picture about bom usage.
STLAN PMPFE PMPKO PMPKA PMPRV PMPVS PMPIN PMPER ANTXT
1 + . . - - - . Production
2 . + . - - - . Engineering/Design
3 . . . . - - . Universal
4 - - . - - + . Plant Maintenance
5 . . + + - - . Sales and Distribution
6 . . + . - - . Costing
7 . - . . - - - Empties
8 - . - - - - - Stability Study
M . . . . - . . External Munitions Display
Z + . + + - - . Rebranding Sales BOM (1:1)
Thanks
Regards
Hari Shankar -
Index keywords not getting displayed in alphabetical order
Greetings to one and all!!1
Why the keywords defined in my index folder, is not getting
displayed in alphabetical order..what option am i missing to set??
can anyone help me to achieve this!!!
ThankxHi all
In addition to what Colum offered, if you choose to keep a
non-binary index (those are my particular preference) you may
right-click the index and sort the terms. (Inside RoboHelp, not in
the compiled output)
Just a thought... Rick -
Hi all,
I have a finished good is ABC, strategy is 20 (make to order).
I have a variant for ABC, the quantity of components in ABC is 1 pc. When I create a Sale order, I have to choose some characterristics. It depend on requirement of customer. I can see cost estimate in cost report function of Sale Order and inform to customer. My question is "if I change the quantiy of component in ABC is 2 or 3 pc, the cost estimate will be change?"
If not? how i see the cost of order after change component in BOM.
Thanks allDear,
I have noy fully understood your question. What I understood is you have created Sales order and then you chnaged the BOM qty of sales order BOM. Will it chnage the cost estimation?
It depends. If you have chnaged the BOM after sales order is created, if you go for recost run, it may change. and you may get the correct cost.
Are you looking for this?
Raj -
Display Several Sales Orders from Same Business Customer TOGETHER in MD04
Hello
In MD04 is it possible to display several sales orders from same business customer together?
For instance one business customer order bikes for two times.
The Order-No are 12912(50st by 07/08/09) and 12913(100st by 10/08/09).
Normally after runnning of MRP(MD02), the planned orders are displayed seperately in MD04.
I want to display two orders together.
The reason is if some trouble happens in Production(for Ord-no 12912) and it cannot be deliveried on schedule, however Production (for Ord-no 12913) is going without trouble, the final-products for order 12913 should move for 12912.
If you have some good solutions, please share it.
Thank you for your advice.
Regards,Hi Riyolshibashi,
Lets look at the two main scenarios, MTS and MTO.
In MTS, the general display filters are available in MD04. Standard SAP filters do not filter on 'customer'. I suspect this is because the concept would normally be illogical in a MTS environment. Planned orders do not exist to serve a customer, but to serve 'stock'. But let us not think about SAP and their logic.
SAP allows you to create customized filters, in IMG>Production>MRP>Evaluation>Filter>Define Display filter. Within this definition, under the "Addnl Selections' tab, you can tick 'Define addl selections in the transaction'. When you use this filter in MD04 display, then, one of the options available to you is to enter a specific Customer number, and then the display will only show the requirements from this customer. Since you have excluded all other customer's orders, all orders of a single customer will be displayed consecutively. Next to each other.
In the case of MTO, the 'filter-by-customer' concept makes more sense (although, not for the reason you have stated. You would have to find some manual method to convert a production order from supporting one sales order item, to supporting another sales order item. Possible but difficult). Anyway, the above mentioned customized filter would also work in an MTO environment.
Regards,
DB49 -
Hi Experts,
I have met a problem in BOM explosion in sales order.
I have maintained the BOM with usage 5 and the conversion between header material and component of the BOM. But in the sales order entry, no matter how many qty I entered for the header material, after the BOM explosion, the qty of component is 1.
Can anyone help?
Regards,
EmilyHi,
Go to CS02 and select ur bom and go to components give 1 that means 1;1
hope u get it
regards,
sadanandam kasarla -
Problem with BOM (packaging material) in order change
Hi Gurus,
In my b2b shop, i have created an order with BOM material and that order contains one main material and a sub item material after update or order. When i open the same order and click on change, when i click on update, a new sub item is getting added as a main item.
Details:
item 10 is 12007492 (main material)
item 20 is 12007491(sub item for the main material)
when i click on update,again one more sub item 30 is getting added.
When i check the logs, all the items guids are getting passed to IN of crm_isa_basket_changeitems functions module. But when check it in runtime using external debuggin mode, the sub item guid is blank.
Then the main material is again getting exploded and the sub item is coming at item 20 and actual sub item before update is shifting to item 30 as new item.
Please help me in this regard why it is happening like this.
Thank you
LakshmanHello Lakshman,
I had the same issue, however my backend system was ERP and not CRM. In any case, the logic might be the same.
When a BOM material is sent to the backend system for simulation/save, only the header needs to be sent. By this, backend system will explode the material and send 2 items back. I guess in your case, ISA is sending both items to SAP and that is the reason you are getting back 3 items.
Simplest approach is to write some logic in your backend class to avoid sending this subitem to SAP. You can achieve this by manupulating the items table sent to SAP
Suppose salesDoc is the ISA document and itemsTable is the JCO table that is sent to SAP as a table parameter:
ItemList itemList = salesDoc.getItems();
for (Iterator iter = itemList.iterator(); iter.hasNext();) {
ItemSalesDoc itemSalesDoc = (ItemSalesDoc) iter.next();
TechKey parentKey = itemSalesDoc.getParentId();
if(null!=parentKey){
if (!parentKey.getIdAsString().equalsIgnoreCase("")) {
//Here remove it from the tables parameter which is sent to SAP
itemsTable.deleteRow(i);
I am not too sure how it would work for CRM, but works in ERP.
Pradeep -
BOM explosion in process order
Dear PP experts
In my scenario, the sales order and process orders for the corresponding line items got generated by uploading some details of master contract through some Z code. The client provide me details regarding the BOM for the process orders from their third party software, which process through XI. I have to trigger that bom into process order. for that i first maintain the bom details in CS61 and then trigger the "Read Master Data" in process order manually. Now i have to do it automatically. means when the BOMvdata flows from third party software, it should get updated in cs61 and simontaneously "read master dat" should get triggered. how can i do this. please suggestHi,
Check for any BAPI / Function Module in SE37 which can fulfill your requirement.
Search BAPI with SAP component ---> PP option in search help(F4).
Regards,
Tejas -
Error when displaying an internal order
Hi,
I am trying to create an internal order with a particular order type. The internal order gets saved. But while displaying the internal order, I get a message saying "Express document : Update was terminated". The error briefs "ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC". After pressing enter to pass the message, I can see the same order with different parameters - like the company code differs from what I have entered earlier, similarly, profit center, business area etc.,
Any suggestion how to rectify this?
Regards,
SakthyHi,
the number that should be used for the order that you want to create is already used for another existing order, thats what "SAPSQL_ARRAY_INSERT_DUPREC" means. This number range is comp. code independent.
Check your order number range (T-Code KONK) and change the already used order numbers to the highest number that can be seen in tabla AUFK for all the order types using this number range.
Best Regards, Christian -
Audiobooks are not displaying in numerical order on iphone. all mixed up.
audio book contents which are in order from 1 to whatever number in itunes are now displaying in different orders on iphone now. how do I fix this? they are already in the order I want in itunes but not on the iphone
I created a playlist (not a smart playlist) for the audiobooks I transfer to the iPod and they're STILL playing as if I had shuffle mode on. I've reported this as a bug, but who knows when Apple will get around to fixing it!
I was hoping someone would have come up with a workaround but nothing works. -
Document library items are not displaying in sorted order in sharepoint 2013
Hi,
I have a document library , I am storing document sets on it.
28326 items are there in the library.
I have configured sort on Name columns. Initially items are displaying in sorted order like (A,B,C,D,E...)
Now Items are not displaying in a sorted order it is displaying like (A, B,C,D,E,A,C...) like this.
Please help me on this sorting issue.
Thanks,
SamirAre the documents displaying in your image inside the document sets? If so then your sets (folders) are displaying in alphabetical order and the documents inside the sets are displaying in alphabetical order. This is what i would expect.
Paul Stork SharePoint Server MVP
Principal Architect: Blue Chip Consulting Group
Blog: http://dontpapanic.com/blog
Twitter: Follow @pstork
Please remember to mark your question as "answered" if this solves your problem. -
BOM in standard PURCHASE order/requisition
I would like to use BOM as a specification of a "group" of materials procured many times in the same or similar configuration.(eg. servers with specific configuration listing all parts).
Is it possible, to use material BOM in standard purchase order (NEITHER SUBCONTRACTING NOR PRODUCTION ORDERS) as a kind of "recipe" for eg. server configuration.
What I would like to achive is to reduce ammount of work in document entry. Instead of entering 30-50 position for each purchase requisition/order, I would like to use for this material BOM.
Is it possible?
If not, what other object can serve for preparing a list of materials to procure?
How the buttons "BOM Explosion" and "Components" can be turned on on standard purchase order/requisition?
Thanks in advance for help.
Best regards,
WojciechHi,
To the best of my knowledge - BOM's are used in the context of value addition say - a manufacturing or processing involved in converting the inputs to the final prodcut.
While configurable items are used in a scenario where in a simple putting together / packaging in to a kit kind of activity is involved.In this scenario the final product is packaged to the requirements from picking the items of choice from the available prodcut list.
As it seemed the requirement as indicated in the question are in line with this concept I had suggested this solution of usage of Configurable materials.
I have not come accross a scenario of BOM and BOM explosion in Procurement excepet for Sub contracting.
How ever , I appreciate if any one can share information on BOM & Explosion in Purchase order.
Hope this information helps.
Thanks & regards
Raghuramam
Maybe you are looking for
-
Hi, I am using the 'for-each' to map a nodeset to a nodeset that has a maxOccurs="3" in the XSD schema. Is there a way to limit the 'for-each' to only map 3 values and stop after that? Regards
-
Repeating Frames Prior to a Transition
Hello All, I'm sure it's something that I have overlooked, but I'm going to need some help. I have a DVD of individual clips I want to make into one longer project and include titles, transitions, and chapter markers. So I ripped (legally...their my
-
Cannot draw logarithmic graph in Plot Multi-XY vi
Hello All, I'm trying to use the Plot Multi-XY vi in the picture controls to dynamically draw an X-Y grid on a picture control. I need the grid to be logarithmically scaled, but when I check the "x log?" and "y log" booleans in the cartesian axis at
-
Help: i can't open all microsoft programs
hi i am a newbie... i can't open all my microsoft programs from words to entourage after a software update... i try reinstalling and deleting files but it won't work... save me!!!
-
Looking for SQL*Loader sample file
Hi all, I'm looking for a sample SQL*Loader file that I could use to populate the Bank Statement Interface in Cash Management (Receivables Lockbox Receipts) - specifically CE_STATEMENT_HEADERS_INT_ALL and CE_STATEMENT_LINES_INTERFACE. I'm trying to p