Skip to Content
Author's profile photo ' MoazzaM '

How to hide cost price in Sales Process and MB51

Dear Fellows

I came across a requirement once in my previous job and many users ask me on E-Mails or on other IM about this so I thought I should share some points which we need to consider achieving this requirement. Although some points have already been disccused in many threads for different requirements but in this document I am going to gather all the documents/discussions under one umbrella so that actual requirement can be fulfilled with all of these ideas.

Requirement was to hide the cost price from different screens for all end users except few. In other words it was to control cost price display access SAP user wise. In sale order process we can view the cost price in condition tab VPRS condition in sale order and billing document and in billing document overview screen.

I don’t know what other transactions you have given to your end users where they can view cost price but in my case there were Sales Order, Billing document, MM03 and MB51. Our internal audit department was concerned about these transactions. I will share some previously published documents and discussions here which I used to get the information about this requirement. Let’s go one by one.

Material Master

 

If you have given the access of MM03 to your end users you can control the views with authorization object M_MATE_STA. I restricted the Costing view for all end users except those to whom we wanted to give access of viewing material’s cost price.

 

Sales Order and Billing Document Condition tabs

 

It is difficult and tricky to hide VPRS condition value or any other condition value for some users in sales order and billing document condition tab. There are no settings in standard SAP to do this neither any screen variant or transaction variant. I searched for this and found SAP note 105621 in which they have mentioned step by step how to implement this note to restrict some conditions for some users. We can hide condition value or restrict users to enter any condition manually. This note is applicable in sales order and billing document condition tabs. 

I have shared another document which you can view here which describes how to implement this note and if still you need some assistance to implement this note you can ask me in comments or direct message.

Billing Document Overview

We can view cost price during billing document create, change or display process. To restrict this we need to use SAP standard table control settings. We can hide any column, change location of columns and set the variant as default. There is an authorization object S_ADMI_FCD which takes care of this table control variant access and no user can change it until he has appropriate access in this object. There is a document which you can view by clicking here and it was shared by * Ammarah * (Away) on how to control table control settings and its uses.

 

MB51 Report

MB51 is the report which shows detailed information on material movements. Importance of this report was like a back bone in my company due to batch management in finished goods material. Controlling department was using this report for different analysis purposes.

We can add or remove different fields from MSEG and MKPF tables in MB51 selection or output screns through standard IMG settings. For this there is a document which you can view here and it was published by A M This approach was not useful for me because it will add or remove the field for every user within our SAP system but I was asked to do this for some specific users. I was not able to control this user wise and I raised thread in SCN but didn’t get anything from there. I then checked it with my ABAPER and we debugged the standard MB51 report and got a triggering point where we added our own logic by implementing implicit enhancement and controlled the Amount in LC field user wise in MB51.

We used RM07DOCS program and in its subroutines section we added the coding in DATA_SELECTION. You can view this in below screen shot as well.

21212221.JPG

For this we maintained a Z table with SAP User names and validated the current user names with that table. If users were same then Amount in LC field was displayed otherwise it was blank. We can also use some customized authorization object for this but I got this idea later after I transported the Z table and logic so I didn’t change the settings but if you wana go for this technique please go with authorization object instead  a Z table.

There are also some other reports like MB5B and MM60 etc but these were not in my target. May be you get some requirement like this and I am sure if you debug that report you would get similar triggering point where you can add your own logic.

 

I haven’t added screen sho for every process because this document is to give you an idea. All processes and screen shots are there in each document and discussion which I have shared in this document so you can follow those. If you have some other screen/place where cost price can be viewed please highlight that so that we can find a way out to control that user specifically.

Hope it will be helpful for some of you.

Regards

MoazzaM

Assigned Tags

      27 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Mahendra Jani
      Mahendra Jani

      This is really awsome MoazzaM.

      Excellent Document.  Everything at one place.

      A complete FS for fulfilling clients requirement.

      Really Appreciable Sir.

      Regards,

      MJ.

      Author's profile photo ' MoazzaM '
      ' MoazzaM '
      Blog Post Author

      Thank you Mahendra Jani

      Author's profile photo Former Member
      Former Member

      MoazzaM,

      Very useful information.

      Really Fantastic.

      Regards,

      BSS

      Author's profile photo ' MoazzaM '
      ' MoazzaM '
      Blog Post Author

      Thank you Shiva 🙂

      Author's profile photo Former Member
      Former Member

      Good reference document. Thank you for sharing this MoazzaM !

      Author's profile photo ' MoazzaM '
      ' MoazzaM '
      Blog Post Author

      Thank you Karuna.

      Author's profile photo Former Member
      Former Member

      Its really really useful...thnx and keep posting..

      Author's profile photo ' MoazzaM '
      ' MoazzaM '
      Blog Post Author

      I am glad to know SAPSD that its usefull for you.

      Thank$

      Author's profile photo Suhaib Bin Aziz
      Suhaib Bin Aziz

      Dear ' MoazzaM ' Great effort towards hiding cost price, you nicely blended and referenced many other good documents. Thanks for posting This stuff and Keep exploring and posting for all of us. 🙂 Thanks!

      Best Regards,


      Suhaib Bin Aziz

      Author's profile photo ' MoazzaM '
      ' MoazzaM '
      Blog Post Author

      Thank you Suhaib for these nice words.

      Thank$

      Author's profile photo Dipranjan Khanra
      Dipranjan Khanra

      Dear Moazzam,

      Thank you for your fantastic effort like always.

         Very muchh appreciated your contribution here...

      Many thanks,

      Deep

      Author's profile photo ' MoazzaM '
      ' MoazzaM '
      Blog Post Author

      Its my pleasure Deep K

      Thank$

      Author's profile photo Raman Korrapati
      Raman Korrapati

      Hi,

      Really useful information.Thanks for sharing.

      Thanks

      Author's profile photo ' MoazzaM '
      ' MoazzaM '
      Blog Post Author

      Thank you Raman  🙂

      Thank$

      Author's profile photo Srinu S
      Srinu S

      Hi MoazzaM,

      Useful document shared. Thanks for sharing your real time requirement.

      thanks,
      Srinu. 🙂

      Author's profile photo ' MoazzaM '
      ' MoazzaM '
      Blog Post Author

      Thank you Srinu for liking this.

      Thank$

      Author's profile photo Pradeep Mani
      Pradeep Mani

      Dear Moazzam,

      Good work.Thanks for the efforts.

      pradeep

      Author's profile photo ' MoazzaM '
      ' MoazzaM '
      Blog Post Author

      Thank you Pradeep for nice words.

      Thank$

      Author's profile photo Former Member
      Former Member

      Dear MoazzaM,

      Another great piece of work as usual by you. Thank you for a hard work. I'm sure it was worth it for all. There is no doubt that you are the one of the most superbrain  of the SCN community.

      Thank a ton for sharing...

      Kind Regards,

      Khushi.

      Author's profile photo ' MoazzaM '
      ' MoazzaM '
      Blog Post Author

      Khushi Mughal

      I am really obliged for such words.

      Thank$

      Author's profile photo Dee Cee
      Dee Cee

      Hi MoazzaM,

      Good one.

      You think this logic  can be used as a base [ not copy and paste of course 😀 ] for any Auto Condition Types [like any surcharges for example] in the Sales/Invoice Documents ?

      Thanks.

      Author's profile photo ' MoazzaM '
      ' MoazzaM '
      Blog Post Author

      Hi

      Yes this logic can be used for any condition or even for any step in pricing procedure. If you go through in detail you will see that it controls pricing procedure's steps so we can use it for any condition. And yes not copy pasting 🙂

      Thank$

      Author's profile photo Former Member
      Former Member

      Hey, great post. 🙂

      Author's profile photo ' MoazzaM '
      ' MoazzaM '
      Blog Post Author

      Thank you dear 🙂

      Author's profile photo Former Member
      Former Member

      Hi MoazzaM,

      Thanks for the hard work! Keep up with your good work.

      regards,

      Author's profile photo ' MoazzaM '
      ' MoazzaM '
      Blog Post Author

      Hussain Poonawalla

      Thank you for your remarks.

      Author's profile photo Former Member
      Former Member

      Great Document MoazzaM