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: 

Copying Function Modules

Former Member
0 Kudos
185

Hi there, newbie ABAP er here,

I want to reset the SENDER value in FM SO_NEW_DOCUMENT_ATT_SEND_API1 from SPACE to a valid non-reply email address. Obviously I dont want to alter the Function module so I made a Z copy in my ZDEV package -> Function group -> Function module.

Seeing as the original FM was in Function group SOI1 I'm getting an error as various statements in the FM are tripping out as they are macros within SOI1 and probably cant be seen.

Can anyone advise the right way of cracking this?

1 ACCEPTED SOLUTION

former_member705122
Active Contributor
0 Kudos
68

Hi,

Check this link:

Regards

Adil

4 REPLIES 4

former_member705122
Active Contributor
0 Kudos
69

Hi,

Check this link:

Regards

Adil

Former Member
0 Kudos
68

Hi,

Have followed that procedure as shown (copied FG) but the program now trips up to say the FM cannot be found in its function group. I have activated it so my guess is its still looking at function group SOI1 for the FM instead of the new ZSOI1. How do I tell the program to look at the new FG for new functions?

Many thanks, Steve

0 Kudos
68

Hi,

I understand you do not have issues in creating the Function group,

but associating the z copy to the Z Function group is the problem.

Try this:

1) Take SO NEWDOCUMENT_ATT_SEND_API1 in se37, instead of se80.

Copy the FM, and make all neccesary code changes.

2) Now go back to SE80 and take your z Function group make sure the z Function module listed below it.

If not, try Goto->Update Navigation Index

3) Check the Top include of the Original Function group to find the include that uses the macros.

When you copy the function module alone, the entries in the associated Top include of the FG needn't be copied.

Include what you have found in your Function group's Top Include.

3) Now active the entire Function group.

= Or else (not recommended though) =

1) Create a z copy of the function Group

The FM, also gets copied as Z

2) Make neccesary changes and activate!

Hope this helps!!

Cheers,

Remi

Clemenss
Active Contributor
0 Kudos
68

Hi Steve,

if you are really a newbie, you have the once-in-a-developers-life chance to get rid of all trouble related to the SO_NEW_* function modules.

Check out Eddy De Clercq's great [SAP Network Blog: Unknown thus unloved? |http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3443] [original link is broken] [original link is broken] [original link is broken] [original link is broken];, see various BCS* reports, search here on SDN.

Do not hesitate to use this little ABAP OO. It will save you so much trouble and time.

Regards,

Clemens

P.S.: We had threads here discussing to ban all SO_NEW_DOCUMENT_* threads from the forum.