cancel
Showing results for 
Search instead for 
Did you mean: 

Adjusting RMVKON00

Former Member
0 Kudos

Hi.

I don't know if it's suitable to post this question here, but I might as well give it a try.

I need to add the <b>vendor name</b> and the <b>material description</b> to the ALV in program <b>RMVKON00</b>.

I've been trying to figure out how the program works, but I haven't been able to figure out everything.

Can someone please aid me in this quest. (I've been reading code for a couple days now)

It would be much appreciated.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Tim,

When you run the report and produce some output, there will be an icon for 'change layout'. It is a series of 3 x 3 multi coloured squares two places right of the 'mail send' icon.

Click on this and a pop-up will appear with columns and column set. The left hand column will list any fields you can add. Are the fields you want listed ?

If so, highlight them and click on the arrow to move to the column set on the right hand side.

Then click on <Save> to save your new layout.

It can then be set to the default setting so the report will always show these fields.

Hope this helps.

Cheers

Colin.

Former Member
0 Kudos

I knew about this feature, but I need to know how to get Vendor Name and Material Description in those fields which you can choose for displaying.

Maybe I didn't ask my question correctly, I'll try again.

So in that pop-up, you can choose fields you want to be displayed. But Vendor Name and Material Description aren't among the selectable fields.

How do I get these fields in that pop-up selection thingie?

If you view the code, there are a couple of FORM calls that have something to do with it.

First there's <b>rkwa_partitionieren</b>, I don't exactly know what it does, but it seems to be slicing the rkwa-table - which is filled earlier in the program - into blocks.

Then there's <b>alv_list_prepare</b>, with arguments pti_block (a structure with some fields and the earlier filled rkwa-table), and ptx_alv_list (which I think contains the fields which you can select in the popup).

After alv_list_prepare, there's <b>alv_list</b>, and this calls the REUSE_ALV_GRID_DISPLAY function.

Thanks for your help anyway Colin.

Former Member
0 Kudos

Hi,

Are you familiar with ALV? And actually on which step you are now?

There is the following call of the function module in report RMVKON00:

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_buffer_active = space

i_callback_program = c_repid

i_callback_pf_status_set = c_pf_status_set

i_callback_user_command = c_user_command

i_structure_name = 'T_ALV_LIST'

it_fieldcat = tab_fieldcat[]

it_sort = tab_sort[]

is_layout = s_layout

i_save = c_save

is_variant = s_variant

it_events = tab_events[]

tables

t_outtab = t_alv_list.

t_alv_list – is the table with all data you see on the ALV screen.

tab_fieldcat – basically saying this is the table with description how this table will be displayed.

So if you want to add additional columns generally you to do 2 things:

1. Redefine type of this variable t_alv_list (add

columns which represent material description and vendor name).

2. Fill this fields before calling the ALV.

3. Change the field catalog tab_fieldcat[]. You just have somehow to add the “description” of this two columns you want to display.

That’s all!

You can also have a look on example of Full screen ALV:

BCALV_TEST_FULLSCREEN*

Former Member
0 Kudos

Hi Tim,

I thought you would have done but had to make sure. You never know in this forum.

Anyway, there is a function REUSE_ALV_FIELDCATALOG_MERGE called in this program.

You will see two of the parameters :

i_internal_tabname = 'RKWA'

i_structure_name = 'CONALV'

This function uses the data held on table RKWA to set the ALV fields on CONALV (this is viewable in SE11)

You will need to copy CONALV to a custom structure and add the two fields you want (Vendor Name and Material Description)

Create an internal table in the program something like LISTTAB with a structure of RKWA plus the 2 fields you want as these are not available on RKWA.

Just before function REUSE_ALV_FIELDCATALOG_MERGE copy the contents found on the RKWA internal table to your new table LISTTAB. Then populate your two new fields and call the function REUSE_ALV_FIELDCATALOG_MERGE with your 2 new structure

ie. i_internal_tabname = 'LISTAB'

i_structure_name = 'YF100' ( This is the name of the structure you created when copying CONALV)

Obviously you cannot do this in the SAP standard program but just take a copy and off you go with your extra bits.

It sounds complicated but when you have done it once you will be laughing at its simplicity.

Hope this explanation makes sense.

Cheers

Colin.

Former Member
0 Kudos

Won't that fail because the data he is after is not currently on the structure used to build the ALV list ? This is in answer to Mikhail's post !

Message was edited by: Colin Bickell

Former Member
0 Kudos

Great answer Colin.

I also had the same idea, but I didn't know exactly how, or rather where, to implement it.

Your help is greatly appreciated.

Former Member
0 Kudos

Glad to help

Former Member
0 Kudos

For completeness' sake, here's the coding I did to get it to work:

In alv_list FORM, just before field_catalog FORM is called, I looped t_alv_list and moved all corresponding fields to the new internal table. In the same loop I added the corresponding Vendor name and Material Description.

Then in the REUSE_ALV_FIELDCATALOG_MERGE I replaced the argument 'RKWA' with 'ITAB' (name of my new internal table)

If you stop at this point, you will get the Vendor Name and Material Description in the ALV, but without values.

So here's what I did next:

In REUSE_ALV_GRID_DISPLAY I replaced t_alv_list with itab, so the values would change as well.

And it's working.

Hoo-rah.