Sie sind auf Seite 1von 5

IA16 - Cost Maintenance Task Lists TITLE Costing Task Lists PURPOSE You can perform a costing for

maintenance task lists , service task lists or operations in a task list using this report. The system calculates the costs for which the selected task lists or operations are respons ible. You can analyze and evaluate the results of the costing with the help of differe nt cost reports of the report group 7U0I. INTEGRATION PREREQUISITES FEATURES Significance of the costing parameters: ?the order type and business area have the same significance as in the maintenance order, as the system performs a costing for the order for the report in the background. ?you can create a protocol within the framework of the cost analysis that checks all costing-relevant master data for completeness and consistency, for example, ?cost center ?activity type ?material valuation ?order type If any errors occur during costing of the task list, these are recorded in a pro tocol for subsequent evaluation. Documentation extract taken from SAP system, Copyright (c) SAP AG Includes used within report: INCLUDE MIOLXF68.

Tables used within report and the associated select statement: T350 SELECT SINGLE * FROM T350 INTO G_T350 WHERE AUART = AUART_P.

TGSB SELECT SINGLE * FROM TGSB INTO G_TGSB WHERE GSBER = GSBER_P.

Function Modules used within report and the associated call statement: CM_F_INITIALIZE CALL FUNCTION 'CM_F_INITIALIZE' EXPORTING APLID = APPLID OBJECT_ID = OBJID EXCEPTIONS MESSAGE_TYPE_NOT_VALID = 01 UNKNOWN_OBJECT_ID = 02.

POPUP_TO_CONFIRM_STEP CALL FUNCTION 'POPUP_TO_CONFIRM_STEP' EXPORTING DEFAULTOPTION = 'Y' TEXTLINE1 = TEXT-002 TEXTLINE2 = TEXT-003 TITEL = TEXT-001 START_COLUMN = 25 START_ROW = 6 IMPORTING ANSWER = ANSWER_LOC.

CI_02_KALKTAB_INIT CALL FUNCTION 'CI_02_KALKTAB_INIT'.

CO_IH_ORDER_GENER_4 CALL FUNCTION 'CO_IH_ORDER_GENER_4' EXPORTING PLNNR_I = PLNNR_IMP PLNTY_I = PLNTY_IMP PLNAL_I = PLNAL_IMP IWERK_I = IWERK_IMP GSTRP_I = PN_DATUV GLTRP_I = PN_DATUV AUART_I = AUART_IMP AUTYP_I = AUTYP_IMP TRTYP_I = TRTYP_IMP GSBER_I = GSBER_IMP TPLNR_I = TPLNR_IMP EQUNR_I = EQUNR_IMP BAUTL_I = ISTRU_IMP IMPORTING AUFNR = CAUFVD-AUFNR ES_CAUFVD = CAUFVD.

"N498877 "N498877

CK_F_ORDER_COSTING CALL FUNCTION 'CK_F_ORDER_COSTING' EXPORTING CAUFVD_IMP = CAUFVD NO_CO_REFRESH = NO_REFRESH NO_INFO_MESSAGE = NO_MESSAGE

IMPORTING CAUFVD_EXP EXCEPTIONS NO_COSTING

= CAUFVD = 01.

CI_02_KALKTAB_MIX CALL FUNCTION 'CI_02_KALKTAB_MIX' EXPORTING FAKTOR_IMP = FAKTOR_LOK NO_AGGREGATION_IMP = 'X' EXCEPTIONS NO_ENTRIES = 01.

CM_F_INFO CALL FUNCTION 'CM_F_INFO' EXPORTING APLID OBJECT_ID ALL IMPORTING MSG_COUNTER_PRO EXCEPTIONS WRONG_OBJECT_ID

= APPLID = OBJID = 'X' = MESSAGE_COUNT = 01.

CM_F_ANALYSIS CALL FUNCTION 'CM_F_ANALYSIS' EXPORTING APLID = APPLID HEADLINE = TEXT-001 EXCEPTIONS NOT_ACTIVE = 01.

CI_02_KALKTAB_DISPLAY CALL FUNCTION 'CI_02_KALKTAB_DISPLAY' EXPORTING CAUFVD_IMP = CAUFVD EXCEPTIONS NO_ENTRIES = 01. *&---------------------------------------------------------------------* *& Form agregar_eo_ewo *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* form agregar_mat_eo using p_dokar p_doknr p_dokvr p_doktl changing p_existen. data: it_documents type dms_document_hierarchie occurs 0,

wa_documents like line of it_documents. refresh it_documents. call function 'CV115_DOC_HIERARCHIE_GET' exporting pf_dokar = p_dokar pf_doknr = p_doknr pf_dokvr = p_dokvr pf_doktl = p_doktl pf_direction = 'DOWN' tables ptx_documents = it_documents. if sy-subrc = 0. * Si no existen documentos hacia abajo agrego una linea. append <fs_xdeffect> to <fst_xdeffect>. p_existen = 0. else. refresh: it_drad_ma. select dokar doknr dokvr doktl dokob objky from drad into corresponding fields of table it_drad_ma for all entries in it_documents where dokar = it_documents-dokar and doknr = it_documents-doknr and dokvr = it_documents-dokvr and doktl = it_documents-doktl and dokob = 'MARA'. if sy-subrc = 0. sort it_drad_ma by objky. delete adjacent duplicates from it_drad_ma comparing objky. * Agregar cada linea por material EO/EWO. loop at it_drad_ma assigning <fs_drad>. select single mfrpn from mara into <fs_xdeffect>-mfrpn where matnr = <fs_drad>-matnr. append <fs_xdeffect> to <fst_xdeffect>. p_existen = 1. endloop. else. * Si no existen los objetos enlazados al material. append <fs_xdeffect> to <fst_xdeffect>. clear <fs_xdeffect>. endif. endif. *loop at it_drad_eo assigning <fs_drad>. * select single mfrpn * from mara * into <fs_xdeffect>-mfrpn * where matnr = <fs_drad>-matnr. * if sy-subrc = 0. * endif. * *endloop. *else. *append <fs_xdeffect> to <fst_xdeffect>. *endif.

** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *

loop at tdraw. clear lf_objectid. perform class_build_key using tdraw changing lf_objectid. if lf_objectid is not initial. <fs_draw_obj>-dokar = it_tdwa-dokar. <fs_draw_obj>-klasse = it_tdwa-klasse. <fs_draw_obj>-klassenart = it_tdwa-klassenart. <fs_draw_obj>-lf_objectid = lf_objectid. <fs_draw_obj>-doknr = tdraw-doknr. <fs_draw_obj>-dokvr = tdraw-dokvr. <fs_draw_obj>-doktl = tdraw-doktl. <fs_draw_obj>-dwnam = tdraw-dwnam. append <fs_draw_obj> to <fst_draw_obj>. clear <fs_draw_obj>. endif. endloop. endloop. endloop. " agregar_eo_ewo

endform.

Das könnte Ihnen auch gefallen