Skip to Content

This blog is continuation of my previouw blog CRM 7.0 How to –5C EventHandling and Navigation

In this Blog I will cover how to create a Custom Controller and how to bind context nodes

 

Step 1: Create Custom Controller

 

 

System will start the wizard

 

 

Enter a name HeaderCuCo

 

 

Create a node BTAdminH and choose the BOL entity BTAdminH

 

 

Complete the wizard without making any further changes.

 

 

 

Step 2: Go to the *CTXT class of DetailsOV view

 

 

open the create method of the context node BTAdminH

 

 

Add the following code to the method

 

 

By doing this you will observe the change in the context node tree and the Icon of the context node.

 

 

Do the same for the View DetailsEF and you are done with the context node binding.

 

This is what we have achieved so far.

 

 

This concludes the Customer Controller and Binding of context nodes. In my next Blog I will talk about how to create a search view and search result.

To report this post you need to login first.

9 Comments

You must be Logged on to comment or reply to a post.

      1. Lakshmi Menon
        Hi Vikash,

        Can you pls tell us how to auto populate some value into DetailsOV view’s fields.

        If values are not available, giving provision to enter values and to search based on that so that result will be visible in next view.

        So far , what you have done is a great selfless work.

        Regards,
        Lakshmi

        (0) 
    1. Vikash Krishna Post author
      Hi,

      I am glad that you guys are following my blogs. Due to the hectic schedule I am not able to devote time to write the next one at this moment but I promise that I will come up with my next blog very soon.

      Thanks,
      Vikash.

      (0) 
  1. roman glass
    Hello Vikash,

    your posts are very detailed and provide useful information. Keep up the good work!

    Nevertheless I would like to repeat the question by Krishna in the previous post: Should this view be in edit mode by now? As I am not sure how to put the fields into edit mode and it appears to be pure magic for me why some fields in comparable views are editable …

    I would be glad if you could provide any hints how to reach the goal of an editable form view.

    Best wishes and thanks in advance

    Roman

    (0) 
    1. Vikash Krishna Post author
      Hi Roman,

      I thought you will wait till I release the secret 🙂 just kidding. Actually I picked some field which is not editable by user e.g. Transaction number is system generated field and not editable by user.

      What you have to do to make field editable is in the GET_I method write the following code and the field will become editable:

        DATA: current TYPE REF TO if_bol_bo_property_access.

        IF iterator IS BOUND.
          current = iterator->get_current( ).
        ELSE.
          current = collection_wrapper->get_current( ).
        ENDIF.

        TRY.
            IF current->is_property_readonly(
                          ‘XXXXXX’ ) = abap_false.     “#EC NOTEXT
              rv_disabled = ‘FALSE’.
            ENDIF.
          CATCH cx_sy_ref_is_initial.
        ENDTRY.

      Hope this will help.

      Thanks,
      Vikash.

      (0) 
  2. Hemangi Sawant
    I like your blog .. too good i am able to complete my whole task on this information ..thanks a lot ..please keep updating your new views …. C U soon
    (0) 

Leave a Reply