Company Code finding

Hi guys: Is there a way in SAP to find out ALL the tables that contain a certain company code? is there a t code where i can specify the co code?
thanks much
Brian

hi,
try this report - but restrict tables by tabclass -
REPORT zbukrs01 .
*data
TABLES dd03l.
DATA: BEGIN OF itab OCCURS 0,
        tabname TYPE dd03vt-tabname,
        tabclass TYPE dd03vt-tabclass,
      END OF itab.
DATA: dwa  TYPE REF TO data.
FIELD-SYMBOLS: <wa> TYPE ANY.
DATA: BEGIN OF wtab OCCURS 0,
        line(72),
      END OF wtab.
FIELD-SYMBOLS <fs>.
PARAMETERS p_fld LIKE dd03l-fieldname DEFAULT 'BUKRS'.
PARAMETERS p_val(50) DEFAULT '1000'.
SELECT-OPTIONS s_class FOR itab-tabclass DEFAULT 'TRANSP'.
*start-of-selection.
START-OF-SELECTION.
SELECT tabname tabclass FROM  dd03vt INTO CORRESPONDING FIELDS OF itab
         WHERE  fieldname  =  p_fld
          AND   tabclass  IN s_class.
    COLLECT itab.
  ENDSELECT.
  IF sy-subrc <> 0.
    MESSAGE e001(00) WITH 'nothing found!'.
  ENDIF.
  CONCATENATE p_fld '=' p_val INTO wtab SEPARATED BY space.
  APPEND wtab.
*output
  sort itab.
  LOOP AT itab.
    WRITE: / itab-tabname.
    CREATE DATA dwa TYPE  (itab-tabname).
    ASSIGN dwa->* TO <wa>.
    SELECT SINGLE * FROM (itab-tabname) INTO <wa>
     WHERE (wtab).
    IF sy-subrc = 0.
      SELECT *  FROM  dd03l
             WHERE  tabname  = itab-tabname
              ORDER BY position.
        ASSIGN COMPONENT dd03l-fieldname OF STRUCTURE <wa> TO <fs>.
        WRITE: / dd03l-fieldname COLOR 4, ':', <fs> COLOR 2.
      ENDSELECT.
    ELSE.
      WRITE: 'entry for table', itab-tabname, 'not found'.
    ENDIF.
    ULINE.
  ENDLOOP.
Andreas
pls reward helpful answers
thank you

Similar Messages

  • How find out which user is using which company code?

    Hi Gurus,
    I am having more than 500 users in Production System.I need to find out which user is using which company code?I can get the roles and users separately from two different SAP tables.
    Is it possible to get it from a single table or Tcode?
    Best Regards,
    Rahman

    Hi,
    Thanks for the update.Yes I tried with SUIM.But I was unable to find any clue.
    Regards,
    Rahman

  • How to find out Company code from Plant in BW

    Hi,                                                      This is probably a very basic question.                                 
    In one of my ODSs, I have 0PLANT infoobject but do not have the Company Code. I thought 0COMP_CODE should have been an attribute of 0PLANT. But it is not and I am NOT finding anyway to derive the company code from the Plant code.                              
    I guess I can change my datasource to get that value but thought the Plant-->Company Code link is one of the most basic things in SAP R/3.    
    I cannot imagine it can be missed in the Business Content design by SAP.  
    So thought I would check with you to see if my expectation is correct.    
    If not, what might have been the reason behind the exclusion of the link between Plant and Company Code from the Business Content.                                                                               
    Thanks and regards,                                                       
    Atul Kulkarni

    Hi,
    we are running RETAIL and by design:
    a plant (0PLANT ) belongs to a sales organization (0SALESORG attr of 0PLANT) which belongs to a company code (0COMP_CODE attr of 0SALESORG)
    this defines a unique comp_code for a plant.
    You can therefore put the following two fields in an internal table of a start routine
    SELECT pPLANT sCOMP_CODE
    INTO CORRESPONDING FIELDS OF TABLE lt_internal
    FROM /BI0/PPLANT p
    INNER JOIN  /BI0/PSALESORG s ON sSALESORG = pSALESORG
      AND sOBJVERS= pOBJVERS
      AND s~OBJVERS = 'A'.
    and look it up in your IObj routine.
    In R/3 that's true WERKS (T001W9 belongs to a BWKEY (T001K) which belongs to a BUKRS.
    hope that helps...

  • How to find out company code from a plant ?

    Hello friends,
    I have to modify a program that uses FM "BAPI_COMPANYCODE_GET_PERIOD".   For that, we have to export company code ID.  Currently it is hard coded with one company code.  Now we want to make this program usable by all company codes.  So instead of hard coding, I would like to dynamically find out company code based on the plant.   So I want to know - how to find out company code from a plant ?  Is there any table that has plant to company-code assignment data, or any other FM/BAPI to get this info ?
    Thanks,
    - Chetan

    hi
    u can find this from table T001K
    or just goto EC01
    here click on STRUCTURE>NAVIGATION
    double click on co code u will get the list
    u can slo try this in EC02
    regards
    kunal

  • How to find out the company code given the customer number

    I am new to SAP please help me out? How do you find out the answer.

    Hi,
    Goto T.Code SE11/Se16/SE16n.
    Key in the table name as KNB1.
    Enter your customer number.
    Execute.
    You will get your company code here.
    Another way is Goto XD02/XD03.
    Enter your customer number.On company code press F4.Enter the customer number and press Enter.A list of company code in which your customer presents will appear.
    Regards,
    Krishna.

  • How to find document attached to user and Company code?

    Hi all,
    Requirement: Select a list of Business documents ( Sales order/PO....) created or changed by <b>specific users</b> which belong to a <b>Specific Company code</b>.
    ie,To develop a report which lists the Documents created/updated/changed based on specified date and users.
    I think we can find from CDHDR & CDPOS  tables.  But i need to filter these documents or pick documents based on a Specific Company code.
    ie.,from the list of records obtained from CDHDR table....how to filter these documents based on Company code......
    valuable inputs needed.
    Thanks,
    Subba

    Hi
    Most of the application document Heade tables(VBAK,EKKO etc ) will have the field CRETAED by  like ERNAM. and all these tables will have BUKRS field also in them
    So compnay code wise User created documents list you will get.
    Only problem is the Changed/Modified list by user with related Company code.
    Anyhow you will get the User who changed the documents from CDPOS table.
    But for linkthem to Company code I feel You need the
    help of HR related Tables .
    with the UNAME which you get from CDPOS table go to PA0105 infotype and get the PERNR linked with that user.
    And get the attached BUKRS Company code from PA0001 infotype.
    Hope this will solve your problem.
    reward points if useful
    regards
    Anji

  • How to find expense and revenue of a company code for a particular period

    Hi Gurus,
    I am new to FI. I need to find out the revenue, expense and gross profit of a company code for a particular period.
    for eg: I need to find the revenue, expense and GP of a comapany code 'ZYZM' for the month of july. Is there
    any standard report for this or any way to see P&L statement for this period?
    Thanks and regards,
    Ashish Kumar

    Hi Ashish
    You can use report S_PL0_86000030 - G/L Account Balances (New)  for the period wise report.
    You can select as Mani mention P&L account statement type as X in dynamic selection and give the period for which you require the balance.
    The report will give you the three balances
    Opening
    Till previous period
    for the period
    Hope this report will help you.
    Regards
    Pankaj P

  • FROM WHICH TABLE I CAN FIND  GL ACCOUNT NUMBER AND COMPANY CODE OF A PARTI

    FROM WHICH TABLE I CAN FIND  GL ACCOUNT NUMBER AND COMPANY CODE OF A PARTICULAR CUSTOMER?..I AM TRYING TO POST AN IDOC ..SO DATA HAS TO BE PROPER.JUST TELL THE SOLUTION

    Hi rendeep,
    1. LFB1
       this is the required table.
    2. field is AKONT
    3. The account number can be different
       for different companies.,
       hence it depnds upon combination of
       LIFNR
       BUKRS
    regards,
    amit m.

  • Where can I find the relation between company code and plant?

    where can I find the relation between company code and plant?
    I need to the list of plants under a company code.
    Which table?

    yes,wayne weng   .What you said is right.
    Thank you very much!
    My MSN:[email protected]

  • How to find which profiles created with SU02 have a specific company code

    We just added another company code.
    We have company code 10 & 20
    We're trying to find out which profiles created with SU02 have company code 0010 or * for BUKRS
    I know that you can get that information with SUIM for field text BUKRS and it will show you all the roles or I can browse table agr_1252,
    But how do I get the same information for profiles created with SU02
    I just want to make sure that users that have company code 0010 cannot access company code 0020 and vice versa
    Thanks a lot in advance, this will be very helpful for me
    Thanks again
    Joe

    Hello Joe,
    Solution is to be found in SUIM->Profiles by complex selection criteria. In the selectin screen uncheck the field 'Generated Profiles'
    (t-code=S_BCE_68001409)
    Total Questions:         58 (34 unresolved)
    Please clean up your threads....
    Thread locked as per forum rules.
    b.rgds, Bernhard

  • Table to find the company code's Local currency

    Can anyone tell me which table contains data for finding a company code's local currency
    thanks

    Hi Benson,
    You can find it in View V_001_B  Table T001
    Cheers
    Shony

  • Finding controlling areas from company codes

    Hi,
    can any body tell me the way to find the controlling areas
    given the company codes lke we find the sales org from the company codes using OVX3.
    Thanks in advance,
    Ramakrishna.

    Hi,
    OX19 Controlling Area: Assgn. to CCode

  • Unable to find company code in assignment of company code (OX19)

    Hi,
    Please advice me why I am unable to find the newly created company code in assignment of company code (OX19).
    TQ

    Hello
    Comapnay code can be assigned to one controlling area only, so this might be assigned to some other CO Area, check the table TKA02, you can see that.
    Before you can delete the assignment, you must delete all master data in controlling area ALMA referring to company code you want assigned.
    Regards
    Dinabandhu

  • How to find company code and its org unit?

    Hi All,
    For a given company code, i need to find its org unit. Please let me know the info type table or any FM.
    Thanks,
    SKJ

    Hi Ravi,
    Yes, i just came to know about that. I clicked on account assignment features button in PPOS_OLD and specified pers area, pers sub area and company code and found that an entry was created in HRP1008 for the company code with org unit.
    Thank you very much.
    SKJ

  • How to find company code using sales doc. No

    Hi,
         I need to print company code, how to find company code using sales doc no. I don't find it VBAK.
    Cheers
    Senthil

    Dear Senthil
    You can find in table VBAK itself - Field BUKRS_VF
    thanks
    G. Lakshmipathi

Maybe you are looking for

  • Set default value based on current day value and setItems in Design studio

    Hello I have 2 filters on my dashboard - year and month. The default display of the dashboard should populate current year data. Is it possible to create formula to populate dynamic default value based on the current date using setSelectedValue() ? A

  • Issue with VO which is attached to the picklist

    Hi, Currently i have an issue with VO which is attached to the picklist if i try to attach the same VO (but query changed) to diff picklists , the picklists are overridden with last executed query (all the code is inside a loop) while(rs.next()) { St

  • Regarding Filter in Webi Report which is based on BEx query

    Hi, I am developing Webi report, in which using universe which is baed on BEx query. Suppose BEx query contains filter on fiscal year 2010. And I am developing Webi report on that query. So I want to know, whether my Web i report output will contain

  • Wait for Event step in Workflow (Urgent).

    Hi,all! I am unable to implement the wait for event successfully in my workflow.. Sceanrio: I have created a container element in the WF with of type a <b>BOR(ISUPARTNER)</b> whose <b>CREATED</b> event is being waited for in the workflow. Then in the

  • UDP Datagram package receive question

    With my program I send a datagrampackage and then wait for a package to receive. Is it possible to print an error when you don't receive a package within a second and the program stops waiting for a package to receive but will do the next step in the