Authority check on company code

Hi ,
      How i need to check whether the company codes in an internal table is having creation access to the particular user or not ?.
     In authority check what is  ACTVT - 01,02,03  signifies ??
Thanks in adv.
varma

LOOP ...
AUTHORITY-CHECK OBJECT 'F_LFA1_BUK'
ID 'BUKRS' FIELD T_COMP_CODES-BUKRS
ID 'ACTVT' FIELD '01'.
IF SY-SUBRC <> 0.
move  w_COMP_CODES-bukrs to (itab1).
ENDIF.
AUTHORITY-CHECK OBJECT 'F_LFA1_BUK'
ID 'BUKRS' FIELD T_COMP_CODES-BUKRS
ID 'ACTVT' FIELD '02'.
IF SY-SUBRC <> 0.
move  w_COMP_CODES-bukrs to (itab2).
ENDIF.
ENDLOOP.
Hence segregating all the Company codes as per the authorization.

Similar Messages

  • Transaction code KO88 need to be check at company code leval

    Dear Experts,
    I need maintain authorization check at company code level for the transaction code KO88
    Can you suggest what are the better approaches/solutions to meet this requirement
    Thanks in Advance
    Guru Prasad

    Hi,
    it does not look like you can use standard authorization objects assigned to this transaction. This transaction is from CO module and this module does not use company codes directly. It uses controlling areas instead. You can see it in authorization object K_VRGNG which is checked in KO88.
    It does not look like there is a suitable BADI either. So if you are on Netweaver you can try to use enhancement framework. In program KO71 which corresponds to transaction KO88 is subroutine ACTIVITY_AUTHORITY_CHECK where FM K_VRGNG_AUTHORITY_CHECK is used to check authorization for object K_VRGNG. It looks to me that it's a good point to use implicit enhancement point of this subroutine to add additional authorization check. In your case check for company code attached to internal order. But you need to test it properly and it might work only for this transaction. So if user can start settlement from somewhere else that your additional check might not be performed.
    Cheers.

  • 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

  • Authorization-check in company code for GR55 reports

    Hi to all!
    Created User: ZTESTUSER
    The scenario is this.
    We created a report in GR55(Report Painter) and we want users (ex. ZTESTUSER) to access only company codes 7000 to 7999. How will I be able to do that?
    I am thinking of creating a role or profile then assign it to the user, but I was not be able to locate an authorization object for GR55 reports.
    The authorization object in GR51 is not doing what we want. It only control the create/change/display and execution transactions.
    I tried using validation in GGB0 but I can't find a parameters where the GR55 reports will be checked so the users will be limited by company code.
    Can somebody help me?
    Thanks a lot.

    I programmed a company code check for a report like this.
    ===========================================================
    data: lv_text(4) type c.
      if p_bukrs is not initial.
        select single * from T001
                      where bukrs = p_bukrs.
        if sy-subrc <> 0.
          message e321(FR) with p_bukrs.
        endif.
        AUTHORITY-CHECK OBJECT 'F_SKA1_BUK'
        ID 'BUKRS' field T001-BUKRS
        ID 'ACTVT' field '03'.
        if sy-subrc <> 0.
          clear lv_text.
          lv_text = p_bukrs.
          message e800(FR) with p_bukrs.
        endif.
      endif.
    ============================================================
    but I was not able to do that in GR55 reports because the program is automatically generated by SAP named GPXXXXXXXXXXXXXXXXXXXXXXXXXXXX.

  • Check for Company Code & Vendor Relation ship before a PO is saved

    Scenario ,:
    If the Vendor doesn’t belong to the same CoCd as SAP accepts in this stage the PR/PO , the problem will not appear at this stage og MIGO  but will appear after the goods have been received and then it will appear when we want to enter the invoice SAP will not accept .
    Any suggestion / work arounds to put a check on this ....
    Satish

    Dear Satish,
    Your problem is vendor is created at Porg level but not at company code level.
    In SAP, we have 3 transactions to create vendor
    MK01 - Purchase Organization level - (purchasing people use to create vendor)
    FK01 - FI views - Finanace people create
    XK01 - Centrally -  Comapny code level.
    If vendor is created with MK01, sysyem allow the PO, GR but not IV as the vendor still not exist at company code level
    If you create with FK01, you can do FI transactions but not Purchasing.
    Here co-ordination is required between the MM and FI departemnts. If any vendor required by both MM & FI, after creating it should be informed to other department.
    SAP given this for the flexibility of authorizations and flexibility.
    Thanks,
    Krishna Reddy

  • Invoice tolerance check at company code level

    Hi! I know in SRM, the tolerance check for invoice is set up and assigned to a tolerance group which is then assigned to the user attribute. In theory, the tolerance setting should match that of ECC as it does not make sense to meet the tolerance requirement in SRM and then subsequently get block in ECC. However, it is common in ECC that we maintain different tolerance value for different company codes. Is there a way to do the same in SRM? My guess at the moment is that we will have to 'copy' the check in ECC to SRM rather than relying on the tolerance checks in SRM. Am I right to say that? What is the best practice in such situation?
    Appreicate you sharing your experience in this.
    Cheers!
    SF

    Hi. I think the only way to do this is to set the tolerance to 999% via config and PPOMA and assign to all users. This means the standard tolerance check does not apply.
    Then use the BBP_DOC_CHECK_BADI to read in whatever tolerances you want based on whatever parameters, and issue an error on screen if the tolerance is exceeded. You can easily RFC into R/3 to get the tolerances from table T169G.
    Regards,
    Dave.

  • User exit to check PO company code and MIRO company code

    HI,
    when user entering an invoice in a company code different than what is on the PO.  Currently, the system will let them key the invoice and it will automatically intercompany it to the correct company. 
    I want to Implement FI validation so that the system provides a warning when you post to FI MIRO.  In the FI validation, use the user exit to get the PO company code and do a compare of the company code from the PO to the input field on the invoice and if not the same provide screen popup warning .
    Using OBBH Create validation rule in user exit  for input invoice and process MIRO associated company codes
    Plese provide me correct user exit.
    I tried BAdI INVOICE_UPDATE, but it didnt work.
    Thank You,
    Archana

    Check Badi implementation MRM_HEADER_DEFAULT
    Regards
    Vinod

  • Authority-check for a particular company code

    Hi,
       I need to check authorization for a particular company code.In my bdc call transaction program i'm fetching mass data from excel file and for every record i've to check the company code field.If the company code is not the required one then that record should not be processed.
      So before filling the bdc data i wrote like
    LOOP AT gt_inrec INTO gs_inrec.
         AUTHORITY-CHECK OBJECT 'F_BKPF_BUK'
                   ID 'ACTVT' field '02'
                   ID 'BUKRS' field '2800'.
        IF NOT sy-subrc = 0.
          MESSAGE e058(zz) WITH gs_inrec-bukrs.
          EXIT.
        ENDIF.
         PERFORM fill_bdc.
      ENDLOOP.
    but it is not exiting for different company codes and is allowing records with all company codes.
    can anybody pls tell me how to rectify this?
    thanks in advance,
    poornima

    I need to perform authority check on the field NAME1 present in the standard screen - customer master ( T.Code-XD02). Only certain users should be allowed to edit the field and others should be restricted.
    I have created a field exit FIELD_EXIT_AD_NAME1 for the ADRC-NAME1 field.
    Now inside this field exit i need to write the authority-check code.
    I have created the authorisation object Z_KNA1_NAM for the field NAME1 using the SU20 and SU21.
    For this scenario how do i write the authority-check code in my field exit?
    Below is my field exit code,is that correct?
    FUNCTION FIELD_EXIT_AD_NAME1.
    ""Local Interface:
    *" IMPORTING
    *" REFERENCE(INPUT)
    *" EXPORTING
    *" REFERENCE(OUTPUT)
    AUTHORITY-CHECK OBJECT 'Z_KNA1_NAM'
    ID 'NAME1' FIELD SY-UNAME
    ID 'ACTVT' FIELD '03'.
    IF SY-SUBRC = 0.
    MESSAGE 'Not Allowed to Edit the Name 1 Field' TYPE 'E'.
    ENDIF.
    ENDFUNCTION.
    In the above code i have given SY-UNAME in the code line 2 - ID 'NAME1' FIELD SY-UNAME ,is that correct? what should i give there?
    Please help me on this issue.
    Cheers,
    P.S.Chitra

  • PO creation-ME21n-Why SAP does not check company code and Plant relation

    Hi All,
    Does someone know, why SAP does not check Plant and company code relation at the time of PO creation or how can we put validation between plant and company code at the time of PO creation.
    <b>Example:</b> Suppose i have a company 0001 which is assinged to Plant 0001. when i am creating a PO with another company code 0002(Entering at header level-Org, data) and using Plant 0001 at line item level. SAP does not do this validation.
    How can we put this check in place?
    Thanks in advance.
    Deepak

    Hello Deepak,
    There are three types of purchasing
    - Company code specific :You need to assign company code to Pur organization
    - Plant specific : You must assign plant to pur organization
    - Cross company purchasing: No assignment between company code and pur organization.
    In the case 3, the system will not check company code and plant relationship, but it will check plant and pur organization specific.
    The following is the copy of sap help text:
    You can assign a purchasing organization to one company code. This is company-specific purchasing.
    You can assign a purchasing organization to no company code. This purchasing organization can then procure for all plants assigned to it, irrespective of the company code to which the plant belongs.
    Since each plant must be assigned to a company code, the company code can be determined via the plant in each procurement transaction, even if the procuring purchasing organization is not assigned to a company code.
    A purchasing organization must be assigned to one or more plants. This is plant-specific purchasing.
    Now, check your company-code and purchase organization assignment.
    Hope this helps.
    Regards
    Arif Mansuri

  • Check table 169P connected to chart of acts /company code

    Dear friends,
    I have configured Act determination.
    we have 1000company code and 1000 chart of acts.
    when iam doing GR-MIGo,iam getting the meassage like--"Check table 169P: entry 1000   does not exist"
    please suggest what to do,
    regards,
    Canand

    hi ,
    this error comes while u have not tick the item amount check for company code.
    path
    spro > MM > log inv verification > invoice block > set item amount check >
    here tick in front of company code
    that will solve ur prob
    regards,
    snb

  • 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

  • Restrict tcode MRBR on company code - Note 399953 correct?

    Hi everybody,
    In the selection screen of MRBR you have the option to select a company code, but it is NOT CHECKING on company code.
    I found a OSS note: Note 399953 - Authorization for CoCode in Logistics Invoice Verification
    This OSS notes describes exact the problem and the solution should be to use FI validation rules. We have created them, but it is not working, because it seems like that it only works for "posting" and "simulating" tcodes!!! But MRBR is more a changing tcode.
    We have put a break point into the user exit, which is used in the validation rule, but it is not executing the user exit, but for example for MR8M (posting tcode) it is working!
    Please, can anybody give me an advice how I can get MRBR checking on company code?!
    Thanks in advance, Philipp

    Hello, we are using ECC 6.0 and we do have problems to implement Note 399953 - Authorization for co code in Logistics Invoice Verification at all. Coudl you please send me a screenshot of your implementation? I am really not sure how to insert the authority check coding in the validation!
    Thanks in advance!
    Best regards
    Matthias

  • Error : COmpany code does not exist or has not been fully maintained

    Hi ,
    I tried creating a material with industry sector : mechanical , material type : raw material.
    i selected basic data 1 and 2 view or MRP 1 view for views , i gave plant as SUJA and storage location value S001 ( plant and stor loc i have created in the company code 2001)
    but i get this error COmpany code 2001 does not exist or has not been fully maintained..
    I created COMPANY CODE using SPRO - Entreprise structure --definition -  financial accounting --define , copy , check , delete company code..
    kindly suggest me the solution for this error..

    Hi,
    Your company code not activated for material management. Few pre-requisites to create material and one is to activate company code for material management
    Please activate in T.code: OMSY,
    [For example: For Fiscal year variant K4]
    In OMSY steps, u have to enteru2026u2026u2026..
    Company Code (enter your company code name 2001)u2026u2026u2026u2026u2026.
    Company Name..
    Fiscal Year of Current Period 2009
    Current period (posting period) 03( )
    Fiscal year of previous period 2008( will come automatic)
    Month of previous period 02( will come automatic)
    Fiscal year of last period of previous year 2008
    Last month of previous year 12
    Allow Posting to Previous Period (Back posting)
    Disallow back posting after a change of period
    Now create material with T.code; MM01
    Regards,
    Biju K

  • ERROR in depreaction area to company code

    HI all,
    i am using ECC 6.0. i copied depreaction area from USA and tried to assign same to my company code but it is geving following error:
    Inconsistency between FI company code 1234 and chart of deprec. 123C
    Message no. AC481
    You tried to assign chart of depreciation 123C to company code 1234. According to its Customizing definition, this company code manages parallel currencies.
    The chart of depreciation does not contain a corresponding depreciation area for each of the currency types that are defined in the company code.
    System Response
    This assignment is not possible.
    Procedure
    1. Check the currency types of the company code.
    2. Specify a corresponding depreciation area for each currency type.
    can any one give me solution for this problem
    Thanking you

    hi,
    please check your company code whether you maintain parallel currencies.
    make the settings for the depreciation areas also.

  • Unable to assign Chart of Depreciation to Company Code

    Dear Experts,
    I am trying to assign newly created chart of depreciation to my company code but system is not allowing me giving the following error message:
    "You cannot process company code ****, it contains assets".
    When I go for F1, then further it says:
    Message no. AC507
    Diagnosis
    You want to delete company code **** or assign company code **** to a different chart of depreciation.
    However, at least one asset exists in company code ****.
    System Response
    The action cannot be carried out.
    Procedure
    Check the company code entry. You may have to reset the assets in this company code, if it is not in production operation.
    Please note that I had previously created few assets and asset classes but asset classes have been deleted due to some reason.
    I have now recreated asset classes but can't proceed to assign COD to company code because of above issue.
    If I must delete existing assets within my company code then how to do it with minimum required steps.    
    Looking for resolve.
    Regards

    Dear all who responded,
    Thanks for your effort, advise & valuable time.
    Issue has been solved finally.
    Key point was to delete all assets one by one using AS06 and then try to assign to COD to company code.
    Within AS06 when you enter asset code & company code and then click "Delete Asset" button on top, system gives error message in tray. Here when I re-clicked "Delete Asset" button (ignoring error message) it worked and next screen appeared.  
    Then it was a usual activity to choose "Delete asset physically" button and save the transaction.
    After deleting all assets one by one I was able to execute the primary purpose which was: "to assign the COD to my Company Code".
    Regards

Maybe you are looking for