Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

Adding custom columns in mb51 report output

0 Kudos

hello all,

I need to add to custom columns in mb51 output as vendor name and unit rate

so in the standard code there a table itab where whole output data is fetched

I added two columns to this irab and written code to get data into these two fields and data was also fetchd

But these to fields are not getting displayed in the output.

so where else i have to add to bring it in output

and also in general can anyone tell how to deal when one asks to add few fields

because i mmy client there are all such requirements like add custom columns in me2s etc

Please help

Thanks in advance



Active Contributor
0 Kudos


There is a sap not which is explained in detail how to add and get the fields in report.



0 Kudos

Hi Ujwal,

u  are able to fetch the data  right, i thin k u have not mentioned in filed catalogue .

please check in ur report  FORM build_fieldcatalog.  in 2050 line, mention two fields in fileld cat

i t will display in out put

Former Member
0 Kudos


You dont need to modify the report for this.

Go to view V_MMIM_REP_CUST and add your fields there.

All the field in the view comes up in the layout for ALV.



0 Kudos

hi shambu,

it worked for me

i have added the field vendor name in the view and it got added in the code and came in the output

But now i m tring to add anther field zunitr( for unit rate) i added it in the view

but for this field it didnot get added in the code.

Can u please say whats the problem



0 Kudos

hi raymond,

And another question, how to find the view name i.e if we add in this view the data will be displayed in output

is this view generic for all reports of for this particular report as the program names entries in this view are all with this program only.

if it varies please tell me how to find such things for a particular report


Active Contributor
0 Kudos

If I remember good (also check yourself for delta with last EHP of ECC6)

If you want to add a field of MSEG/MKPF -> call SPRO or SM30 on view  V_MMIM_REP_CUST (will update the first internal table ITAB selected from MSEG or MKPF)

For other fields you will require  Enhancement Spot ES_RM07DOCS to add and fill fields to internal table LINE which is displayed

- Use implicit enhancement in LINE structure (look for ENHANCEMENT 1  MGV_LAMA_RM07DOCS)

- RM07DOCS_07 Add fields to ALV (Like::   perform bu_fc using 'LIST' 'EKKN_ZEKKN' 'EKKN' 'ZEKKN' c_no_out.)

- RM07DOCS_02 include TOP (For you own data; for you an ita  with vendor/name)

- RM07DOCS_04 Initialization (Initial loading of a text table or such data)

- RM07DOCS_06 Update your own fields in LINE during LOOP AT ITAB



0 Kudos

Hello there

Check out Note 357187 - MB51: Fields in field catalog / selection screen.

Hope it helps.

0 Kudos

hii ,,

please go through saptechnical documents. they have mentioned how to add custom fields to report output. i think they have done it for CSIF tcode. you can follow the procedures.. it will help you..