‎2007 May 24 7:59 PM
BAPI_MATERIAL_SAVEDATA is returning this message:
"No authorization for material type Semifinished product"
Anyone know where on God's green earth this kind of authorization is set ????
All we're trying to do is update AUSSS in MARC, and it's been working fine thru two months of testing in DEV and QA.
Thanks in advance.
djh
‎2007 May 24 8:05 PM
First, try to do this manually using MM02 and see if you get the same message. If so, immediatly put /NSU53 into the tcode/fcode box and the top of the gui and hit enter. This will give you the authorization object that is being hit and failing. Give this info to your authorizations guy and all should be well.
Regard,
Rich Heilman
‎2007 May 24 8:05 PM
First, try to do this manually using MM02 and see if you get the same message. If so, immediatly put /NSU53 into the tcode/fcode box and the top of the gui and hit enter. This will give you the authorization object that is being hit and failing. Give this info to your authorizations guy and all should be well.
Regard,
Rich Heilman
‎2007 May 24 8:13 PM
Rich -
Been there done that.
No - it's not that kind of authorization - /nsu53 gives me no failure ...
Regards
djh
‎2007 May 24 8:15 PM
‎2007 May 24 8:15 PM
Hi David,
Please check the error mesage ... what are the message class and number?
Mostly, somewhere in the program is checking the following FM.
READ_MATERIALTYPE
...
CALL FUNCTION 'BEGRU_MAR_AUTHORITY_CHECK'
EXPORTING
aktyp = aktyp
begru = it134-begru
EXCEPTIONS
no_authority = 1.
IF sy-subrc NE 0.
SELECT SINGLE * FROM t134t "wk/99a
WHERE mtart = it134-mtart "wk/99a
AND spras = sy-langu. "wk/99a
MESSAGE e851 WITH t134t-mtbez RAISING no_authority. "<--- check here for the error
ENDIF.
...
Regards,
Ferry Lianto
‎2007 May 24 8:17 PM
You can also go to ST01 and turn on trace for authorizations. You can then analyze the trace for authorization objects.
‎2007 May 24 8:23 PM
Sorry Rich - you were right - when I did it a second time OUTSIDE the update debugging session, sure enough:
M_MATE_MAR
activity 01
authorization group HALB
Thanks for forcing me to double-check myself.
Thanks to everybody else for good tips that may prove useful in the future.
Dave
‎2007 May 24 8:24 PM
I believe that this may be your issue here. This coding maybe where the message is coming from. Put a break point in this code and walk thru to try to find out how to remedy. This code is within the function module READ_MATERIALTYPE which is called by your BAPI.
IF NOT it134-begru IS INITIAL.
CALL FUNCTION 'BEGRU_MAR_AUTHORITY_CHECK'
EXPORTING
aktyp = aktyp
begru = it134-begru
EXCEPTIONS
no_authority = 1.
IF sy-subrc NE 0.
SELECT SINGLE * FROM t134t "wk/99a
WHERE mtart = it134-mtart "wk/99a
AND spras = sy-langu. "wk/99a
MESSAGE e851 WITH t134t-mtbez RAISING no_authority.
ENDIF.
ENDIF.
Regards,
RIch Heilman
‎2007 May 24 8:26 PM