cancel
Showing results for 
Search instead for 
Did you mean: 

Authorization issues MM/PP STATUS Changes

Former Member
0 Kudos

Hello,

I'm getting the following error even with SAP_ALL SAP_NEW

BDC Transaction Report for ZM02. Report: ZUCC0026

Run by: KHALIFAO page: 1

On: 11/11/2009 at : 09:06:12

In System: Q47

Authorization issues MM/PP STATUS Changes

M365SC1110020 ZFIN M680 MM/PP STATUS 00 Not authorized to change MM/PP status

One of my user is having the following error when she excuted the following steps :

Steps:

SE38/ ZUCC0026 - Material Mass update program for Costing View

Enter the following fields before executions

Material : M365SC1110020

Plant: M680

Check off update material

Field to update: select MM/PP status

New Value: 00

Execute transaction

Thanks

Osama

Expected results: output document should states that update of MM/PP status was changed from XX to 00.

-


This message

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Please display the program code (F7) in SE38 and then use the menu option (Utilities?) to scan the source for a pattern, or just use the binoculars for a quick-check for the statements:

SY-UNAME

and also

GET PARAMETER

... and post the corresponding coding block here (if you can).

These are the most common culprits in customer code.

Cheers,

Julius

Former Member
0 Kudos

Hello Julius,

SY-UNAME

ZUCC0026 550 WRITE: / 'BDC Transaction Report for ZM02. Report:'(b01),

/ 'Run by: '(b02) ,sy-uname COLOR 5,

1167 * IF sy-uname <> 'BATCH'.

1183 READ TABLE itab_zusrgroup WITH KEY group_id = group_id

user_name = sy-uname.

1212 SELECT SINGLE update_ind scop_ind

FROM zusrgroup INTO (itab-update_field,l_scop_ind)

WHERE user_name = sy-uname

AND group_id = itab_fields-group_id.

1219 * WHERE user_name = sy-uname

1223 READ TABLE i_zplant WITH KEY

user_name = sy-uname

werks = itab-werks.

1422 SELECT werks FROM zusrplant

INTO zusrplant-werks

WHERE user_name = sy-uname.

1453 MOVE: sy-uname TO i_zplant-user_name,

Parameter :

188 *PARAMETERS: p_mode TYPE c DEFAULT 'N' NO-DISPLAY. JHSIR35508-

189 PARAMETERS: p_field LIKE itab_fields-descriptio.

190 PARAMETERS: p_name LIKE itab_fields NO-DISPLAY.

191 PARAMETERS: p_newval(14) TYPE c.

193 PARAMETERS: p_file(100) TYPE c LOWER CASE.

194 PARAMETERS: p_filval AS CHECKBOX. "0001+

195 PARAMETERS: p_unix AS CHECKBOX. "0004+

33 PARAMETERS: P_UPD AS CHECKBOX.

Thanks

Osama

Former Member
0 Kudos

What is coded on lines 1168 to 1182?

If there is a PERFORM statement in those lines, then double-click on the form name and post those lines as well (they will be right at the bottom of the program).

Cheers,

Julius

Edited by: Julius Bussche on Nov 12, 2009 7:36 PM

Former Member
0 Kudos

Thanks Julius,

Here is the code :

FORM validate_field USING group_id.

CLEAR valid_field.

READ TABLE itab_zusrgroup WITH KEY group_id = group_id

user_name = sy-uname.

IF sy-subrc <> 0 OR itab_zusrgroup-update_ind IS INITIAL.

CLEAR valid_field.

ELSE.

valid_field = 'X'.

ENDIF.

ENDFORM. " VALIDATE_FIELD

Former Member
0 Kudos

So, it looks as if you need to be entered in the table from which itab_zusrgroup has been selected and assigned to a group ID, otherwise some field validation takes place (valid_field = 'X') and tells you that you are not authorized for whatever reason... unless your user ID name is 'BATCH' (intended to indicate that the program is running in a background jobstep...) in which case it does not happen.

So, you can either maintain the ZUSRGROUP table, or change the code, or simply open the menu to Execute in Background and then go to SM37 and switch the stepuser to BATCH...

Cheers,

Julius

Former Member
0 Kudos

Bingo?

Also take a look at this thread =>

and this blog => [Hacker's Lunch|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/16530] [original link is broken] [original link is broken] [original link is broken];

If you include function calls which donu2019t react to exceptions or TRY and CATCH tactics or IF SY-UNAME type checks, then you might have way more than just 12 concepts to manage in your systemsu2026

Cheers,

Julius

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Osama,

Both ZM02. Report: ZUCC0026 are custom T-Code and Report.

And can you please provide the exact authorisation error that was given by the system.

Cheers,

Bharath.