Skip to Content
author's profile photo Former Member
Former Member

How to hide the message or delete the message in CRM WEB UI

Hi ,

I am able to set the quantity value to 1 as default by enhancing the component and adding code to DO_PREPARE_OUTPUT and using method set_property by checking the current guid .

However i am getting the message ' Enter the Quantity (No Schedule Line found) '

Please provide your valuable inputs!!

Lakshmi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2009 at 04:27 AM

    Hi Laksmi,

    You can try to put a breakpoint in CRM_ORDER_MAINTAIN when it call FM CRM_SCHEDLIN_I_MAINTAIN_OW to find out how the parameter passing

    This is code that I use. When we input the product and forget to input the quantity, it will give the default quantity to 1.

    ls_schedlin_extd-quantity = '1'.

    • set specific data

    INSERT ls_schedlin_extd INTO TABLE ls_schedlin_i_com-schedlines.

    ls_schedlin_i_com-ref_guid = is_orderadm_i_wrk-guid.

    • fill input fields

    ls_input_fields-ref_guid = is_orderadm_i_wrk-guid.

    ls_input_fields-ref_kind = 'B'.

    ls_input_fields-objectname = 'SCHEDLIN'.

    MOVE 'LOGICAL_KEY' TO ls_input_field_names-fieldname.

    APPEND ls_input_field_names TO lt_input_field_names.

    MOVE 'QUANTITY' TO ls_input_field_names-fieldname.

    APPEND ls_input_field_names TO lt_input_field_names.

    MOVE lt_input_field_names TO ls_input_fields-field_names.

    INSERT ls_input_fields INTO TABLE lt_input_fields.

    CALL FUNCTION 'CRM_SCHEDLIN_I_MAINTAIN_OW'

    CHANGING

    cs_schedlin_i_com = ls_schedlin_i_com

    ct_input_fields = lt_input_fields

    EXCEPTIONS

    schedlin_i_change_error

    schedlin_i_create_error

    error_occurred.

    Hope it's help,

    Lina

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Lina,

      Thank you for the response. I had tried using 'CRM_SCHEDLIN_I_MAINTAIN_OW' and it did not work out so i finally could meet the requirement through GUI set_property method in Do_PREPARE_OUTPUT

      anf using the modify method of the class cl_crm_bol_core.

      Although problem got resolved before i viewed your response , so i still give ou points for a very valuable input

      regards

      sowmya

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2009 at 08:47 AM

    Hi Laksmi,

    It's better to implement badi : crm_orderadm_i_badi. In that badi call FM crm_schedlin_i_maintain_ow to set the quantity default of the item to 1

    It will be done automatically after user type the product and press Enter button. It's work in SAP GUI but I think should also work in Web UI as it also called the same badi.

    Hope it's help,

    Lina

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi ,

      I am using below given code.Please suggest changes to the same.

      As teh quantity is not getting defaulted to 1.

      ls_schedlin_i-ref_handle = '0000000001'.

      ls_schedlin_i-ref_guid = is_orderadm_i_wrk-guid.

      ls_schedlines-guid = lv_guid.

      • ls_schedlines-guid = is_orderadm_i_wrk-guid.

      ls_schedlines-item_guid = is_orderadm_i_wrk-guid.

      ls_schedlines-Quantity = '1'.

      • ls_schedlines-LogicalKey = lv_guid.

      ls_schedlines-mode = 'A'.

      append ls_schedlines to lt_schedlines.

      ls_schedlin_i-schedlines = lt_schedlines.

      append ls_schedlin_i to lt_schedlin_i.

      ls_input_fields-ref_guid = is_orderadm_i_wrk-guid.

      ls_input_fields-ref_kind = 'A'.

      ls_input_fields-objectname = 'ORDERADM_I'.

      ls_field_names-fieldname = 'MODE'.

      append ls_field_names to lt_field_names.

      clear : ls_field_names ,ls_input_fields.

      ls_input_fields-ref_guid = is_orderadm_i_wrk-guid.

      ls_input_fields-ref_kind = 'A'.

      ls_input_fields-objectname = 'ORDERADM_I'.

      ls_field_names-fieldname = 'ORDERED_PROD'.

      append ls_field_names to lt_field_names.

      clear : ls_field_names ,ls_input_fields.

      ls_input_fields-field_names = lt_field_names.

      append ls_input_fields to lt_input_fields.

      • ls_input_fields-ref_handle = '0000000001'.

      ls_input_fields-ref_guid = is_orderadm_i_wrk-guid.

      ls_input_fields-ref_kind = 'A'.

      ls_input_fields-objectname = 'SCHEDLIN'.

      ls_field_names-fieldname = 'Quantity'.

      append ls_field_names to lt_field_names.

      ls_input_fields-field_names = lt_field_names.

      append ls_input_fields to lt_input_fields.

      CALL FUNCTION 'CRM_SCHEDLIN_I_MAINTAIN_OW'

      • EXPORTING

      • IV_FIELD_SELECTION_OFF = FALSE

      • IV_EXTERNAL_CALL = FALSE

      CHANGING

      cs_schedlin_i_com = lt_schedlin_i

      ct_input_fields = lt_input_fields

      EXCEPTIONS

      SCHEDLIN_I_CHANGE_ERROR = 1

      SCHEDLIN_I_CREATE_ERROR = 2

      ERROR_OCCURRED = 3

      OTHERS = 4

      .

      IF sy-subrc <> 0.

      • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

      • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

      ENDIF.

      CALL FUNCTION 'CRM_ORDER_SAVE_OW'

      • EXPORTING

      • IT_OBJECTS_TO_SAVE =

      • IV_UPDATE_TASK_LOCAL = FALSE

      • IV_SAVE_FRAME_LOG = FALSE

      • IV_LOG_HANDLE =

      • IV_NO_BDOC_SEND = FALSE

      • IV_CANCELLED_WHEN_ERROR =

      • IT_ACTIVE_SWITCH =

      • IMPORTING

      • ET_SAVED_OBJECTS =

      • ET_OBJECTS_NOT_SAVED =

      .

      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

      • EXPORTING

      • WAIT =

      • IMPORTING

      • RETURN =

      .

      commit work and wait.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.