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

Batch input inside a ABAP Class method?

Can I do a simple batch input inside a ABAP Class method? Is it possible?

I'm new to objects and I need to do a batch input (Call Transaction) that was once in a report.

I can't use performs inside methods, so how shoul i do it?



Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Sep 21, 2010 at 07:08 PM

    Yes, you can do it. The method is nothing more for class but the same which subroutine (form) is for program.

    So map all the subroutines from the program to methods, all global data objects to class attributes. Make all those which have to be exposed public and the ones to internal calculation private . Inside write your functional code (the one which BDC program uses in subroutines) and pretty much that's it.

    Then create another local program which instantiates the class object and calls its public methods (like i.e adding new row to BDC table based on the parameters). BTW such BDC table should be a private class attribute (not to be changed directly, but only by class methods). Then at the end call the method (i.e. batch_entry ) which calls the transaction passing this BDC table.

    Anyhow, by rewriting the code to OO one, you don't really gain to much in this respect. You can still work with your procedural coding, but for training I think this might be a good example.



    Add comment
    10|10000 characters needed characters exceeded