Cost center data fetch from COSS/COSP tables.

Hi Experts,
I need to fetch data from COSS/COSP tables for particular Cost centers fetched in CSKS select.
As there is no Costcenter field I cannot access the database tables directly.
Fetching entire dat and then deleting is causing performance issue with the report.
I need to reduse the time taken by COSS/COSP table select , as I have Cost center field on the selection screen.
Is there any other method or  FM that I can use?
Thanks in advance!!!

Hi
This is my code to get the data from a certain cost element group:
}call function 'G_SET_GET_ID_FROM_NAME'
     exporting
       shortname                      = p_kagru
       tabname                        = 'CCSS'
       fieldname                      = 'KSTAR'
       kokrs                          = p_kokrs
       ktopl                          = 'ENPC'
       setclass                       = '0102'
       check_set_empty                = 'X'
     importing
       new_setid                      = setid
*     SET_INFO                       =
    exceptions
      no_set_found                   = 1
      no_set_picked_from_popup       = 2
      wrong_class                    = 3
      wrong_subclass                 = 4
      table_field_not_found          = 5
      fields_dont_match              = 6
      set_is_empty                   = 7
      formula_in_set                 = 8
      set_is_dynamic                 = 9
      others                         = 10
   if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
   endif.
   call function 'G_SET_GET_ALL_VALUES'
     exporting
*     CLIENT                      = ' '
*     FORMULA_RETRIEVAL           = ' '
*     LEVEL                       = 0
       setnr                       = setid
*     VARIABLES_REPLACEMENT       = ' '
*     TABLE                       = ' '
*     CLASS                       = ' '
*     NO_DESCRIPTIONS             = 'X'
*     NO_RW_INFO                  = 'X'
*     DATE_FROM                   =
*     DATE_TO                     =
*     FIELDNAME                   = ' '
     tables
       set_values                  = t_set_values
    exceptions
      set_not_found               = 1
      others                      = 2
   if sy-subrc <> 0.
     message id sy-msgid type sy-msgty number sy-msgno
             with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
   endif.
  loop at t_set_values.
    count = count + 1.
    r_kstar(3) = 'IEQ'.
    r_kstar-low = t_set_values-from.
    append r_kstar.
    if count = 500.
      perform read_coep.
    else.
      at last.
        perform read_coep.
      endat.
    endif.
  endloop
U can use somthing like that to get data from cost center
Max

Similar Messages

  • Cost Center data Extraction from R/3

    Hello,
    I am using extractor 0CO_OM_CCA_1 to get CO data into BW-BPS. After examining the resulting data into BW, I have a a problem: The customer uses movement types JVIV, RKIV, RRIV in R/3 for some of their cost centers, and they want those movements to be excluded from the extraction. However, I can see no valid filtering possibilities at the extractor....
    Do you know how I could make this filtering?
    Many thanks in advance for your help,
    Eduardo.

    Hi Gianfranco, thanks for your reply
    I am stuck at this point because when data is extracted from R/3 into BW, there is a "conversion" for such "movement types", in which the system maps those values I mentioned from table COSP_VTYPE in R/3 into something like the following in BW:
    Table RSTVTDETAIL:
    VALUETYPE MEASTYPE VTDETAIL TXTSH                TXTMD                                  
    010       001000   01       Primary Costs        Primary Costs                          
    010       001000   02       CO-Transfer          CO-Transfer                            
    010       001000   03       CO-Allocations       CO-Allocations                         
    010       001000   04       CO-Activ. alloc.     CO-Activity allocations                
    010       001000   05       CO-Settlement w act. CO-Settlement with activity flow       
    010       001000   06       CO-Settl. wo act.    CO-Settlement without activity flow    
    The problem is, I cannot find a correspondent value for those JVIV.. from R/3, and thus, all data is displayed as a total. What I intend is to separate entries related to those COSP_VTYPE values and exlude them from budgetting...
    The final objective for this one is (I will try to explain it without a specific technical knowledge of financial vocabulary), that It is a requirement that imputations to a cost center that come from other cost centers, are not displayed for the former.
    Any help will be appreciated. Thank you very much in advance
    Regards,
    Eduardo.

  • Extracting cost center data from two tables

    Hi Everyone,
    I'm trying to extract cost center data from two different tables in SAP and pull it into one InfoObject.  I'm using 0costcenter and it's already extracting data from one of the tables I need.  Could someone explain how to add the second table? Thank you.

    You can create a Generic Extractor , Create a view on 2 tables with proper join condition n use this to load 0COSTCENTER.

  • Data fetching from BSEG table

    Hi,
    I have used smartforms for generating suppler payment statement for financial department. more time duration is taken by the program when it is generating.
    I think this problem comes while data fetching from BSEG table. because, it has more records for one vendor ID.
    I want reduce this time duration.
    Please guide me.

    Have you tried this selection in se16? I'm quite sure that It will take
    a long time.
    The problem has been explained in this group before and I think you
    should search for bseg in the answers given.
    As a hint: It has to do with the selection universe. You are restricting
    only bukrs from the primary key (all the other restrictions in your
    where clause are filters that are applied on SAP's side (not on the
    database side)). The problem is that bseg isn't stored as separated
    fields in the RDBMS, but as a table with the primary key and a stream of
    bits in a raw field.
    You should review and change the logic you're using before reading bseg.
    It's the only way you'll improve the performance of this select. (for
    example, you could use one or more secondary index tables - bi or ba
    to retrieve belnr and access bseg with a better where clause).

  • Cost center data transfer

    Hi
    I am searching for a progra which can send cost center data to other systms. I have got one transaction BD16(program rbdsecos)
    but in this we we have to give the cost center name
    but my requirement is sending data of all cost centers with a variant.
    Please help me.
    Regards
    Manu

    Hi,
    Yes Controlling Area and Cost Centre Code are mandatory. Get a table dump of table CSKS for all cost centre code and enter in the selection screen using multiple selection feature. Do the same for controlling area from table TKA01 and run the report.
    Hope this helps.
    Regds,
    Rudra

  • BAPI_GLX_GETDOCITEMS and no Cost Center Data

    Hi,
    i'm using the BAPI "BAPI_GLX_GETDOCITEMS" to extract all documents from General Ledger. This BAPI returs the structure "ITEMSLIST" which contains a field for the Cost Center. I took a look at several Documents via FB03 and there are many documents with a specified Cost Center.
    When i use the BAPI to extract all documents for a specific Company Code, the Cost Center field is always empty.
    Does anyone know what the problem might be and how i could fix this?
    I am using Pentaho Data Integration (and it's SAP Plugin) to connect to a SAP R/3 System.
    Thanks in advance!

    Hi Hugo,
    thanks for the answer. You were right, i am in New GL and I just checked the table "FAGLFLEXA" and there is really no Cost Center saved at any table entry.
    Is there another possibility to get Cost Center Data without activating the Cost Center Scenario (FIN_CCA), perhaps extracting documents from SAP CO? I've heard, that New GL supports a real time integration of CO with FI.
    Thanks a lot in advance!

  • Cost center data uploading issue in OKENN transaction

    Hi Gurus,
    I have uploaded cost center data using LSMW IDOC method. the data uploaded in the CSKS table successfully. after that i have checked for the cost centers in OKENN transaction at standard hierarchy level. but there cost center are not exist under hierarchy level. then i have changed the hierarchy data(KHINR)(for example From SUS2021100 to SUS2021200, ihave changed in KS02.... then the cost displyed under SUS2021200.... again i have changed the hierarchy from SUS2021200 to SUS2021100.... then the cost center displyed under SUS2021100..... But actualy when i have loaded the data using LSMW all the loaded.... but the cost center not displyed under hierarchy.... after manualy chnged the hierarchy data at KS02 transaction.... it is displying.... idon't understand what is the problem.... can anybody solve my issue.... thanks in advance

    Hi Gurus,
    I am facing the same issue while uploading cost centers through COSMAS01 basic type.
    Cost centers are created properly, we can display them with KS02. Every data are loaded correctly, even the standard hierarchy. Into table CSKS, field KHINR for standard hierarchy is populated, nevertheless, we do not find the cost center into the OKEON Tcode.
    How could I solve the issue I am facing ?
    Thx for your help.
    Regards,
    Aurelien

  • Cost center data distribution through change pointers

    HI
    I need to distribute cost center data through change pointers
    Can anyone please tell me the steps i need to follow
    please dont give links, but would be helpful if some1 can tell me step by step
    and how to do testing, ie which tables i need to check to see whether my change pointers are working or not.
    Thanks in advance
    Regards
    Manu

    Hi,
    Please follow the following steps.
    Check if Change pointer is active Globally via BD61
    Check if change pointer is active for COSMAS via BD50
    Maintain required field entries for which you need the change pointer to be triggered vai BD52.
    Maintain distribution model for Source and Traget System for message type COSMAS in source system
    Maintain partner profile via WE20.
    Then run transaction BD21 to trigger change pointer idocs.
    Hope it helps.
    Regds,
    Rudra

  • COST CENTER DATA NOT populated

    Hi experts,
    I am facing problem with the follwing, please help me as it is urgent and points will be assigned.
    I am working on BI 7, I had two extractors from R/3 0FI_GL_4 and 0FI_GL_6. Extracted data to BI system, In BI system created two DSO namely 0FIGL_O02 and ZFI_GL_6. so I had moved the data from 0FI_GL_4 to 0FIGL_O02 ( P&L accounts) and from 0FI_GL_6 to ZFI_GL_6 ( Balance sheet accounts).
    So here what we did is that we had created created one more DSO ZFI_GL_7, in this DSO we had loaded the both the DSO data of 0FIGL_O02 and ZFI_GL_6.
    so here comes the problem.
    Balance sheet accounts would not have Cost Centre values and in turn P & L accounts would have Cost Centre data. this is true.
    But i am not able to look the costcentre data for all the GL accountsin the DSO ZFI_GL_7, only some few GL accounts have the data some does not have.
    In this regard please help me. and it is very much urget.
    For your kind information , one more info is there please note.
    Whatever the data is coming to DSO ZFI_GL_7 is copied into the another DSO ZFI_GL_8 ( HYPERION DATA LOAD) , FOR THIS WE HAD WRITTEN THE ABAP PROGRAM also.
    So can anyone help.
    Hi ABAP experts,
    Please find the above information,
    Since I had to write the ABAP program in 0FIGL_O02 in Transformations, the program is already there, but the delete statement shows like this.
    "DELETE SOURCE_PACKAGE where BAL_FLAG = 'X'."
    In this case I want to allow the GL accounts data with cost centre data, so that I want to see for all GL accounts the cost center data will be populated. so Please help me what is the process to write the code.
    At the same time I want to write the ABAP code at ZFI_GL_6 to restrict the GL accounts, since this accounts are already present in the DSO, so that we cannot get the duplicate data in the ZFI_GL_7 DSO.
    So Please help me in this regard.
    Thanks
    Sekhar

    Hi ABAP experts,
    Please find the above information,
    Since I had to write the ABAP program in 0FIGL_O02 in Transformations, the program is already there, but the delete statement shows like this.
    "DELETE SOURCE_PACKAGE where BAL_FLAG = 'X'."
    In this case I want to allow the GL accounts data with cost centre data, so that I want to see for all GL accounts the cost center data will be populated. so Please help me what is the process to write the code.
    At the same time I want to write the ABAP code at ZFI_GL_6 to restrict the GL accounts, since this accounts are already present in the DSO, so that we cannot get the duplicate data in the  ZFI_GL_7 DSO.
    So Please help me in this regard.
    Thanks
    Sekhar

  • HRP1001 subtype A011....Position to Cost center data

    Hi Folks,
    I am new to HR data replication from HCM to ECC. I am trying to replicate the HR Organizational data from HCM to ECC, THough I am able to replicate all the organizational data I am having issue with HRP1001 Subtype: A011 (Position to Cost Center data). I am using the IDOC type HRMD_ABA and I see all the IDOCS successfully made it to ECC with status 3; but still when I look into HRP1001 (plan version 01, Object TYpe :S; subtype:A011) I see zero entries. As there are no failed IDOCs it is difficult to understand what is stopping the entries to be populated. Please advise if any one has any suggestions or if anyone has encountered similar issue.

    Kalyan,
    Shouldn't the object type be S. Anyway I even tried with O but still no luck.
    But I observed one thing, there are no entries in HRMDORIGIN and when I tried to run the program RHALEHRMDORIGINIT, I am getting a dump
    Category               ABAP Programming Error
    Runtime Errors         SYSTEM_LOAD_OF_PROGRAM_FAILED
    ABAP Program           RHALEHRMDORIGINIT
    Short text
        Illegal interruption of the event LOAD-OF-PROGRAM.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "RHALEHRMDORIGINIT" had to be terminated because it
         has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        During the flow of the event LOAD-OF-PROGRAM (event for the
        initialization of an ABAP program), a condition occurred under which
        the event was to be left early. This is not permitted as it would
        result in an inconsistent status in the ABAP program.
    Trigger Location of Runtime Error
        Program                                 RHALEHRMDORIGINIT
        Module Name                             SYSTEM-EXIT
    Active Calls/Events
    No.   Ty.          Program                             Include                             Line
          Name
        1 EVENT        RHALEHRMDORIGINIT                   ???                                     0
          SYSTEM-EXIT

  • Distribute cost center data change pointer

    HI
    I need to distribute cost center data through change pointers
    Can anyone please tell me the steps i need to follow
    please dont give links, but would be helpful if some1 can tell me step by step
    and how to do testing, ie which tables i need to check to see whether my change pointers are working or not.
    Thanks in advance
    Regards
    Manu

    Hi manu,
    1) Goto transaction BD61 check if the checkbox is checked
    2) Goto SM30 table V_TBDA2 click maintain enter message type and check the checkbox
    3) Goto transaction BD52 enter Cost center message type
    (COSTCENTER_CHANGEMULTIPLE/COSTCENTER_CREATEMULTIPLE/ any custom one) which you are using  and create an entry object CMDT_CC table CMDTCC_ALL field * (all fields/ list of fields you want) .
    Change pointers are created you can use this for distribution of IDocs
    Regards
    Hussain

  • Cost Center Data in Company Code Currency

    Hi All,
    We have a requirement to develop a Cost Center Report with Company Code, Account Number and Amount in Company Code Curreny.
    I have checked table COEP, we can get data of CCode, Account Number. But Amount will be in Object Currency/Transaction  Currency / COArea Curreny and not in Company Code Currency.
    Is there a way to get Cost Center data in Company Code curreny.
    Please advice.
    Thanks
    Satish

    Hi,
       In CO, you specify in the year-dependent settings for the controlling area (Transaction OKKP) whether you want to use one or more currencies (flag "All currencies", TKA00-ALLEW).
    If you decided to use one currency only, all documents are only managed in CO area currency.
    If you decided to use several currencies, the following three currencies are managed in CO:
        1. Controlling area currency
           The controlling area currency can be:
           -  10 company code currency (only if all company codes assigned to CO area have the same currency)
           -  20 free controlling area currency
           -  30 group currency
        2. Object currency (defined per object)
    As a rule, the object currency is the company code currency. Only in one case the object currency can be freely chosen, that is, if flag "different company code currencies allowed" is not active.  This flag is set automatically if CO area currency is not 10 and cross-company code accounting is set.
        3. Transaction currency (could be different in every posting).
    regards
    Waman

  • Cost center data

    Hi
    I am searching for a progra which can send cost center data to other systms. I have got one transaction BD16(program rbdsecos)
    but in this we we have to give the cost center name
    but my requirement is sending data of all cost centers with a variant.
    Please help me.
    Regards
    Manu

    Hello,
    You can still make use of BD16. The 2 required fields are Controlling area and Cost center. If you need to send data for all cost centers why not just put in a "*" in the cost center field and save the variant. This should solve your issue. Let me know if not.
    Regards,
    I. Shekar

  • Data Extraction from AR Aging Tables to Acess

    Hi
    I used to work on developing the reports.But I am a new to the Data Extraction from AR Aging Tables into Acess and the data is upload from Acess to SAP.
    Can anybody help me to relove this issue.I really appreciate to you.After mapping then the data is loaded to SAP.

    Hi
    I used to work on developing the reports.But I am a new to the Data Extraction from AR Aging Tables into Acess and the data is upload from Acess to SAP.
    Can anybody help me to relove this issue.I really appreciate to you.After mapping then the data is loaded to SAP.

  • Uploading of cost center data with additional fields

    Hi Gurus,
    I have uploaded the cost center data. now my client has given same data with additional fields data(ORT01, ORT02, TXJCD). first time I have uploaded with LSMW IDOC methos COSMAS1. but in the same idoc the extra field not available. So i have tried recording method for KS02 to upload the data. but the data is not changed. in the sence the additional fields data not loading. while uploading i getting the probelm at TXJCD. it is getting a popup window. i was not able to handle that. Is there any other Basic IDOC to upload the data with all the fields in cost center. BAPI or Direct input program? Thanks in advance

    hi,
    you can  avoid the popup screen by using  OK code.
    ~linganna.

Maybe you are looking for

  • Weblogic 10.0 on HP-UX

    HI We have WLS 10.0 Mp1 installed on HP-UX 11.23 OS. The underlying java is HP JAVA 1.5.0.05. The server responds perfectly when small number of records are requested from the DB. But when a large amount of a data is requested the server returns a HT

  • Trouble Connecting To Internet.....

    Hello, I have a Linksys wireless router model WRT54G (not sur ethe exact model, it's not in front of me right now).  It has worked flawlessly for the past several years, but for some reason has recently stopped working.  I confirmed it's not a proble

  • The requested URL /mahjongtrails/ was not found on this server.

    Not Found The requested URL /mahjongtrails/ was not found on this server. Apache/2.2.9 (Debian) mod_jk/1.2.26 PHP/5.2.6-1+lenny4 with Suhosin-Patch mod_python/3.3.1 Python/2.5.2 mod_ruby/1.2.6 Ruby/1.8.7(2008-08-11) mod_ssl/2.2.9 OpenSSL/0.9.8g Serve

  • Ghost of a Iphoto 6 library...where have all my photos gone?

    Help! Most of my photos in my library seem to have dissapeared - or in other words - are not displaying. When I go to the underlying databases all my photos appear to be there however. Also, in iPhoto on the bottom of the screen it says 728 items (60

  • Combining more than two movies QT Pro 7.1.5

    I know I can combine two movies with QTPro, but how do I combine three? Thanks Tom