Quantcast
Channel: SCN: Message List - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 7775

CRM/ChaRM UI Custom field 'BTAdminH not bound' error

$
0
0

Hello,

I am new to CRM/ChaRM and BSP so please bear with me.  There is a missing step here somewhere...I just don't know what it is.

 

I need to add several custom fields to the Request for Change BSP header within ChaRM/CRM.  I have gone through several tutorials and have gotten some great leads from the SCN community.  However, I cannot get past the custom field is not bound error.

 

 

What I've done:

Originally I added my fields using the on-screen configuration enhancement.  I was able to create the field but got the 'not bound' error.

 

I then deleted the enhancement and tried using the BSP editor to create the field.

 

Using transaction BSP_WD_CMPWB I enhanced my component AIC_CMCR_H and enhanced the View AICCMCRHeaderEF.  This results in the 'Z' implementation Class.  I expanded to Context->Context Nodes->CONTRACTBTADMINH->Attributes.  I right click on the Attributes and Click on Create.  Using the Create Attributes wizard I can create the field.  Using the wizard I get the required GETTER & SETTER methods.

 

I then add the field to the screen using the on-screen config.  I modified the GET_I_* method to comment out the rv_disabled = 'TRUE' line to open the field.

 

I still get the 'BTAdminH not bound' error.

 

I can enter a value in the field but the value is not stored/saved.

 

 

Within debug I can see that both the GET_* and SET_* method does not find the CURRENT value prior to trying the get_property and set_property methods.

 

ITERATOR is INITIAL.  get_current returns INITIAL too.

 

See code below:

 

method GET_INCIDENT_NUMBER.

    DATA: current TYPE REF TO if_bol_bo_property_access.
    DATA: dref    TYPE REF TO data.


    value =
'BTAdminH not bound'."#EC NOTEXT


    if iterator is bound.
      current = iterator->get_current( ).
    else.
      current = collection_wrapper->get_current( ).
    endif.


    TRY.
        dref = current->get_property( 'Incident_Number' )."#EC NOTEXT
      CATCH cx_sy_ref_is_initial.
        RETURN.
    ENDTRY.

-------------------------------------------------------------------------

   method SET_INCIDENT_NUMBER.
    DATA:
      current TYPE REF TO if_bol_bo_property_access,
      dref    TYPE REF TO data,
      copy    TYPE REF TO data.

    FIELD-SYMBOLS:
      <nval> TYPE ANY,
      <oval> TYPE ANY.

*   get current entity
    if iterator is bound.
      current = iterator->get_current( ).
    else.
      current = collection_wrapper->get_current( ).
    endif.

*   get old value and dataref to appropriate type

    TRY.
    dref = current->get_property( 'Incident_Number' )."#EC NOTEXT
      CATCH cx_sy_ref_is_initial.
        RETURN.
    ENDTRY.

 


Viewing all articles
Browse latest Browse all 7775

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>