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

Pretty Printer

Former Member
0 Likes
1,966

I have a program with a selection screen. If i enter the program name and execute , that program should get arranged i.e. Pretty Printed.

Any Suggessions ?

16 REPLIES 16
Read only

Firoz_Ashraf
Contributor
0 Likes
1,755

Hi !

Write a BDC for SE38 where you click the 'Pretty Printer'.

Use this BDC in 'N' mode in your program. This way when you enter the program name and execute your report, Pretty Print will take place for the program you entered on the selection screen.

Regards,

Firoz.

Read only

Former Member
0 Likes
1,755

Do a recording using SHDB...

Specify SE38...Program Name...Change button...pretty printer button....activate button....back button....

Now, place this code in your program and when program name is specified it does it...

Read only

0 Likes
1,755

Hi, I have even tried recording mathod, The ok code for Pretty Printer is =ED_PRETTY_PRINT. In recording, the code is not getting rearranged. Have a look at the code.

PERFORM BDC_DYNPRO USING 'SAPLWBABAP' '0100'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' 'RS38M-PROGRAMM'.

PERFORM BDC_FIELD USING 'RS38M-PROGRAMM' P_PRGNAM.

PERFORM BDC_FIELD USING 'RS38M-FUNC_EDIT' 'X'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=CHAP'.

PERFORM BDC_DYNPRO USING 'SAPLS38E' '0400'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' 'RSTXP-TDLINE(01)'.

PERFORM BDC_FIELD USING 'RSTXP-TDFIRST' '1'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=ED_PRETTY_PRINT'.

PERFORM BDC_DYNPRO USING 'SAPLS38E' '0400'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' 'RSTXP-TDLINE(01)'.

PERFORM BDC_FIELD USING 'RSTXP-TDFIRST' '1'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=ED_PRETTY_PRINT'.

BREAK-POINT.

OPT-DISMODE = 'A'.

OPT-DEFSIZE = 'X'.

CALL TRANSACTION 'SE38' USING IT_BDCDATA OPTIONS FROM OPT.

IF SY-SUBRC EQ 0.

ENDIF.

Read only

Former Member
0 Likes
1,755

Any Updates ?

Read only

0 Likes
1,755

H i ,

May be Program not in the modify States , thats y its not re arranging the code.....

regards

Prabhu

Read only

0 Likes
1,755

I have executed the program in All screen mode. The screen is opening in Change Mode only. Any thing more i need to check ?

Read only

0 Likes
1,755

Hi ,

Check the FM PRETTY_PRINTER.

Regards

Arun

Read only

0 Likes
1,755

I have checked the following function modules, but invain

CREATE_PRETTY_PRINT_FORMAT

EDITOR_PRETTY_PRINT

PRETTY_PRINTER

PRETTY_PRINT_PROGRAM

Read only

Former Member
0 Likes
1,755

go to SYSTEM menu-----> SETTING there u select prity printer tab & select the desired option.

after that clisk on PP ur program will arrange automatically.

Read only

Former Member
0 Likes
1,755

I have done even the pretty printer settings and tested the function modules. They are not working.

Read only

Former Member
0 Likes
1,755

Hi,

While recording in BDC,

1. Go to SE38, <program name> -- Change mode.

2. Do pretty printer.

3. SAVE+ACTIVATE.

I think u didnt save the program whlie recording..

Check it out.

Regards,

Prem

Read only

0 Likes
1,755

Hi Prem,

Once we do SAVE, session ends, we cant activate. But even i tried using sav option also. its not working. Just try from your end also.

Read only

0 Likes
1,755

Any Updates .. .. . ...

Read only

Former Member
0 Likes
1,755

I have done the recording and just reprocessed the recorded one. Even then it is not working.

Read only

Former Member
0 Likes
1,755

hi friend

the fct code for the pretty printer is '=ED_PRETTY_PRINT'

so with this u can code

just do like this

go to shdb or sm35 start new recording

give ur transaction name

i.e., se38

then just select a program by F4 help select the program which u have already done

and then click on prettty printer

and now save and activate the program

give back

it will take u to the screen consists of bdcdata fields of the recording which u have done.

and now save that recording

and now transfer that recording of the name given by you and transfer to the program

and in that program ur input is nothing but the program name

and if u want some coding u can enter that

and try it , it will work

Read only

Former Member
0 Likes
1,755

I have debugged the standard code and adjusted the code accordingly.