cancel
Showing results for 
Search instead for 
Did you mean: 

Use Event print_list to display all search results in print preview

gregorw
Active Contributor
0 Kudos

Hello SDN Fellows,

our users want to get a printable List of their search results in Opportunities and Account Management. I've found the Event PRINT_LIST and added it to the Toolbar-Group OPP_OIC.

Now I start a search for opportunities and found about 30 matches. By default 5 are displayed. When I click now on the Button "Print" a new window opens and shows me this 5. When I click the Icon "Maximize" I see 20 opportunities. When I click "Print" I only see a print preview for this 20.

How can get displayed all my search results?

I've tried also to implement my own print preview function as Debasish Pattnayak has described here: But the problem is that my Access Class is only called when a Opportunity is selected. What must I do to get it also called when no Opportunity is selected? Where can I read the search result list?

Regards

Gregor

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

You know the screen-structure of the search-result area.Then in your Model-Access-Class (for this structure )the read method will be reading the search result list.

Within the framework the method CL_CRM_BSP_FRAME_SRES->DO_GET_DATA reads this data from the read method of the MAC.Put a breakpoint there and you can see this list in gr_data_context->gr_table after the 'do_read' method is called.

Regards,

Satyadeep

gregorw
Active Contributor
0 Kudos

Hello Satyadeep,

unfortenately the screen-structure is the SAP Standard structure: CRMT_BSP_OPP_SEARCH. So I can't add my Model-Access-Class for this structure via the Application set. But I have seen in the Debugging of CL_CRM_BSP_FRAME_SRES->DO_GET_DATA that gt_object_key is filled with the search Result GUID's. How did I get access to this table in my Model-Access-Class?

Regards

Gregor

Former Member
0 Kudos

Hi ,

So far as getting this table in model acccess class , well you do have that data in model-access class itself!

Check the parameter ET_SCREEN_STRUCTURE of the read method of model-access-class .This is the data that you i.e. the application or model or model-access-class (you can call it by any name) pass to the framework controller

CL_CRM_BSP_FRAME_SRES .

The program flow from CL_CRM_BSP_FRAME_SRES->do_get_data is as follows :

It calls the method CL_CRM_BSP_DC_GENERIc->do_read,

which internally calls CL_CRM_BSP_DATA_CONTEXT->read which calls CL_CRM_BSP_IL->read.

(These three classes are framework classes and you shoudn't change them.)

The CL_CRM_BSP_IL->read finds out the model access class for the given screen-structure , and calls the read method of that class.

You cannot change the model access class provided by SAP but you can copy the MAC into a zclass , modify it and then map this new class to the screen-structure (mapping is stored in table crmc_access) .

Regards,

Satyadeep