Skip to Content

Function module or Globlal class?

Hi All,

I need to write code in the include ZXF04U01, as forms(perform) are obsolete now, i cant create classes in this include. So i have to go either with function modules or else with Global class.

Is there any priority between FM and global classes. Which is better and why?

Thanks in advance.

regards,

NarsiReddy.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on May 19, 2015 at 02:53 PM

    If you have more than one organization and the logic in the customer exit include ZXF04U01 would be shared by more than one, I suggest you convert the customer exit into the custom BADI.

    • Create a custom BADI with a possible filter, with multiple implementation
    • Call the BADI using CALL BADI in the include ZXF04U01
    • Implement the BADI and write your own logic within it for that org unit.
    • If more than one org unit, create another BADI implementation

    It has lot of artifacts and would need more time to develop, but by doing so you have these advantages:

    • You use the Object Oriented technique as the BADI implementation would require an implementing class
    • Flexible design - a new implementation can be created with a new filter
    • Code segregation - each org has its own implementation
    • You enforce other developers who would change the include, not to use obsolete statements.

    If you think, its overkill and you don't have multiple org structure, create the Function Module. Make sure to copy the same signature in your custom FM as well.

    Regards,
    Naimesh Patel

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 19, 2015 at 03:03 PM

    Or replace Customer Exit EXIT_SAPMF02D_001 of Enhancement SAPMF02D with some method of BAdI CUSTOMER_ADD_DATA(_CS) some simulation of a dummy customer screen?

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.