Application Development and Automation 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: 
Read only

Adding fields in CO27 report

Former Member
0 Likes
2,055

I'm having trouble to add in additional fields in the report of CO27.

I've tried to search for any available exits/badi/bapi, but the result seems negative.

Then I tried to copy the standard program to Z program and tried to enhance it, but the standard program seems to be too complex to be understand.

I'm asking help for any suggestion on doing this. Is there any available exits/badi/bapi for adding the additional fields.

If none, are there other alternative in doing so other than copying & enhancing the standard program?

If copying & enhancing is the only way, where should I modify the code?

These are the 3 fields I need to add in:

AFKO-PLNBEZ, AFKO-GAMNG, MARA-BISMT

11 REPLIES 11
Read only

alex_cook
Active Participant
0 Likes
1,661

Howdy,

What version of SAP are you on? This program has a number of enhancement points, or if none of them suit you could use an implicit enhancement.

Cheers

Alex

Read only

Former Member
0 Likes
1,661

Alex,

How can I know where is the enhancement point? Is there anyway or methods for me to find it?

My version of SAP is ECC 6.0

Read only

Former Member
0 Likes
1,661

Hi,

Did you try the KOMM transaction ?

Best regards,

Prabhu

Read only

Former Member
0 Likes
1,661

Copy standard sap program to z-program.

include : PPIOZFSP

line no : 610

output table : aus_s000

add which field u want in this intrnal table.

before output Loop this internal table and modify it according to your requirement.

<removed by moderator>

Edited by: Thomas Zloch on Jan 7, 2011 11:09 AM - please don't ask for "appreciation"

Read only

Former Member
0 Likes
1,661

Hi Prabhu,

How to use KOMM?

Using this TCode we should be able to customize our picking list by having additional fields which is not in the original standard program right?

But can you gimme step by step procedure in creating it? Thanks a lot.

Read only

Former Member
0 Likes
1,661

Hi,

There are standard set of fields which can be added to the picking list..

In KOMM tcode, you can select the picking list and go to field selection .

In the field selection you can add the necessary fields which are already in the list.

Best regards,

Prabhu

Read only

Former Member
0 Likes
1,661

Hi Prabhu,

I have checked and the fields that needed is not in the list.

Thanks anyway.

Is there any other way to add in additional fields which is not in the list?

Read only

Former Member
0 Likes
1,661

Hi Amit,

Thanks for your info.

I'm not sure with what you mean by "before output Loop this internal table and modify it according to your requirement."

Where can this output that you mention be found? Modify as in what?

Thanks & sorry I'm bit lost, as this is my 1st time modifing a standard program.

Thanks, Jeff

Read only

Former Member
0 Likes
1,661

Hi,

Try tcode KOMM. Using this you can add additional fields.

Best regards,

Prabhu

Read only

Former Member
0 Likes
1,661

Hi ,

To find Badi use the following steps for that transaction.

These steps should enable you to find any BADI related to any transaction in a matter of minutes.

1) Go to the transaction SE37 to find your function module.

2) Locate the function SXV_GET_CLIF_BY_NAME.

3) Put a breakpoint there.

4) Now open a new session.

5) Go to your transaction.

6) At that time, it will stop this function.

7) Double click on the function field EXIT_NAME.

😎 That will give you name of the BADI that is provided in your transaction.

Regards,

Prasad

Read only

Former Member
0 Likes
1,661

Hi ,

To find User exit for your required transaction, Just run below program and enter Your transaction as an input to the below program. it will display list of user exits.

&----


*& Report Z_FINDUSEREXIT

*&

&----


*&

*&

&----


REPORT z_finduserexit.

TABLES : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.

TABLES : tstct. DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.

DATA : field1(30).

DATA : v_devclass LIKE tadir-devclass.

PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.

SELECT SINGLE *

FROM tstc WHERE tcode EQ p_tcode.

IF sy-subrc EQ 0. SELECT SINGLE * FROM tadir WHERE pgmid = 'R3TR'

AND object = 'PROG' AND obj_name = tstc-pgmna.

MOVE : tadir-devclass TO v_devclass.

IF sy-subrc NE 0.

SELECT SINGLE * FROM trdir WHERE name = tstc-pgmna.

IF trdir-subc EQ 'F'.

SELECT SINGLE * FROM tfdir WHERE pname = tstc-pgmna.

SELECT SINGLE * FROM enlfdir WHERE funcname = tfdir-funcname.

SELECT SINGLE * FROM tadir WHERE pgmid = 'R3TR' AND object = 'FUGR' AND obj_name EQ enlfdir-area.

MOVE :

tadir-devclass TO v_devclass. .

ENDIF.

ENDIF.

SELECT * FROM tadir INTO TABLE jtab

WHERE pgmid = 'R3TR' AND object = 'SMOD' AND devclass = v_devclass.

SELECT SINGLE * FROM tstct WHERE sprsl EQ sy-langu AND tcode EQ p_tcode.

FORMAT COLOR COL_POSITIVE

INTENSIFIED OFF.

WRITE:/(19) 'Transaction Code - ', 20(20) p_tcode, 45(50) tstct-ttext.

SKIP.

IF NOT jtab[] IS INITIAL. WRITE:/(95) sy-uline.

FORMAT COLOR COL_HEADING INTENSIFIED ON.

WRITE:/1 sy-vline, 2 'Exit Name', 21 sy-vline , 22 'Description', 95

sy-vline.

WRITE:/(95) sy-uline.

LOOP AT jtab.

SELECT SINGLE * FROM modsapt

WHERE sprsl = sy-langu AND name = jtab-obj_name.

FORMAT COLOR COL_NORMAL INTENSIFIED OFF.

WRITE:/1 sy-vline,

2 jtab-obj_name

HOTSPOT ON,

21 sy-vline ,

22 modsapt-modtext,

95 sy-vline.

ENDLOOP.

WRITE:/(95) sy-uline.

DESCRIBE TABLE jtab.

SKIP.

FORMAT COLOR COL_TOTAL INTENSIFIED ON.

WRITE:/ 'No of Exits:' , sy-tfill.

ELSE.

FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.

WRITE:/(95) 'No User Exit exists'.

ENDIF. ELSE.

FORMAT COLOR

COL_NEGATIVE INTENSIFIED ON.

WRITE:/(95) 'Transaction Code Does Not Exist'.

ENDIF.

AT LINE-SELECTION.

GET CURSOR FIELD field1.

CHECK field1(4) EQ 'JTAB'.

SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).

CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.