cancel
Showing results for 
Search instead for 
Did you mean: 

Invoice Advanced Search Criteria

nishantbansal91
Active Contributor
0 Kudos

HI Guys,

I have one Requirement in SRM 7.0. We want to set one default value for Role Field  in Invoice search.

By default it value is Invoice Created By me. We want Blank by default.

Is it possible through configuration or not? or shall i change through Web dynpro changes.

Regards,

Nishant

Accepted Solutions (1)

Accepted Solutions (1)

laurent_burtaire
Active Contributor
0 Kudos

Hello Nishant,

do not know if it is possible through WDC configuration, but value ranges for role are obtained with /SAPSRM/IF_PDO_SO_SEARCH_BASE~GET_VALUE_RANGES method from /SAPSRM/CL_PDO_SO_SEARCH_BASE class.

You can write an implicit enhancement at the end of this method in order to re-order values for:

- iv_fieldname = 'DESKTOP_FUNCTION',

- iv_object_type = 'BUS2205'.

Regards.

Laurent.

nishantbansal91
Active Contributor
0 Kudos

HI Laurent,

Thanks for Reply.

Yes I already saw this. But i want to set the Default value in the Field.

Below code is used for collecting the data into Internal table then How we can Set the Default value for that Field.

       add_value space space.

       add_value /sapsrm/if_pdo_search_c=>gc_desktop_fct_approver text-061.

       add_value /sapsrm/if_pdo_search_c=>gc_desktop_fct_rejecter text-062.

       CASE iv_object_type.

         WHEN /sapsrm/if_pdo_obj_types_c=>gc_pdo_shop.

           add_value /sapsrm/if_pdo_search_c=>gc_desktop_fct_recipient text-060.

         WHEN /sapsrm/if_pdo_obj_types_c=>gc_pdo_grse.

           add_value /sapsrm/if_pdo_search_c=>gc_desktop_fct_creator text-056.

           add_value /sapsrm/if_pdo_search_c=>gc_desktop_fct_requester text-059.

           add_value /sapsrm/if_pdo_search_c=>gc_desktop_fct_recipient text-060.

         WHEN /sapsrm/if_pdo_obj_types_c=>gc_pdo_biddingdoc.

           add_value /sapsrm/if_pdo_search_c=>gc_desktop_fct_creator text-057.

         WHEN /sapsrm/if_pdo_obj_types_c=>gc_pdo_invoice.

           add_value /sapsrm/if_pdo_search_c=>gc_desktop_fct_creator text-058.

       ENDCASE.

Regards,

Nishant

laurent_burtaire
Active Contributor
0 Kudos

Hello,


     IF iv_fieldname   eq /sapsrm/if_cll_powl_c=>gc_search_cr_desktop_function AND
       iv_object_type eq /sapsrm/if_pdo_obj_types_c=>gc_pdo_invoice.

         

          REFRESH et_values.

          add_value /sapsrm/if_pdo_search_c=>gc_desktop_fct_creator text-058.

          add_value /sapsrm/if_pdo_search_c=>gc_desktop_fct_approver text-061.

          add_value /sapsrm/if_pdo_search_c=>gc_desktop_fct_rejecter text-062.

          add_value space space.

     ENDIF.

                

Laurent.

nishantbansal91
Active Contributor
0 Kudos

Hi Laurent,

I appreciate your reply. But how we can set the default value in the Drop Down. or in which way thr default value is set automatically in Advanced Search.

I have one silly question also. What is the Use of these class /SAPSRM/IF_PDO_SO_SEARCH_BASE and how you can search this class. I found that class in Debugging. Is there any way by the name that we can find the Class in SAP SRM. I am in little bit confusion about the mapper class and DO BO SO classes. How we can find this classes. What is the scope of all this classes.

Regards.

Nishant

laurent_burtaire
Active Contributor
0 Kudos

Hello,

it does not seem you debugged method i gave you...

/SAPSRM/IF_CLL_MAPPER~REFRESH method from /SAPSRM/CL_CH_WD_SOSM_INV class calls method i mentioned in my previous message  in order to put data from the PDO layer into the Drop down Internal Tables.

Lines populated in drop-down table are displayed as stored inside the internal table (there is no index to manage a default value). So, you have to put in first row role you want to be the default one.

Regards.

Laurent.

Answers (0)