Application Development and Automation 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: 
Read only

Perform sub routine in Eclipse

Former Member
0 Likes
4,108

Hello All,

I am new to ABAP in Eclipse (AiE). I started by developing a report program in eclipse after creating a new abap project.

My question is, how can we create a perform statement sub routine in the report program? I have searched online but could not find the solution and hence posting it here.

Appreciate if some one could provide me inputs on this issue.

Thanks,

Sandy

1 ACCEPTED SOLUTION
Read only

Krzysztof
Explorer
2,678

Simply, don't use subroutines anymore, FORM...ENDFORM is obsolete syntax.

12 REPLIES 12
Read only

LukaszPegiel
SAP Champion
SAP Champion
0 Likes
2,678

Sandy,

AiE is only the tool, code syntax and statements are same for AiE and Development Workbench(SE80,SE38, etc). So you do everything exactly as directly in SAP....

Cheers

Łukasz

Read only

0 Likes
2,678

Lukasz,

Thanks for the response.

If it is in normal SAP GUI, we could create a subroutine by double clicking on it. But in eclipse we cannot create in the same way. So I am trying to find out a way to create sub routines in eclipse.

Thanks,

Sandy

Read only

0 Likes
2,678

Try with Ctrl+1 or write manually form .... Endform. 🙂

Read only

0 Likes
2,678

Hello Lukasz,

Yes, I did create manually and it works fine. But, I am looking for an option similar to how we create an Top Include in the same report program.

Also, I don't think 'Ctrl + 1' provides and option to create subroutine. I will try this tomorrow again and make sure if I am guessing it right.

Thanks,

Sandy

Read only

0 Likes
2,678

Hi Sandy,

I do not have the problem what you said.

If you propetly create the report program?

Path: Favorite Packages->ZPackage->Source Library->Program->New ABAP Program

Regards,

Vinson

Read only

0 Likes
2,678

Hello Vinson,

Thanks for the response.

The path you have mentioned is to create a new ABAP program for which I don't have any issues. Here I am interested in creating a perform subroutine. I don't see a similar path in eclipse to create the subroutine.

Thanks,

Sandy

Read only

0 Likes
2,678

Hi Sandy,

When you create a ABAP program ,  Thought right click the mouse open menu and pick the 'OPEN WITH SAP GUI '  , that you can do the same thing as  ABAP Editor.


Regards,

Vinson

Read only

0 Likes
2,678

Hello Vinson,

I totally agree that when we open with SAP GUI then it would behave the same as we do in SE38. But, I am looking out for an option to create subroutines in eclipse itself without going to SAP GUI.

Thanks,

Sandy

Read only

0 Likes
2,678

Hi Sandy,

Please do as follows:

File->New->Other->ABAP Folder->ABAP Include (or other be related to ABAP )

Regards,

Vinson

Read only

Krzysztof
Explorer
2,679

Simply, don't use subroutines anymore, FORM...ENDFORM is obsolete syntax.

Read only

Former Member
0 Likes
2,678

Hello Krzysztof,

Thanks for the response.

I like your answer. So, do you say we need to write the entire program under START-OF-SELECTION and not to create any perform subroutines? This doesn't sound good to me as it looses the look and feel of the program.

Thanks,

Sandy

Read only

2,678

Hello.

Of course not. Local classes and their methods instead of subroutines are current recommendations for local modularization.

Krzysztof.