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

Similar Messages

  • Steps to define company code and its dependent entries for mm,pm

    Hi Experts,
    kindly share that how to define company code and its dependent assignments for PM & MM module

    Dear Hitendra
    Company code, Contolling area, Profit Center are Financials related fields and are mapped under FI Enterprise structure as its Org unit. Plant (Logistics Plant) is defined in MM. Related modules like PP, PM, SD extend this logistics plant in their repsective modules as Production Planning Plant, Production Plant, Maintenance Planning Plant, Maintenance Plant, Sales Plant etc.
    Company code is never defined in any logistics moudle , its in Financials where it is defined. It is then assigned to the Plant in logistics thru which the company code gets populated easily in respective modules.In contolling end, its controlling area that talks.
    IMG-->SAP Customizing Implementation Guide->Enterprise Structure-->Definition-->Financial Accounting-->Edit, Copy, Delete, Check Company Code
    This is a very broad upper level details for your query. Please search the SCN in relevant spaces for more information.
    Award points if the above explanation was useful...
    KR
    Murad Ahmed.

  • Company code and Purchase Org during vendor registration

    Hi,
    I have one enterprise context, with many company codes and purchasing org.
    I am aware that vendor master data is at enterprise level in ESO. However while integrating to backend i need to capture the relevant co code and Purchasing org.
    When the Purchaser wants to create a vendor, there does not seem anyway to enter which Purchasing org and company code the vendor should be created for.
    Need your suggestions for the following options
    1) capture co code and Purchasing org on bespoke fields and then in PI, pass these values to Co code and Purch org resp
    2) create company contexts - would this resolve this? what are the implications if one vendor needs to be extended to multiple co codes
    regards
    Subrote

    Hi,
    Have you imported integration config workbook.
    As part of ECC integartion  guide we have couple of workbook and XML needs to integrated, which will create all the required extension for vendor master and vendor registration.
    Once you imported the integration workbook, you will able to see the company code and purchasing org screens in vendor master.
    Thank you,
    Mani

  • 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

  • How to find bar codes and mails to send clients in smartforms

    HI friends,
        How to find bar codes in smartforms and also how to send mail to the client. I have developed one object in smartforms, but i don't know how to send maill to the client. Pls help me........................
    Thanks in Advance.
    Saradhi.

    Hi!
    Here is the code to send the Smartform to mail as PDF attachment.
    *& Report ZTEST_PDF_MAIL
    REPORT ZTEST_PDF_MAIL.
    Internal Table declarations
    DATA: I_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
    I_TLINE TYPE TABLE OF TLINE WITH HEADER LINE,
    I_RECEIVERS TYPE TABLE OF SOMLRECI1 WITH HEADER LINE,
    I_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
    Objects to send mail.
    I_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
    I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
    I_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
    I_RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
    Work Area declarations
    WA_OBJHEAD TYPE SOLI_TAB,
    W_CTRLOP TYPE SSFCTRLOP,
    W_COMPOP TYPE SSFCOMPOP,
    W_RETURN TYPE SSFCRESCL,
    WA_DOC_CHNG TYPE SODOCCHGI1,
    W_DATA TYPE SODOCCHGI1,
    WA_BUFFER TYPE STRING, "To convert from 132 to 255
    Variables declarations
    V_FORM_NAME TYPE RS38L_FNAM,
    V_LEN_IN LIKE SOOD-OBJLEN,
    V_LEN_OUT LIKE SOOD-OBJLEN,
    V_LEN_OUTN TYPE I,
    V_LINES_TXT TYPE I,
    V_LINES_BIN TYPE I.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    FORMNAME = 'ZTEST'
    IMPORTING
    FM_NAME = V_FORM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    W_CTRLOP-GETOTF = 'X'.
    W_CTRLOP-NO_DIALOG = 'X'.
    W_COMPOP-TDNOPREV = 'X'.
    CALL FUNCTION V_FORM_NAME
    EXPORTING
    CONTROL_PARAMETERS = W_CTRLOP
    OUTPUT_OPTIONS = W_COMPOP
    USER_SETTINGS = 'X'
    IMPORTING
    JOB_OUTPUT_INFO = W_RETURN
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    I_OTF[] = W_RETURN-OTFDATA[].
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    IMPORTING
    BIN_FILESIZE = V_LEN_IN
    TABLES
    OTF = I_OTF
    LINES = I_TLINE
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    OTHERS = 4.
    IF SY-SUBRC <> 0.
    ENDIF.
    LOOP AT I_TLINE.
    TRANSLATE I_TLINE USING '~'.
    CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.
    ENDLOOP.
    TRANSLATE WA_BUFFER USING '~'.
    DO.
    I_RECORD = WA_BUFFER.
    APPEND I_RECORD.
    SHIFT WA_BUFFER LEFT BY 255 PLACES.
    IF WA_BUFFER IS INITIAL.
    EXIT.
    ENDIF.
    ENDDO.
    Attachment
    REFRESH: I_RECLIST,
    I_OBJTXT,
    I_OBJBIN,
    I_OBJPACK.
    CLEAR WA_OBJHEAD.
    I_OBJBIN[] = I_RECORD[].
    Create Message Body Title and Description
    I_OBJTXT = 'test with pdf-Attachment!'.
    APPEND I_OBJTXT.
    DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
    READ TABLE I_OBJTXT INDEX V_LINES_TXT.
    WA_DOC_CHNG-OBJ_NAME = 'smartform'.
    WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
    WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
    WA_DOC_CHNG-SENSITIVTY = 'F'.
    WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
    Main Text
    CLEAR I_OBJPACK-TRANSF_BIN.
    I_OBJPACK-HEAD_START = 1.
    I_OBJPACK-HEAD_NUM = 0.
    I_OBJPACK-BODY_START = 1.
    I_OBJPACK-BODY_NUM = V_LINES_TXT.
    I_OBJPACK-DOC_TYPE = 'RAW'.
    APPEND I_OBJPACK.
    Attachment (pdf-Attachment)
    I_OBJPACK-TRANSF_BIN = 'X'.
    I_OBJPACK-HEAD_START = 1.
    I_OBJPACK-HEAD_NUM = 0.
    I_OBJPACK-BODY_START = 1.
    DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
    READ TABLE I_OBJBIN INDEX V_LINES_BIN.
    I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
    I_OBJPACK-BODY_NUM = V_LINES_BIN.
    I_OBJPACK-DOC_TYPE = 'PDF'.
    I_OBJPACK-OBJ_NAME = 'smart'.
    I_OBJPACK-OBJ_DESCR = 'test'.
    APPEND I_OBJPACK.
    CLEAR I_RECLIST.
    I_RECLIST-RECEIVER = '[email protected]'.
    I_RECLIST-REC_TYPE = 'U'.
    APPEND I_RECLIST.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = WA_DOC_CHNG
    PUT_IN_OUTBOX = 'X'
    COMMIT_WORK = 'X'
    TABLES
    PACKING_LIST = I_OBJPACK
    OBJECT_HEADER = WA_OBJHEAD
    CONTENTS_BIN = I_OBJBIN
    CONTENTS_TXT = I_OBJTXT
    RECEIVERS = I_RECLIST
    EXCEPTIONS
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    DOCUMENT_TYPE_NOT_EXIST = 3
    OPERATION_NO_AUTHORIZATION = 4
    PARAMETER_ERROR = 5
    X_ERROR = 6
    ENQUEUE_ERROR = 7
    OTHERS = 8.
    IF SY-SUBRC <> 0.
    WRITE:/ 'Error When Sending the File', SY-SUBRC.
    ELSE.
    WRITE:/ 'Mail sent'.
    ENDIF.
    If you want to send some text as Body of the Mail then follow this once
    when u r callin the FM'SO_NEW_DOCUMENT_ATT_SEND_API1'.. points to remember
    1.u have to pass the body of content in table CONTENTS_TXT(ia m using I_OBJBIN) (each line a record) then. suppose i have appended 11 records to the table CONTENTS_TXT .
    2.PACKING_LIST(iam usign I_OBJPACK) table u ahve to append a redord as follows
    I_OBJPACK-TRANSF_BIN = ' '.
    I_OBJPACK-HEAD_START = 000000000000001.
    I_OBJPACK-HEAD_NUM = 000000000000001.
    I_OBJPACK-BODY_START = 000000000000002
    I_OBJPACK-BODY_NUM = 000000000000010.
    I_OBJPACK-DOC_TYPE = 'RAW'.
    append I_OBJPACK-.
    by the above code system treat the first line in table I_OBJBIN as header and the 2nd line to 10 lines tread as body.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = WA_DOC_CHNG
    PUT_IN_OUTBOX = 'X'
    TABLES
    PACKING_LIST = I_OBJPACK
    OBJECT_HEADER = WA_OBJHEAD
    CONTENTS_BIN = I_OBJBIN
    CONTENTS_TXT = I_OBJTXT
    RECEIVERS = I_RECLIST
    EXCEPTIONS
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    DOCUMENT_TYPE_NOT_EXIST = 3
    OPERATION_NO_AUTHORIZATION = 4
    PARAMETER_ERROR = 5
    X_ERROR = 6
    ENQUEUE_ERROR = 7
    OTHERS = 8.
    Regards
    Tamá

  • How to derive Company Code and Vendor Number from CDHDR / CDPOS ?

    Hi everyone,
    This is my first post and my apologies if this is a wrong forum to ask this.
    I'm creating an analytic that will track changes to the vendor master.  I know that I have to look into CDHDR and CDPOS tables and that CDHDR.OBJECTCLAS = KRED.
    However, part of the requirements is to be able to filter the results by Company Code and Vendor Number as well.  How do I do this? How can I link CDHDR to LFA1/LFB1 to get the company code and vendor code?
    Any information will be highly appreciated
    Thanks!

    I think you would have gotten answers sooner in the abap forum :P. Anyways the change pointer tables are kept in a different format, not in the normal flatly structured tables. What this means is that the data which comes through the pointer tables are somewhat encrypted. The object class and id present you records; Each change in master data (where the option is set) is recorded in these pointer tables.
    I believe there is a function module for converting the data into a readable format; that data should have your company code/vendor number in it.  You cannot link the chdr and lfa tables directly- you will need to first convert the data from the pointer tables

  • How to find custom parameters and its values?

    Hi,
    Please let me know how to find the list of custom parameters with its possible values and its use in programs?
    Thanks.

    There is no validation for the values that can be input so you can put anything in the value field. For example, try "BUK" and
    then a value for a company code you know does not exist.
    When you run a transaction with that it will default that value.

  • Company code and Sales Org.

    Hi, this is one of the certification questions.
    Can you create a sales organization without setting up a company code?
    I am almost certain we can't but I want to get a second opinion.
    Thank you.

    You can definitely create a sales organization without company code, but you won't be able to post any entries to the accounting department if you don't assign it to company code.
    You can even create a customer without the Company code, using the sales area in T.Code: VD51.
    Regards
    AK

  • Function that return Company Code given an Org Unit ID

    Hi folks,
    As per subject, is there any such function?
    I seem unable to find. Straightforward way is just select bukrs from hrp1008 using the Org Unit OBJID. However, that table only stores direct assignment. I.e. many Org Unit actually have the company code inherited from parent OU. So if my OU doesn't have account assignment, must go to its parent OU to find, if parent OU doesn't have, again must go up and search. And so on..
    If there's already such function, I don't want to re-invent the wheel.
    Thanks!
    Regards,
    Olyvia

    I know it's an old topic, but the answer could be helpful for others:
    use RH_STRUC_GET as suggested, standard WEGID OMACC_U will return the objects maintained in 1008 (including BUKRS, WERKS, BTRTL).

  • How to find cost centers for a org unit ( if kost center is inherited)

    Hi all
    We have a org structure
    When a parent org unit is assigned a kost center then the parent also inherites the kost center
    I need to find kost center for all the org unit in my organization
    I cant see the inherited cost center neither in IT 1001 nor 1008 nor 1015 but i can see it in PPOME in the account assignment tab.
    How can i find the inherited cost centers to all the org units.
    i think i am clear with my requirement to all
    Thanks
    Raj

    Use the report RHSTRU00 in tcode SE38
    and give the follwoing values in selection screen
    Plan version                    01  Current plan
    Object type                     O   Organizational unit
    Evaluation Path               A011       All relationships to A011 -> cost
    execute the report to see all the orgunits with their cost centers

  • Finding company code based on SY-UNAME

    Hello all,
       please anyone suggest me how to find company code of particular user based on SY-UNAME.
    Thanks

    Check if program RSUSR002_ADDRESS is helpful to you.
    Total Questions:  16 (14 unresolved) 
    P.S: plz close the  threads once they are resolved.

  • 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]

  • Position to inherit company code and cost centre from Org Unit

    Hi Team,
    I have entered the company code and controlling area in my root Org. Unit.  All the sub-ordinate org units that I've created have inherited this company code and controlling area, however none of the positions I've created have inherited them.  What do I have to do to get my positions to inherit this information from their org unit.
    Regards,
    Jeanette

    Hi,
    Check table T7SS0, there are three switches
    PPOM     INHIC     X     'X': PPOM: Obligatory Inheritance of Company Code
    PPOM      INHIH     X     'X': PPOM: Obligatory Inheritance of Contr. Area
    PPOM     INHS     X     Inheritance of acc. ***. features by positions
    So just check these switches that they are set in this table, and I hope your problem should resolve
    Regards,
    guds

  • How to calculate no.of records for a specific company Code and Transaction

    Hi All,
    Could you please help me how to calculate or count no.of records, in a table which are having a specific Company Code and Transaction Code and populate  in an output table displaying that these many records are present for this company code and Transaction code.
    The table is having the data like this:
    LOB   TRAN CODE    COUNT
    X1                             1   
    X1                              2   
    X1                              3   
    X1                              4   
    F1   NB                      5   
    F1   NB                     6   
    F1   NB                     7   
    F1   NB                    8   
    F1   NB                    9   
    F1   NB                    10  
    F1   NB                    11  
    F1   NB                    12  
    F1   NB                     13  
    F1   NB                     14  
    F1   NB                     15  
    F1   NB                     16  
    F1   NB                     17  
    F1   NB                     18
    F1   NB                    19  
    F1   NB                    20  
    F1   NB                   21  
    F1   NB                   22  
    F1   NB                   23  
    F1                          24  
    F1                         25  
    F1                         26  
    F1                         27  
        In the above table there are totally 27 records,where as the no.of records with F1 as company code and NB as transaction code are 18..so i have to display like F1 NB and 18 as one record as output.
    Thanks and Regards,
    Johny

    You can go for Control Breaks for your requirement.
    First sort the internal table by company code and transaction. Declare a counter variable.
    Now loop the internal table and increment the counter variable. within the loop use AT END OF tcode.......ENDAT. Within the control break append the counter variable as well as the company code and tcode to some other ITAB and clear the counter.
    This will give you the total number of records for a combination of co code and tcodes.
    This will be a good reference for your requirement. What I am doing here is, for each Vendor i am calculating total number of deliveries and amounts for that vendor. For every new vendor i am writing the ouput on to a list and clearing the counter variables.
      LOOP AT t_vend_prod_grp INTO fs_vend_prod_grp.
        w_total_delv = w_total_delv + 1.
        w_total_amt = w_total_amt + fs_vend_prod_grp-dmbtr.
        AT NEW matkl.
          w_mat_grp = fs_vend_prod_grp-matkl.
    * To display the material group and the header texts for the data
    * grouped by material group and vendor.
          SKIP 1.
          WRITE:  text-mtk  COLOR COL_HEADING
                                  INTENSIFIED,
                / w_mat_grp COLOR COL_NORMAL
                                  INTENSIFIED OFF.
          SKIP 1.
          FORMAT COLOR COL_HEADING ON INTENSIFIED.
          ULINE  1(54).
          WRITE:/ sy-vline,
                2 text-ven,
               12 sy-vline,
                  text-dlv,
               26 sy-vline,
               38 text-amt,
                  sy-vline,
               46 text-cur,
               54 sy-vline.
          ULINE /1(54).
          FORMAT COLOR COL_HEADING OFF INTENSIFIED.
        ENDAT.                             " AT NEW MATKL
        AT END OF lifnr.
    * To display the actual data for the grouping based on Material group
    * and Vendor.
          FORMAT COLOR COL_NORMAL ON INTENSIFIED OFF.
          WRITE: / sy-vline,
                 2 fs_vend_prod_grp-lifnr COLOR COL_KEY,
                12 sy-vline,
                   w_total_delv,
                26 sy-vline,
                   w_total_amt CURRENCY text-usd,
                   sy-vline,
                46 text-usd,
                54 sy-vline.
          FORMAT COLOR COL_NORMAL OFF INTENSIFIED OFF.
          CLEAR: w_total_amt,
                 w_total_delv.
        ENDAT.                             " AT END OF LIFNR
      ENDLOOP.                             " LOOP AT T_VEND_PROD_GRP

  • How to get new company code and controlling area in SRM

    Hi SDN,
    we are on SRM 5.0.
    Our finacial experts want to implement a new company code and controlling area.
    In SRM I can set up a new company code easily in ppoma_bbp and import a new plant from backend for the new company code.
    When testing in EBP I get the error: "company code xyz not available in controlling area zzz"
    So I need to import the new backend controlling area, too. How can I get the second controlling area in SRM?
    Thanx for help,
    matthias

    Hi Muthuraman Govi  and Sanjeev,
    in fact I can see in backend in transaction KS03 (show cost center) there in the F4s, which comp.code + controll area combinations are valid and have indeed cost centers assigned.
    So I have a new valid comp.code and a new valid cont.area.
    The new comp.code belongs to the new contr. area.
    In SRM I set the BUK attribute as described by Sanjeev (I had that already done). Still, if it is like you say, why do I get an error in EBP when trying to buy products from the new plant in the new company code...
    Is there any more config.work necessary in backend or SRM?
    kind regards, matthias

Maybe you are looking for