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

Understanding Enhancement & Modifications

Former Member
0 Likes
639

Dear experts,

SAP has introduced Enhancement & Modification framework so i tried an example



REPORT  ZADIENHANCEMENT.

types:begin of ty_struct,
      name(25) type c,
      address(45) type c,
      zip(25) type c,
      end of ty_struct.

data: t_struct type standard table of ty_struct.
data: wa_struct like line of t_struct.

wa_struct-name = 'ADITYA'.
wa_struct-address = '98/12,Pragati Vihar,Vijaypur,Dehradun'.
wa_struct-zip = '248001'.

append wa_struct to t_struct.

wa_struct-name = 'AJAY'.
wa_struct-address = '98/12,Pragati Vihar,Vijaypur,Dehradun'.
wa_struct-zip = '248001'.

append wa_struct to t_struct.



ENHANCEMENT-SECTION     SEC_PRINTING SPOTS ZES_MY_SPOT.

* Writing it to screen simple
loop at t_struct into wa_struct.
write:/5 wa_struct-name,
      30 wa_struct-address,
      95 wa_struct-zip.
endloop.

END-ENHANCEMENT-SECTION.

I want that i must give an enhancement point to let say another developer enhance the way ,this chunk of data is been printed at present.What should be my strategy.When i clicked on ENHANCEMENT-SECTION,right clicked created Enhancement Implementation.I got the same code as copied as active version.I changed it as per my convenience.

revised code is below.


*&---------------------------------------------------------------------*
*& Report  ZADIENHANCEMENT
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
*Objective :  Utilize Enhancement Framework. We want to give an enhancement
*;              provision that someone should be able to improve the printing
*              of this report


REPORT  ZADIENHANCEMENT.

types:begin of ty_struct,
      name(25) type c,
      address(45) type c,
      zip(25) type c,
      end of ty_struct.

data: t_struct type standard table of ty_struct.
data: wa_struct like line of t_struct.

wa_struct-name = 'ADITYA'.
wa_struct-address = '98/12,Pragati Vihar,Haridwar road,Dehradun'.
wa_struct-zip = '248001'.

append wa_struct to t_struct.

wa_struct-name = 'AJAY'.
wa_struct-address = '98/12,Pragati Vihar,Haridwar road,Dehradun'.
wa_struct-zip = '248001'.

append wa_struct to t_struct.



ENHANCEMENT-SECTION     SEC_PRINTING SPOTS ZES_MY_SPOT.

* Writing it to screen simple
loop at t_struct into wa_struct.
write:/5 wa_struct-name,
      30 wa_struct-address,
      95 wa_struct-zip.
endloop.

END-ENHANCEMENT-SECTION.
*$*$-Start: SEC_PRINTING------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZSEC_IMPROVED_PRINT.    "active version

* Writing it to screen simple
write:/5 'New Implementation'.

loop at t_struct into wa_struct.
write:/5 wa_struct-name,
      30 wa_struct-address,
      95 wa_struct-zip.
endloop.

ENDENHANCEMENT.
*$*$-End:   SEC_PRINTING------------------------------------------------------------------------$*$*

What i achieved till here ?.I do not know.

What does ENHANCEMENT-POINT do ??. I didn't used till here

What i got is that if i post this forum twice.It is the same concept as Enhancement here ?

Not joking, how it actually plays part in standard development scenario?

Edited by: aditya sharma on Jul 9, 2010 1:48 PM

Edited by: aditya sharma on Jul 9, 2010 1:49 PM

Edited by: aditya sharma on Jul 9, 2010 1:50 PM

Dear experts,

SAP has introduced Enhancement & Modification framework so i tried an example



REPORT  ZADIENHANCEMENT.

types:begin of ty_struct,
      name(25) type c,
      address(45) type c,
      zip(25) type c,
      end of ty_struct.

data: t_struct type standard table of ty_struct.
data: wa_struct like line of t_struct.

wa_struct-name = 'ADITYA'.
wa_struct-address = '98/12,Pragati Vihar,Vijaypur,Dehradun'.
wa_struct-zip = '248001'.

append wa_struct to t_struct.

wa_struct-name = 'AJAY'.
wa_struct-address = '98/12,Pragati Vihar,Vijaypur,Dehradun'.
wa_struct-zip = '248001'.

append wa_struct to t_struct.



ENHANCEMENT-SECTION     SEC_PRINTING SPOTS ZES_MY_SPOT.

* Writing it to screen simple
loop at t_struct into wa_struct.
write:/5 wa_struct-name,
      30 wa_struct-address,
      95 wa_struct-zip.
endloop.

END-ENHANCEMENT-SECTION.

I want that i must give an enhancement point to let say another developer enhance the way ,this chunk of data is been printed at present.What should be my strategy.When i clicked on ENHANCEMENT-SECTION,right clicked created Enhancement Implementation.I got the same code as copied as active version.I changed it as per my convenience.

revised code is below.


*&---------------------------------------------------------------------*
*& Report  ZADIENHANCEMENT
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
*Objective :  Utilize Enhancement Framework. We want to give an enhancement
*;              provision that someone should be able to improve the printing
*              of this report


REPORT  ZADIENHANCEMENT.

types:begin of ty_struct,
      name(25) type c,
      address(45) type c,
      zip(25) type c,
      end of ty_struct.

data: t_struct type standard table of ty_struct.
data: wa_struct like line of t_struct.

wa_struct-name = 'ADITYA'.
wa_struct-address = '98/12,Pragati Vihar,Haridwar road,Dehradun'.
wa_struct-zip = '248001'.

append wa_struct to t_struct.

wa_struct-name = 'AJAY'.
wa_struct-address = '98/12,Pragati Vihar,Haridwar road,Dehradun'.
wa_struct-zip = '248001'.

append wa_struct to t_struct.



ENHANCEMENT-SECTION     SEC_PRINTING SPOTS ZES_MY_SPOT.

* Writing it to screen simple
loop at t_struct into wa_struct.
write:/5 wa_struct-name,
      30 wa_struct-address,
      95 wa_struct-zip.
endloop.

END-ENHANCEMENT-SECTION.
*$*$-Start: SEC_PRINTING------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZSEC_IMPROVED_PRINT.    "active version

* Writing it to screen simple
write:/5 'New Implementation'.

loop at t_struct into wa_struct.
write:/5 wa_struct-name,
      30 wa_struct-address,
      95 wa_struct-zip.
endloop.

ENDENHANCEMENT.
*$*$-End:   SEC_PRINTING------------------------------------------------------------------------$*$*

What i achieved till here ?.I do not know.

What does ENHANCEMENT-POINT do ??. I didn't used till here

What i got is that if i post this forum twice.It is the same concept as Enhancement here ?

Not joking, how it actually plays part in standard development scenario?

Edited by: aditya sharma on Jul 9, 2010 1:48 PM

Edited by: aditya sharma on Jul 9, 2010 1:49 PM

Edited by: aditya sharma on Jul 9, 2010 1:50 PM

4 REPLIES 4
Read only

Former Member
0 Likes
589

Hi,

Couldn't get what you are trying to ask.

You can refer the below link for learning enhacement framework.

http://help.sap.com/saphelp_nw70/helpdata/en/91/f1e540f8648431e10000000a1550b0/frameset.htm

Read only

0 Likes
589

???

Edited by: aditya sharma on Jul 9, 2010 2:24 PM

Read only

0 Likes
589

Because only sap gets it.They blocked my forum showing it double posted in Abap general

Read only

0 Likes
589

It is me who is locking your duplicate posts. One thread per question is enough.

I will leave this one open to see if there will be an interesting discussion, the basics you can find in SAP documentation, one link was already given.

Thomas