Authorization issue with Company code/ Cost center combination
Hi,
I am currently trying to restrict user access by company code and cost center combination.
We have roles defined for each user and I am trying to use the standard authorization object A_S_KOSTL in this role . It seems that since it is not a 'maintianed' object no activity can be assigned to this autorization object.
currently the values are :
company Code : 1110 , 1112, 1114
Cost Center : *
i am getting sy-subrc as 0 even when i test for company code : 1110 for a user with the above role.
My code is :
AUTHORITY-CHECK OBJECT 'A_S_KOSTL'
ID 'BUKRS' FIELD '1110'.
F sy-subrc EQ 0.
AUTHORITY-CHECK OBJECT 'A_S_KOSTL'
ID 'KOSTL' FIELD '*' .
IF sy-subrc EQ 0.
MESSAGE 'Success with KOSTL also' TYPE 'S'.
ELSE.
MESSAGE 'Success with BUKRS only' TYPE 'S'.
ENDIF.
ELSE.
MESSAGE 'Failure' TYPE 'S'.
ENDIF .
I get a subrc NE 0 for the KOSTL part. The test passes for BUKRS.
Please advise on how to proceed.
Thanks and Regards
Soumya
Okay, I misread the "NE". Sorry.
Have you done a syntax check on it?
Also compare to:
AUTHORITY-CHECK <object>
ID 'KOSTL' '*'.
I cannot confess to ever have done a "full" AUTHORITY-CHECK myself, but it is most likely the same as with DUMMY -> you should not use the FIELD statement as '' value if the data element does not know what a '' is...
Cheers,
Julius
Similar Messages
-
Standalone Scenario - Company Code, Cost center table
Hi,
Can any one please let me know the company code, cost center table used in standalone scenario.
Regards,
SAP Guy.Hi,
The account assignment, Product category and Logical system combination is maintained in SPRO.
SPRO > IMG > SRM > SRM Server > Cross Application Basic settings > Account Assignment
There are three settings which you maintain there :
1. Account assignment categories
2. Define G/L account for product category , Logical system and Account assignment category
3. Maintain local accounting data.
These are the three settings which you maintain for account assignment determination.
Hope this makes you more clear and helps in resolving your issue. Clarifications are welcome.
Award points for helpful answers.
Rgds,
Teja -
Cross company code cost center allocation
Hello experts,
I would like to know if cross company code cost center allocations is possible or not ?
Please let me know.
Newcomhi its possiable,
can u give a senario, i will explain to u.
for ex:
com code1 having dept x
com code 2 also have a possiablities to have same c ctr dept x
thanqu -
HR - SRM Replication: Issue with company code and cost center
Hello Experts,
We have a scenario where we are trying to replicate the HR Org Structure into the SRM system.
All the standard settings have been made using relevant SAP Notes and other help available on SRM.
However, the company code and cost center for a particular position are not getting updated into SRM.
These details are present in the Inbound Idoc from the ECC system.
Is there any setting we may have missed out on?
Please help.Hi
Kindly check your ALE Filter in BD64 in the sending system. You need to maintain the objects C K O S and infotype 1001 and related subtypes in the filter model.
Also check the Evaluation path that you are using to send data.
Regards
Vijay V -
Override Company and Cost Center for FI Posting from HR Payroll
Hello all. I have this scenario with a company that was merged into another and retroactive payroll occurs for absences and extra time in the "old" company, but the "old" merged company is closed so no postings can occur.
I also found this unanswered post: How to Override Company and Cost Center for FI Posting from HR Payroll
We suppose that retroactive differences could be accounted in the new company code but I didnu2019t found any way to do it even in the BADI SMOD_PCPO0001 I couldnu2019t find a way to change the company code/cost center....
Does anyone have dealt with the same problem? What is the solution?Amosha, thank you for your response. Here is PCP0 that shows what I mean by 'header company code' that I don't see how to change (I re-ran pd 26 2008--bi-weekly payroll, btw):
06/30/2009 Posting Document
Run 0000002791
Company Code 0057
Document 0000008174
PostingCurrency USD
Reference HRPAY00009
Doc. Type ZB
Run Type PP
Posting Date 12/01/2008
Documant Type G/L Account Document
Document Date 06/30/2009
Bus. Transaction HRP1
There are error messages for this document
Account Number with Text
21301000 Accrued Salaries & Wages CCTR 14515 ...
20303998 HR P/R Doc Split ...
Messages for Document 000008174
Error in document: HRPAY 0000008174
The CO account assignment object belongs to company code 0001, not 0057
Company code 0057 is now closed and has been merged into 0001. Cost center 14515 in the above doc was populated by my clone of RPCIPE00 and call to my BAdI which retrieved current company and cost center from PA0001. You can see from above that the 'header' data still shows 0057 and indeed, my version of RPCIPE00 only changes P_ITEM-BUKRS, P_ITEM-KOSTL and P_ITEM-SGTXT. It looks to me that fm HRPP_TRANSLATE_FICO gets the 'header' company code afresh. I was planning to leave WPBP-BUKRS (and all other Payroll data) alone (ie, not override company code).
As for your other question, we post retros to /551 and /552.
Thanks again. -
Authorization object for company code and profit center together
Hi all,
Please help me with the following requirement..
Company Code = ABCD
Profit Center = *
The user is authorized to run the report for company code ABCD only but any profit center within this company code.
2 Company Code = *
Profit Center = WXYZ
The user is authorized to run the report for Profit Center WXYZ only but any company code.
3 Company Code = *
Profit Center = *
The user is authorized to run the report for any company code and profit center.
The same user could have 1 and 2. So, in this case he should be able to run a report for the total inventory of company code ABCD, and a report for total inventory of profit center WXYZ only regardless company code.
He should not have visibility to other company codes inventory other then profit center WXYZ.
Regards,
RajHi ,
Anyone please help me..
Regards,
Raj -
Restricting issue of goods to cost center with respect to material type
Dear Users,
I have a requirement like we want to restrict issue of goods to cost center with respect to material type i.e., we want to issue goods to cost center only through reservation and that too only for specific material types. Is there any standard solution for this, please provide your suggestions.
Thanks,
ManojHi Ajay,
Thanks for valuable input.
I also thought in the same line , but user has the following concern on this:
Assessment Cycle: As per Users, it cannot be used because this will allocate based on allocation basis. But they need, the values that was posted at the time of transaction and as per materials. So it wont be accurate through Assessment cycle,
OKB9: They have different Cost center for different valuation area for the same GL Account.
Hence through OKB9 also, we cannot post directly to COPA.
That's the reason the above option were not adopted.
My other concern to this is:
In CKM3, we have two lines under consumption, one for Normal sales PGI and other is Cost Center.
After doing revaluation of consumption in CKMLCP, we see one line under Cost Center :Revaluation of Consumption Figure"
My question, where can I see that figure whether in any table or in Cost Center report??
If that is also available we can try to match those values and post to COPA.
Let me know your thought on this.
Thanks and regards
Kami -
How to Override Company and Cost Center for FI Posting from HR Payroll
Current problem: A company code has been 'merged' into another one and the old company code can no longer be used. In the last payroll run, there was a rate change that caused a retro back to the time of the old company code and since the old company code and cost center were closed, the FI posting error'ed out. To correct, we had to delete the offending pernr from the cluster and back out the rate change until we came up with a solution.
Investigation has revealed a process called 'Substitute Cost Centers', but we tested it and a 'flusher' cost center is required to be set up in the old company code and FI refuses to open it up.
Also, I've located 3 user exits for RPCIPE00, but I do not see where company and cost center can be changed. So I've tried to code my own BAdi, but there seems to be a header company code that I'm not getting. The item company code and cost center seem to be doable, but I don't know how to change the header company code.
I am new to HR and Payroll having spent the last couple of years in BI and before that I worked with the material master and Purchasing. It is my humble opinion that the company should not have been 'turned off' until Payroll was finished with it and that means 2 years until we archive. In reading about symbolic accounts, several times it is written not ever to delete them. Seems to me company code is the same. But surely I must be wrong and there is a solution that will make everybody happy.
I would appreciate any and all ideas. Thank you so much.Amosha, thank you for your response. Here is PCP0 that shows what I mean by 'header company code' that I don't see how to change (I re-ran pd 26 2008--bi-weekly payroll, btw):
06/30/2009 Posting Document
Run 0000002791
Company Code 0057
Document 0000008174
PostingCurrency USD
Reference HRPAY00009
Doc. Type ZB
Run Type PP
Posting Date 12/01/2008
Documant Type G/L Account Document
Document Date 06/30/2009
Bus. Transaction HRP1
There are error messages for this document
Account Number with Text
21301000 Accrued Salaries & Wages CCTR 14515 ...
20303998 HR P/R Doc Split ...
Messages for Document 000008174
Error in document: HRPAY 0000008174
The CO account assignment object belongs to company code 0001, not 0057
Company code 0057 is now closed and has been merged into 0001. Cost center 14515 in the above doc was populated by my clone of RPCIPE00 and call to my BAdI which retrieved current company and cost center from PA0001. You can see from above that the 'header' data still shows 0057 and indeed, my version of RPCIPE00 only changes P_ITEM-BUKRS, P_ITEM-KOSTL and P_ITEM-SGTXT. It looks to me that fm HRPP_TRANSLATE_FICO gets the 'header' company code afresh. I was planning to leave WPBP-BUKRS (and all other Payroll data) alone (ie, not override company code).
As for your other question, we post retros to /551 and /552.
Thanks again. -
DMS Document relationship with company code
Hi All,
I have to delete all DMS Documents for Document Type AAA and company code 8200. I am not able to find relationship between Document info records and company code in table level so can you please guide me How to get the relationship.
I checked with tables : DRAW, DRAD, AUSP... but not got proper answer.
-Thanks,
AjayHi All,
Thanks for your replay. This issue is resolved.
In transaction CV04N with classification tab I have to option of Company code. I am able to get list of DIR's with company code and document type.
-Thanks,
Ajay -
Why "You do not have authorization to display company codes" ? Thanks
Hello,
Using the Tutorial BAPI which comes with the JCO Tutorial,I just wanna call the first function.
When I run the code, it display "You do not have authorization to display company codes".
Could any body please help me to explain why?
Thanks a lot
BELOW IS THE CODE:
package com.sap.slc.teamweb.test;
import com.sap.mw.jco.*;
public class TestBapi1 extends Object {
JCO.Client mConnection;
JCO.Repository mRepository;
public TestBapi1() {
try {
// Change the logon information to your own system/user
JCO.createClient("001", // SAP client
"<userid>", // userid
"****", // password
null, // language
"<hostname>", // application server host name
"00"); // system number
mConnection.connect();
mRepository = new JCO.Repository("SAPJCO", mConnection);
} catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
JCO.Function function = null;
JCO.Table codes = null;
try {
function = this.createFunction("BAPI_COMPANYCODE_GETLIST");
if (function == null) {
System.out.println("BAPI_COMPANYCODE_GETLIST" + " not found in SAP.");
System.exit(1);
mConnection.execute(function);
JCO.Structure returnStructure = function.getExportParameterList().getStructure("RETURN");
if (!(returnStructure.getString("TYPE").equals("") || returnStructure.getString("TYPE").equals("S"))) {
System.out.println(returnStructure.getString("MESSAGE"));
System.exit(1);
codes = function.getTableParameterList().getTable("COMPANYCODE_LIST");
for (int i = 0; i < codes.getNumRows(); i++) {
codes.setRow(i);
System.out.println(codes.getString("COMP_CODE") + '\t' + codes.getString("COMP_NAME"));
catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
try {
codes.firstRow();
for (int i = 0; i < codes.getNumRows(); i++, codes.nextRow()) {
function = this.createFunction("BAPI_COMPANYCODE_GETDETAIL");
if (function == null) {
System.out.println("BAPI_COMPANYCODE_GETDETAIL" + " not found in SAP.");
System.exit(1);
function.getImportParameterList().
setValue(codes.getString("COMP_CODE"), "COMPANYCODEID");
function.getExportParameterList().
setActive(false, "COMPANYCODE_ADDRESS");
mConnection.execute(function);
JCO.Structure returnStructure = function.getExportParameterList().getStructure("RETURN");
if (!(returnStructure.getString("TYPE").equals("") ||
returnStructure.getString("TYPE").equals("S") ||
returnStructure.getString("TYPE").equals("W"))) {
System.out.println(returnStructure.getString("MESSAGE"));
JCO.Structure detail =
function.getExportParameterList().
getStructure("COMPANYCODE_DETAIL");
System.out.println(detail.getString("COMP_CODE") + '\t' +
detail.getString("COUNTRY") + '\t' +
detail.getString("CITY"));
catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
mConnection.disconnect();
public JCO.Function createFunction(String name) throws Exception {
try {
IFunctionTemplate ft = mRepository.getFunctionTemplate(name.toUpperCase());
if (ft == null)
return null;
return ft.getFunction();
catch (Exception ex) {
throw new Exception("Problem retrieving JCO.Function object.");
public static void main(String args[]) {
TestBapi1 app = new TestBapi1();Hi Mao,
R/3 comes with some predefined Company Codes and we also
can define our own Company Codes.
visit this link this may help you.
http://help.sap.com/saphelp_erp2004/helpdata/en/8e/1a5217171311d28e1d080009b6ab29/frameset.htm
Regards,
Narinder Hartala -
Display users along with company code assigned to them
Hi,
I would like to display list of users with company code assigned to them
Thanks & Regards,
Rajesh KaleHi himanshu,
I want list of user using complex selection criteria.
It can be display using tools -> Administration -> User maintenance -> Information System -> Users by complex selection criteria.
Here, I am facing the problem that which authorization object I should put so that I can get list of users in which in front of every user I get the company code assigned to them.
Regards,
Rajesh -
Dear all,
I have an authorization issue with two ODS.
One I activated for BEx reporting --> Is working fine in Dev, but I get error with
missing authorization in QUA, althought some authorizations.
Same issue with a newly created ODS, which works in Dev, but gives an error
with missing authorization in QUA.
What can be the reason for this? Any input is highly appreciated!
Cheers,
ClaudiaHi,
check that the role(s) are transported from your DEV and your QA, and that the user has the correct role(s)
Check as well in your QA transaction RSSM for your ODSs objects; it might be that by transporting the ODS, some authorizations have been applied by default.
hope this helps...
Olivier. -
Assign chart of dep with company code
Hi All SAP Guru,
I want to Assign new chart of dep in company code. When i assign the system is not allow. It is not showing white color field. Please advice how can i assign the new COD.
Regards,
PankajHi,
Thanks for your quick reply. The COD is already assigned with company code. Client want to change COD. When i try to assign another COD. It is not allow.
Company code Company COD text
1000 ABC LTD BP00(want to assign new COD)
Regards,
Pankaj -
If Company has one to one relationship with Company code
Dear All,
If Company has one to one relationship with company code in the transaction system (ECC),
can we use company in place off company code - in the BCS system?
That is, in this case - under consolidation units
- company,
i will be using the ECC companies rather than ECC company codes as consolidation units.
Request your insights.
Cheers
KumarActually, I almost always use the company, not the company code. The difference is in the different number of attributes, and the type CHAR 4 or 6. 0COMPANY is the standard infoobject for using in SEM-BCS.
Though, I also used the custom infoobject for ConsUnit. Not a problem. Everything works. Just one needs to be careful with infoobjects which are the references to the Company IO. -
Peculiar problem in LDB ADA with company code selection
<h5>Hello Colleagues, </h5>
Faced a peculiar problem with company code selections in LDB ADA. Entered depreciation area, dep posting perios, lower and higher value of company code and would like to except few companies from selections. On pressing extension button, error message "Depreciation area 01 is not defined in chart of depreciation" is popping up and not allowing to provide exceptions for company codes. But working well in development systems. We are using ECC 6.0 systems and in both systems we have same lines of code for SAPDBADA.
During debug, found that in development system, control coming to initial statements after PAI event. But in other systems, control skips few initial commands after PAI and directly jumps to later commands. Due to this FNAME parameter in PAI subroutine setting with '*' in other systems and 'BUKRS' in dev system.
Could anybody give me some thoughts of why system behaving differently?
Thanks and Regards,
PrasanthSome - or most? - ODBC driver, especially MS for SQLServer and Access, don't support these advanced JDBC features.
Like the messages says: they are optional features, and the driver doesn't implement them.
A good news:
you don't need them.
Just go through your ResultSets only forward by next(), and do all inserts, updates and deletes with executeUpdate() and SQL commands.
Maybe you are looking for
-
IPhone 4 not connecting to any computer, Mac OS or Windows, or iTunes after ios 7 update
Hello Apple community, I desparately need help connecting my iphone 4 to iTunes so I can restore my previous iPhone4 backup that is on my windows laptop computer. It used to connect perfectly to my windows 7 laptop with iTunes, but after ios 7 (an
-
Hi, We have 300 stores with mostly the same router config. The router in each store is a cisco 891 router capable of doing QOS. Each of our store is connected to internet through a local Internet Service Provider (ISP). They all have different ISP.
-
How does a server set SoapFault parameters?
If a SOAP server encounters errors and needs to pass some data back to a SOAP client by way of the client receiving a weblogic.soap.SoapFault, how can the server set the value for <faultcode> and <faultstring>? How method does a SOAP client use to ge
-
Is there any documentation (white paper, research paper, etc) where we can get a comparison of Netweaver and OAS10G?
-
Receive my new iphone 3GS to day .how long am i supposed to load the batt ?
receive my new iphone 3GS to day ... how long am i supposed to load the battery ? 24 Hours ? only the time to achieve the full level ? ty