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: 

Format whole package ( pretty printer ) in ABAP

almedin_hodzic53
Participant
0 Kudos

Is there a possibility to format whole package ( pretty printer ) at once, and activate everything after, without doing everything manually?

6 REPLIES 6

Sandra_Rossi
Active Contributor

What means "format package"?

almedin_hodzic53
Participant

All classes, reports, interfaces inside package. Format it with pretty printer then activate it. Without doing everything manually.

Sandra_Rossi
Active Contributor

You may possibly adapt this program which I used to check if the Pretty Printer was applied to a list of classes and programs of abap2xlsx.

ABAP: check if pretty printer was applied (NB: default list of programs defined for https://github.c...

SugguSandeep
Active Participant
0 Kudos

Hi alhodzic,

This Program Will Erase All Your Objects in Package,

TABLES: TADIR.
PARAMETERS: p_pack TYPE TADIR-DEVCLASS.
DELETE FROM TADIR
WHERE DEVCLASS eq p_pack.


Thank You,
Suggu Sandeep.

matt
Active Contributor

The function modules PRETTY_PRINT_PROGRAM and PRETTY_PRINTER (called by PRETTY_PRINT_PROGRAM) do the work.

So you could write a program to get all the source code connected to a package, pretty print it and then activate it. READ REPORT and INSERT REPORT would be needed. You'd also have to find the includes (for example) of every class.

Probably quicker to do it manually. Or explain to developers that if they don't want to be ex-developers they need to pretty print their source code as mandated in the standards.

0 Kudos

It might be possible for you to adapt the program that I used to check if the Pretty Printer had been applied to a list of classes and programs that were part of abap2xlsx to fit your specific requirements.