Skip to Content
avatar image
Former Member

Adding a new Search Criteria and New field in Result list in Supplier screen

Hello Experts,

I have a requirement to add some extra fields in the supplier search criteria as a drop-down like External Number(BPEXT) field,Tax Number (DFKKBPTAXNUM – TAXNUM)

I have also gone through different threads and tried with those methods( like creating a post exit to Handler Class, configuring the hide field name in MDGIMG) but there was no luck.

Could anyone please let me know if anyone able to achieve this requirement

Regards

Prateek Agarwal

P.S:- Any useful inputs will be appreciated and rewarded.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • avatar image
    Former Member
    Jan 07, 2017 at 05:23 AM

    Hi Loga Nathan,

    Thanks for the response.

    Yes, I have created the post-exit method in the Clasd Cl_MDg_BS_BP_HANDLER with the new field, but its not showing in the UI.

    If you have achieved this scenario, can you please share more details(a doc or code snippet) will be really helpful and appreciated to check If I am missing or doing some mistake.

    Thanks

    Regards

    Prateek

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 07, 2017 at 04:36 AM

    Hi Prateek,

    Search criteria - Enhance methods Query_* and Get_Query_properties of class CL_MDG_BS_BP_HANDLER.

    Result - Extend structure BSS_BPIL_ROOT_ATTRIBUTES.

    Thank you

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 09, 2017 at 05:35 AM

    Hi Prateek,

    It is simple as you just wanted to extend existing search method with one search criteria. Just create one more entry in the get query properties of the handler class and add the same in the configuration.

    ls_attribute-fieldname = 'TAXNUM'.
    APPEND ls_attribute TO et_search_attributes.
    ls_props-attribute = ls_attribute-fieldname.
    ls_props-rollname = 'BPTAXNUM'.
    INSERT ls_props INTO TABLE et_search_attribute_props.

    Thank you!

    Regards,

    Logan.D

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 09, 2017 at 07:49 AM

    Hi Prateek,

    1.Enhance the method QUERY_PROP_BP_* of class CL_MDG_BS_BP_HANDLER to add the field in search criteria.

    2.Enhance the method QUERY_BP_* of class CL_MDG_BS_BP_HANDLER to fetch the data based on search criteria(added fields).

    Thanks

    Bala

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 09, 2017 at 12:43 PM

    Hi Loga Nathan& Bala,

    Thanks for your inputs and help.

    Fields are added now in the drop-down, bt when I used the method (Query_BP_*) to fetch the records the I am getting the below error message.

    Below is the error and the code snippet:-

    ENHANCEMENT 1  ZADDR_VAL.    "active version
    
    DATA:
    
       lr_regio           TYPE RANGE OF adrc-region.
    
      DATA:
    
       lr_regio_line      LIKE LINE OF lr_regio.
    
      LOOP AT it_sel ASSIGNING <ls_sel>.
    
        CASE <ls_sel>-fieldname.
    
          WHEN 'RFE_POST'.
    
            MOVE-CORRESPONDING <ls_sel> TO lr_regio_line.
    
            APPEND lr_regio_line      TO lr_regio.
    
            lv_search_address = abap_true.
    
           WHEN OTHERS.
    
            ef_not_supported = abap_true.
    
        ENDCASE.
    
      ENDLOOP.
    SELECT DISTINCT p~partner
    
          FROM ( ( but000 AS p INNER JOIN but020 AS c
    
                                  ON p~partner = c~partner  )
    
                 INNER JOIN adrc AS a
    
                    ON c~addrnumber = a~addrnumber )
    
          UP TO iv_num_entries ROWS
    
          INTO  TABLE lt_partner
    
        where p~partner    IN lr_partner
    
        and   a~region     in lr_regio.
    
      LOOP AT lt_partner ASSIGNING <lv_partner>.
    
          ls_idlist-bpartner = <lv_partner>.
    
          APPEND ls_idlist TO et_idlist.
    
        ENDLOOP.
    

    Can you please let me know if I am missing something?

    Regards

    Prateek

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 16, 2017 at 06:17 AM

    Hi Prateek,

    Before checking, Region search is already part of the search criteria right.

    Thank you!

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 14 at 09:25 PM

    Hi Nathan,

    What is the Class and the method where we can populate the custom fields in Results list?

    I have added my custom field in the structure BSS_BPIL_ROOT_ATTRIBUTES,and it shows up in the UI?

    Regards,

    Xavier.P

    Add comment
    10|10000 characters needed characters exceeded