Skip to Content

Enhance purchasing reports with new fields

I work as both a functional and technical consultant and have been faced many times with the requirement to add customer fields to purchasing reports like ME28, ME2L or ME2N.

Adding the last purchase price to ME28 is especially frequent, and in the past (to my shame) I’ve made custom changes to RM06EF00. I’ve also searched for the best way to enhance these reports in SCN and have come across many forum posts where a lot of people validated my old ways.

This is the correct (SAP Sponsored) way to do it, and it’s available from EHP4 onwards.

Many purchasing reports share the BADI ME_CHANGE_OUTTAB_CUS, which takes in dynamic parameters according to the calling report.


There is only one method called FILL_OUTTAB, which takes as input parameter the output structure name in IM_STRUCT_NAME, and the real data in CH_OUTTAB.

The first thing is to declare a field-symbol with the correct structure provided in IM_STRUCT_NAME, and create an IF that validates if the structure is the expected one (remember this BADI runs for various reports with various output structures).


This is the specific example for ME28. All that is left is:

  • Add the custom code inside the IF, which fills the customer fields in <fs_tabrel>;
  • Add the customer fields to the structure in SE11 (in this case MEREP_OUTTAB_PURCHDOC_REL for ME28). Use append structures.

Here is the simple, standard, and clean way to enhance your purchasing reports and at the same time centralize all enhancements in the same BADI.  Happy maintenance and upgrades.

You must be Logged on to comment or reply to a post.
  • Hi,

       We used to refer the BAdI: ME_CHANGE_OUTTAB_CUS to technical team to add new fields to ME2* reports. But never checked how they coded / developed the field. Your document gives that idea too.

       Nice document and thanks for sharing.



  • Hi Joao,

    this is very helpful information.

    I had done similar thing like you 2 days ago adding Gross Value (EKPO-BRTWR) to one of the Appends of the Structure MEREP_OUTTAB_PURCHDOC.

    The new Field is visible in report Transactions: ME2L/ *M / *N if 'ALV' Scope of List is chosen in the selection screen of a report. It needs to be moved from  Column Set to Displayed Columns and saved as a specific User Layout.

    As Gross Value is an existing Field on SAP standard Table EKPO, no code needs to be done in the related BAdI.