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: 

Enhancement Spot

Former Member
0 Kudos
220

Hello All,

When i give program name how many enhancement spots are implemented.

I have to know how many enhancement spots are implemented in the program name. Can anybody tell me the solution for this.

Thanks,

Karan

5 REPLIES 5

Former Member
0 Kudos
78

hai Reddy,

I am Genaralising This For U.

It Is ver EASY Procees.

Just Go To SE84

Give The Program Name Or Package name In Which ME41 is present.

Then Click On Display.

Then Click On Enhancements.

Then U will Get USer Exits Aswell As BADI 's

IF Found helpful Reward.

Regards

Eshwar

vinod_vemuru2
Active Contributor
0 Kudos
78

Hi Indrakaran,

Just copy paste below code and execute this report. Give either transaction code or program name. It will give a list of enhancements and BADIs available. U can go to each enhancement and check whether it is implemented or not.

REPORT zuserexitbadi.

TABLES: tstc,

tadir,

modsapt,

modact,

trdir,

tfdir,

enlfdir,

sxs_attrt,

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,

p_pgmna LIKE tstc-pgmna .

DATA wa_tadir TYPE tadir.

START-OF-SELECTION.

IF NOT p_tcode IS INITIAL.

SELECT SINGLE * FROM tstc WHERE tcode EQ p_tcode.

ELSEIF NOT p_pgmna IS INITIAL.

tstc-pgmna = p_pgmna.

ENDIF.

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 IN ('SMOD', 'SXSD')

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:/(105) sy-uline.

FORMAT COLOR COL_HEADING INTENSIFIED ON.

  • Sorting the internal Table

SORT jtab BY object.

DATA : wf_txt(60) TYPE c,

wf_smod TYPE i ,

wf_badi TYPE i ,

wf_object2(30) TYPE c.

CLEAR : wf_smod, wf_badi , wf_object2.

  • Get the total SMOD.

LOOP AT jtab INTO wa_tadir.

AT FIRST.

FORMAT COLOR COL_HEADING INTENSIFIED ON.

WRITE:/1 sy-vline,

2 'Enhancement/ Business Add-in',

41 sy-vline ,

42 'Description',

105 sy-vline.

WRITE:/(105) sy-uline.

ENDAT.

CLEAR wf_txt.

AT NEW object.

IF wa_tadir-object = 'SMOD'.

wf_object2 = 'Enhancement' .

ELSEIF wa_tadir-object = 'SXSD'.

wf_object2 = ' Business Add-in'.

ENDIF.

FORMAT COLOR COL_GROUP INTENSIFIED ON.

WRITE:/1 sy-vline,

2 wf_object2,

105 sy-vline.

ENDAT.

CASE wa_tadir-object.

WHEN 'SMOD'.

wf_smod = wf_smod + 1.

SELECT SINGLE modtext INTO wf_txt

FROM modsapt

WHERE sprsl = sy-langu

AND name = wa_tadir-obj_name.

FORMAT COLOR COL_NORMAL INTENSIFIED OFF.

WHEN 'SXSD'.

  • For BADis

wf_badi = wf_badi + 1 .

SELECT SINGLE text INTO wf_txt

FROM sxs_attrt

WHERE sprsl = sy-langu

AND exit_name = wa_tadir-obj_name.

FORMAT COLOR COL_NORMAL INTENSIFIED ON.

ENDCASE.

WRITE:/1 sy-vline,

2 wa_tadir-obj_name HOTSPOT ON,

41 sy-vline ,

42 wf_txt,

105 sy-vline.

AT END OF object.

WRITE : /(105) sy-uline.

ENDAT.

ENDLOOP.

WRITE:/(105) sy-uline.

SKIP.

FORMAT COLOR COL_TOTAL INTENSIFIED ON.

WRITE:/ 'No.of Exits:' , wf_smod.

WRITE:/ 'No.of BADis:' , wf_badi.

ELSE.

FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.

WRITE:/(105) 'No userexits or BADis exist'.

ENDIF.

Hope this will be helpfull.

Thanks,

Vinod.

0 Kudos
78

Gentlmen - I think Indrakaran needs Enhancement spots & not BADI or Exits.

Well, Indrakaran, you need to click on spiral icon button (shift+f4) and you will get colored lines in the source code of the program, This is what is needed by you.

Reward if found helpful.

Thanks

Dany

0 Kudos
78

Hello Dany,

You got my point. But can you tell me the spiral icon where it is located. Is the coloured lines for the program.

Can you explain me in deatil regarding this.

Thanks,

Karan

0 Kudos
78

Hi indrakaran reddy,

I am talking abut enhancement Framework. I suppose you are in ECC 6.0. Go to the underlying code in the status program. You would be in abap editor like screen and try to see an icon which seems like 'spiral (rings)' or press shoft + F4. You will see some highlighted orange colored lines.

xas include stmts.

If not you can search 'ENHANCEMENT-POINT' or 'ENHANCEMENT-SECTION 'string.

Let me know if you need more.

thanks

Dany