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

Status Not changed in Activity Screen

Helo Experts

In activity screen MORE menu, i have option SET TO COMPLETED. If i click on it then the STATUS textbox should change to COMPLETED (either from OPEN / INPROCESS). But thats not happening..... i have the following code for it. Kindly go through and can let me know whats the problem.

  • Set to Completed button

ls_button-text = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT_ACTIVITY/SETTOCOMPLETED' ).

ls_button-on_click = 'COMPLETED'.

ls_button-tooltip = ls_button-text.

ls_button-page_id = me->component_id.

if lv_status eq 'E0003'.

ls_button-enabled = abap_false.

else.

ls_button-enabled = abap_true.

endif.

append ls_button to rt_buttons.

clear ls_button.

ls_button-text = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT_ACTIVITY/PDFAFS' ).

ls_button-on_click = 'CREATE_FACT_SHEET'.

ls_button-tooltip = ls_button-text.

ls_button-page_id = me->component_id.

lv_activity_guid = ls_btadminh-guid.

call method cl_crm_uiu_activity_tools=>check_pdfafs_allowed

exporting

iv_activity_guid = lv_activity_guid

iv_pdfafs_create = 'X'

  • IV_PDFAFS_SAVE =

importing

ev_pdfafs_allowed = lv_pdfafs_allowed

  • ES_ORDERADM_H =

.

if lv_pdfafs_allowed eq 'X'.

ls_button-enabled = abap_true.

else.

ls_button-enabled = abap_false.

endif.

append ls_button to rt_buttons.

clear ls_button.

Thanks in advance

Rohan

Hi Experts

Waiting for your Inputs.

Thanks & Regards

Rohan

Edited by: Rohan M on Nov 7, 2008 3:10 PM

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 07, 2008 at 08:17 PM

    Hi Rohan,

    I can suggest you an approach for this. Try the steps below.

    1) Move the button definition to the GET_BUTTONS method of the view controller class. Leave the DO_PREPARE_OUTPUT method as clean as possible. Make sure that the event name is in the same case in the button-on_click parameter and the event handler name (you can check the event handler name in DO_HANDLE_EVENT).

    2) As you know there would be NEW STATUS dropdown available to change the status. Go to the getter and setter methods of this attribute. From there there should be an BOL Action which will be triggered. This action takes the status which is set. This is the place where the status change mechanism starts.

    3) Try to call the same BOL Action in your event handler COMPLETED. If you want to commit the change to the database, you can call the transaction manager class commit method. You can refer SAVE method of your view impl class.

    Hope this helps.

    Regards,

    Vinay

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Rohan,

      If it is the system status you refer to, then please be advised that

      after hitting the 'Set to Completed' button, in order for this change to take effect, then you must save the document again after hitting this

      button.

      Only then will the system status be updated and changed to 'Completed'.

      This is standard behavior.

      If it is the user status that you refer to, then you may need to check

      the following:

      Open the status profile in question in tx CRMBS02,

      double click on status you have maintained for 'Completed'

      and activate the business transaction Complete, with the

      flags 'no influence' and 'set' activated.

      Once this has been done, then when you set the system status to

      completed, the user status should then be automatically set to Completed also.

      Hope this helps

      Best Regards

      Shiven

  • Posted on Nov 07, 2008 at 04:03 PM

    Hi Rohan,

    you need an event handler for this button and add this event handler to the DO_PREPARE_OUTPUT data.

    Then in the event handler itself, make sure that you either work with the bol entity or you could use the object layer calling the ORDER_MAINTAIN and the ORDER_SAVE followed by the commit.

    Best regards,

    Erika

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 17, 2009 at 06:26 PM

    Excellent answer Shiven. Thanks a lot for the Input.

    Add a comment
    10|10000 characters needed characters exceeded

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.