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

Can I create a enhancement implementation elements.

0 Likes
2,594

Hello,

I have a Subordinate Enhancement Spots called 'ES_SAPLCOKO_PS' and it have a include 'LCOKOO22' them in this include, it have a module 'screen_modify' and it have some ENHANCEMENT.

this lines>

into include 'lcokoo22':

ENHANCEMENT-POINT ehp_lcokoo22_01 SPOTS es_saplcoko_ps.

$$-Start: EHP_LCOKOO22_01----


$$

ENHANCEMENT 1 PS_ST_EHP3_SFWS_SC_LCOKOO22. "active version

My problem when I try to insert other 'enhancement-point' so the cursor goes after 'ENDMODULE' and

I can't get another new 'enhancement-point'.

Enhancement implementation Point/Section | Enhancement Implementation Type| Name of Modificacion Unit|Program Name

\PR:SAPLCOKO\EX:EHP_LCOKOO22_01 -> Dynamic Enhancement Point -> Screen_Modify ->LCOKOO22

Can I get a enhancement implementation elements in this 'PS_ST_EHP3_SFWS_SC_LCOKOO22_01'.

thank you very much for you help.

Regards

Gustavo

11 REPLIES 11
Read only

0 Likes
1,966

Hello,

I have tried to insert another enhanment point to include "LCOKOO22" but I could not because it has insert points,

ENDMODULE appear after "screen_modify OUTPUT" And you need within the lines of MODULE "screen_modify OUTPUT."

in include "LCOKOO22."

I saw another possibility in that I understand "Composite Enhancement Spot"

I can have "enhancement options: 1) Enhancement Source Code and 2) Badi Definition.

1) I could add another "Enhancement" within the lines of the MODULE "screen_modify OUTPUT"

I do not understand this and this is a problem.

2) I tried to see another option, option 2 and I've searched the package "PS_ST_EHP3_SFWS_SC" being

in se80, then deploy , the tab "extension points" and Place "Es_SAPLCOKO_PS" I give you click-right

and I get the following:

[Create Enhancement Spot]

Spot Enhancement:

Short Text:

Tecnology -> Badi_DEF Badi Definition

Enhacencement Composite Spot:

But I found two problems now:

1. No badi I can build a "Z", within the same enlargement Es_SAPLCOKO_PS "and within the same package

PS_ST_EHP3_SFWS_SC. "

2. I managed to create the badi "Z" within a package "Z", but I can invoke the badi within the same

"Composite Enhancement Spot", if within the include "LCOKOO22" I can not add other lines to

refer to a badi.

can I apply to other option?

Thank you very much.

Regard

Gustavo

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,966

It's difficult to understand you because you make confusions with the terms. So maybe that should be your first question

> ENHANCEMENT-POINT ehp_lcokoo22_01 SPOTS es_saplcoko_ps.

You may create your own implementation if the enhancement spot is not reserved to SAP, and in the limit of the maximum number of implementations (1 or any). If you can't, then you must either implement IMPLICIT enhancement options (only in routines, function modules, methods), or do a modification of the standard.

> ENHANCEMENT 1 PS_ST_EHP3_SFWS_SC_LCOKOO22.

SAP already created one implementation. Maybe the enhancement spot is limited to one implementation maximum.

> I saw another possibility in that I understand "Composite Enhancement Spot"

Forget it. It's just for organizing the enhancement spots.

> 1) I couldN'T add another "Enhancement" within the lines of the MODULE "screen_modify OUTPUT" I do not understand this and this is a problem.

See my answer about ENHANCEMENT-POINT ehp_lcokoo22_01 SPOTS es_saplcoko_ps

> 2) I tried to see another option, option 2 (BAdIs)

You don't have to worry of BAdIs: ENHANCEMENT-POINT don't refer to BAdIs at all.

An enhancement spot is a container for either only BAdIs, or only explicit source plug-ins (ENHANCEMENT-POINT or ENHANCEMENT-SECTION).

For more information about enhancement frameworkYou should read the blogs from Thomas Weiss about the enhancement and switch frameworks to understand how it works.

Read only

0 Likes
1,966

Thank you very much Sandra for your help.

I tried to add an IMPLICIT enhancemet within the include 'lcokoo22'.

This include 'lcokoo22' contains an Module and is called 'screen_modify OUTPUT'.

I open the source code of the object That I Want To Enhance, in Change Mode.

Place the cursor on the line where I want to create the enhancement point. Right-click in order to access

But the cursor does not stay inside the lines of the module.

the cursor goes outside the module and I need to create the enhancement inside.

In this module I can see this enhance :

ENHANCEMENT-POINT ehp_lcokoo22_01 SPOTS es_saplcoko_ps

ENHANCEMENT 1 PS_ST_EHP3_SFWS_SC_LCOKOO22

I agree with what you mention.

SAP already created one implementation. Maybe the enhancement spot is limited to one implementation maximum.

Finaly, So how I can add another Enhanced Implicit in this point or Maybe I can change the implementation limit

for enhancement spot?

Thank you very much Sandra for your help.

Regard

Gustavo

Read only

0 Likes
1,966

> This include 'lcokoo22' contains an Module and is called 'screen_modify OUTPUT'.

>

> I open the source code of the object That I Want To Enhance, in Change Mode.

You must click the spiral button to enter the enhancement mode

> Place the cursor on the line where I want to create the enhancement point. Right-click in order to access

> But the cursor does not stay inside the lines of the module.

> the cursor goes outside the module and I need to create the enhancement inside.

You cannot enhance where you want.

For embedding ABAP code directly inside other code, you can only do it at explicit or implicit enhancement options (called "hooks"):

- Explicit enhancement options are indicated by the ENHANCEMENT-POINT and ENHANCEMENT-SECTION statements (hooks)

- Implicit enhancement options are available only at a few places, you must click the Show implicit ... in the menu to display and implement them, detailed in [sap library - Implicit Enhancement Options in ABAP Source Codes|http://help.sap.com/saphelp_nw70/helpdata/en/29/e59441026aae5fe10000000a1550b0/frameset.htm]. You see that you cannot enhance modules

There are also kind of enhancements which are not of interest for you: class enhancements, function group enhancements, webdynpro enhancements, new BAdIs. They are detailed here: [sap library - Enhancement Technologies|http://help.sap.com/saphelp_nw70/helpdata/en/70/63da4023a28631e10000000a1550b0/frameset.htm]

> SAP already created one implementation. Maybe the enhancement spot is limited to one implementation maximum.

> \[...\]

> Finaly, So how I can add another Enhanced Implicit in this point or Maybe I can change the implementation limit

> for enhancement spot?

First, I apologize for my first answer. Number of implementations is not limited for explicit enhancement options.

So, I guess you probably forgot to click the spiral button, or did not right-click at the right place.

Read only

0 Likes
1,966

Hello,

Thank you very much Sandra for your help.

I review about your points.

In this point.

First, I apologize for my first answer. Number of implementations is not limited for explicit enhancement options.So,

I guess you probably forgot to click the spiral button, or did not right-click at the right place.

Answering:

First point.

I review step by step.

I click the spiral button to enter the enhancement mode.

Place the cursor on the line where I want to create the enhancement point.

I see that the Show implicit ... does not stay inside the lines of the module.

the Show implicit ... goes outside the module and I need to create the enhancement inside.

when I click the Show implicit ... in the menu to display and implement them, in detailed in sap library -

Implicit Enhancement Options in ABAP Source Codes have some restrictions:

Use

In ABAP programs, implicit enhancement options are predefined at the following places:

· At the end of an include. There are some restrictions, for example, not at the end of a method include.

Include :LCOKOO22.

MODULE screen_modify OUTPUT.

ENHANCEMENT-POINT ehp_lcokoo22_01 SPOTS es_saplcoko_ps.

$$-Start: EHP_LCOKOO22_01----

-


$$

ENHANCEMENT 1 PS_ST_EHP3_SFWS_SC_LCOKOO22. "active version

    • source lines..

ENDENHANCEMENT.

$$-End: EHP_LCOKOO22_01----

-


$$

ENDMODULE. "SCREEN_MODIFY OUTPUT

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$SE:(1) Include LCOKOO22, Final

the Show implicit """""""""" goes inside "ENDMODULE", I can't create implicit enhancement because There are some restrictions.

Second point.

With Explicit Enhancement Options in ABAP Source Codes,Use:

Activities

· To mark a position in an ABAP program as an explicit enhancement option, use the following ABAP statement:

· To mark a section in an ABAP program as an explicit enhancement option, use the following ABAP statement:

......

Using , I define the name of the enhancement option or the source code enhancement.

After , the enhancement option must be assigned to at least one (simple) enhancement spot.

When, I try to Create Enhancement.

I see this box:

Select o Create Enhancement Implementation, click in create:

Enhancement Implementation :ZP_ST_EHP3_SFWS_SC_LCOKOO22_03

Short Text :New enhanc

Composite Enhancement Implementation : space

I get this message when I try to create:

here is the problem.

I do not understand what reason I can not create an Enhancement Implementation?

According to steps that should be possible.

This will probably need a Note.

I need at this point, add a new Enhancement Implementation.

Thank you very much Sandra for your help.

Regard

Edited by: Gustavo Hermoza Azaldegui on Jun 7, 2010 1:44 PM

Read only

0 Likes
1,966

· To mark a position in an ABAP program as an explicit enhancement option, use the following ABAP statement:

This remark from the documentation explains how to create an explicit source enhancement option using ENHANCEMENT-POINT or ...-SECTION line. It doesn't apply to you. SAP already created the explicit source enhancement option, and you want to implement it.

When, I try to Create Enhancement.

Here maybe is a confusion: what you do is creating an enhancement implementation, but you don't create an enhancement option.

I see that the Show implicit ... does not stay inside the lines of the module.

the Show implicit ... goes outside the module and I need to create the enhancement inside.

That's normal. As I said, there are no implicit enhancement options in modules.

I get this message when I try to create:

Enhancement Spot ES_SAPLCOKO es SAp internal - customer implementation not possible.

as I said in my first answer: "You may create your own implementation if the enhancement spot is not reserved to SAP".

Unfortunately, it seems the enhancement spot es_saplcoko is reserved to sap in your system. You can check that by double-clicking the enhancement spot (or go to SE18), the information is in the attributes tab "Nur SAP-implementierbar".

Note: I tried to check in my ECC system (SAPKH60011), unfortunately ES_SAPLCOKO_PS composite enhancement spot doesn't exist, the explicit enhancement option doesn't exist in LCOKOO22, and ES_SAPLCOKO enhancement spot can be implemented here!

Read only

0 Likes
1,966

Hello Sandra,

It's right so I understand.

I go to SE18 and I can check that by double-clicking the enhancement spot "ES_SAPLCOKO_PS", the information is in the attributes tab, say: [Marked], can only be impl. SAp internal.

What other solution could be used as a suggestion? Yes, this can only be implemented by Sap.

And the solution is right on that point.

Maybe I can do a modification of the standard.

This spot "ES_SAPLCOKO_PS"

Go Tab [Properties]

Enhancement Implementation "PS_ST_EHP3_SFWS_SC_LCOKOO22_02"

Enhancem. Technique:Source Code Plug-In

Description : LCOKOO22

Package :PS_ST_EHP3_SFWS_SC

Switch :PS_SFWS_SC1 ->Coding Switch for PS Ehp3

Switch Position: T on

Superordinate Enhancement Implementation :CEI_PS_ST_NET

Thank you very much Sandra for your help.

Regard,

Gustavo

Read only

0 Likes
1,966

You can look for a procedure (form, method or function module) that is called from the module, and implement one of its implicit enhancement options. Sometimes, they may not fit your requirement, so you must do a modification of the standard.

Read only

0 Likes
1,966

Thank you very much Sandra for your help.

Sincerely,

Gustavo

Read only

0 Likes
1,966

Hi Sandra,

Just a question/comment on the documentation. Yes, it does not offer to enhance screen module routines. However I am not sure why this is and cannot think of any reason. Especially for that a lot of modules call form routines of the same name. Beside s that it was always the case that teh debugger has problems when it comes to module processing. For code enhancements it just looks like an oversight to not have enhancements in there.

What is your take on this?

Thanks,

Andreas

Read only

0 Likes
1,966

I think the idea behind the design of the New Enhancement Framework is to offer flexibility to the customers to be able to change standard business functionality to their own i.e. to be able to change the code at the business logic layer which is embeded within the routines of the same name (well, not always!) which the Modules call. It is only at this layer all the business logic exists and not at the Screen layer where calls to the Modules are coded. It is more or less the same reason why one cannot put a break point when debugging a screen but one is able to put a break point once the Module calls a routine.

Also, if customers had the option to implement implicit enhancements on screen, then they would change 90% of the standard screens themselves by loop at screen etc. and that I understand is of course not part of SAP's strategy. So, in summary, it is working as designed

Cheers,

Sougata.