Blocking of cost element

hi Gurus,
does any one help me to block the clost element( not delete cost element).
URGENT
nagesh

you can go to fs00 - chart of account level  or fss0- company code level, click "G/L account -> block, in that way, you can block the cost element for posting or creation.
reward points if helpful.

Similar Messages

  • Block GL / cost element to be use in purchase order

    hi expert,
    i want to ask is there any way to block GL been use in purchase order but in meantime can use in FI posting?
    I heard can done with cost element block for integration posting?
    Can any expert advice the detail?
    Thanks.

    There is no standard functionality to block any GL for specific purpose.
    We can block it for entire company code/Chart of Accounts.level
    However at OB28 create a new validation
    We use WE document type for GR or RE document type for Invoice
    Go to OB28
    Prerequisite
    If the Document type = WE or RE
    Check
    GL account is not equal to 123456
    Message....check GL Account
    Srinivas

  • Block cost element

    Can we block a cost element if we temporarily not to use it?

    Hi,
    You can block a cost element by blocking the relevant GL account. Alternatively, you can consider using a validation rule.
    Other alternative can be, though a little rude, deafaulting a cost center assignment to such cost element and locking the cost center for postings.
    Hope this helps.
    Cheers.
    Dhananjai

  • How to deactivate Primary Cost Element

    Hi,
    A primary cost Element is already created. Now We would like to decativate it so that during posting an entry it doesnot prompt to enter a CO object.
    How cdan we do this?
    Regards,
    MG

    Hi,
    For blocking the cost element you have two options
    1 )if earlier posting are not made to that particular cost center or no records exist then you can diredtly delte the cost element.
    2 )If posting is already made then goto KA02 in analysis period change the analysis period.
    Regards,
    Sreekanth

  • Cost Element Block

    Hi
    I have created one cost element and posted number of documents.
    client asks that the posting should be reflecting in FI but not in CO
    So I tried to delete the Cost element category in FS00 but it is mandatory field. So if we delete it will impact the business..
    So there is any alternative to block Cost element or witout reflecting the posting in CO
    Raju

    Hi Raju,
    the cost element is the transmission between FI and CO. So if you do not want a FI posting to be reflected in CO you must not create a cost element for the relevant account.
    If a cost element has already been created, the only possibility to prevent the CO posting will be
    to delete the cost element again via TA KA04. For this you will first of all have to delete all CO documents that have been posted with the relevant cost element via report RKACOR20 (see SAP note 45122)
    Regards
    Karl

  • Delete cost element

    Hello Everybody,
    I try to delete a cost element with T KA04 in batch method, but it is more than a day since I executed and it is still going on.
    Do you know if this is right?
    On the other hand, I try to do this because a user created a GL account, then they made a posting in this account (without a cost center), and finally this GL account was created as a cost element. After this process, they realized the posting was wrong because a cost center has to be used.
    Do any of you know how to deal with this problem?, how to delete the cost element or reverse the document they posted?
    Thanks in advance.

    Hi Israel,
    Once a value is posted to a G/L account or a Cost Element, you cannot delete the same. You can only block the same so that no future postings happen to these.
    You can reverse the document posted using the T Code FB08.
    Let me know if this solves your issue.
    Regards
    Sridhar

  • How to extend cost element to controlling area?

    Hello all,
    I created a new cost element via FSP0 and then created cost element via KA01.
    Now whwen I am trying to do cost center assignment in OKB9, it throws me error that cost center in controlling are not exit for today's date with error message KI217
    I made sure the cose center's validity date cover's today, so why does it show me that error?
    Do I need to extend the cost center for perticular controlling area? if yes than how acan I do it?
    Regards,

    Hi,
    if you want to extend validity period for Cost centre - KS02  & for Cost element KA02 and select particular Cost centre & Cost element - go to edit in main menu - select Analysis Period - press F6 - and change valid period as per your requirement
    but we can't change one controlling area to another controlling area ,
    if you do not want use cost centre , cost element whatever already created - just go and Block/lock for posting
    Thanking you
    Regards
    Mahesh

  • Cost Element group table

    Can anyone tell me which table contains the cost element groups and which cost elements are related to them

    Please.... Help!
    I want to write data there can fix it ....!
    ---------      I want to record this record in the edit field -----------------------
    code is:
    REPORT NO STANDARD PAGE HEADING LINE-SIZE 100 LINE-COUNT 60
                                    MESSAGE-ID zin.
    TYPE-POOLS: gset, gseth, slis, kkblo.
    TABLES: aufk.
    TYPES: BEGIN OF t_datam.
            INCLUDE STRUCTURE GRPOBJECTS.
    TYPES: END OF t_datam.
    DATA: it_datam TYPE STANDARD TABLE OF t_datam WITH HEADER LINE.
    DATA: gwa_datam TYPE t_datam,
          GRPOBJECTS TYPE t_datam.
    DATA: pt_node TYPE gseth_node_tab,           "Nodos
          pt_valu TYPE gseth_val_tab,            "Valores
          pt_mast TYPE gseth_md_tab.             "Descripciones
    DATA: ls_node LIKE LINE OF pt_node,
          ls_valu LIKE LINE OF pt_valu.
    DATA:
          p_layout     TYPE slis_layout_alv,              " Layout inicial
          t_sortcat    TYPE slis_sortinfo_alv OCCURS 1,   " Orden ALV
          t_fieldcat   TYPE slis_t_fieldcat_alv,          " Atributos a mostrar
          t_events     TYPE slis_t_event,                 " Lista de eventos
          t_top_page   TYPE slis_t_listheader,            " Write ini pagina
          w_sort       LIKE LINE OF t_sortcat.
    DATA: l_repid TYPE sy-repid.
    SELECTION-SCREEN BEGIN OF BLOCK b01 WITH FRAME TITLE text-b01.
    PARAMETERS:     p_kokrs LIKE aufk-kokrs       OBLIGATORY DEFAULT '300',
                    p_class LIKE setnode-setclass OBLIGATORY DEFAULT '0101',
                    p_subcl LIKE setnode-subclass DEFAULT '300',
                    p_setnm LIKE setnode-setname  OBLIGATORY DEFAULT '300MPR2'.
    SELECTION-SCREEN: END OF BLOCK b01.
    PARAMETERS:     p_expor NO-DISPLAY,
                    p_nivel NO-DISPLAY. "@01
    *Initialization
    INITIALIZATION.
      l_repid = sy-repid.
    START-OF-SELECTION.
       PERFORM 1pro_data.
    IF p_expor = 'X'.
        IF p_nivel = 'X'.                                       " @01
          EXPORT it_datam TO MEMORY ID 'T_DATAM'.
        ENDIF.
       ELSE.
        PERFORM 0_layout USING p_layout.
        PERFORM a_haz_alv.
        PERFORM c_haz_eventos CHANGING t_events.
        PERFORM d_call_alv.
      ENDIF.
    END-OF-SELECTION.
    FORM 1pro_data.
    PERFORM obt_jerarquia  USING  p_kokrs      "Sociedad         (intput)
                                   p_class      "Clase de set     (intput)
                                   p_subcl      "Subclase
                                   p_setnm.     "Nombre del set
    * LLenado de datos del master
      LOOP AT pt_node INTO ls_node.
        it_datam-shortname = ls_node-shortname.
        it_datam-hlevel = ls_node-hlevel.
        it_datam-descript = ls_node-descript.
        it_datam-credate = ls_node-credate. "Fecha creada
        it_datam-creuser = ls_node-creuser. "usuario creador
        it_datam-ref_set = ls_node-ref_set. "Email
        APPEND it_datam.
      ENDLOOP.
    sort it_datam by hlevel ascending.
    ENDFORM.
    FORM obt_jerarquia USING  pi_kokrs                      "Sociedad         (intput)
                              pi_class                      "Clase de set     (intput)
                              pi_subcl                      "Subclase         (intput)
                              pi_setnm.                     "Nombre de set    (intput)
      DATA:
        lf_info       LIKE grphinfo,
        lf_over       LIKE sy-datar,
        lf_class      LIKE sethier-setclass,
        lf_setid      LIKE sethier-setid,
        lf_kokrs      LIKE sethier-kokrs,
        lf_mandt      LIKE sy-mandt,
        lf_mast_datax LIKE grphp1,
        lf_structurex LIKE grphp2,
        lf_repl_class LIKE sethier-setclass,
        lf_repl_unitx LIKE sethier-kokrs,
        lf_repl_table LIKE sethier-fieldname,
        lf_repl_field LIKE sethier-tabname,
        lf_repl_suffi LIKE grpdynp-suffix,
        lf_nros_level LIKE sethier-level.
      DATA lf_strlen TYPE i.
    * Data
      lf_class = pi_class.
    *              CONCATENAMOS CLASE + SUBCLASE + NOMBRE DE GRUPO
    *Si hay subclase (Centro de beneficio, clase de costo, centro de costo)
      IF pi_subcl NE space.
    * Cargamos la clase de set con la subclase
        CONCATENATE lf_class pi_subcl INTO lf_setid.
        lf_strlen = STRLEN( pi_subcl ).
      ELSE.
    * Si no hay subclase (orden interna), cargamos solo la clase de set
        lf_setid  = lf_class.
        lf_strlen = 0.
      ENDIF.
    *Obtenemos cuántos espacios en blanco habrá entre la subclase y el nombre del set
      lf_strlen = 4 - lf_strlen.
      IF lf_strlen < 0. lf_strlen = 0. ENDIF.
      lf_strlen = 0.
    *Si es > 0 concatenamos caracter para ser reemplazado por espacio en blanco
      DO lf_strlen TIMES.
        CONCATENATE lf_setid '&' INTO lf_setid.
      ENDDO.
    *Cargamos nombre de set
      IF p_class = '0106' OR p_class = '0101'.
        CONCATENATE lf_setid '&' pi_setnm INTO lf_setid.
      ELSE.
        CONCATENATE lf_setid pi_setnm INTO lf_setid.
      ENDIF.
    *Reemplazamos & por espacios en blanco
      TRANSLATE lf_setid USING '& '.
      lf_kokrs         = pi_kokrs.
      lf_mandt         = '100'.
      lf_mast_datax    = '   '.   "Los espacios evita mensaje verificación de datos maestros
      lf_structurex    = 'X  X0200'.
      lf_repl_class    = ' '.
      lf_repl_unitx    = ' '.
      lf_repl_table    = ' '.
      lf_repl_field    = ' '.
      lf_repl_suffi    = ' '.
      lf_nros_level    = '1'.
      REFRESH: pt_node, pt_valu, pt_mast.
    *Obtiene lista de sub estaciones de la tabla objetos
      CALL FUNCTION 'K_HIERARCHY_TABLES_READ'
        EXPORTING
          e_class                     = lf_class
          e_setid                     = lf_setid
          e_kokrs                     = lf_kokrs
          e_mandt                     = lf_mandt
          e_master_data               = lf_mast_datax
          e_structure                 = lf_structurex
          e_replace_class             = lf_repl_class
          e_replace_unit              = lf_repl_unitx
          e_replace_table             = lf_repl_table
          e_replace_field             = lf_repl_field
          e_suffix                    = lf_repl_suffi
          e_old_line_level            = lf_nros_level
        TABLES
          t_nodes                     = pt_node         "Nodos
          t_values                    = pt_valu         "Valores
          t_master_data               = pt_mast         "Textos
        CHANGING
          c_info                      = lf_info
          c_overwrite                 = lf_over
        EXCEPTIONS
          no_controlling_area         = 1
          no_chart_of_account         = 2
          different_controlling_areas = 3
          different_chart_of_accounts = 4
          set_not_found               = 5
          illegal_field_replacement   = 6
          illegal_table_replacement   = 7
          fm_raise                    = 8
          convert_error               = 9
          no_overwrite_standard_hier  = 10
          no_bukrs_for_kokrs          = 11.
    ENDFORM. 
    FORM 0_layout USING ls_layout TYPE slis_layout_alv.
      CLEAR: ls_layout.
      ls_layout-zebra                 = ''.
      ls_layout-colwidth_optimize     = 'X'.
      ls_layout-box_fieldname         = space.
      ls_layout-no_input              = 'X'.
      ls_layout-no_vline              = ' '.
      ls_layout-no_colhead            = ' '.
      ls_layout-lights_condense       = 'X'.
      ls_layout-confirmation_prompt   = 'X'.
      ls_layout-detail_popup          = 'X'.
      ls_layout-detail_initial_lines  = 'X'.
      ls_layout-detail_titlebar       = 'Centro de Benef. vs Centro Costo'.
    ENDFORM.  
    FORM a_haz_alv.
      REFRESH: t_fieldcat.
      CLEAR:   t_fieldcat.
      PERFORM define_campo USING:
      'SHORTNAME' '' '' '25' 'GRPOBJECTS' '' '' 'ID Corto'       '' '' '' '' '',
      'HLEVEL' ''    '' '04' 'GRPOBJECTS' '' '' 'Nivel'          '' '' '' '' '',
      'DESCRIPT' '' ''  '35' 'GRPOBJECTS' '' '' 'Descripción'    '' '' '' '' '',
      'CREDATE' '' ''   '12' 'GRPOBJECTS' '' '' 'Fec.Creada'     '' '' '' '' '',
      'CREUSER' '' ''   '08' 'GRPOBJECTS' '' '' 'Usu.Creador'    '' '' '' '' 'X',
      'REF_SET' '' ''   '34' 'GRPOBJECTS' '' '' 'Correo E-mail asig.' 'Cor.Email' 'E-mail' '' '' 'X'.
    ENDFORM.
    FORM define_campo  USING fieldname        "Nombre de campo
                             emphasize        "Color
                             hotspot          "Evento click
                             outputlen        "Longitud
                             ref_tabname      "Tabla referencia
                             cfieldname       "Campo referencia
                             datatype         "Tipo de dato
                             seltext_l        "Texto largo
                             seltext_m        "Texto mediano
                             seltext_s        "Texto corto
                             do_sum           "Campo para suma
                             no_out           "No se visualiza
                             pi_edit  TYPE c. "Editar campos
      DATA: ls_fieldcat TYPE slis_fieldcat_alv.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname   = fieldname.
      ls_fieldcat-tabname     = 'T_AUFK2'.
      ls_fieldcat-ref_tabname = ref_tabname.
      ls_fieldcat-outputlen   = outputlen.
      ls_fieldcat-emphasize   = emphasize.
      ls_fieldcat-hotspot     = hotspot.
      ls_fieldcat-cfieldname  = cfieldname.
      ls_fieldcat-datatype    = datatype.
      ls_fieldcat-seltext_l   = seltext_l.
      ls_fieldcat-seltext_m   = seltext_m.
      ls_fieldcat-seltext_s   = seltext_s.
      ls_fieldcat-do_sum      = do_sum.
      ls_fieldcat-no_out      = no_out.
      ls_fieldcat-edit        = pi_edit.
      APPEND ls_fieldcat TO t_fieldcat.
    ENDFORM.                    "define_campo
    FORM c_haz_eventos CHANGING lt_events TYPE slis_t_event.
      CONSTANTS:
        c_top_of_page  TYPE slis_formname VALUE 'TOP_OF_PAGE',
        c_end_of_page  TYPE slis_formname VALUE 'END_OF_PAGE',
        c_user_command TYPE slis_formname VALUE 'USER_COMMAND'.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = lt_events.
    * tope de pagina
      READ TABLE lt_events WITH KEY name =  slis_ev_top_of_page INTO ls_event.
      IF sy-subrc = 0.
        MOVE c_top_of_page TO ls_event-form.
        APPEND ls_event TO lt_events.
      ENDIF.
    * fin de pagina
      READ TABLE lt_events WITH KEY name =  slis_ev_top_of_page INTO ls_event.
      IF sy-subrc = 0.
        MOVE c_top_of_page TO ls_event-form.
        APPEND ls_event TO lt_events.
      ENDIF.
    * eventos de usuario
      READ TABLE lt_events WITH KEY name = slis_ev_user_command INTO ls_event.
      IF sy-subrc = 0.
        MOVE c_user_command TO ls_event-form.
        APPEND ls_event TO lt_events.
      ENDIF.
    ENDFORM.
    FORM d_call_alv.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = l_repid
          i_callback_pf_status_set = 'SET_STATUS'
          i_callback_user_command  = 'USER_COMMAND'
          is_layout                = p_layout
          it_fieldcat              = t_fieldcat[]
          i_save                   = 'X'
          it_sort                  = t_sortcat
    *   is_variant               = g_variant_1
        TABLES
          t_outtab                 = it_datam
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    ENDFORM. 
    FORM set_status USING rt_extab  TYPE  slis_t_extab.
      SET PF-STATUS  'ALV_STATUS'.
    ENDFORM.
    FORM user_command USING r_ucomm     LIKE sy-ucomm
                            r_selfield TYPE slis_selfield.
      PERFORM sr_upd_alv.
    DATA: wa_alv  LIKE it_datam.
    r_selfield-refresh = 'X'.
      CASE r_ucomm.
        WHEN 'SAVE'.
          LOOP AT it_datam INTO gwa_datam.
      "Here you should go, because I have not created anything but just reads the data helps.
          ENDLOOP.
    ENDFORM.

  • RSA2/Cost Element Hierarchy (0COSTELMNT_0102_HIER)/remove 0CO_AREAP Prefix

    Hi, gurus.
    We are using 0COSTELMNT_0102_HIER delivered infosource.  This datasource is extracting from our source system the cost element hierarchy.  When loading into BW, every element is getting a controlling area Prefix (cost element characteristics, hierarchy nodes and hierarchy name).  This is the standard behaviour.
    Our requirement is to remove Controlling Area prefix from every hierarchy node and from hierarchy name, but not from characteristic elements.
    eg......0CO_AREA........0COSTELMNT............0HIERNAME
    .........M650..................RU_SIGMA................M650RU_SIGMA
    .........M660..................RU_SIGMA................M660RU_SIGMA
    And we want to get the hierarchy name without the controlling area, so:
    ....................................................................0HIERNAME
    ....................................................................RU_SIGMA
    We can´t upload the hierarchy from a flat file cause we want to load and refresh it daily from the source system.
    We've asked in Marketplace about the missing "change" option in RSA2 transaction, cause we see 2 options to do this:
    1) Create a customer datasource for 0COSTELMNT hierarchy with RSA2 and use 2 custom function modules for extraction and hierarchy catalogs.
    2) Modify 0COSTELMNT_0102_HIER and call 2 new custom function modules for catalog and data extraction (GSBH_HIERARCHY_TRANSFER_SETS, GSBH_HIERARCHY_CATALOG_SETS)
    In any case, we would need access to RSA2 with create/modify authorization.
    They answered that RSA2 is for display only.  Here is their answer:
    "RSA2 is a display only transaction. This transaction is not released for changes in customer systems. The reason is that there would be risks due to incorrect modifications."
    I've also tryed BW07 transaction, but it is just for sets created with GS01 transaction (hierarchy class 0000), and I can´t create a custom datasource for Cost Element from this point.
    If is there another way to supress controlling area prefix??
    Our Development team don´t want the idea to modify GSBH_HIERARCHY_TRANSFER_SETS, GSBH_HIERARCHY_CATALOG_SETS function modules without an OSS note that says so.
    Thanks in advance, Leticia
    I'm having just the same problem mentioned in this thread /community

    I have created a ABAP program to download the costelementgroup from SAP R/3 into a flatfile.<br>
    Hope this helps.<p>
    &----<br>
    *& Report  Z_EXTRACT_COSTELMNTGRP_HIER<br>
    *&<br>
    &----<br>
    *&<br>
    *&<br>
    &----<br>
    <br>
    REPORT  Z_EXTRACT_COSTELMNTGRP_HIER.<br>
    <br>
    ************************************************************************<br>
    TABLES<br>
    ************************************************************************<br>
    <br>
    TABLES: SETLEAF,<br>
            CSKU,<br>
            CSKT.<br>
    <br>
    ************************************************************************<br>
    TYPES<br>
    ************************************************************************<br>
    <br>
    TYPES:  BEGIN OF T_FL_SETLEAF,<br>
            SETNAME TYPE SETLEAF-SETNAME,<br>
            LINEID TYPE SETLEAF-LINEID,<br>
            VALOPTION TYPE SETLEAF-VALOPTION,<br>
            VALFROM TYPE SETLEAF-VALFROM,<br>
            VALTO TYPE SETLEAF-VALTO,<br>
            LTEXT TYPE CSKU-LTEXT,<br>
            END OF T_FL_SETLEAF.<br>
    <br>
    TYPES:  BEGIN OF T_FL_CSKU,<br>
            KSTAR TYPE CSKU-KSTAR,<br>
            LTEXT TYPE CSKT-LTEXT,<br>
            END OF T_FL_CSKU.<br>
    <br>
    TYPES:  BEGIN OF T_FL_CSKB,<br>
            KOKRS TYPE CSKB-KOKRS,<br>
            KSTAR TYPE CSKB-KSTAR,<br>
            DATBI TYPE CSKT-DATBI,<br>
            END OF T_FL_CSKB.<br>
    <br>
    TYPES:  BEGIN OF T_FL_HIER,<br>
            NID(8) TYPE N,<br>
            IOBJ(30),<br>
            NNAME(32),<br>
            PID(8) TYPE N,<br>
            HID TYPE I,<br>
            VALC TYPE I,<br>
            DESC(60),<br>
            END OF T_FL_HIER.<br>
    <br>
    TYPES:  BEGIN OF T_FL_MKHIER,<br>
            HID TYPE I,<br>
            PID(8) TYPE N,<br>
            END OF T_FL_MKHIER.<br>
    <br>
    TYPES:  BEGIN OF T_FL_FINAL,<br>
            OUT(500),<br>
            END OF T_FL_FINAL.<br>
    <br>
    ************************************************************************<br>
    WORKAREAS<br>
    ************************************************************************<br>
    <br>
    DATA:  VFL_CSKU TYPE T_FL_CSKU,<br>
           VFL_CSKB TYPE T_FL_CSKB,<br>
           VFL_SETLEAF TYPE T_FL_SETLEAF,<br>
           VFL_HIER TYPE T_FL_HIER,<br>
           VFL_HIER1 TYPE T_FL_HIER,<br>
           VFL_MKHIER TYPE T_FL_MKHIER,<br>
           VFL_FINAL TYPE T_FL_FINAL,<br>
           VFL_SETHIER TYPE SETHIER_CO.<br>
    <br>
    DATA:  V_SETHEADER TYPE SETHEADER.<br>
    <br>
    ************************************************************************<br>
    INTERNAL TABLES<br>
    ************************************************************************<br>
    <br>
    DATA:  VIT_CSKU TYPE STANDARD TABLE OF T_FL_CSKU,<br>
           VIT_CSKB TYPE STANDARD TABLE OF T_FL_CSKB,<br>
           VIT_SETLEAF TYPE STANDARD TABLE OF T_FL_SETLEAF,<br>
           VIT_SETLEAF1 TYPE STANDARD TABLE OF T_FL_SETLEAF,<br>
           VIT_HIER TYPE STANDARD TABLE OF T_FL_HIER,<br>
           VIT_MKHIER TYPE STANDARD TABLE OF T_FL_MKHIER,<br>
           VIT_FINAL TYPE STANDARD TABLE OF T_FL_FINAL,<br>
           VIT_SETHIER TYPE SETHIER_CO OCCURS 0 WITH HEADER LINE,<br>
           VIT_SETVAL TYPE SETVAL_CO OCCURS 0 WITH HEADER LINE.<br>
    <br>
    ************************************************************************<br>
    VARIABLES<br>
    ************************************************************************<br>
    <br>
    DATA:  NID(8) TYPE N,<br>
           PID(8) TYPE N,<br>
           CSTEL(14) TYPE N,<br>
           SETCLS(4) TYPE C,<br>
           IOBJ(10) TYPE C,<br>
           HID TYPE I,<br>
           NHID(8) TYPE N,<br>
           NVALC(8) TYPE N,<br>
           OUT(500),<br>
           L_FLAG(2) TYPE N,<br>
           L_LINK(1),<br>
           L_COAREA LIKE BAPICO_GROUP-CO_AREA,<br>
           RETURN LIKE BAPIRET2.<br>
    <br>
    ************************************************************************<br>
    SELECTION SCREEN INPUTS<br>
    ************************************************************************<br>
    <br>
    SELECTION-SCREEN BEGIN OF BLOCK SS01 WITH FRAME TITLE TEXT-002.<br>
    PARAMETERS: P_SUBCLS(4) OBLIGATORY,                "Org. eenheid bepalen<br>
                P_SETNM(15) OBLIGATORY.            "Kostensoortgroep bepalen<br>
    SELECTION-SCREEN END OF BLOCK SS01.<br>
    <br>
    SETCLS = '0102'.                        "Setklasse voor kostensoortgroep<br>
    IOBJ = '0COSTELMNT'.                    "InfoObjectnaam voor kostensoort<br>
    <br>
    SELECT SETNAME LINEID VALOPTION VALFROM VALTO INTO TABLE VIT_SETLEAF<br>
           FROM SETLEAF<br>
           WHERE SUBCLASS = P_SUBCLS<br>
           AND SETCLASS = SETCLS.<br>
    <br>
    SELECT KSTAR LTEXT INTO TABLE VIT_CSKU<br>
           FROM CSKU<br>
           WHERE KTOPL = P_SUBCLS<br>
           AND SPRAS = 'NL'.<br>
    <br>
    LOOP AT VIT_SETLEAF INTO VFL_SETLEAF.<br>
    <br>
      IF VFL_SETLEAF-VALOPTION = 'EQ'.<br>
    <br>
        READ TABLE VIT_CSKU INTO VFL_CSKU WITH KEY<br>
                   KSTAR = VFL_SETLEAF-VALFROM BINARY SEARCH.<br>
    <br>
        IF SY-SUBRC = 0.<br>
    <br>
          VFL_SETLEAF-LTEXT = VFL_CSKU-LTEXT.<br>
    <br>
          IF VFL_SETLEAF-LTEXT IS INITIAL.<br>
    <br>
            SELECT SINGLE KTEXT FROM CSKU INTO VFL_SETLEAF-LTEXT<br>
                   WHERE SPRAS = 'N'<br>
                   AND KTOPL = P_SUBCLS<br>
                   AND KSTAR = VFL_SETLEAF-VALFROM.<br>
    <br>
          ENDIF.<br>
    <br>
          APPEND VFL_SETLEAF TO VIT_SETLEAF1.<br>
    <br>
        ENDIF.<br>
    <br>
        CLEAR VFL_CSKU.<br>
    <br>
      ELSEIF VFL_SETLEAF-VALOPTION = 'BT'.<br>
    <br>
        LOOP AT VIT_CSKU INTO VFL_CSKU<br>
             WHERE KSTAR GE VFL_SETLEAF-VALFROM<br>
             AND KSTAR LE VFL_SETLEAF-VALTO.<br>
    <br>
          VFL_SETLEAF-VALFROM = VFL_CSKU-KSTAR.<br>
          VFL_SETLEAF-VALTO = VFL_CSKU-KSTAR.<br>
          VFL_SETLEAF-LTEXT = VFL_CSKU-LTEXT.<br>
    <br>
          IF VFL_SETLEAF-LTEXT IS INITIAL.<br>
    <br>
            SELECT SINGLE KTEXT FROM CSKU INTO VFL_SETLEAF-LTEXT<br>
                   WHERE SPRAS = 'N'<br>
                   AND KTOPL = P_SUBCLS<br>
                   AND KSTAR = VFL_SETLEAF-VALFROM.<br>
    <br>
          ENDIF.<br>
    <br>
          APPEND VFL_SETLEAF TO VIT_SETLEAF1.<br>
    <br>
          CLEAR VFL_CSKU.<br>
    <br>
        ENDLOOP.<br>
    <br>
      ENDIF.<br>
    <br>
      CLEAR VFL_SETLEAF.<br>
    <br>
    ENDLOOP.<br>
    <br>
    CLEAR VIT_SETLEAF[].<br>
    <br>
    SORT VIT_SETLEAF1 BY SETNAME VALFROM.<br>
    <br>
    CALL FUNCTION 'K_GROUP_REMOTE_READ'<br>
      EXPORTING<br>
        setclass   = SETCLS<br>
        co_area    = L_COAREA<br>
        chrt_accts = P_SUBCLS<br>
        groupname  = P_SETNM<br>
      IMPORTING<br>
        return     = RETURN<br>
      TABLES<br>
        et_sethier = VIT_SETHIER<br>
        et_setval  = VIT_SETVAL.<br>
    <br>
    NID = 00000001.<br>
    PID = 00000000.<br>
    <br>
    LOOP AT VIT_SETHIER INTO VFL_SETHIER.<br>
    <br>
      IF NID EQ 00000001.<br>
    <br>
        HID = VFL_SETHIER-HIERLEVEL.<br>
    <br>
        VFL_HIER-NID = NID.<br>
        VFL_HIER-PID = PID.<br>
        VFL_HIER-HID = HID.<br>
        VFL_HIER-IOBJ = '0HIER_NODE'.<br>
        VFL_HIER-NNAME = VFL_SETHIER-GROUPNAME.<br>
        VFL_HIER-DESC = VFL_SETHIER-DESCRIPT.<br>
        VFL_HIER-VALC = VFL_SETHIER-VALCOUNT.<br>
    <br>
        VFL_MKHIER-HID = HID.<br>
        VFL_MKHIER-PID = PID.<br>
    <br>
        APPEND VFL_MKHIER TO VIT_MKHIER.<br>
        APPEND VFL_HIER TO VIT_HIER.<br>
    <br>
        NID = NID + 1.<br>
    <br>
        CLEAR: VFL_HIER, VFL_MKHIER.<br>
    <br>
      ELSE.<br>
    <br>
        IF HID EQ VFL_SETHIER-HIERLEVEL.<br>
    <br>
          HID = VFL_SETHIER-HIERLEVEL.<br>
    <br>
          VFL_HIER-NID = NID.<br>
          VFL_HIER-PID = PID.<br>
          VFL_HIER-HID = HID.<br>
          VFL_HIER-IOBJ = '0HIER_NODE'.<br>
          VFL_HIER-NNAME = VFL_SETHIER-GROUPNAME.<br>
          VFL_HIER-DESC = VFL_SETHIER-DESCRIPT.<br>
          VFL_HIER-VALC = VFL_SETHIER-VALCOUNT.<br>
    <br>
          NID = NID + 1.<br>
    <br>
          APPEND VFL_HIER TO VIT_HIER.<br>
    <br>
          CLEAR: VFL_HIER.<br>
    <br>
        ELSEIF HID LT VFL_SETHIER-HIERLEVEL.<br>
    <br>
          HID = VFL_SETHIER-HIERLEVEL.<br>
          PID = NID - 1.<br>
    <br>
          VFL_HIER-NID = NID.<br>
          VFL_HIER-PID = PID.<br>
          VFL_HIER-HID = HID.<br>
          VFL_HIER-IOBJ = '0HIER_NODE'.<br>
          VFL_HIER-NNAME = VFL_SETHIER-GROUPNAME<br>.
          VFL_HIER-DESC = VFL_SETHIER-DESCRIPT.<br>
          VFL_HIER-VALC = VFL_SETHIER-VALCOUNT.<br>
    <br>
          READ TABLE VIT_MKHIER INTO VFL_MKHIER<br>
            WITH KEY HID = VFL_SETHIER-HIERLEVEL BINARY SEARCH.<br>
    <br>
          IF SY-SUBRC = 0.<br>
    <br>
            VFL_MKHIER-PID = PID.<br>
            MODIFY TABLE VIT_MKHIER FROM VFL_MKHIER.<br>
    <br>
          ELSE.<br>
    <br>
            VFL_MKHIER-HID = HID.<br>
            VFL_MKHIER-PID = PID.<br>
            APPEND VFL_MKHIER TO VIT_MKHIER.<br>
    <br>
          ENDIF.<br>
    <br>
          NID = NID + 1.<br>
    <br>
          APPEND VFL_HIER TO VIT_HIER.<br>
    <br>
          CLEAR: VFL_HIER, VFL_MKHIER.<br>
    <br>
        ELSE.<br>
    <br>
          HID = VFL_SETHIER-HIERLEVEL.<br>
    <br>
          READ TABLE VIT_MKHIER INTO VFL_MKHIER<br>
            WITH KEY HID = VFL_SETHIER-HIERLEVEL BINARY SEARCH.<br>
    <br>
          PID = VFL_MKHIER-PID.<br>
    <br>
          VFL_HIER-NID = NID.<br>
          VFL_HIER-PID = PID.<br>
          VFL_HIER-HID = HID.<br>
          VFL_HIER-IOBJ = '0HIER_NODE'.<br>
          VFL_HIER-NNAME = VFL_SETHIER-GROUPNAME.<br>
          VFL_HIER-DESC = VFL_SETHIER-DESCRIPT.<br>
          VFL_HIER-VALC = VFL_SETHIER-VALCOUNT.<br>
    <br>
          NID = NID + 1.<br>
    <br>
          APPEND VFL_HIER TO VIT_HIER.<br>
    <br>
          CLEAR: VFL_HIER.<br>
    <br>
        ENDIF.<br>
    <br>
      ENDIF.<br>
    <br>
    ENDLOOP.<br>
    <br>
    LOOP AT VIT_HIER INTO VFL_HIER WHERE VALC NE 0.<br>
    <br>
      LOOP AT VIT_SETLEAF1 INTO VFL_SETLEAF WHERE SETNAME EQ VFL_HIER-NNAME.<br>
    <br>
        VFL_HIER1-PID = VFL_HIER-NID.<br>
        VFL_HIER1-HID = VFL_HIER-HID.<br>
        VFL_HIER1-IOBJ = IOBJ.<br>
        VFL_HIER1-DESC = VFL_SETLEAF-LTEXT.<br>
    <br>
        SELECT KOKRS KSTAR DATBI INTO TABLE VIT_CSKB<br>
               FROM CSKB<br>
               WHERE KSTAR EQ VFL_SETLEAF-VALFROM.<br>
    <br>
        LOOP AT VIT_CSKB INTO VFL_CSKB WHERE DATBI GE SY-DATUM.<br>
    <br>
          VFL_HIER1-NID = NID.<br>
    <br>
          CONCATENATE VFL_CSKB-KOKRS VFL_SETLEAF-VALFROM INTO CSTEL.<br>
    <br>
          VFL_HIER1-NNAME = CSTEL.<br>
          NID = NID + 1.<br>
    <br>
          APPEND VFL_HIER1 TO VIT_HIER.<br>
    <br>
          CLEAR: VFL_CSKB.<br>
    <br>
        ENDLOOP.<br>
    <br>
        CLEAR: VFL_SETLEAF, VFL_HIER1.<br>
    <br>
      ENDLOOP.<br>
    <br>
      CLEAR VIT_SETLEAF[].<br>
    <br>
    ENDLOOP.<br>
    <br>
    <br>
    LOOP AT VIT_HIER INTO VFL_HIER.<br>
    <br>
      NHID = VFL_HIER-HID.<br>
      NVALC = VFL_HIER-VALC.<br>
    <br>
      CONCATENATE VFL_HIER-NID ';' VFL_HIER-IOBJ ';' '"' VFL_HIER-NNAME '"'<br>
                  ';' ';' VFL_HIER-PID ';' ';' ';' 'N' ';'<br>
                  '"' VFL_HIER-DESC '"' ';' '"' VFL_HIER-DESC '"' ';'<br>
                  '"' VFL_HIER-DESC '"' INTO OUT.<br>
    <br>
      VFL_FINAL-OUT = OUT.<br>
      APPEND VFL_FINAL TO VIT_FINAL.<br>
      CLEAR VFL_FINAL.<br>
    <br>
    ENDLOOP.<br>
    <br>
    CALL FUNCTION 'GUI_DOWNLOAD'<br>
    EXPORTING<br>
      filename = 'hierarchy.csv'<br>
    TABLES<br>
      data_tab = VIT_FINAL<br>
    EXCEPTIONS<br>
      OTHERS   = 1.<br>
    <br>
    Edited by: Bjorn Houben on Dec 28, 2009 2:07 PM
    Edited by: Bjorn Houben on Dec 28, 2009 2:16 PM
    Edited by: Bjorn Houben on Dec 28, 2009 2:16 PM

  • Block default cost center in OKB9

    Dear Experts,
    - If I would like to block one cost center which setting in OKB9 as defaul cost center, then change it to other cost center, what is the affect?
    - If cost element in OKB9 is having no cost center as default , then how the transaction from FI flow to Controlling?
    Kindly advice.
    Thank you.

    Hi Puri,
    When you give any Cost Center as default object in OKB9 for any Cost Element, that means, whenever there is a posting in FI in that GL, the system will prompt the default Cost Center in that line item. User will still have facility to change that cost center and can enter new cost center.
    If you want to replace a new Cost Center with a old Cost Center in OKB9, you can do that at any point of time. No implications.
    If you do no mention any Cost Center as default object in OKB9 for GL, nothing will happen but the User has to select the Cost Center manually at the time of FI postings.
    Srikanth Munnaluri

  • Validation rule cost element via Idoc

    Hi all,
    i am sitting on the following Problem:
    we are creating master data via an external tool, called MDM. It is an Access based tool as far as i know.
    These data's are send via Idoc into our SAP R/3 system. It works fine.
    The only issue we have:
    If you create cost elements, you have normally a validation with gives you a warning that e.g. this cost element already exist. Via our Idoc its just overwriting this already existing cost elements, also the history, all data's are nearly lost.
    Do we have to customize special validation rules? Is it because of Idoc? why is the existing validation not be activated via Idoc?
    I hope i have written down enough information, so that somebody can help me. Thanks
    Michael

    Hi Christian,
    I have set a breakpoint in validation rule. The step from Financial Accounting is processed.
    Prerequisite
    BKPF-BUKRS = 'FAI' AND BKPF-BLART = 'WA' AND
    BKPF-AWTYP = 'MKPF' AND BSEG-HKONT IN TESTE_CL
    Check
    BSEG-AUFNR IN TESTE_OP
    The validation rule check only the first item from accounting document. So, all postings on account 1103010008 are blocked.
    Itm   PK   Account           Account short text              Order            Amount                                                                               
    1   99   1103010008     STOCKS OF AUXILIARY                            63,15-
      2   81   5102040001     Maintenance and Repa        101541          63,15 
    I need to check the second item from accouting document.
    Do you have any suggestion to solve my problem?
    Thanks.
    Osmar.

  • Problem with a cost element

    dear all,
    a cost element was created from a society x in ca y.
    now this cost element creats some problem for society d and b in ca Y.
    some regiastration are made on this cost element so I know that I can delete it until 31.12.2010.
    what kind of solution can I have? we don't want tha the registrations made on this account are relevant for controlling.
    this is a cost element of type 11.
    If I create a cdc Dummy and I imput it every time that I made  registration on this account what kind of impact I will have in controlling?
    i read that I have to block th account 206131 and create new in copy of it. What kind of impact I will Have?
    please help me to solve this issue because we have the ragistration blocked at the moment.
    thanks
    V.

    why you don't suggest me to use this program?
    the entries on my cost element are made with tc VL01N..
    until 31 of july this kind of registration creates a document FI and a document Profit center.
    after the creation of the cost element this kind of registration creates a Fi document, profit center document and a CO document.
    I don't want the creation of CO document.
    Actually in COEP I have 24 input. I try to simulate the same case in test client.
    I create the cost element, I do the same registration, and I have 3 type of document.
    then I run the program RKACOR20.
    at the end I have only 2 documents: FI and profit centre. (the same situation that I had in july)
    then I run tc KA04 and I can delete the cost element.
    you think that it is so dangerous to do in production system?
    what kind of problem this program can creates to me?
    thanks a lot
    V.

  • Requires an assignment to a CO object for revenue cost element

    Hi All,
    I am posting directly in FI revenue entry through FB70. For that I am using the revenue GL Code 62200030 and same has been created as a cost element using cost element category 11 Revenue under controlling area...
    Now when I am posting the transaction I have already given profit center at line item level (& not a cost center as it will never takes credit entries). But after giving all the data at line item level system is giving me the following error "Account 62200030 requires an assignment to a CO object-Message no. KI235". I am using SAP ECC 6.0
    I can not use cost center in revenue entry as my cost center has been blocked for revenue posting.
    Kindly help to resolve this issue.
    For helpful answer points will be surely assign & thanks in advance.
    Regards,
    Sandeep

    Hi Sandeep
    First of all, do not offer points.. Edit your post and remove those words.. Else, your thread might get locked....You can give points for helpful answers as per your discretion, but pls do not offer them in your thread
    You need to enter an Internal Order or a Prof Segment to a revenue line item...
    If you do not want to do this, then convert this message into Warning message in OBA5
    Regards
    Ajay M
    Edited by: Ajay Maheshwari on Jan 17, 2011 10:01 AM

  • KB15N_No adjustment account found for cost element Message no. K5112

    When I am trying to post Manual Cost Allocation through TC KB15N with the following input data I am getting the following error message and the same could not be posted.  Kindly advise.
    Screen Variant used: 01 SAP Cost Center
    Input Type: List Entry
    Item No.1
    Sender Cost Center : 3402100942
    Cost Element: 6200001
    Amount : 62,201.56
    Receiving Cost Center: 3405100945
    First four digits represent profit center code.  If first four digits are equal the above error is not coming. But posting is needed with different profit centers.
    No adjustment account found for cost element
    Message no. K5112
    Diagnosis
    Neither standard account determination nor the enhanced function found an adjustment account for the reconciliation posting.
    System Response
    No adjustment account could be determined for cost element  in company code SCCL.
    Procedure
    Maintain the standard or enhanced account determination for transaction KAMV. Information on maintenance can be found in the program documentation.
    Execute

    Hi all,
    I face the issue like this but with transaction KOAP - Plan settlement
    But, the problem is that, I do not active reconciliation ledger, so I do not maintain any thing relate to reconciation ledger or adjustment posting? I can do transaction "actual settlement"  without error
    So, How this error come to me?
    And how I can fix it?
    Thanks all!

  • No Adjustment account found for cost element

    Dear Gurus,
    I am getting Three errors  msg "No Adjustment account found for cost element" when i try to run the conformation of production order create  ( T Code : C015 )"  and I am not able to save the record . like
    1 ).No adjustment account found for cost element
    Message no. K5112
    Diagnosis
    Neither standard account determination nor the enhanced function found an adjustment account for the reconciliation posting.
    System Response
    No adjustment account could be determined for cost element  in company code XXXX
    Procedure
    Maintain the standard or enhanced account determination. Information on maintenance can be found in the program documentation.
    Execute
    2) . No adjustment account found for cost element XXXXXXXX
    Message no. K5112
    Diagnosis
    Neither standard account determination nor the enhanced function found an adjustment account for the reconciliation posting.
    System Response
    No adjustment account could be determined for cost element XXXXXXX in company code XXXX.
    Procedure
    Maintain the standard or enhanced account determination. Information on maintenance can be found in the program documentation.
    Execute
    3 ) No account is specified in item 0000000002
    Message no. F5670
    Diagnosis
    No account was specified for account type "S" in item "0000000002" of the FI/CO document.
    System Response
    The Financial Accounting program cannot process the document.
    Procedure
    A system error has probably occurred in the application you called up. Check the data transferred to item "0000000002" of the FI/CO document.
    Could anyone please help me with this.
    Regards
    SAP CO

    Hi,
    iam not able to understand of this  SAP Notes: 531606 and 1027645
    Could you pl give me full details for come out this problem.
    Regards
    SAP CO

Maybe you are looking for

  • No selectable items exist for purchase requisition l_banfn

    Hi, While creating PO with ref to PR getting the below error : no selectable items exist for purchase requisition l'banf . Checked if the PO is created, its not created,. checked if the item is blocked/cancelled/deleted. Nothing is set. PR looks fine

  • Remote FTP site GMT offset issue

    When I have a DW remote FTP site, and look at the remote site the timestamps are ahead of mine. I can PUT a file right now and the remote timestamp will appear +4 hrs, which is correct GMT time. I look at the FTP log and see that the LIST (ls) comman

  • Custom fields to the sales area tab of customer master data

    Hi Guys,        i have one requirement, where i need to add Zfields to the Sales tab in sales area data of customer master. Can somebody give me steps how to do it? do we need to do screen programming or just appending KNVV so that functional consult

  • JDeveloper 10.1.3: KeepResident version 1.0 update not working

    I just tired to download KeepResident from the update center, but the .zip file is corrupt. I tried a couple of times with no success, does anyone know a hardlink to this update? Thanks

  • Cover flow gone?

    Recently I noticed that my ipod nano (3rd gen) has lost the cover flow option! Maybe I'm not looking in the correct spot, but I thought it was under Music --> Cover Flow. For some reason it doesn't show up? Anyone have the same problem, or it could b