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.

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

Similar Messages

  • Extending custom class

    I made the transition to AS3 two years ago, but I still carry with me old AS2 habits. Could someone please help me understand how I extend a custom class correctly.
    I have the bad habit of putting most of my code in one .as file (the Document class), but I use a few custom classes now and then. What I'm tring to figure out is how I would extend a class of this type:
    public class ClipDragger {
         private var _clip:MovieClip;
         public function ClipDragger(clip:MovieClip) {
              _clip = clip;
              _clip.buttonMode = true;
              _clip.addEventListener(MouseEvent.MOUSE_DOWN, drag);
              _clip.stage.addEventListener(MouseEvent.MOUSE_UP, drop);
         private function drag(event:MouseEvent) {
              _clip.parent.setChildIndex(_clip, _clip.parent.numChildren - 1);
              _clip.startDrag();
         private function drop(event:MouseEvent) {
              _clip.stopDrag();
    For example I would like to add a MOUSE_MOVE listener, and also add actions to the drag function.
    Could someone please guide me in the right direction?

    package{
    import flash.display.MovieClip
    public class ClipDraggerExtension extends ClipDragger{
    private var _clip:MovieClip
    public function ClipDraggerExtension(clip:MovieClip){
    super(clip);
    _clip=clip;
    //add whatever.
    //override whatever

  • Transport custom class SE24

    Hi,
    I have created a custom class in SE24 and transported it.
    The same class I implemented in a custom program. Now I my program was going to short dump as it do not find a class.
    And I found that class was not in QA system.
    Please guide me how to transport it.
    Thanks,
    Deepak.

    Hi,
    Thanks, Actually I released and transported it directly. But I couldnt see it in target system.
    Now I got it.
    Thanks,
    Deepak.
    Edited by: KDeepak on Feb 8, 2008 3:30 AM

  • Adding info blocks in a custom class for Factsheet

    Hi Experts,
    I need to create a custom class by copying the standard class 'CL_CRM_CCKPT_PROCESS_OPEN'  which should accept input as Activity Types. At present this class only accepts Number of months as Input. This added input field should accept individual multiple values & Ranges and F4 help also needs to be attached for the field.
    I would like to know how to add this new input field to the class 'CL_CRM_CCKPT_PROCESS_OPEN' .
    Any valuable help would be appreciated & points would be rewarded generously for the same.
    Regards,
    Sangeeta.

    Hi,
    You can copy and include your fields in the class using transaction SE24.
    According to your subject  line you are trying to modify an existing factsheet display you own data. I would suggest instead of creating a modifying an existing class, implement your own function module and call this function module directly from the smartform used to for factsheet. This is an easier way to implement modification of factsheets instead of using the classes and displaying the data.
    Reward with points if this helps.
    Regards,
    Gaurav Gera

  • Need help calling and looping custom classes

    Hi, I am writing a code with custom classes in it and another program that calls upon all of the classes in the first program. I can get the second one (L6) to call upon and execute all of the classes of the first (Foreign). However, I need the second one to loop until quit is selected from the menu on Foreign and I can't seem to figure out how to do it. Here are the codes:
    L6:
    public class lab6
    public static void main(String[] args)
    Foreign camount = new Foreign();
    camount = new Foreign();
    camount.get();
    camount.print();
    camount.intake();
    camount.convert();
    camount.vertprint();
    System.out.println(camount);
    Foreign:
    import java.util.Scanner;
    public class Foreign
    private String country;
    private int choice;
    private float dollars;
    private float conversionValue;
    private float conversionAmount;
    public Foreign()
    country = "null";
    choice = 0;
    dollars = 0;
    conversionValue = 0;
    conversionAmount = 0;
    public void get()
         Scanner Keyboard = new Scanner(System.in);
              System.out.println("Foreign Exchange\n\n");
    System.out.println("1 = U.S. to Canada");
    System.out.println("2 = U.S. to Mexico");
    System.out.println("3 = U.S. to Japan");
    System.out.println("4 = U.S. to Euro");
    System.out.println("0 = Quit");
    System.out.print("\nEnter your choice: ");
    choice = Keyboard.nextInt();
    public void print()
    System.out.print("\nYou chose " + choice);
    public void intake()
         Scanner Keyboard = new Scanner(System.in);
              if (choice >= 1 && choice <= 4)
    switch (choice)
              case 1: System.out.println("\nU.S. to Canada");
                        conversionValue = 1.1225f;
                        country = ("Canadian Dollars");
                        break;
              case 2: System.out.println("\nU.S. to Mexico");
                        conversionValue = 10.9685f;
                        country = ("Mexican Pesos");
    break;
              case 3: System.out.println("\nU.S. to Japan");
                        conversionValue = 118.47f;
                        country = ("Japanese Yen");
    break;
              case 4: System.out.println("\nU.S. to Euro");
                        conversionValue = 0.736377f;
                        country = ("European Union Euros");
    break;
                   System.out.print("\nEnter U.S. dollar amount: ");
              dollars = Keyboard.nextFloat();
    public void convert()
    conversionAmount = conversionValue * dollars;
    public void vertprint()
    System.out.println("\nCountry = " + country);
    System.out.println("Rate = " + conversionValue);
    System.out.println("Dollars = " + dollars);
    System.out.println("Value = " + conversionAmount);
    public String toString()
    String line;
    line = "\n" + country + " " + conversionValue + " " + dollars + " " + conversionAmount;
    return line;
    I appreciate any help anyone can give me. This is driving me crazy. Thanks.

    1. first you need to write method to get choice value from Foreign class.
    simply add this method.
       public class Foreign {
          // ... Add this
          public int getChoice() {
             return choice;
       }2. Then in your main, you can obtain with previos method.
    public static void main(String[] args) {
       Foreign camount = new Foreign();
       // remove this. you alredy create an instance in last statement.
       //camount = new Foreign();
       int choice = 0;
       do {
          camount.get();
          choice = camount.getChoice();
          // your process...
       } while (choice != 0);
    }

  • Putting Loader in a custom class: events, returning to main ... asynch challenges

    I'm creating a custom class to retrieve some data using URLoader.
    My code is below, doing this from memory, plz ignore any minor typos.
    The challenge I'm encountering: when my custom class calls the loader, the event handler takes over.  At which point the context of my code leaves the function and it's not clear to me how I then return the data retrieved by the loader.  I sense that I'm breaking the rules of how ActionScript really runs by putting a loader in a separate class; at least, that's my primitive understanding based upon the reading I've done on this.
    So can I do this?  I am trying to create a clean separation of concerns in my program so that my main program doesn't get clogged up with code concerned with retrieving remote data.
    Thanks!
    Main program;
    import bethesda.myLoader;
    var ldr:myLoader = new myLoader;
    var data:String = myLoader.getData("someurl");
    My custom class:
    package bethesda {
         public class myLoader {
              function myLoader(url:String):String {
                   var loader:URLLoader = new URLLoader();
                   var request:URLRequest = new URLRequest(url);
                   loader.addEventListener(Event.COMPLETE, completeHandler);
         function completeHandler(event:Event):void {
              var ld:URLLoader = new URLLoader(event.target);
              data = loader.load(); // here's where I don't know what to do to get the data back to my main program

    I think you are on the right track in abstracting loading from other code.
    Your class may be like that:
    package 
         import flash.events.Event;
         import flash.events.EventDispatcher;
         import flash.net.URLLoader;
         import flash.net.URLRequest;
         public class myLoader extends EventDispatcher
              // declare varaibles in the header
              private var loader:URLLoader;
              private var url:String;
              public function myLoader(url:String)
                  this.url = url;
              public function load():void {
                  var loader:URLLoader = new URLLoader();
                  var request:URLRequest = new URLRequest(url);
                  loader.addEventListener(Event.COMPLETE, completeHandler);
                  loader.load(request);
              private function completeHandler(e:Event):void
                  dispatchEvent(new Event(Event.COMPLETE));
              public function get data():*{
                  return loader.data;
    Although, perhaps the best thing to do would be to make this class extend URLLoader. With the example above you can use the class as following:
    import bethesda.myLoader;
    import flash.events.Event;
    var ldr:myLoader = new myLoader("someurl");
    ldr.addEventListener(Event.COMPLETE, onLoadComplete);
    ldr.load();
    function onLoadComplete(e:Event):void {
         var data:String = ldr.data;

  • Dynamic Class Reference in Custom Class

    I've created a custom class that I want to be able to
    dynamically insert a movie clip from the library. I'm running into
    trouble because I want to access the clip as a property of the
    custom class object (ie: so it can be swapped out for another
    library clip after instantiation, among other things). I'm using
    getDefinitionByName() but I can't use it outside my addDiagram()
    function (see attached code) because the string variable that
    stores the name of the library clip isn't defined until after the
    custom class constructor function. Any help is appreciated!
    Thanks,
    -Erik

    i'm not quite following - are you saying you want to access
    panelDiagram in functions other than your addDiagram function? just
    take your variable definition out of your function and make it a
    class variable eg put the following line above your constructor:
    private var panelDiagram:*;
    and in the second line of your addDiagram function use:
    panelDiagram = new diagramClass();
    sorry if this isn't your answer, if it isn't i'm struggling
    to understand the problem.

  • Using custom classes that are not beans

    Hi folks,
    Is it possible to use java classes that are not beans. I mean, on a page, could you say Customer cust = new Customer("Jones", 25);
    if you had a Customer class with a constructor that took a name and age (String and int).
    If so, how do you go about this- do you need to import the class, or put it in a standard location? I'm using Tomcat, and would guess that this would go in WEB-INF/classes?
    I hope it's not a stupid question, all the literature seems to be focused on JavaBeans
    Any advice on this would be great!

    Beans are used as putting Java code into a JSP is generally considered bad practice. The advantage of the bean pattern is that you use things like:
    <jsp:setProperty name="laBean" property="someSetter" value="someValue" />so that you aren't embedding Java directly into the JSP. I'm not very religious about this particular topic personally and will throw a line or two in here and there.
    Having said that though, you can easily use any Java class in a JSP. You'll have to import it first:
    <%@ page import="java.util.*" %>And then you can easily use it like in a real Java program.

  • Calling a method from custom Class in WD Application

    Hi,
    I wrote a piece of code in method SEARCH for my WD Application.
    Instead of diectly callling the method I would like to create a class and then call the method.
    How do we proceed?
    Do we use SE24 first or can we start creating class from WD application itself?
    Rgds
    vara

    Hi Vara,
    Either way it is possible if you are creating from web dynpro then you can create  assistance class from component properties there you can write one method and to access that method always you have an instance wd_assist.
    From se24 create a class and declare a method. if you declare level of method is instance then you have to create object first in application and then access your method using created instance.

  • What are the benefits of converting my custom class into Data Control?

    Hi,
    I have developed my own custom class which implements no of methods for execution of Business Logic. Now I have two ways to use the same -
    *1. Create and instance of the same (wherever required) and call those methods.*
    *2. Expose the class as Data Control.*
    I want to understand which methods/technique is better and why?
    Does creating that class as Data Control provides me better performance any other benefit.
    Thanks in Advance,
    Amit

    Hi,
    1. You use this if you don't want to use ADF bindings to access the business logic (e.g. to build input forms or table for it)
    2. You use this when you want to work with ADF. Additional benefits you gain is that you can specify UI control hints on the generated metadata, apply validation rules that are consistently applied to all uses of the POJO class. In addition you don't need to handle class instantiation and dismissal yourself anymore as the ADF framework takes care of it.
    The base line though is "no data control - no ADF binding"
    Frank

  • Lock a custom class

    Hi,
    I want to put editor lock on a custom class that I created using SE24. How can I do that?
    Sridhar

    Hello Sridhar
    Apparently there is no attributes popup available where you can set the <i>Editor Lock</i>.
    However, you could use function module <b>TRINT_TADIR_MODIFY</b> (IMPORTING parameter <b>EDTFLAG = 'X'</b>) to set the lock.
    Regards
      Uwe

  • Custom class trouble

    I created two custom classes for a project. The excerpt of
    code attached refers to the event handler from my first class. In
    the event handler it creates a new instance of my second class.
    This works fine. Unfortunately I cannot figure out how to make the
    existing instance (before a new one is created using the same event
    handler) use a fade out function (or do any other property value
    change) I created, then have the new instance display after the
    property value change of the original instance has been
    triggered.

    I get this when putting the following line just before the
    creation of var loadMyImage
    quote:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at BotMenu/downClick()

  • Dynamic invocation of javac with custom class path.

    To all the Java Gurus out there,
    Consider the following classes:
    XYZ/test/TestUtil.java
    package test;
    class TestUtil {
      void useMe() {
    }ABC/test/Test.java
    package test;
    public class Test {
      public static void main(String[] args) {
        TestUtil t = new TestUtil();
         t.useMe();
    }The class Test uses package private access to the TestUtil.useMe() method. Then the Test class is packaged into test.jar and the TestUtil class is packaged into testutil.jar.
    Our application uses a custom class loader architecture where the test.jar is loaded by class loader "X" and testutil.jar is loaded by class loader "Y". Also Y is the parent class loader of X. When the main() of Test class is run it results into IllegalAccessException as the package private method is being accessed from different class loaders.
    We are currently using a dynamic way to detect the dependency between test.jar and testutil.jar and generating the classpath argument to the "javac" ant task which dyncamically invokes the sun.tools.javac.Main class. So while compiling Test class the following command line is generated:
    javac -classpath XYZ/testutil.jar Test.java
    It compiles fine assuming that the Test class and the TestUtil class are loaded by the same class loader but at runtime this fails.
    Is there a way to make "javac" use our runtime class loader architecture to instead of static classpath, so that the access violation is captured at compile time?
    Any help is appreciated.
    Ravi
    PS: If this is not the right forum please point me to the right place to post this questions.

    Not that I'm aware of - the Java Language is designed to be platform-independent so absolute file paths which is a specific feature of various file systems would naturally not to be mixed up with the object-oriented hierarchy structure.
    Just like a compiler wouldn't check if a file exists in
    new File("<FilePath>")I don't think you can get compile-time checks for what you have wanted.
    Hope this helps~
    Alex Lam S.L.

  • Pending Class onResult in custom class.

    Ok,
    I have a custom class with private field:
    private var test:Stringint the constructor I load the web
    service:
    pws = new WebService(Constants.getWsURL() + "?WSDL");
    then I call a method on the WS:
    var pcLoadModel = pws.LoadModel();
    pcLoadModel.onResult = pcLoadModel_Succ;
    pcLoadModel.onFault = pcLoadModel_Fail;
    where:
    public function pcLoadModel_Succ(result){
    //some code.
    The problem is that where it says "some code", I cant access
    the members of my class! Why not? in the debugger I clearly see
    that I have left the scope of the instance of the class I was
    working from. I dont understand why this happens.
    Anyone has an answer to this?
    Thanks you :)
    Jp

    i'm not quite following - are you saying you want to access
    panelDiagram in functions other than your addDiagram function? just
    take your variable definition out of your function and make it a
    class variable eg put the following line above your constructor:
    private var panelDiagram:*;
    and in the second line of your addDiagram function use:
    panelDiagram = new diagramClass();
    sorry if this isn't your answer, if it isn't i'm struggling
    to understand the problem.

  • How do I resolve a ClassNotFoundException for a custom class

    I am new to Java and am having frustrating problems. I am creating a Desktop application and want the application to have the capability to read from the file system.
    I created a custom class to hold mapping data and stored the object to file using ObjectOutputStream writeObject. I read it back into the program to make sure it worked. All was well and fine. I am trying to mimic the C capability to read and write entire data structures at a time. I ensured that the class (and all classes that it relied on) were serializable.
    Now back to the Desktop app. I am trying to read the object into that same custom class in my program. The program compiles fine. I have set my classpath up in Netbeans 6.1 to look to the other apps classes, have imported the classes. Again no problem.
    I also set my classpath (in the run section) to look at the jar file in the other section that contains my class. I have tried setting this runtime classpath many ways. I will get a ClassNotFoundException: MyClass at URLClassLoader ... on and on.
    I really am trying to do something simple here by just reading in a structure (class in Java). I was told previously that it is a classpath problem. How can I resolve this? I don't think that I should have to write a binary or text file that contains all of the various parameters (easier to do in one hop using
    MyClass c = (MyClass) in.readObject();
    Help is appreciated. Jay A

    jaya wrote:
    I am new to Java and am having frustrating problems. I am creating a Desktop application and want the application to have the capability to read from the file system.Very good.
    I created a custom class to hold mapping data and stored the object to file using ObjectOutputStream writeObject. I read it back into the program to make sure it worked. All was well and fine. I am trying to mimic the C capability to read and write entire data structures at a time. I ensured that the class (and all classes that it relied on) were serializable.I'm not sure why you think Object streams are the way to go here. Why aren't a text representation and a toString call good enough? Sounds like you just want a simple persistence mechanism without a relational database. Writing a Map of <key, value> pairs using a PrintWriter would seem enough to me and parsing each pair on a line to read it back in would seem sufficient to me.
    Now back to the Desktop app. I am trying to read the object into that same custom class in my program. Why? What are you trying to do? Why can't your Desktop app instantiate an instance of the custom class and be done with it?
    The program compiles fine. I have set my classpath up in Netbeans 6.1 to look to the other apps classes, have imported the classes. Again no problem.So does your NetBeans classpath include your custom class?
    I also set my classpath (in the run section) to look at the jar file in the other section that contains my class. Why do you have to package the other class in a JAR? Why can't that package just be part of your current project? Or are they separate projects, and you want to treat the first one like a 3rd party JAR?
    I have tried setting this runtime classpath many ways. I will get a ClassNotFoundException: MyClass at URLClassLoader ... on and on.You aren't setting CLASSPATH correctly. You don't need a URL class loader. You're making this far too complicated. It's a much easier thing than this.
    I really am trying to do something simple here by just reading in a structure (class in Java). I was told previously that it is a classpath problem. How can I resolve this? I don't think that I should have to write a binary or text file that contains all of the various parameters (easier to do in one hop using
    MyClass c = (MyClass) in.readObject();This is not the way to do it.
    CNF exception means one thing: a .class that you need to load isn't in the CLASSPATH. That advice you got is correct. You need to figure out how to make it so.
    Your description is confusing.
    I think your mistake is assuming that serialization is the best way to persist that mapping data. Without knowing more about the details, I think adding two method to the "custom class" that encapsulated the mapping data should be sufficient. Create a static read() method that takes a java.io.Reader and returns a populated instance of your class. Create a static write() method that accepts a java.io.Writer and an instance of your class and returns void. Have them read and write plain text. Then either make that source code part of your NetBeans project or package it into a JAR and put that in your CLASSPATH. Either way, if you don't do it properly you'll get that CNF exception. Keep plugging until you get it right.
    %

Maybe you are looking for

  • Bridge preview does not actualize after raw processing

    After having processed a raw (.NEF) file with the raw converter, the changes show up in CS5 but not in bridge.

  • Excel file shown on i_oi_document_viewer

    Hi I am showing generated XLS file (XML in fact) on custom container using i_oi_document_viewer. The Excel is shown without menu, just the columns and rows. Is that possible to show an Excel menu also. Thank you

  • Using Acrobat on two operating systems

    I upgraded to Adobe Acrobat XI Pro in April 2013, for my Mac. I have recently installed Windows on my Mac as a second operating system and would like to use Acrobat from Windows as well. Can I re-download, or do I need to do another upgrade? FYI, on

  • Crate XML file and send that XML file from R3 to SIBEL

    Hi Friends,           Is SAP provided any idoc type and Message type for Goods Receipt (MIGO)?? My requirement is to create XML file having 4 fields from MIGO then that XML file to be display in SIBEL system. Can anybody help me how can I do this.

  • EA6500 - Wireless Issues, Varied possibly tied to leases?

    I am switching over from a Netgear WNDR Router, and this EA6500 V1 is really giving me some recurring, very minor wireless issues.  I have to assume its tied to some setting I just am not seeing. My laptop will just lose internet connectivity.  The c