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

Standart Print Function Code on Gui Status on dialog programming

Former Member
0 Likes
978

Hi,

I create a new dialog programming and I want to use standart print function on the gui status.

I write PRINT function key on gui status but couldn't print.

How can I do this?

Thanks.

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
695

Print what the values in the screen? Since this is not a report program, this means that you must handle the PRint button, meaning you assign the fcode to it, you must also handle this fcode in the PAI of your screen, and also write all of the logic to do whatever printing you want. Simply assigning the fcode(or even the standard fcode value in a list display) will not do anything, you need to write the code to print something, whether it be a list display, or a sapscript, smartform, IFbA, whatever.

Regards,

Rich Heilman

Read only

0 Likes
695

Hi again,

I create a dialog program. For example I use 100 screen.

And I cretae a GUI status . You are write so I must handle this print code in the PAI of your screen.

But how ?

For example: I write a exit function

when 'EXIT'.

leave program.

when 'PRINT'.

.....

There is a pie chart and a list on the screen, this is dialog screen, not sapscript, not smartforms.

Read only

0 Likes
695

That's right, so in a dialog screen, you must write the logic for whatever you want to print. Basically if you have a list on the screen, maybe in a table control, you would need to now loop at that table write the list, this would generate a list output, where you can then print the list, or you could force this output directly to the printer without having to show the subsequent list output.



case ok_code.

when 'EXIT'.
  leave program.

when 'PRINT'.
   leave to list-processing.
     loop at itab.
        write:/ itab-field1, itab-field2, itab-field3.
     endloop.

endcase.

Would you like to force this output to a printer directly without the list display?

Regards,

Rich Heilman

Read only

0 Likes
695

Hi Rich,

There is a pie chart and a list grid on the screen so I couldn't use itab.

I think in standart GUI status there is a print function. You push print button, popup is appeard on he screen. I want to use this standart print function.

Is it possible?

Read only

Former Member
0 Likes
695

In the PAI when checking the user command:

      set screen 100.         " The current screen.
      leave to list-processing and return to screen 100.   " The current screen.
      set pf-status space.

Then do your list.

Rob