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: 

function type for print in menu painter for standard toolbar

Former Member
0 Kudos
380

Hi Everyone,

In my standard toolbar i have print, find and find next, when i create these it asks for an option function type,

which must i select for it to work in my program.

These are the options provided.

E Exit command (MODULE xxx AT EXIT-COMMAND)

S System function

T Call a transaction

Normal application function

P Local GUI functions

H Internal Use

Which one i should select for it work in the standard toolbar, any help will be of great use to me.

Thanks in advance,

Prabs.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
97

Hi Prabhakaran,

If your menu is for a custom screen, then you should leave it blank for 'Normal Application Function' and you should handle it in your code. If it is report program, then you don't have to do anything, system will take care of it.

Please close the other post created by you as these two are related.

Srinivas

8 REPLIES 8

Former Member
0 Kudos
98

Hi Prabhakaran,

If your menu is for a custom screen, then you should leave it blank for 'Normal Application Function' and you should handle it in your code. If it is report program, then you don't have to do anything, system will take care of it.

Please close the other post created by you as these two are related.

Srinivas

0 Kudos
97

Hi Srini,

Could u please send me a sample on it.

It would be of great help to me.

Thanks,

Prabs.

0 Kudos
97

Assign a function code, to the button/icon. For example, for the print button, assign the function code "PRINT". Then in your user-command module of the PAI, you must write the code to handle the the printing.



CASE OK_CODE.
  WHEN 'PRINT'.
    CLEAR OK_CODE.

* Do whatever you need to do.

ENDCASE.

What exactly do you need a sample of?

Regards,

Rich Heilman

0 Kudos
97

Hi Rich,

What exactly do you need a sample of?

I want this window to pop up, if i press the print button it has pop up the window like usually how it pops in the report program if we press the print button, same thing for the find button also.

The general find pop window. i.e find/replace i think you know what i am talking.

Please I need very badly this to be done.

Thanks in advance,

Prabs.

0 Kudos
97

Oh, what you are asking for is the standard functionality of the buttons as if there where in a report list display?

Let me ask yo this, if the user presses the print button, what exactly is to be printed?

If the user presses the find button, what exactly is being searched?

What I mean is, in report list displays, the functionality behind the buttons are specific to a list display, for example, when you click the print button, it will throw a dialog for print parameters about printing the LIST display. If you click Find, it will be searching the LIST display. I am assuming that you have a regular dynpro here, with some fields, maybe a table control, so again what is being printed, and what is being searched.

Calling the standard functionality of the PRINT and FIND buttons as they are in a list display is NOT going to solve your problem.

Regards,

Rich Heilman

0 Kudos
97

Hi Rich,

I have around 3 alv grid in the screen, when i execute my program the screen displays all the grids.

And on the standard toolbar i have these icon print and find. So if i press them then it must come up with the dialog as u said with standard print parameters for printing the alv girds. Same thing for finding also just give any word to search it has to highlight them on the alv grids which are in my screen.

So for this only i am asking the sample code.

Any help will be of great use to me.

Once again thanks,

Prabs.

0 Kudos
97

Interesting, first I would suggest you taking a look at the CL_GUI_ALV_GRID, are the methods for "PRINT" and "FIND" available for you to call or are they "private" methods. If they are "public", then you may be able to call the associated methods of all the instances of the class. First, take a look and see if you can even call them? In Se24, it should say what kind of methods they are, public, private, or protected.

Another totally different option would be....

When you click the print icon, Loop at all of your internal tables that are associated with grids and WRITE them out to a list, or maybe you can even use PRINT-CONTROL.

Regards,

Rich Heilman

0 Kudos
97

I made a report like your, but it only had icon to print.

When user pressed it, the programm called ALV function that generated ALV list: it called the K_KKB_LIST_DISPLAY, not REUSE_ALV_LIST_DISPLAY, because the importing parameter IS_LAYOUT (of K_KKB_LIST_DISPLAY)has field PRINT (there isn't in REUSE_ALV_LIST_DISPLAY). If you set this field to X, the function'll print the list.

I think it'll easy for you to call ALV function, because you have just filled catalog tables and layout structures for ALV GRID.

You can see the method PRINT_BACKEND of CL_GUI_ALV_GRID as example.

So I think you should pass your three tables to K_KKB_LIST_DISPLAY, set IS_LAYOUT-PRINT to X.