cancel
Showing results for 
Search instead for 
Did you mean: 

ksb1

Former Member
0 Kudos

Hi,

TC ksb1 is attached with report RKAEP000. Is there any easiest way to add Material Group column in this report output?

Thanks,

Pratibha.

Accepted Solutions (0)

Answers (3)

Answers (3)

venkat_o
Active Contributor
0 Kudos

Hi Pratibha,

I debugged the program RKAEP000(ksb1).I came to know the following points.

<b>1</b>.

You might be executing the T.code by giving Layout(Variant).So on the output ,Click on the Pushbutton <b>Change Layout</b>,You will get list of possible fileds ,if u find ur Material Group,just select move it to Left side and close that window and Click on <b>Save Layout</b> button Next to the Previous one.

<b>2</b>.

There is one User-exit to modify Fieldcatalog .

Find the user exit using this path .

In your program.

Function module : K_LINE_ITEMS_SELECT_AND_LIST

Line :874

Function module :K_LINE_ITEMS_SELECT_AND_LIST

Line :199

PERFORM list USING ls_disvariant_key

ls_layout.

Include :LKAEPFLI

Line :29

CALL CUSTOMER-FUNCTION '009'

EXPORTING

i_item_group = gd-item_group

i_rep_object = gd-rep_object

CHANGING

is_layout = vs_layout

it_fieldcat = gt_variant_fieldcat[]

i_save = ld_save

is_print = ls_print

Have a look at above user-exit.

It helps u .

<b>Thanks,

Venkat.O</b>

Former Member
0 Kudos

Thanks Venkat for your reply,

Please tell me how I can add Material Group in this user exit?

Please provide code sample if possible.

Thanks

Pratibha.

venkat_o
Active Contributor
0 Kudos

Hi Prathiba,

Follow the steps.

<b>1</b>.

Double click on the Function module

CALL CUSTOMER-FUNCTION '009'

EXPORTING

i_item_group = gd-item_group

i_rep_object = gd-rep_object

CHANGING

is_layout = vs_layout

it_fieldcat = gt_variant_fieldcat[]

i_save = ld_save

is_print = ls_print.

<b>2</b>.

Then u can see this include.

INCLUDE ZXKAEPU09 .Double click on this .U will get message with yellow color .Then Press ENTER.

<b>3</b> .

Add this piece of code .

TYPE-POOLS :slis.

DATA :w_field TYPE slis_fieldcat_alv.

w_field-fieldname = 'MATKL'.

w_field-tabname = 'GT_COVP_EXT'.

w_field-seltext_m = 'Mat.Group'.

APPEND w_field TO it_fieldcat.

CLEAR w_field.

<b>4</b>.

Activate include and come back Activate Function module .

<b>5</b>.

Run T.code KSB1 with one of the variant.

<b>6.</b>

On the output,Click CHANGE LAYOUT button then u will see ur Material Group field on the Left side list.

<b>7</b>.

Select that one and Transfer to Right side .

<b>8</b>.

Press ENTER then u will see on the output.

<b>Thanks,

Venkat.O</b>

Former Member
0 Kudos

Hi venkat,

I added the above code in include ZXKAEPU09.

Created breakpoint in FUNCTION EXIT_SAPLKAEP_009.

But code is not getting called.

So material group is not added in field list.

Thanks,

Pratibha

Former Member
0 Kudos

Activate the user-exit. 'COOMEP01'

go to CMOD transaction, Type COOMEP01 in the enhancement, press Test button, Press activate button correspoding to FM EXIT_SAPLKAEP_009

Former Member
0 Kudos

Vijay,

FM EXIT_SAPLKAEP_009 is active, but no results from the code above.

Thanks,

Pratibha

Former Member
0 Kudos

Activate the user-exit 'COOMEP01' for triggering the code u have written in FM

venkat_o
Active Contributor
0 Kudos

Hi Prathiba,

<b>1</b>.

GO to CMOD T.code.

<b>2</b>.

Create Project name YOMEP01.

<b>3</b>.

Give Text and click on Enhancements assignments

and Give COOMEP01 under Enhacements.and click on Components that .

<b>4</b>.

U will list of Function exits EXIT_SAPLKAEP_001 to 009.

Select EXIT_SAPLKAEP_009 function module Double click on that do whatever i told before .

<b>5</b>.

U come back to main screen(CMOD starting screen)and Activate the Proejct .

<b>Thanks

Venkat.O</b>

Former Member
0 Kudos

Hi Venkat,

I checked table 'GT_COVP_EXT' during runtime, it does not have field MATKL.

So program gives short dump.

Thanks,

Pratibha.

Former Member
0 Kudos

Hi,

Report inside is calling FM 'REUSE_ALV_FIELDCATALOG_MERGE'. if you put a breakpoint then u can see the structure name being passed is KAEP_COAC.

So the easiest method to add ur field would be to add that field into this structure so that u can avoid making any changes to the program.

i can see a append structure ZACI_AUFK, if you can use this then there is no need of access key and your addition of field is not going to effect the standard program in the future.

Former Member
0 Kudos

Thanks Sharath for your reply.

Where is append structure ZACI_AUFK? Shall I add field Material Group-MATKL in this structure?

Regards,

Pratibha.

Former Member
0 Kudos

HI

GOOD

TRY WITH THESE USER EXITS TO ADD THE FIELD.

COCCA001 Customer enhancement to cost center authorization checks

COCCA002 Customer Functions for Organizational Authorization Checks

COOMEP01 CO-OM: Information system -> line item reports

COOMKA01 Customer Fields for Cost Element Master Data

COOMKS01 Customer Fields for Cost Center Master Data

COOMKS02 Cost Center: Checks When Saving

COOMKS03 Cost Center: BAPI Enhancements

COOMLA01 Customer Fields for Activity Type Master Data

KMA10001 Customer Fields for Activity Type Master Data

THANKS

MRUTYUN