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

Similar Messages

  • Restrict PR/PO/GR for a particular company code from particular date

    Hi Experts
    How we can restrict PR/PO/GR for a particular company code from a particular date?
    I know PR is not directly linked with company code
    PO can be restricted by deactivating the assignment between company code & plant
    GR- we can use posting period option.?
    Suggest me the best solution for the above requirment.
    Thanks/karthik

    hi
    Obvoiyusly , you can stop the company code posting by not activating the month end closing of periods (MMPV) in MM and similarly in FI ( OB52).
    By removing the assignment you can stop PO creation for the company code but you need to ensure that all the old, un-finished PO/SA and other related activities are taken care off before that.
    Regards

  • Calculate the database size for a particular company code in SAP

    Hi Experts,
    We have 30 company codes in our FI production system. So to plan another new company code to be deployed into the system, we need to know exact data capacity (database) of the previous company code that we already deployed. Kindly let me know whether it possible to calculate the database size occupied for a particular company code in a SAP system.

    >
    Kalyan Kumar Bandlamudi wrote:
    > Hi Experts,
    >
    > We have 30 company codes in our FI production system. So to plan another new company code to be deployed into the system, we need to know exact data capacity (database) of the previous company code that we already deployed. Kindly let me know whether it possible to calculate the database size occupied for a particular company code in a SAP system.
    Its not possible to calculate data size based on company code.
    By creating company code It will not occupy much space. Depends on your posting documents for particular company codes.
    Thanks
    Siva

  • Calculate database size for a particular company code

    Hi Experts,
    We have 30 company codes in our FI production system. So to plan another new company code to be deployed into the system, we need to know exact capacity (database) of the previous company code that we already deployed. Kindly let me know whether it possible to calculate the database size for a particular company code in a ERP system.

    >
    Kalyan Kumar Bandlamudi wrote:
    > Hi Experts,
    >
    > We have 30 company codes in our FI production system. So to plan another new company code to be deployed into the system, we need to know exact data capacity (database) of the previous company code that we already deployed. Kindly let me know whether it possible to calculate the database size occupied for a particular company code in a SAP system.
    Its not possible to calculate data size based on company code.
    By creating company code It will not occupy much space. Depends on your posting documents for particular company codes.
    Thanks
    Siva

  • Defaulting document types for a particular company codes.

    Dear All,
    Is there a way to default certain document types to particular company codes, so that when ever if we enter that particular company code then automatically the default document types has to come. I tried to check for configurations but could not. Please let me know how to achieve this scenario.
    Regards
    Srikanth

    Hi,
    No, does not seem possible to me without development...
    Regards,
    Eli

  • Unable to clear customer line items for a particular company code

    Hello,
    For a certain company code, even though open items are present for some customers, i am unable to clear them using F-28 or F-32.I am getting the message 'No open item exists', Anyone come across this scenario before?

    Hi:
             Make sure you are giving proper selection criteria for the processing open item. May be the items are Special GL based transaction so you need to select special GL indicator to process open item. Please also refer to OSS Note 136754 - F-03, F-32, F-44, F-28 missing open items. Hope this will help you.
    Regards

  • Sequential Delivery document nos for a particular Company Code

    Dear All
    I have to assign a customized Number Range based on the company code while creating a  Delivery using VL01N.
    I am aware that Standard Number Range in SAP does not support my business needs and number range enhancements are possible for SD document types. I have achieved the same for invoice documents but not able to override the standard number range of delivery to the newly created number range based on the company code.
    Can any one you help me on the User Exits with you so that I can proceed without much delay.
    Please help and please advise and let me know if you want some more details!!!
    Regards
    Amitanshu
    Edited by: Amitanshu Deep on Oct 5, 2009 1:51 PM

    Hi All,
    Thanks for the reply. I did go through the S_ALR_87012342 and found three documents missing in the number range I specified.
    Also I went through SNRO and applied Objects "RF_BELEG" , "DEBITOR"  "KREDITOR" and I founf No Buffering for object type  "RF_BELEG" and Main Memory buffering for  "DEBITOR"  and "KREDITOR" with 5 as No. of number in buffers section.
    Can you please suggest as to what this implies and how do I found out the Object that I need to specify in SNRO.
    Also I observed one peculiar thing wherin whenever there is a document posetd via third party tool an idoc is generated which would post a doc via FB08 ,the previous document number is missing in the BKPF table.
    Please advise.
    REgards,
    Praveen

  • Posting is not possible for the specified company code.

    Hi SRM Gurus,
      We have a four company codes in our org.structure and if we try to post manual invoice for a particular company code with its currency, we are getting this error :
    "Posting is not possible for the specified company code "
    We have all company codes defined and inherited for the particular user in BUK and we get all the company codes in the F4 help of this user in BBPIV02 -->Basic data.
    Any suggestions pl.
    I doubt this particular Cocode is deactivated for invoice posting in backend. Is it possible ?
    Kindly suggest.
    Reg.,
    Sridhar.

    Hi
    Which SRM version are you using ?
    Are you getting this error for a praticular company code only or for all the comapny codes ?
    <b>Please read this -></b>
    Since you are trying to create Invoice with PO did you check the Vendor Root there is a attribute for company code. Please maintain the same, if not maintained.
    Refer the link below for details.
    Re: Company code for system missing in user attributes
    <u>Other related links -></u>
    Try to change the chart of acct info in OBY6 for a company code that was copied from SAP template, there is no Financial posting or any other posting in this company code.
    Re: Posting Period Error in Confirmation
    Hope this will help.
    Regards
    - Atul

  • Prevent billing on a particular company code

    Dear All,
    I want to stop the billing on particular company code from certain date. What would be the best way to do it. The requirement is not through authorisation or through blocking the customers/payers.
    The billing F2 sahll be still to be used for other company codes
    Reg
    CD

    If the date happens to be month-end then close the FI and MM period for all subsequent periods for the particular company code.
    Closing MM period will block creation of delivery (PGI) and hence billing.
    Closing FI period will block posting billing doc to FI.

  • Authority-check for particular comp code

    Hi All,
    when i'm using standard Authority Object F_BKPF_BUK  for a particular standard code say 'CO01'. but it is working for all company code, but i want work for only one company code say 'CO01' ONLY.i'm using in report program (zreport prog)
    I written code as
    AUTHORITY-CHECK OBJECT 'F_BKPF_BUK'
        ID 'BUKRS' FIELD 'BE10'
        ID 'ACTVT' FIELD '03'.
    Please can u advice on this .
    Many Thanks in Advance for u r Answer
    Naren

    Hi
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a  profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    Reward points if useful
    Regards
    Anji

  • How to block postings for particular company code ?

    Hello All,
    I have a scenario like FI document shouldn't generate automatically when I invoice with reference to order/delivery document.
    Just I want only Invoice number but not FI document (It should park instead of creating automatically) for particular company code among all and later I will create manual FI document with reference to that Invoice.
    Existing solutions:
    1.Can control in document functionality but I am using single document for all company codes
    2.Can control using FD02 transaction but I have many customers
    Please suggest any new solution other than above.
    Regards,
    Gangadhar

    Hi,
    Please check the below thread:-
    Re: VF01: Prevent document posting in FI via user exit
    It should be useful in your situation.
    Regards,
    Gaurav

  • Asset Claas Activate For particular Company code in Company

    Hi,
    Asset class is defined at client and how can we activate asset class for particular company code in group company how can assign the asset class for particularly one company code in group company
    Regards,
    Harish

    Asset class depends on chart of depreciation , so if you have created an asset class on lets say US chart of Depreciation, it will be available to all the companies that have US Chart of Depreciation assigned to them .
    Thanks

  • Blocking of J1IEX Transaction for particular company code

    Hi,
    I have two requirment,
    1 :  For our one company code  C011 , J1IEX transaction should not allow ,  we have one user and that user is working on different conpany code  but for particular to this company code C011,  how to block the J1IEX transaction user should not take the cenvat
    2: For the same company code J1IEX transaction is allowed  only of in Purchase order material code is  XYZ ,  otherwise for other materials materials should not come i n J1IEX  to get the cenvat benifit.
    regards,
    zafar

    Hi Zafar.
    I belive this would be an authorization issue in this case (guys on the forum pls correct me if I'm wrong).
    Maybe you should put a request for the Basis/Security management team who supports your company, informing what C.Code restrictions to add in this transaction, and for what users, so that they would find out what authorization objects to restrict.
    Regards,
    Rodrigo.

  • Passing validation(ob28) for particular company code at the time of posting

    Hi Gurus,
    My business requirement is creation of new company code for recalculation of accrual amount. where in these recalculated amount will be posted to new company code, however we had defined some validation (ob28) for document posting. so my query related to is it possible to pass all the validations for this new company code  at the time of posting?
    your response will be highly appreciated
    Thanks & Regards,
    Jamuna

    Hi,
    My requirement is to create new company code, and whenever the document will be posted during the posting whatever validations has been defined with respective to document posting should be restrict for new company code.
    so wheneever business will try to post the document for new company code all the existing validations will be by pass for document posting.
    Thanks,
    Jamuna

  • How to pass the currency of particular company code into a text variable.

    Hi
    I want to pass the currency of particular company code into a text variable.
    The company code is selected by the user using Input variable "0S_COM_M".
    I have created a text variable "ZD_CURR" with processing type customer exit.
    I have written the following abap code but its not working.
    DATA : LV_CURR type /BI0/OICURRENCY.
      WHEN 'ZD_CURR'.
        IF I_STEP = 2.
          CLEAR  XTAB.
          READ TABLE I_T_VAR_RANGE INTO XTAB WITH KEY VNAM = '0S_COM_M'.
          SELECT SINGLE CURRENCY FROM /BI0/PCOMP_CODE INTO LV_CURR WHERE COMP_CODE =  XTAB-LOW.
          L_S_RANGE-LOW = LV_CURR.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT  = 'EQ'.
          CLEAR E_T_RANGE.
          APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
    Pls let me know how to resolve this issue or what modification can be done to this code.
    Is there a way where we can debug customer exit code for variables.
    Thanks.

    Hi.
    You should debug your code to check behaviour of it.
    Just set external breakpoint (or create checkpoint via tc SAAB) and run your query.
    You may run query via RSRT.
    Regards.

Maybe you are looking for

  • Upgrading to 10.8.5 killed my cMBP

    I have a late 2011 MacBook Pro 15", 16gb ram 2 hard drives SSD in primary and swapped my DVD for the 750gb that was installed when I ordered it. It has been rock solid since I purchased it, never an issue. The ram and hard drive arrangement has been

  • Set reader 9 as default reader

    How do I set reader 9 as my default reader?  I also have Acrobat 6 running & when I attempt to read a document it defaults to Acrobat 6 & I get the prompt that I need Reader 9 or later to read this document.  In sum--I wish to have both reader 9 & ac

  • User Exit ATP check availibility of current material Checking Group

    Hello All, Would someone please tell me the best place to put (user-exit?) a modification on sales order create / modify so that the ATP check availibility will check the current Checking Groups in the Material Master?    The problem is that there ar

  • Zen Sleek and WMP11!

    Hi, I have a zen sleek and have not put any music on it for ages. I updated to WMP ages ago and it works fine with my ZVM. I have tried searching the forums but not getting very far!! It says the driver is outdated and won't let me get any further. I

  • Cartridge/Ink problem with my HP Photosmart C3180

    hi,  i have a nasty problem with my printer. i have an old cartridge and a new one who i just refilled. my problem is that when i insert the new refilled cartridge the start black copy light is blinking and when i insert the old cartridge is not and