Search help results of cost center

Hi everybody
Cost center is normally assigned to SC item based on the attribute set in PPOMA_BBP (attribute CNT). Now, when you're in the item details screen and want to change that default cost center you can search for other ones using the "glasses icon". This starts some kind of a F4 search help screen and returns a list of all available cost centers existing in the backend system.
Our SRM users are NOT created in the backend system, therefore we're not able to control cost center authorizations via backend user authorizations.
So the problem we have is, that in the result screen we get by far too much cost centers from which the enduser can make his choice. We'd like to reduce this result list to only the cost centers assigned via CNT attribute on org. unit level in PPOMA_BBP.
I already looked at BAdIs BBP_F4_READ_ON_ENTRY and BBP_F4_READ_ON_EXIT (method GET_COSTCENT) and to verify if they could do what I wanted simply tried to delete all entries from table ET_COSTCENT_LIST and ET_COSTCENT_FAVOURITES... no changes, the result list still contains a complete overview of all our backend cost centers.
To all SRM gurus out there: how is it possible to restrict the result list of cost center search help?
Thanks again anyone for some help.
Kind regards,
Renaud

Hi Case,
  We can get this functionality with out changing any standard program.
  Herewith I am sending details.
1.     Implement the badi using definition BBP_DRIVER_DETERMINE and write below  mentioned code in method DETERMINE_DRIVER.
        IF functionname = 'B470_SHLP_CALL' AND sy-tcode NE 'PPOMA_BBP'.
functionname = 'ZB470_SHLP_CALL'.
        ENDIF.
2.     Copy the standard FM B470_SHLP_CALL to ZB470_SHLP_CALL then make        
       the changes in ZB470_SHLP_CALL.
       Here you have to make two changes.
a.     Clear the destination name (LV_DESTINATION) for calling search help
                        from SRM
b.     Give your own search help name (ZCOST_CENTER we need to create this search help in SRM )
       Now it will call the search help ZCOST_CENTER from SRM only
               Sample code
          CASE shlp_field.
        WHEN gc_g_l_acct.
      lv_shlpname = 'SAKO'.
       lv_shlpparam = 'SAKNR'.
        WHEN gc_cost_ctr.
      lv_shlpname = 'ZCOST_CENTER'.
      lv_shlpparam = 'KOSTL'.
      CLEAR lv_destination.
3.      Create you won search help (ZCOST_CENTER) in SRM and write code in search help exit for getting the cost centers from user attributes. For reading the cost centers from user attributed you can use the FM BBP_READ_ATTRIBUTES (pass the CNT as attribute ID)
Regards,
Padmaraju
If it useful to you,please reward points.

Similar Messages

  • Adding new field in search help result view

    Dear Experts,
    I want to include one more field in search help result. The field shoud give description.
    How can i do this in UI result view?
    If I try to add attribute in result view, the result view is of type table, and it does not allow us to add value node. It will allow us to add model attribute. If I add attribute in search help resut table view then will i be able to see it in table form.
    Thanks and regards
    Pankaj Kumar

    Hi Pankaj,
    Its not that difficult.
    There are two ways
    1. You can enhance your Result BOL object through EEWB and append your z-field to std. BOL result object. This then appears automatically for your result context node and then you can pull it to the view in config tool.
    2. Directly go to your context node class (CN00 , CN01 etc ) , now copy method GET_S_XYZ , paste it and rename as GET_yourfieldname. Similarly copy SET_S_XYZ, GET_M_XYZ and GET_I_XYZ and paste and rename. Once activated. Quit the component browser completely. Open again using bsp_wd_cmpwb. open you view and then your node. You can find you new attribut present as struct.YourField.
    You can then copy code from available setter-getter methods for this attribute. You must handle setter getter by urself in this case. In may std. nodes, this is done for description field. I have personally done this for product descripton field.
    if you dont want the field to be part of structure ( i.e. as struct.Yourfield ) then you can also copy paste GET_XYZ, SET_XYZ methods. your filed then do not appear as Struct.YourField but it just appears as YourField name under context node.
    Hope this helps you.
    Thanks & Regards.
    You can check PRODUCTDESCRIPTION  attribute of BTAdminI node of BT115QIT_SLSQ/Items  view of BT115QIT_SLSQ component. They have added it the same way as i described above. You see the GET_ method to see how they are retrieving product description. In my object, i wrote direct query to Comm_prshtext table to retriev short_text by passing product guid and then assigen it to value variable of Get method.
    Edited by: suchita P on Sep 20, 2008 2:22 AM

  • Restrict search help results on order types

    I need to restrict search help results on the account assignment category  for order type for the users when creating a SC. I have define fix values on the attributes PM_AUART & ANR & KNT (Order type, Order & Account assignment category) and maintained the related others PM attributes as well. But when I select the search help the system brings up all the Orders type and not the ones defined at the user attributes -  PM_AUART (Order type). Do I am missing something? How can I restrict the search help when searching for order types?
    Your support is highly appreciated.
    Thanks
    William

    Hi
    Please elaborate which SRM version you are currently on..
    Which Search help you are referring to and the name of the serach help which is being used ?
    Regards
    - Atul

  • How to assign search help for custom cost centre field in SRM 7.0

    Hi Experts!!
    We are currently working in SRM 7.0.As per our business requirement, in account assignment tab we need to use a custom
    cost centre field (ZCOST_CENTRE) instead of standard cost centre field.It is observed that for standard cost centre field there is a standard web-dynpro search-help assigned where it will return the F4 search help values from backend.
    Can any one of you please help me how can I assign the search-help for the custom cost centre field. Is there any FM to call the backend cost centre search help for custom field or any other way how can I achieve this?
    Thanks in advance.
    Regards,
    Kalyani

    kalyani,
    i can see your requirement in below way..
    as it just reads: you need to assign the standard cost center help to a z cost center field in component /SAPSRM/WDC_UI_DO_ACC.. which actually is fetched though the component /SAPSRM/WDC_UI_BACKEND_SH
    so, if you see the component controller of SAPSRM/WDC_UI_DO_ACC you will see the component
    USAGE_SH_F4     /SAPSRM/WDC_UI_BACKEND_SH                        
    USAGE_SH_F4     /SAPSRM/WDC_UI_BACKEND_SH     INTERFACECONTROLLER
    so you can replicate the same functionality for your z field.
    but can you clarify one thing.. why are you going for this z field in place of standard field ?

  • How to get search help results in RIGHT-JUSTIFIED column

    I am writing a search help with search help exit. Therefore, I use a table lets say tabA. I don't need all fields of tabA but need some further fields which I fill during exit.
    tabA does not have currency or number fields.
    I need a currency field and use a char20 field of tabA instead. filling of this field and showing results is o.k., but of-course it is shown left-justified.
    I did not find any fields of shlp-fielddescr which sounds like left/centered/right-alignment. Another try was to fill char20 field with leading '_' signs - that looked terrible and was not right-justified either, because of not fixed-size font.
    Let's resume: there is no number or currency field which I can use. The shown results appear in a column of not fixed-size font.
    Any other idea?

    Hi, I have the same problem. Did you get to resolve it? . Thanks

  • Want search help result directly only key field

    Hi friends
       i need one help, working on 4.6c, i want any fm that takes search help name and select options and write back the result list .
       i know some fm's like DD_SHLP_GET_HELPVALUES which is returning the result in string, for that i have to do lot of other stuff in that one i have to use cl_alv_table_create=>create_dynamic_table which i don't want.
        i want only the key field result list like F4IF_FIELD_VALUE_REQUEST rerurns RETURN_TAB type table of DDSHRETVAL .
      thanks in advance

    Hi Shiva,
    I know that this post is really old, but just for people who still visit this post, I extended Uwe's solution and came up with this. (Uwe's solution causes a popup to appear which I do not want as am accessing the F4 helps remotely).
    DATA: ls_shlp_descr TYPE shlp_descr,
           lt_ddshretval TYPE TABLE OF ddshretval,
           ls_ddshselops TYPE LINE OF ddshselops.
    " Get F4 Help structure
    CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
       EXPORTING
         shlpname = 'T006_T'
       IMPORTING
         shlp     = ls_shlp_descr.
    " Add filter criterion
    ls_ddshselops-shlpname = 'T006_T'.
    ls_ddshselops-shlpfield = 'MSEH3'.
    ls_ddshselops-sign = 'I'.
    ls_ddshselops-option = 'EQ'.
    ls_ddshselops-low = 'MON'.
    APPEND ls_ddshselops TO ls_shlp_descr-selopt. " You can add more such filter options
    " Get the result values
    CALL FUNCTION 'F4IF_SELECT_VALUES'
       EXPORTING
         shlp       = ls_shlp_descr
       TABLES
         return_tab = lt_ddshretval.
    Maybe there are other ways to do this, just that I found this pretty OK for my case.
    best regards,
    Ashwani

  • Can AUTHORITY_CHECK effect in search help result list

    For example ,authorizaiton objid a value 1,2,the user only have authorization a = 1,but in F4 for search help ,the user can see value 1 and 2 for a .Can i do someting to make the user only can see value 1 for a?
    i have an idea using search_help_exit and authority_check,is there any other way to do this ?

    Hi,
    I need to perform authority check on the field NAME1 present in the standard screen - customer master ( T.Code-XD02). Only certain users should be allowed to edit the field and others should be restricted.
    I have created a field exit FIELD_EXIT_AD_NAME1 for the ADRC-NAME1 field.
    Now inside this field exit i need to write the authority-check code.
    I have created the authorisation object Z_KNA1_NAM for the field NAME1 using the SU20 and SU21.
    For this scenario how do i write the authority-check code in my field exit?
    Below is my field exit code,is that correct?
    FUNCTION FIELD_EXIT_AD_NAME1.
    ""Local Interface:
    *" IMPORTING
    *" REFERENCE(INPUT)
    *" EXPORTING
    *" REFERENCE(OUTPUT)
    AUTHORITY-CHECK OBJECT 'Z_KNA1_NAM'
    ID 'NAME1' FIELD SY-UNAME
    ID 'ACTVT' FIELD '03'.
    IF SY-SUBRC = 0.
    MESSAGE 'Not Allowed to Edit the Name 1 Field' TYPE 'E'.
    ENDIF.
    ENDFUNCTION.
    In the above code i have given SY-UNAME in the code line 2 - ID 'NAME1' FIELD SY-UNAME ,is that correct? what should i give there?
    Please help me on this issue.
    Cheers,
    P.S.Chitra

  • Search help result

    Hi there.
    There is a F4IF_INT_TABLE_VALUE_REQUEST FModule but it returns only 1 field from search-help line chosen
    Could You tell me how can I get the whole line ?

    Hi,
    This is how the FM works.
    data:
        begin of t_values occurs 2,
          value like kna1-begru,
        end of t_values,
        t_return like ddshretval occurs 0 with header line.
      t_values = 'PAR*'.
      append t_values.
      t_values = 'UGG'.
      append t_values.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield        = 'BEGRU'
                value_org       = 'S'
           tables
                value_tab       = t_values
                return_tab      = t_return
           exceptions
                parameter_error = 1
                no_values_found = 2
                others          = 3.
      if sy-subrc = 0.
        read table t_return index 1.
        o_begru-low = t_return-fieldval.
        if o_begru-low = 'PAR*'.
          o_begru-option = 'CP'.
        else.
          o_begru-option = 'EQ'.
        endif.
        o_begru-sign = 'I'.
        append o_begru to s_begru.
      else.
        o_begru = i_begru.
      endif.
    Regards,
    ramya

  • Formatted search to get the cost center name

    Dear experts, I need to display the cost centre name/description on goods issue via formatted search. i have set the cost centre as " Display distribution rule in a unified column".
    Dimension 1
    01 Abc
    02 xyz
    Dimension 2
    001 aaa
    002 bbb
    Dimension 3
    0001 jkl
    0002 mno
    System shows only the code on goods issuance screen like "01,001,0001 " while i need to display "Abc,aaa,jkl" . Is it possible via formatted search
    or any other way?
    Regards,
    Awais

    Hi,
    Create on UDF at Row Level in Good Issue form beside distribution rule column
    & apply below FMS to it
    SELECT T0.[PrcName] FROM OPRC T0 WHERE T0.[PrcCode] =(select $[$13.10001018.0])
    auto-refresh it on selection of distribution rule
    regards,
    Raviraj

  • How can I replace a standard search help in SRM 7.0 as enhancement?

    Hi experts.
    In SRM 7.0, Shopping Cart, Account tab - when using search help for the Cost Center field, a search help 'KOST' is called in the backend system.
    I need to replace this functionality with a call to a local search help.
    Being newbie in WebDynpro, I expected to be able to make this change in the Context field, search help attribute as an enhancement, but that was not possible.
    Thanks in advance!
    Per

    Hi again.
    I tried the proposed solution with no luck.
    The problem is, that the standard program is dynamically accessing the attributes of the field I deleted and then I got a short-dump
    The solution was however quite simple, when I first had the idea.
    If SAP can access a screen field dynamically adding a search help, then I probably could do the same.
    So I created a enhancement post exit in view method "WDDOMODIFYVIEW" with this code:
    DATA lo_nd_account_detail TYPE REF TO if_wd_context_node.
    * navigate from <CONTEXT> to <ACCOUNT_DETAIL> via lead selection
      lo_nd_account_detail = wd_context->path_get_node( path = `COMP_CONTEXT.ACCOUNT_DETAIL` ).
      DATA lr_node_info TYPE REF TO if_wd_context_node_info.
      lr_node_info = lo_nd_account_detail->get_node_info( ).
      CALL METHOD lr_node_info->set_attribute_value_help
        EXPORTING
          name            = `COST_CTR`
          value_help_mode = lr_node_info->C_VALUE_HELP_MODE-DDIC
          value_help      = 'BBP_COSTCENT_VALUE'
      CALL METHOD lr_node_info->set_attribute_value_help
        EXPORTING
          name            = `G_L_ACCT`
          value_help_mode = lr_node_info->C_VALUE_HELP_MODE-DDIC
          value_help      = 'Z_GL_ACCOUNT'
    The above code sets the search help for two fields in the Context.
    Hope this helps someone out there!
    Best regards
    Per

  • Cost Center and G/L account search help not working

    Hi Gurus,
    I am facing a problem with the search help button for cost assignment in Shop screen.
    When I press the search button for cost center, there is no new screen coming up asking me the search criteria to be given as input. Same is the problem when I search for G/L accounts.
    I have defined the backend RFC user as dialog user and also defined the RFC(dialog) in the SRM system for the backend RFC.
    My user id has authorization object M_BBP_SHLP in my profile.
    What may be the reason for this issue?
    Note: I am currently using SRM5.0 system with backend R/3 4.7 version. This SRM system is already connected to another backend system ECC6.0, and the search help is working fine for those users.
    Pls. guide me on how to resolve this issue.
    Regds,
    Ancy

    Hi Ancy,
    Don't give wild search. Give some words following with * like "UK*" lists all the UK Cost centers. For the G/L accounts: G/L Accounts will get updated in the SC automatically depend upon the product category what you have selected.
    Check the configuration  Cross Application Basic settings->Account Assignment ->Define G/L Account for the product category.
    If you have maintained the configuration for the paritcular G/L Account and Product cateogyr then when G/L Account is updated automatically in the SC (Depend upon this configuration)
    Kind Regards
    Sameer

  • How to restrict the Cost Center Search ?

    Hi everybody,
    Im a little bit worried... In my Org Model, I defined in the CNT user's attribute some Cost Centers. 
    I was thinking that this action would restrict the Cost Centers that the end-user can use. 
    Obviously not.. it seems that it is just a default value, but the user can search and put any cost center.  The same concept applies for the GL account.  =(
    Somebody knows how to really restrict the cost centers that an user can use ?
    I appreciate your help a lot !!!
    Regards,
    Diego

    Hi Diego,
    For cost centers search help in SRM, there are 2 options:
    1 - You use the backend search help, then backend search help is called directly, and the attributes are not taken into account.
    2 - You do not use the backend search help, then a HTML select option (dropdown list) of codes is shown to the user with all the values entered (one by one) in the user attributes (or herited values, but ranges are not supported).
    The first option is used as soon as the user has the authorization object (authorization object SRM 3.0: M_BBP_SHLP; authorization object SRM 4.0: BBP_FUNCT/value: BE_F4_HELP)
    What I understand, is that you want to use the backend search help, with a limitation upon the user attributes: this can be done using the search help BADI.
    Regards.
    Vadim

  • Input help for cost center & WBS element not working

    Hi ALL
    We are using SRM 4.0 with backend ECC 5.0.
    Input help for attributes cost center (CNT), WBS element (PRO) are not functioning.
    When tried to search for input help (F4) on the above attributes, I am getting message "Display not possible (Inconsistency in the input help)".
    I even applied SAP note 746788 for cost center search help.
    Can you tell me if I have missed any config settings?
    Thanks in advance
    Jagdish

    Hi,
    Did you managed the transactional RFC destination in the customizing (where you define all your log. systems it is an additional field in the table control).
    Regards.
    Vadim

  • F4 help for Cost Center in SRM 7.0

    Hi,
      My requirement is to display customized F4 help for the Cost Center(i.e. user specific search help maintained in Z table) field during the creation of the Shopping Cart.
      I've created my own Search Help, and I'm looking for a BADI which will fit in my reuirement.
      So far I've tried BADI 'BBP_DRIVER_DETREMINE ' for the same, but it's not getting called for providing F4 help. 
      Thanks in advance.
    Thanks & Regards,
    Amit

    Hello all,
    This is to correct my posting on Nov 16, 2009 8:20 AM. I have done further research and testing and finally got the multiple GL working. I have to remove the authorisation for object BBP_FUNCT on activity BE_FE_HELP to disable the serach help function. This way, the user will see the allowed list of GLs instead of a search help.
    Regards
    SF

  • Populate and display internal table results using search help exit...

    I have copied F4IF_SHLP_EXIT_EXAMPLE and made changes. I want this search help exit to populate and display contents related to 'FIELD1' when the user enters a specific value for it in the search help screen, meaning when the user restricts the search by that value.  For field2, field3, field4, field5, field6, field7, and field8 I am using a custom view.
    Following is the code:
    TYPES:  BEGIN OF t_search,
                   field2 TYPE field2,
                   field3 TYPE field3,
                   field4 TYPE field4,
                   field5 TYPE field5,
                   field6 TYPE field6,
                   field7 TYPE field7,
                   field8 TYPE field8,
                   field1 TYPE field1,
                END OF t_search.
      DATA: it_itab TYPE TABLE OF t_search,
            wa TYPE t_search,
         wa_selopt TYPE ddshselopt,
            wa_fielddescr TYPE dfies.
    ranges: r_field1 for std_table1-field1
    STEP SELECT    (Select values)
        FREE: r_field1.
    **Get the value entered for FIELD1 in search help
        LOOP AT shlp-selopt INTO wa_selopt.
          CASE wa_selopt-shlpfield.
            WHEN 'FIELD1'.
              r_field1-sign = wa_selopt-sign.
              r_field1-option = wa_selopt-option.
              r_field1-low = wa_selopt-low.
              r_field1-high = wa_selopt-high.
              APPEND r_field1.
              CLEAR: r_field1.
          ENDCASE.
        ENDLOOP.
    **Select 'ID' and 'FIELD1' from table into lt_itab
        SELECT id field1
              INTO TABLE lt_itab
                FROM std_table1
                  WHERE field1 IN r_field1.
        IF sy-subrc = 0.
    **Now, based on the particular IDs from lt_itab, I need to select other values
    from other tables which also have 'ID' as the key.
           SELECT std_table2~field2
                std_table2~field3
                std_table3~field4
                std_table3~field5
                std_table3~field6
                std_table4~field7
                std_table4~field8
                std_table1~field1
              INTO CORRESPONDING FIELDS OF TABLE it_itab
              FROM std_table2
                         INNER JOIN std_table3 ON
                                std_table3mandt = std_table2mandt AND
                                std_table3id = std_table2id
                         INNER JOIN std_table4 ON
                                std_table4mandt = std_table2mandt AND
                                std_table4id = std_table2id
                         INNER JOIN std_table1 ON
                                std_table1mandt = std_table2mandt AND                                           std_table1id = std_table2id
              WHERE
                    std_table1~field1 IN r_field1.
    'id' is common in all the std_tables --> std_table1, std_table2, std_table3, std_table4.
    STEP DISP     (Display values)
    **Then I need to gather all the results in my internal table it_itab and display
    in search help results for the value of FIELD1 entered by the user in the search help.
        CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
          EXPORTING
            parameter   = 'FIELD1'
            fieldname   = 'FIELD1'                          
          TABLES
            shlp_tab    = shlp_tab                                   
            record_tab  = record_tab
            source_tab  = it_itab
          CHANGING
            shlp        = shlp
            callcontrol = callcontrol.
    I am not getting all the data in my internal table and wanted to know if there is anyting wrong in my select statement.
    Any guidance will be appreciated and awarded appropriate points.
    Thanks.

    the webdynpro fieldname and the search help input parameter name were made same.

Maybe you are looking for