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 in Subroutine

Former Member
0 Kudos

Hi,

I am working on a subroutine created through VOFM long back and is assigned for billing . As per requirement I was requird to do changes in the subroutine which I did using source code enhancement at the enhancement spot which solved my problem.

Which I could have also done by using access key also.

So I have a confusion and I want to know which is the beter approach doing changes by using access key or creating enhancement at the enhancement spot.

Thanks & Regards.

Shweta.

1 ACCEPTED SOLUTION

former_member659396
Participant
0 Kudos

Hi,

For your reference, let's see how to enhance a standard SAP program using an Implicit Enhancement

Option.

Let us use program RSFTP002 u2013 Itu2019s a program used to test FTP connections.

In this example, we will unmask the currently masked password field.

Open the program in the ABAP Editor (SE38).

Execute it to bring up the parameter list.

Note the asterisks in the Password field.

To view the places where we can implement these enhancements, go back to the previous page (the one

containing the code) and click on the Enhance button (before the Syntax Check button) or press Shift + F4.

Note: Enhancement options are only present in SAP WAS 7.0 and above.

Then Navigate to Edit -> Enhancement Operations -> Show Implicit Enhancement Options.

You will be shown the places where Implicit Enhancement Options are present,

There will be two such spots in this particular program u2013 One at the end of the result table definition and the other at the end of the program.

To implement an enhancement option, right click in the orange area -> Enhancement Implementation -> Create.

Choose an enhancement name (ZFTP_PWD in this case), give it a description and if needed a Composite Enhancement Implementation name and press enter.

Save it as a local object or in a package (as the case might be).

In this example, we shall change the visibility of the password field and show the password. This is done by looping at the screen and changing the invisible parameter of the PWD field to u20180u2019.

Once the Enhancement Implementation is created, the following code is inserted into the program,

$$-Start: (2)----


ENHANCEMENT 1 ZFTP_PWD.

*

ENDENHANCEMENT.

$$-End: (2)----


ZFTP_PWD is the name of the implementation that we gave.

1 indicates that this is the first implementation in this program.

We can put out code inside the ENHANCEMENTu2026ENDENHANCEMENT block as shown below.

Follow the usual procedure of Syntax Check, Save and Activate.

Now execute the program again to see the parameter list.

Note that anything typed in the Password field is now visible.

Hope this surely help u..

5 REPLIES 5

Former Member
0 Kudos

hai shwetha,

as u have changed using enhancement points then it is fien and sap has provided the enhancement poitns for enhancign without using access key , so if u use access key then sap may not suport the code , where as doign with enhancment it will as it is standard procedure like user exits and badis

m.a

former_member589029
Active Contributor
0 Kudos

As M.A mentioned the main difference is in the support of the code. If you use an access key this is a modification. This means you are changing original code and any Note or Support Pack released by SAP for this form routine will overwrite all your changes and you will have to apply them again each time.

Using an enhancement spot however is not a modification but an enhancement and therefore supported by SAP meaning any code you have written in that enhancement spot will NOT be overwritten by Notes or Support Packs. It is basically a predefined place in the code where you can hook in.

You should always try to use an enhancement spot, BADI or user exit before thinking about modifiying standard SAP code.

Hope that explains it,

Michael

Peranandam
Contributor
0 Kudos

shweta,

dont modify the standard programs by getting access key, because it will be become core modification of standard programs. Then you have to face lot of issue during upgrade phase to accomodate custom code with standard programs.

in your case you can uitlize enhancement point for plugging your own code if you have it. or else you can enhace by using implecit enhancement option at beginning and end of subroutine.

Regards,

Peranandam

former_member659396
Participant
0 Kudos

Hi,

For your reference, let's see how to enhance a standard SAP program using an Implicit Enhancement

Option.

Let us use program RSFTP002 u2013 Itu2019s a program used to test FTP connections.

In this example, we will unmask the currently masked password field.

Open the program in the ABAP Editor (SE38).

Execute it to bring up the parameter list.

Note the asterisks in the Password field.

To view the places where we can implement these enhancements, go back to the previous page (the one

containing the code) and click on the Enhance button (before the Syntax Check button) or press Shift + F4.

Note: Enhancement options are only present in SAP WAS 7.0 and above.

Then Navigate to Edit -> Enhancement Operations -> Show Implicit Enhancement Options.

You will be shown the places where Implicit Enhancement Options are present,

There will be two such spots in this particular program u2013 One at the end of the result table definition and the other at the end of the program.

To implement an enhancement option, right click in the orange area -> Enhancement Implementation -> Create.

Choose an enhancement name (ZFTP_PWD in this case), give it a description and if needed a Composite Enhancement Implementation name and press enter.

Save it as a local object or in a package (as the case might be).

In this example, we shall change the visibility of the password field and show the password. This is done by looping at the screen and changing the invisible parameter of the PWD field to u20180u2019.

Once the Enhancement Implementation is created, the following code is inserted into the program,

$$-Start: (2)----


ENHANCEMENT 1 ZFTP_PWD.

*

ENDENHANCEMENT.

$$-End: (2)----


ZFTP_PWD is the name of the implementation that we gave.

1 indicates that this is the first implementation in this program.

We can put out code inside the ENHANCEMENTu2026ENDENHANCEMENT block as shown below.

Follow the usual procedure of Syntax Check, Save and Activate.

Now execute the program again to see the parameter list.

Note that anything typed in the Password field is now visible.

Hope this surely help u..

former_member659396
Participant
0 Kudos

Hi,

For your reference, let's see how to enhance a standard SAP program using an Implicit Enhancement

Option.

Let us use program RSFTP002 u2013 Itu2019s a program used to test FTP connections.

In this example, we will unmask the currently masked password field.

Open the program in the ABAP Editor (SE38).

Execute it to bring up the parameter list.

Note the asterisks in the Password field.

To view the places where we can implement these enhancements, go back to the previous page (the one

containing the code) and click on the Enhance button (before the Syntax Check button) or press Shift + F4.

Note: Enhancement options are only present in SAP WAS 7.0 and above.

Then Navigate to Edit -> Enhancement Operations -> Show Implicit Enhancement Options.

You will be shown the places where Implicit Enhancement Options are present,

There will be two such spots in this particular program u2013 One at the end of the result table definition and the other at the end of the program.

To implement an enhancement option, right click in the orange area -> Enhancement Implementation -> Create.

Choose an enhancement name (ZFTP_PWD in this case), give it a description and if needed a Composite Enhancement Implementation name and press enter.

Save it as a local object or in a package (as the case might be).

In this example, we shall change the visibility of the password field and show the password. This is done by looping at the screen and changing the invisible parameter of the PWD field to u20180u2019.

Once the Enhancement Implementation is created, the following code is inserted into the program,

$$-Start: (2)----


ENHANCEMENT 1 ZFTP_PWD.

*

ENDENHANCEMENT.

$$-End: (2)----


ZFTP_PWD is the name of the implementation that we gave.

1 indicates that this is the first implementation in this program.

We can put out code inside the ENHANCEMENTu2026ENDENHANCEMENT block as shown below.

Follow the usual procedure of Syntax Check, Save and Activate.

Now execute the program again to see the parameter list.

Note that anything typed in the Password field is now visible.

Hope this surely help u..