‎2014 Mar 25 7:03 AM
Hello Experts,
We have created Zprogram to update the material master using BAPI_MATERIAL_SAVEREPLICA . And we have restricted this program only to users who have authorization object M_MATE_STA assigned with ACTVT = 2 & STATM = 'G' (Costing view).
Also, I have added cost_view = 'X' with material number and in BAPI Table parameter's "HEADDATA","VALUATIONDATA","PLANTDATA"
Even after all this, I don't know why BAPI is trying to open "QUALITY_VIEW", due to which report output is "No Authorisation to Quality view" even though user has only for Costing view and updating only costing information.
Please help on this..
‎2014 Mar 25 7:41 AM
Could you Insure that no field that you change/create in PLANTDATA view are related to quality tab/authorization, even implicitly if creation of record ?
Also don't forget that the system first try to create the data (as MM01) and only then update existing data (as MM02) so some wrong error messages can appear in return parameter when update is actually allowed (ref 545626 - FAQ: Data transfer problems) -> look at RETURNMESSAGES for message MK102 'trying to create...' / error / MK130 'trying to change...' /success / if this is the case execute the commit.
Regards,
Raymond
‎2014 Mar 25 7:07 AM
Hi Shreyansh
If you make the changes via SAP transaction MM01/MM02 do you face the same issue..?
Nabheet
‎2014 Mar 25 7:26 AM
Hi Nabheet,
MM02 works fine. But we have issue only via BAPI
Thanks,
Shreyansh
‎2014 Mar 25 7:33 AM
Shreyansh
Can you please provide the message number and message class detail. We may need to check where this message is thrown and on what basis it was called via debugging
Nabehet
‎2014 Mar 27 6:31 AM
‎2014 Mar 25 7:41 AM
Could you Insure that no field that you change/create in PLANTDATA view are related to quality tab/authorization, even implicitly if creation of record ?
Also don't forget that the system first try to create the data (as MM01) and only then update existing data (as MM02) so some wrong error messages can appear in return parameter when update is actually allowed (ref 545626 - FAQ: Data transfer problems) -> look at RETURNMESSAGES for message MK102 'trying to create...' / error / MK130 'trying to change...' /success / if this is the case execute the commit.
Regards,
Raymond
‎2014 Mar 27 6:35 AM
Thanks a lot Raymond.
SAP Note helped us to analyse the issue. Yes. BAPI first try do activities like Create(01) and then Change(02). Since user did not have authorisation to Create , it was raising exception.
Now we have restricted user to ZTcode with auth object M_MATE_STE with 01(Create),02(Change),03(Display) activities for Costing View.
Thanks& regards,
Shreyansh
‎2014 Mar 25 7:55 AM
Hello Shreyansh.
Try using the BAPI_MATERIAL_SAVEDATA and check if you are getting the error.
Regards.