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

Printer option is not enable in module pool programing

Former Member
0 Likes
614

Hi All,

i m creating one report & i want to print that optput result.So for that persose i create a function key for print.but i dont know the exart coad for that print option , which will be written in PAI.can any one help me...................

Thanks

Laxmikanta

4 REPLIES 4
Read only

Former Member
0 Likes
550

HAI,

Use this FM:

CALL FUNCTION 'GET_PRINT_PARAMETERS'
       EXPORTING
          layout                 = 'X_65_132'
          line_count             = 65
          line_size              = 132
          destination            = 'LOCL'
          report                 = '/SAXAG/CM_DARLEHEN_PRINT'  "Report Name
          list_name              = 'NEW-LIST'
          immediately            = 'X'
          copies                 = '1'
          with_structure         = 'X'
       IMPORTING
          out_parameters         = pripar
          out_archive_parameters = arcpar
          valid                  = val

       EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.

    IF val ne space AND sy-subrc = 0.
      SUBMIT /SAXAG/CM_DARLEHEN_PRINT
      TO      SAP-SPOOL
      SPOOL   PARAMETERS pripar
      WITHOUT SPOOL DYNPRO
      AND RETURN.
    ENDIF.

Declare pripar and arcpar of the type:

DATA: val(1) TYPE c,
      pripar TYPE pri_params,
      arcpar TYPE arc_params.

Best Regards,

rama

Read only

0 Likes
550

This message was moderated.

Read only

0 Likes
550

HAI,

Then use Export and Import statements to get the previous data.

Just a Sample:

WHEN 'PRINT'.
    READ table gt_eqcrh into gtw_eqcrh with key mark = 'X'.
    IF sy-subrc = 0.
      Clear gtw_eqcri.
      Refresh gt_eqcri.
      Perform Get_Eqcri.
      EXPORT gt_eqcrh to Memory ID 'EQH'.
      EXPORT gt_eqcri  to Memory ID 'EQI'.
    ENDIF.

    CALL METHOD CL_GUI_CFW=>FLUSH.
    IF NOT GT_EQCRH IS INITIAL. "AND NOT GT_EQCRI IS INITIAL.
      SUBMIT /SAXAG/CM_DARLEHEN_PRINT and return.
    ENDIF.
    CLEAR OK_CODE.

And now use Import statements in the called transaction program:

IMPORT gt_eqcrh from Memory ID 'EQH'.
IMPORT gt_eqcri  from Memory ID 'EQI'.

Best Regards,

rama

Read only

Former Member
0 Likes
550

Hi

can u help me.

i m created two screen & i want some value will display in second screen ,what i entered in first screen.

for call ing second screen i use call transaction.that is ok.but i wont fetch my previous data on next screen field

.what can i do??

i already use move field1 to field 2.(not working).

move internal table 1 to internal table2.

my code is ......................

Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code

Edited by: Rob Burbank on Feb 17, 2010 11:33 AM