Skip to Content
avatar image
Former Member

How to Remove Default Values of the Field "Product Category" in SAP SRM 7.0 ?

Hi,

When I'm Creating Shopping Cart in SAP SRM 7.0 Portal "Product Category" Field Values are Pre Populated in the Table and Pop Up window.

How to remove the default values in the field ....

Regards,

Sheelam.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Jan 02, 2015 at 03:08 AM

    Hi Sheelam,

    This is hard-coded, and even if you remove the default value from extended attributes, the first product category will be set as default.

    The coding is as below:

    CL_BBP_ATTR_SCENARIO==========CM00D
    CONVERT_HR_VALUES_TO_BBP (CL_BBP_ATTR_SCENARIO)

    WGR will be auto-defaulted

    *     'Auto-Default Flag' (on request)
          AT END OF (l_backend).
            IF ( l_dft_found IS INITIAL ) AND
               ( NOT <omattvalrt>-attrib = 'PRCAT' ) AND
               ( NOT set_auto_dft IS INITIAL ).
              wa_vlist-dft_flag      = 'X'.
              wa_vlist-auto_dft_flag = 'X'.
            ENDIF.
            CLEAR l_dft_found.
          ENDAT.

          AT END OF attrib.
            IF ( l_backend   IS INITIAL ) AND
               ( l_dft_found IS INITIAL ) AND
               ( NOT <omattvalrt>-attrib = 'PRCAT' ) AND
               ( NOT set_auto_dft IS INITIAL ).
              wa_vlist-dft_flag      = 'X'. <
              wa_vlist-auto_dft_flag = 'X'. <
            ENDIF.
            IF NOT <bbp_attr>-get_label IS INITIAL.
              l_get_label = 'X'.
            ENDIF.
            CLEAR: l_lc_attr, l_be_attr, l_backend, l_dft_found.
          ENDAT.

    You can only aachieve your requirement by modification.

    Best regards,

    Ivy

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 02, 2015 at 02:35 PM

    Hi Sheelam,

    Create an local srm product category, and do not maintain description in your local language (you may maintain it in an other language like "Please select").

    Set this newly created local product category to default. Because of missing translation, users will not able to use this product category and add item, also "please select" would be shown in screen.

    Regards,

    Yunus

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 05, 2015 at 10:22 AM

    Hello Sheelam,

    When creating a shopping cart, default product category will be proposed, even if no default category is defined in PPOMA_BBP. In such case, system will take the first product category found and display it to the user.

    In standard, it is no possible to have a blank product category in shopping cart.

    Having said that, there is a consulting note 1498455 available, which is relevant for cases when you add an item to shopping cart via pop-up window, using add item button (shopping card wizard/free text item). If this note is applied, blank product category will be displayed in the pop-up.

    However, if you are creating a new shopping cart using the professional screen, you will be able to see the default product category.

    You could also adopt a workaround that is being used by many other customers.

    As a workaround they create a "dummy" product category with description like "select product category" and set this one as default.

    Then if the user tries to use this product category, error message is raised saying to select a different product category (via BBP_DOC_CHECK_BADI). Then end user would be forced to select a different one.

    I hope the above information helps.

    Best Regards,

    Monalisa

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 05, 2015 at 05:10 PM

    Hi. Yunus and Monalisa have the best ideas by using a dummy category either local or backend with BADI to stop it being used, but you could enahance the webdynpro to remove the default, I have removed the default delivery date this way, can not see why you could not do it for category, and then issue an error if it is not selected.

    You could even hide the standard category field and add a custom field, then use doc change BADI to move from the custom into the standard.

    Regards,
    Dave.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 20, 2015 at 09:41 AM

    Hi All,

    Thanks for support

    Solution ::

    Class    :  /SAPSRM/CL_PDO_SHARED_USER

    Method :  INIT_USER_ATTRIBUTES

    Implemented Enhancement for the above class and Cleared below Fields.

    mv_global_data-category_id and mv_global_data-category

    Regards,

    Sheelam.

    Add comment
    10|10000 characters needed characters exceeded