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: 

FM -> 'RSPO_OUTPUT_SPOOL_REQUEST'

Former Member
0 Kudos

Hi all,

Can the Function module 'RSPO_OUTPUT_SPOOL_REQUEST' be used in background job. The FM is used to print using spool number. If yes! how can it be done? else, is there any other FM to print in background using the spool number.

Thanks,

Rajesh.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Rajesh,

Let me share a small tip for this. Execute se37 and enter this FM name. PRess where used list button. A popup window will come, select only program checkbox in that and press enter. Then it will display list of program in which that FM was used. Now if u check any program then u will get clarification abt the usage of FM.

Hope this helps you. Reply for queries, shall post the updates.

Regards.

Kumar

2 REPLIES 2

Former Member
0 Kudos

Hi Rajesh,

Let me share a small tip for this. Execute se37 and enter this FM name. PRess where used list button. A popup window will come, select only program checkbox in that and press enter. Then it will display list of program in which that FM was used. Now if u check any program then u will get clarification abt the usage of FM.

Hope this helps you. Reply for queries, shall post the updates.

Regards.

Kumar

former_member404244
Active Contributor
0 Kudos

Hi,

plz chek teh below code...

  • Declaration of local constants

CONSTANTS : LC_PAART LIKE SY-PAART VALUE 'X_65_132', " Paper Format

LC_LOCL TYPE SYPDEST VALUE 'LOCL'. " Destination

  • If print option is selected.

IF P_PRINT IS NOT INITIAL.

MOVE C_X TO V_PRINT.

ELSE.

CLEAR V_PRINT.

ENDIF.

  • Setup the Print Parmaters

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

AUTHORITY = SPACE

IMMEDIATELY = V_PRINT

NEW_LIST_ID = C_X

NO_DIALOG = C_X

USER = SY-UNAME

IMPORTING

OUT_PARAMETERS = V_PRINT_PARMS

EXCEPTIONS

ARCHIVE_INFO_NOT_FOUND = 1

INVALID_PRINT_PARAMS = 2

INVALID_ARCHIVE_PARAMS = 3

OTHERS = 4.

IF SY-SUBRC NE 0.

CLEAR : V_PRINT_PARMS.

ENDIF.

  • The printer destination has to be set up

IF V_PRINT_PARMS-PDEST = SPACE.

V_PRINT_PARMS-PDEST = LC_LOCL.

ENDIF.

  • Explicitly set line width, and output format so that

  • the PDF conversion comes out OK

V_PRINT_PARMS-LINSZ = C_LINSZ.

V_PRINT_PARMS-PAART = LC_PAART.

NEW-PAGE PRINT ON PARAMETERS V_PRINT_PARMS NO DIALOG.

peform display_output.

NEW-PAGE PRINT OFF.

Regards,

nagaraj