Company code authority check

Hi
we have created ZTTL01 table maintenance view. Should not allow unauthorized company code to update/create or display.
I searched thru forums and collected below points. but could not test it successfully.
Authorization object (Z_XXX_BUK) was created.But <Permitted activities> Button is not available in display authorization object(SU21) to see what are the activities are permitted.
In su01 for my user no roles or profiles are defined.
To do
Trying to write  below code in PBO and PAI flow logic of ZCHECK_BUK table for screen 01
PBO & PAI
*First statement
Module Authorictycheck.
module Authoritycheck
  LOOP AT EXTRACT.
    AUTHORITY-CHECK OBJECT 'ZCHECK_BUK'
                        ID 'ACTVT' FIELD '01,02,03'
                        ID 'BUKRS' FIELD ZTTL01-BUKRS.
    IF sy-subrc <> 0.
      MESSAGE e000(zrpt) WITH 'You do not have the authorization to'
    EXIT.                          'access Bukrs'extract-bukrs.
    ENDIF.
  ENDLOOP.
endmodule
Can i use above code in PBO and PAI to check change of company code?
I am sharing role and profile created by other user, which allows only company code 'A10'.
How to test this now?
se11->Utilities->table contents create should not allow me to input A11 or other company codes? pls confirm.
Regards
Chandra

Hi Suhas
Regarding 1) It works when i remove the FORM routine assinged for EVENTS.
Thanks for ur input.
Regarding 2)When the user displays record in SM30 for a table, he must not be able to see the company code AD01.
To achieve this can i use EVENT AA?
I create FORM routine <hide_cocode> in EVENT AA and store at include LZXXXXF01.
FORM ZHIDE_COCODE.
DATA: F_INDEX LIKE SY-TABIX."Index to note the lines found"
LOOP AT TOTAL.
READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
IF SY-SUBRC EQ 0.
F_INDEX = SY-TABIX.
ELSE.
CLEAR F_INDEX.
ENDIF. "(make desired changes to the line TOTAL)
MODIFY TOTAL.
CHECK F_INDEX GT 0.
EXTRACT = TOTAL.
MODIFY EXTRACT INDEX F_INDEX.
*ENDIF.
ENDLOOP.
SY-SUBRC = 0.
ENDFORM.
I made break point at line LOOP at Total. and executed SM30 and clicked Display button.
Sorry Code stops here and table TOTAL has flat line structure of empty.Loop at total is skipping
what should be done now?
Regards
Chandra

Similar Messages

  • Wanted: example code authority check for material master (note 303483)

    Hi there,
    we are looking for a coding example for the function module Z_MATERIAL_AUTHORITY_CHECK mentioned in note 303483. We are almost sure that a lot of customers need this enhancement for a more sophisticated authory check when using a common material master for different companies.
    Thanks in advance!
    Regards,
    Frank

    Hi Leo,
    Thanks for the information. I did check the system entries for the same record using T-Code>SM13. Surprisingly, the entries are getting deletedI see an error message "Enqueques Deleted" for the entries.
    I would appreciate if you suggest further on the issue.
    Thanks and Regards
    Srinivas Bandi

  • Double Invoice check across company code

    Hi All,
    I have been trying to use the double invoice check functionality across company codes. i.e. when an invoice is posted in Company code A with ref no: xxx, and when I try to post a new inovice with the same reference ie. xxx in company code B, system does not give error message.
    Please note: I have maintained message in application F5, no: 117 and 312.
    Also in customization for double invoice check, I have unchecked "Check Company code" and checked "check reference" and "check invoice date"
    I have also maintained the double invoice check flag in the vendor master.
    Please help at the earliest.
    Regards,
    Ankush

    Hi Ankush,
    Good Day,
    Duplicate invoice check across company code will not check for FI related invoice ( Like FB60)
    But you can able to achive this with BTE ( SAMPLE_PROCESS_00001110 for FI Duplicate invoice check)
    Steps for Implementing a BTE
    (1)Goto transction FIBF menu Environment->Info System (P/S )
    (2)Select the BTE you want to implement.
    (3)Press button Sample function module
    (4)This brings you to SE37 - Copy the sample function module to a Z-function module (First create a new function group for the function module) . Note: The name of the Z-functionmodule is not important
    (5)Edit the code in the new function module
    (6)Go back to transaction FIBF - Menu Settings->Products -> Of a customer and create a new product whicj identifies the new product . Remember to mark the Active field.
    (7)Go back to FIBF menu Settings->P/S function modules->of a customer - Create an entry that links the BTE and Product with the new function module
    Best Regards,
    KSK

  • SAP BW-BPS Company Code Security

    Hello Everyone,
    In BPS have an issue where the security team has to give users wide open access for company code, for loads to work. When the user is restricted to there 1 specific company code, get authorization issues. Is wide open access required, with BPS restrictions on the company code variable to limit users?
    Any help is appreciated.
    thank you,
    Mike B

    Hi
    If the user should be authorized for 1 company code than the access has been restricted for that company code only. Please check the value maintained for the characteristic of "Company code" and check whether teh comapny code value is maintained or not. You may want to run a trace through transaction ST01 or RSECADMIN to check for teh Authorization checks where the user is failing on.
    Thanks.
    Anjan

  • Customisd err message at MIRO - Business area V/s company code validation

    Hi experts,
    We have simple validation for company code V/S Business area check in place ,
    While doing MIRO system throws error for a particular company code and Business area
    combination the set error message ( customized - Business are does not match with company code)
    This validation has given as a sub node (step) of another consolidation trx. types against GL validation (that was in place earlier, thats why)
    But when we do through F-02 (Journal entry ),F-43(vendor invoice), F-22(customer invoce) for the same combination system passes the entry !!!
    what may be the cause ?
    the error message is the standard one set -251 this message is custom created at Validation (GGB0)
    Business area doesnt belongs to the company code
    Message no. /ASU/GENERAL251
    One more thing Noticed
    The Material PO is a account assigned (K) cost center and the
    cost center Business area is 1003.
    In PO plant is 1003 and i checked the MSEG the plant shows 1003
    But in Logistics assignment the Business area 1001 is tagged to Plant 1003
    not THE BUSINESS AREA 1003 !! . I mean at plant/valuation area to Business ara configuration
    the valuation area 1003 is assigned to Business are 1001 not to Busienss are 1003!!!
    Edited by: melgibson on Feb 15, 2012 1:42 PM
    Edited by: melgibson on Feb 15, 2012 1:43 PM

    Hi
    thankx for the reply,
    there is no exit/ set for validation here
    I have done like this
    Pre requisite
    company code = xxxxx
    Check
    Business area = xxxx or BA = XXXXXX or  BA = XXXXX  ......
    Message
    E           Message class     /ASU/GENERAL
    251
    Business area doesnt belongs to the company code
    Message variables
    1 BSEG       - GSBER
    The t codes like F-43 AND f-02  1003 cc TO  1003 BA is perfectly working !!! our problem is at MIR7/MIRO
    only there the error pops up even the combination is allowed in the above mentioned validation??
    Edited by: melgibson on Feb 15, 2012 2:03 PM
    Edited by: melgibson on Feb 15, 2012 2:04 PM

  • Creation of 2 new company codes in continuation with existing compny code.

    Hi
    Our company has got 2 locations but we are using only one company code for both the locations from the last 4 years.
    Now due to expansion of business we have extended our business to one more location. So.now are planning to use 3 company codes.
    Now I want to know the following things:-
    1. What are the things that are to be done before creating these two additional company codes?
    2. What will be the impact of  these new company codes on the existing company codes?
    3. How the present reports can be used for the new company codes?
    4. How the GL balances will be uploaded for the new compny codes?
    5. How the master data will be created for the new company codes?
    6. What will be the impact of the new company codes on other modules like MM, SD and HR which are already in use?
    Please guide me on the above issue co months of experience.
    considering the fact that I am a fresher in SAP FI and I have
    only 8 months of experience.
    Regards
    Vikram sairam

    Hi Vikcy,
    Company Code is legal Entity and core component in FI.
    Now u r planning create new company codes, just check below:
    01. Chart of Accounts:
         - You may use existing chart of account for new com. code
    02. Controlling Area:
          -  Check the feasibility of cross company code controlling or not. If you maintain one:one relation in existing controlling area, u need to create new one.
    03. SD:  Core component is Sale Organization.  U need to assign them to ur Company Codes. So check accordingly.
    03. MM/ PP:  Plants and Purchasing Organization need to assign to Company Codes.
    Hope it will give you idea on a whole to plan, how u need plan to go ahead.
    Regards,
    Venkat

  • New Company code creation

    Hi,
    Client wants to split one company code to 8 company codes.
    Could you please explain what are the neccessary steps to take for this ?
    What are the precautions to take in creating Company code, Chart of accounts, AP,AR related,AA and consolidation ?
    Regards
    Madan

    Hello,
    You can keep concentration on the following transaction codes.
    These may be useful guide to you.
    FI Enterprise Structure Transaction Codes     
    Transaction Code     Description
    OBY7     Copy Chart of Accounts
    OB29     Fiscal Year Variant
    OBBO     Posting Period Variant
    OX02     Company Codes - Create Check and Delete
    OBY6     Company Code Global Parameters
    EC01     Copy Company code
    OY01     Country Definitions
    OB22     Parallel Currencies
    OX03     Business Areas
    OKBD     Functional Areas
    FI Enterprise Structure Transaction Codes (Continued)     
    Transaction Code     Description
    OBBG     Assign Country to Tax Calculation Procedure
    OBCO     Specify Structure for Tax Jurisdiction Codes
    OBCP     Define Tax Jurisdiction Codes
    FTXP     Maintain Tax Rates
    OBCL     Set Tax Codes for Non-Taxable Transactions
    General Ledger / Chart of Accounts Transaction Codes     
    Transaction Code     Description
    OBD4     Account Groups
    OB53     Retained Earnings Variant
    OB15     Sample Account Rule Types
    FSK2     Sample Account Data Transfer Rules
    OB67     Allocate a Company Code to a Sample Account Rule Type
    OBY9     Transport Chart of Accounts
    OBY2     Copy GL Accounts from the Chart to the Company Code
    OBC4     Field Status Variants
    OB41     Posting Keys
    FBKP     Automatic Account Assignments
    OB40     Define Tax Accounts
    OBYA     Cross Company Code Automatic Account Assignment
    OBYC     MM Automatic Account Assignment
    VKOA     SD Revenue Account Assignment
    OB58     Financial Statement Version
    O7Z3     Line Item Layouts
    OBVU     Special Fields
    O7S7     Sort Variants
    O7R1     Totals Variants
    OBA4     Tolerance Groups
    OB57     Allocate Users to Tolerance Groups
    FBN1     GL Number Ranges
    OBA7     Document Types
    OBU1     Assign Default Posting Keys to Document Types
    O7E6     Fast Entry Screens
    ORFB     Financial Accounting Configuration Menu
    OBL1     Automatic Postings Documentation
    OB32     Maintain Document Change Rules
    General Ledger / Chart of Accounts Programms     
    Transaction Code     Description
    RFBISA10     
    RFBISA20     
    RFTAXIMP     
    General Ledger / Chart of Accounts Tables     
    Transaction Code     Description
    BSEG     GL Document Line Item Table
    TTXD     Tax Jurisdiction Code Structure Table
    T030     Automatic Account Assignments Table
    TZUN     GL Account Sort Key (Allocation Field) Table
    Accounts Payable Transaction Codes     
    Transaction Code     Description
    FI12     House Banks
    FCHI     Check Lots
    FCHV     Void Reason Codes
    FBZP     Payment Programme
    OBD3     Vendor Groups
    XKN1     Create Number Ranges for Vendor Groups
    OBAS     Assign Number Ranges to Vendor Account Groups
    FK15     Copy Vendor Master Records Creation Programme
    FK16     Copy Vendor Master Records Creation Programme
    Accounts Receivable and Credit Management Transaction Codes     
    Transaction Code     Description
    OBB8     Terms of Payment AP and AR
    OB46     Interest Indicator
    OB82     Make Interest Indicator Available to the Interest Calculation Program
    OBAC     Reference Interest Rates
    OB81     Assign Reference Interest Rates to Interest Indicators
    OBV1     Interest Calculation Automatic Account Assignment
    OBBE     Reason Codes
    OBCR     Reason Code Conversion Version
    OBCS     Map External Reason Codes to Internal Reason Codes
    OBXL     Assign GL Accounts to Reason Codes
    OBXI     Cash Discount Amount
    OBA3     Customer Tolerance Groups
    OB45     Credit Control Areas
    OB01     Credit Risk Categories
    OB02     Credit Representative Groups
    OB51     Assign Employees to Credit Representative Groups
    OB39     Days in Arrears Calculation
    OBD2     Customer Groups
    Treasury Transaction Codes     
    Transaction Code     Description
    OB10     Create Lockbox Accounts
    OBAY     Define Lockbox Control Parameters
    OBAX     Lockbox Posting Data
    OT05     Source Symbols
    OT14     Planning Levels
    OT13     Planning Groups
    OT47     Assign Logistics Transactions to Planning Levels
    OT17     Treasury Groupings
    OT18     Treasury Grouping Headers
    OT16     Cash Management Account Names
    OT29     Activate Company Code Treasury Updates
    OBBY     Electronic Bank Statement Transaction Types
    OT55     Assign Transaction Types to House Banks
    OT57     Electronic Bank Statement Posting Rules
    OT51     Map External Transactions to Posting Rules
    OT59     Posting Rules Automatic Account Assignment
    GCRF     Currency Translation Ratios
    Regards,
    Ravi

  • Asset class SANA1100 cannot be used in company code SANA

    hi.every one ...........
    im facing a problem when creating asset classes system showing the following error ,Asset class SANA1100 cannot be used in company code SANAi checked the screen layout rules.number ranges and account determination every thing is ok im unable to solve this error could any one please help me.

    Hi,
    First set your COD with OAPL.
    Then go to AM05 and deselect / unlock your questioned asset class and then try to create asset now.
    Cheers,
    Srinu

  • Authorization at Company Code Level for table FEBKO

    Hello Experts,
    I need to add authorization check on my report program that accesses and displays data from table FEBKO. However the user should only be able to access the data of table FEBKO particular only for their company code. How can I apply this? Thanks in advance for all your responses!
    Best Regards,
    Kurtt

    Hi,
    if it is in your own report, you can define your own authorization object with field for company code. Check transaction SU21 or ask your security guy. Then you will check if an user have authorization for this object.
    Cheers

  • G/L account 891000 does not exist in company code

    Dear Gurus,
    im facing a error while posting Goods(Subcontracting )
    i used Tcode FS01 to create G/L account
    since i dont know what are the important data to be entered in creating 891000 G/L account by using Tcode FS01
    pls help me
    Thanks
    Error is.....
    <b>G/L account 891000 does not exist in company code
    Message no. M7055
    Diagnosis
    The G/L account has not been created in the company code in which you are working.
    Procedure
    If the system has determined the G/L account, the system setting is faulty. Contact your systems administrator.
    If you have entered the G/L account or the company code yourself, check the account number entered, as well as the company code in which you are working.
    G/L acct. CoCode
    wrong right Correct the G/L account.
    right wrong Correct the company code.
    right right The G/L account must be created
    for the company code. </b>

    Hi Kamal,
    Created account using Tcode FS01
    i entered all mandatory fields
    then i tried to save it was asking to fill the field <b> Field Status Group</b> in the tab <b>Create/Bank/Interest</b> then i gave G045>>>which is for <b>Goods/invoice received clearing accounts</b>
    now the error is solver and im able to post goods...what i've doubt is... im not sure whether i gave correct <b>Field Status Group</b>
    pls clarify me........
    Thanks

  • "Company code  is not permitted as the paying company code while FRFT

    Hi Experts,
    I am trying to post cross company fund transfers via FRFT -> F111. In my scenario, CC1 is sending amount to CC2 via a virtual payment method. I have done basic company code set up and also customizations in FBZP for payment method and F8BJ/F8BF for incoming/outgoing transactions. I have also done OBYA setting for cross company clearing account
    During FRFT payment request i get this error: "Company code CC1 is not permitted as the paying company code".
    Did you ever experience this? If so, how can i fix this?
    Thanks in advance.

    Dear subumax
    1.Please check once again in both company codes for FBZP. were you maintained in All Company codes in FBZP - Select your company code and check- were you maintained Paying company code.
    2.Pleasecheck in under Paying Company codes - were you maintained the paying company code CC1 or not
    3Please check in under Payment methods in comapny code were you maintained your paying company code code CC1 details or not 
    Regards
    Shankar

  • Removing a plant to its current company code

    Hello Gurus,
    I am working on this request that the old plant will be removed to its current company code and assigned it to new company code. SAP has been using for couple of years already so many data has been created and documents processed. I am aware of the plants set up configuration and OX18 but I think it will not be good removing the old plant in 0X18 and just assigned it to the new company code requested. I am thinking that create a  new plant exactly the same with the old plant settings then assign it to requested company code. However, how about the existing data from the old plant? Are there any programs that can be used to copy the existing data of plant configuration?
    Please advice!
    Thanks!

    Dear Sidarth,
    Make sure that the plant has nil transaction both quantity wise and value wise. ie MM and FI.
    Then you can reassign the same plant to your new company code.
    Check the use of the Conversion Workbench (CWB), special tool like the
    Migration Workbench, especially developed for this kind of tasks.
    regards
    anand

  • Enterprise Structure-Company Code/Customer Master

    Hey Friends,
    I have a question here. Consider that there is a production system ABC. Within ABC When I go to the company code transaction within the Financial accounting, I see a list of lot of company codes existing. Also I saw that not all the company codes have their related data, by this I mean that I saw that certain company codes have no data like no vendors,no customers existing for that company code. I just want to figure out whats the real Enterprise structure within the system ABC.
    ,Not only based on SPRO, but to investigate actual data in some of the data tables...to get a 'real' enterprise structure. since from actual data in tables, we can tell if we're truly selling to what countries etc.  
    Can you tell me how do I analyze this. Do I check each of the company codes and check if we have any reevant dat for the company code. Also do I see what customer master exists under the particular company code in order to determine which countries we are selling to?
    Please can you answer in detail and explain me?
    Appreciate it. Thanks.

    Use tcode SE16.
    provide Table Name KNB1 - Customer Master (Company Code) and press enter.
    In Data Browser: Table KNB1: Selection Screen, put Maximum No. of Hits as blank and execute (F8 from keyboard).
    There you will be list of Customer Master with respective company code.
    Hope this can assist you.
    All the best and take care.
    Thanks & Regards
    JP

  • Authority-Check Object for PLANT(WERKS)?

    Hi Experts,
    By using "V_VBAK_VKO" Authority Object am checking the user Authentication against the sales area(Sales OrgDistr. ChannelDivision) in my custom report. Below is the code,
    AUTHORITY-CHECK OBJECT 'V_VBAK_VKO'
        ID 'VKORG' FIELD s_vkorg
        ID 'VTWEG' FIELD s_vtweg
        ID 'SPART' FIELD s_spart
        ID 'ACTVT' FIELD '01'
        ID 'ACTVT' FIELD '02'.
    (Note: My report is for SD/OTC module)
    I also need to check the authenmtication of user against entered PLANT (WERKS) in selection screen, so, pls. let me know that  What is the Authority-Check Object for PLANT(WERKS)
    Thank you

    Hi,
    Transaction SU20, search for WERKS.
    When you find it, double click on the row, in the bottom half of the resulting screen there is a list of authorisation objects that contain the field.
    Unfortunately, you can't navigate from this list into the definition of the objects, so you'll need to cross-reference against transaction SU21.
    Regards,
    Nick

  • Copying Company Code

    Hi
    I am copying an existing Comapny Code with Indian Co Code.    I have done the following so far.
    Copy Co.Code, Assign Co. Code to Controlling Area, Currency, Posting Period Variant creation, Bus. Area creation, Global parameters checked.   
    What are all the other FI & CO  activities needs to be done?  Apart from FICO what needs to be done for MM & SD ?
    Also, I need to copy the Chart of Account from existing Co.code to new Co. Code.  
    Is there any mass copying procedure to copy all the GL accounts?
    Expecting help and guideline from the experts.
    Thanks in advance.
    Regards,
    SS

    Hi,
    FS15 is useful to send the GL accounts from source company code
    FS16 is useful to receice the GL accounts to target company code
    Also check OBY2.
    Rgds
    Murali. N

Maybe you are looking for