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

Use pretty printer in generated code

Former Member
0 Likes
732

HI All

I am generating a code and the code that was generated by my class is not nice ...

i want to use the pretty printer on while generating a code there is option to do that ?

Regards

Joy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
613

Hi Joy,

just call these 2 functions in that order.

data: lt_source type table of string.

CALL FUNCTION 'CREATE_PRETTY_PRINT_FORMAT'

EXPORTING

mode = 'HIKEY'

TABLES

SOURCE = lt_source

EXCEPTIONS

syntax_errors = 1

OTHERS = 2.

CALL FUNCTION 'PRETTY_PRINTER'

EXPORTING

inctoo = ''

TABLES

ntext = lt_source

otext = lt_source

EXCEPTIONS

enqueue_table_full = 1

include_enqueued = 2

include_readerror = 3

include_writeerror = 4

OTHERS = 5.

3 REPLIES 3
Read only

Former Member
0 Likes
614

Hi Joy,

just call these 2 functions in that order.

data: lt_source type table of string.

CALL FUNCTION 'CREATE_PRETTY_PRINT_FORMAT'

EXPORTING

mode = 'HIKEY'

TABLES

SOURCE = lt_source

EXCEPTIONS

syntax_errors = 1

OTHERS = 2.

CALL FUNCTION 'PRETTY_PRINTER'

EXPORTING

inctoo = ''

TABLES

ntext = lt_source

otext = lt_source

EXCEPTIONS

enqueue_table_full = 1

include_enqueued = 2

include_readerror = 3

include_writeerror = 4

OTHERS = 5.

Read only

0 Likes
613

HI Oliver ,

Thanks , how can use option of pretty printer like keyword uppercase ?

or indent ?

Thanks,

joy

Read only

0 Likes
613

Look at CREATE_PRETTY_PRINT_FORMAT parameter MODE allowed values ('UPPER', 'LOWER' or 'HIGHKEY')

Regards,

Raymond