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.
cancel
Showing results for 
Search instead for 
Did you mean: 

Add new columns to ALV report ME2J

Former Member
0 Kudos

Hi experts,

I need to add 5 columns to standard ALV report ME2J. This report is based on structure MEREP_OUTTAB_ACCOUNTING, so i use an append structure to add new fields to this ALV report. But my probleme is where/how can I put data into these fields? Because I can't find an user-exit or a Badi.

Please help...

Thanks.

5 REPLIES 5

Former Member
0 Kudos

Hi Wenjing Yu,

One option what you can use is after appending the necessary fields using append structure to the structure MEREP_OUTTAB_ACCOUNTING open the report in SE38 and change it using access key and then retrieve the data for these custom fields by writing your own logic.

If at all you don't want to use the access key and modify the standard SAP report, you can also try copying the standard report into a custom report and then have your own logic to pull the data for your custom fields.

You can also try using the Enhancement CNEX0010 using CMOD.

Hope this helps you out. Reward accordingly.

Thanks and Regards,

Maddineni Bharath.

0 Kudos

Maddineni Bharath,

Thanks for your reply.

Actually I have no access key to modify standard programs. Transaction ME2J is run by program RM06EKPS, but the ALV table is constructed in function module MEREP->method build_acc_list, so I'm afraid that a copy of report RM06EKPS will not work.

I tried to put a break-point in EXIT_FDBPS000_001 of the enhancement CNEX0010, but when I run ME2J it doesn't stop.

Any other suggestions?

Best regards,

Wenjing

Former Member
0 Kudos

Hi Experts,

I have the same problem. I want to add new fields in standard alv for me2j but I don't know how to do it?

Can anyone help me?.

Thanks.

0 Kudos

Hi Jack Fisher,

It's a long time , since this thread was posted.  I also had a same requirement of adding new column in ME2J output. After searching on SDN I came across your thread , which is still unanswered.

After trying by try and error method, I got the solution,

1. Run the T-code ME2J. At output display place a cursor on any column. press F1. Copy Structure name(MEREP_OUTTAB_ACCOUNTING).

2. Go to SE11.  Paste structure name MEREP_OUTTAB_ACCOUNTING in Data type. Press display button. Append structure by desired fields. Press Where-Used-List (Ctrl+Shift+F1).

3. In 'Where-Used in list' structure tick Programs and execute. Copy Program name : LMEREPI02.

4. Goto SE38, give program name LMEREPI02. press Display.

5. Press Enhance (Shift+F4).

6. Goto Edit-Enhancement Operations-Show Implicit Enhancement Options.

7. Search for 'METHOD build_acc_list'. Before the ENDMETHOD right click on the line ""*"" goto the end at Enhancement Implimentations - Create. Select option Code.

8. Create Enahancement implimentation give package and short text.

9. Enhancement spot is created in a include program LMEREPI02. Write the desired code here by using values from 'ls_outtab_accounting'.

10. Modify the required new values got from code to 'ex_outtab_acc'.

11. You will get the new values at output of ME2J by selecting the Column names from Change Layout tab.

Hope this helps you out. Reward accordingly.

0 Kudos

Step 3 gives two programs in which the structure is used. How do you decide which one we need to work with?