Skip to Content
author's profile photo Former Member
Former Member

SE24 or In-line Declaration of Custom Class to be Used in a Custom Exit ???

After our implementation of a custom screen in EXIT_SAPLIE01_007, the function-group XQSM contained the following custom elements:

***********************************************************************

XQSM
    Function Modules
      EXIT_SAPLIE01_007     (this just includes ZXQSMU06)
    PBO Modules
      STATUS_9000
    PAI Modules
      USER_COMMAND_9000
    SCREENS
      9000                  (custom screen (modal dialog box))    
    GUI_STATUS
      9000                  (status for custom screen)  
    INCLUDES
      ZXQSMI01              (contains PAI module)  
      ZXQSMO01              (contains PBP module)
      ZXQSMTOP              (declares custom global variables)
      ZXQSMZZZ              (this just includes ZXQSMI01/ZXQSMO01
      ZXQSMU06              (this calls custom screen 9000)

***********************************************************************

Then the users decided they wanted an editable ALV on custom screen 9000 (to handle multi-item GR postings in MIGO, not just single-item postings.)

Since I never coded an editable ALV before, I first created a working editable ALV program from the SAP demo program BCALV_EDIT_03 plus some additions/modifications kindly provided by Uwe Schieferstein down in the ABAP Objects Forum.

But now I'm stuck because I don't know which components of the XQSM function group I should put the following pieces of code in:

1) 
class lcl_event_receiver definition deferred.
data: g_event_receiver type ref to lcl_event_receiver.

2)
class lcl_event_receiver definition.
  public section.
  ...
  private section.
  ...
endclass.

3)
class lcl_event_receiver implementation.
  ...
endclass.

Can someone please tell me where (1-3) belong inside XQSM - what components they should be put into?

Or should I just build a custom class in SE24 and use it in the exit ??? (By "use it", I mean instantiate it and call its methods.)

It seems to me that if I could define the class in SE24,it would be a lot easier, because everything else except (1-3) above clearly belongs in the PBO or PAIof the screen.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Apr 24, 2007 at 01:36 PM

    Hello David

    In thread

    how to activate or deactivate a user-exit based a specific condition

    I have described a general strategy for implementing CMOD/SMOD exits. In your case, I would create a function group <b>ZXQSM</b> having two function modules:

    - <b>Z_EXIT_SAPLIE01_007</b> (= copy of EXIT_SAPLIE01_007) => calls the following fm

    - <b>Z_EXIT_SAPLIE01_007_SPEC</b> (-> specific exit that is executed only if certain conditions are fulfilled

    All you implementations for you editable ALV grid belong into your customer function group ZXQSM.

    Regards

    Uwe

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Uwe -

      Thanks very much for the suggestion - I will certainly consider it, since it comes from you.

      But assume for the moment that I'm going to follow the BC425 manual and do it the way SAP teaches it.

      Then could you answer my original question so I can award the 10 ???

      1) what component or components of XQSM do I put items (1-3) into??? (These are the class declaration items.)

      2) or, should I define the custom class in SE24?

  • Posted on Apr 24, 2007 at 03:20 PM

    I got it!

    It's a little tricky, so I'm gonna blog on it, actually.

    That way, less people will have to go through the pain.

    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.