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: 

Any Reusable ideas in ABAP Development?

naveenmaaroju
Explorer
0 Kudos

Hi Experts,

Can anyone provide any reusable ideas, that can be implemented in ABAP development (Eg: Reports, FM's)

So that they can be reused directly in different projects which saves our time.

Thanks in advance.

8 REPLIES 8

0 Kudos

Hi Naveen,

One can go for an auto Technical Specification generator for a Report/FM inputted to the Tool.

This can help in quick delivery of Objects.

Thanks and Regards,

Vikram

0 Kudos

That might be very interesting!

0 Kudos

Hi Vikram,

That's a very good idea.

But how it can be implemented, i mean how can we auto generate the technical description for a report/FM?

0 Kudos

Hi Naveen,

I also have not developed one yet too .

So, cannot provide technical details for realizing the idea.

But, to start with one needs to identify what all details are required for the Technical specification and what all can be retrieved on the basis of Program/FM. Refer to below link.

http://scn.sap.com/thread/167023

Also, one needs to start with simpler forms/subroutines/FM and check how to retrieve the required details corresponding to them from the standard SAP tables/FMs.

As far as text part for the Processing Logic is concerned, the same needs to be handled via Code.

And depending upon the ABAP Keywords/Tokens, the text needs to be framed.

One should check how the ABAP Compiler/ABAP Stack/ABAP Debugger works to find out important FMs/ finalize a problem resolution approach.

Say for below select query, TS text needs to be written in the below format.

It will be certainly complex but is not impossible.

Code:

   select *

   from mara

    into table lt_mara

   where matnr in s_matnr[].

TS Text

Details are retrieved from table MARA on the basis of material number entered on selection screen.

Thanks and Regards,

Vikram

ralf_wenzel_heuristika
Active Participant
0 Kudos

former_member185414
Active Contributor
0 Kudos

Hello Naveen,

Some ideas -

1. Have an automatic comment generator report/class which will embed comments in the developed objects.

2. Have an automatic transport release background job. (This has to be thoroughly cross reviewed and triggered from an ID which has due authorizations).

3. Use ATC and SCI Variants. This will make first level of code review automatic.

BR.

sarat_malladi
Explorer
0 Kudos

Why not initiate a process to discuss about re-using existing program/code before creating a new program/code. Of course this is not a tool to develop in SAP, but being proactive to avoid clones.

Regrads,

Sarat.

Former Member
0 Kudos

Naveen,

One thing that I really like to use is table TSE05.

Here is an example - We receive many program requests for BDC, now the common steps for my BDC's are:-

  1. Get Excel file path from the user (file which contains the data to be passed to BDC)
  2. Upload the data from given Excel file
  3. Validate uploaded data
  4. Run BDC if the uploaded data passed the validations
  5. Display appropriate errors if the data did not pass the validations

Of course there will be multiple lines of code attached to each step.

So I have a generic program which updates table TSE05 with following data

APP_OBJ   = 'ABAP'

KEYWORD = 'CODE_FOR_BDC' (or something like that)

POSITION  = Sequential number assigned to each line of code

LINE          = ABAP code (one database record for each line of code)

Once the TSE05 table is updated, you can access it in the editor by pressing CTRL+F6 and entering

CODE_FOR_BDC in 'Other Pattern'. This will insert all the lines of the code that you entered in TSE05 into your editor.

This is just one example, you can do the same for say Comment header in each program, or a generic code for ALV creation, etc.

In short, create an ABAP program to update the TSE05 table as per your ABAP team standards and then carry those programs to every project you go. Run the programs once at each new project. Eventually you will leave a trail of nicely standardized code at each of the projects for the ABAPers who inherit your programs.

Hope this helps.

Amit.