cancel
Showing results for 
Search instead for 
Did you mean: 

I am unable to create Fields on crmd_orderadm_h table due to size limit data baselimit?

former_member198180
Active Participant
0 Kudos

Hi Team,

Unable to create AET fields on crmd_orderadm_h table due to size exceeds of the table but my total fields of  crmd_orderadm_h is 168 fields only ,but it is not allowed to create.i am getting error like as below.please help here.

Thanks

Kalpana

Accepted Solutions (1)

Accepted Solutions (1)

BGarcia
Active Contributor
0 Kudos

Hi Kalpana,

CRMD_CUSTOMER_H was delivered in early versions to handle customer extensions to business transactions at header level. So, one solution for your problem would be to evaluate the creation of the new fields in this table.

Kind regards,

Bruno

former_member198180
Active Participant
0 Kudos

Hi Burno,

Thanks for your reply.but if i have created customer_h fields,i want to add this fields on service order creation screen heade level.. but the fields are not available.because customer_h context node is not available on Service order header component.shall i create customer_h context node on service order component ?is it corret?could you please help here..

Thanks

kalpana

dharmakasi
Active Contributor
0 Kudos

Hi,

You have exceeded the number of fields limit in orderadm_ table due to that you are getting the error. But as Bruno suggested you should use customer_h extension to create custom fields.

I hope you have already created new field in customer_h, just you need to create customer_h context node within the view you want to add field in web ui.

You can change the configuration to add the customer_h field in web ui.

Regards,

Dharmakasi.

former_member198180
Active Participant
0 Kudos

Hi kasi,

Thanks For your reply.

I have created Context node on component - btcategories,view - BTCATEGORIES/Categories ,

Context node- rightl click i have created context node BTCUSTOMERH..after i have added all the fields on view level.but  the fields showing disable and btcustomer_h is not bound.please help here.

Thanks&Regards

Kalpana

dharmakasi
Active Contributor
0 Kudos

Hi,

You need to make the binding between the btcustomerh in category view and context node in your service order main component BT116H_SRVO.

You need to make the context node binding similar to the BTCATEGORYFIRST. You can check how the category context node binds, the same approach you can do it for customer h as well.

Regards,

kasi.

BGarcia
Active Contributor
0 Kudos

Hi Kalpana,

Don't think you should had those fields in component BTCATEGORIES, since it's a kind of generic component used by some business transactions to display only categories. Notice that you don't have context node for CRMD_ORDERADM_H there also...


If still, you want to go ahead, you have to redefine the methods IF_BSP_MODEL~INIT to initialize your model and add your CRMD_CUSTOMER_H entity as a context node. You'll might have to consult the GDC controllers to get the main entity for the business transaction that is being displayed.


My suggestion, since those fields are service order header fields, would be to place them in service order header fields component where the other header fields are being displayed.


Hope that this help you a little more.


Kind regards,

Garcia


former_member198180
Active Participant
0 Kudos

Hi Garcia,

Thanks For your reply.

.

I am still confusing.i guess i did wrong approach..Is it possible to remove added context node CUSTOMER_H on BTCATEGORIES?

According to your suggestion ,Now fields are available on Customer_h ,shall i want to add again context node Customer_h on BT116H_SRVO details view?or could you please elaborate..if you give any inputs its really appreciate .


Thanks for your great help.


Thanks&Regards

Kalpana

former_member198180
Active Participant
0 Kudos

Hi kasi,

As per Buron suggestion binding context node is very complex thing so how can we proceed here .please help.

Thanks

kalpana

dharmakasi
Active Contributor
0 Kudos

Hi,

You can proceed with same steps mentioned by him. you can directly add btcustomerh context node in details view in bt116h_srvo if the context node not available already.

Then you can add them in view configuration.

former_member198180
Active Participant
0 Kudos

Hi Kasi,

before adding BTCUSTOMERH context noode in BT116h_SRVO ,i need to delete the context node on btcategories component .previously i am adding the BTCUSTOMER_H context node ,so  first i need to delete that one..

2->component- BT116h_srov

VIew - details-

Context node - BTCUSTOMERH

after adding this context node,view configuration

Thanks

Kalpana

dharmakasi
Active Contributor
0 Kudos

Hi,

Try to add field above the Category DDLB area, means at the line 12.

Regards,

Dharmakasi.

former_member198180
Active Participant
0 Kudos

Hi kasi,

Shall i Delete BTCUSTOMERH context node on BTCATEGORIES component?

Thanks

dharmakasi
Active Contributor
0 Kudos

Hi,

You can delete it and continue with adding in bt116h_srvo details view. Then add your required field in configuration. Hope you can complete it now.

former_member198180
Active Participant
0 Kudos

Hi kasi,

Thanks for your reply.

i have one more confusion.instead of creating entire customer_h context node on BT116h_SRVO, in BTADMINH context node -attributes -right click create attribute ,

provide - attribute name and bol entity- BTADMINH, Bol attribute - BTHeaderCustExt from here customer _H fields availble shall i go this approach? and is this right approach ? or better to create context node on BT116h_srvo?

Thanks

kalpana

dharmakasi
Active Contributor
0 Kudos

Hi,

I think already i have answered this approach in past. Yes you can use this approach as well. Either of the approach is fine.

Regards,

Dharmakasi.

former_member198180
Active Participant
0 Kudos

Hi Kasi,

But after adding field on  configuration page it is disabled and value should be it is not bound and generated getter method and setter methods automatically redefined methods already so i need to do generate drop down here.so value is showing not bound.

Thanks

Kalpana

dharmakasi
Active Contributor
0 Kudos

Hi,

What is the code available in get and set methods? Is it pointing to the customer_h relation name? You can keep break point in get and set methods and check why it is giving not bound value.

Kind Regards,

Kasi.

former_member198180
Active Participant
0 Kudos

Hi kasi,

In get mehod code is like as below after adding field automatically getter methods generted and it is redefined all the fields ,get_i method it is disabled.

METHOD get_warranty.

     DATA: current TYPE REF TO if_bol_bo_property_access.

    DATA: dref    TYPE REF TO data.

    value =

' '."#EC NOTEXT

    if iterator is bound.

      current = iterator->get_current( ).

    else.

      current = collection_wrapper->get_current( ).

    endif.

  TRY.

  DATA: coll   TYPE REF TO if_bol_entity_col.

  DATA: entity TYPE REF TO cl_crm_bol_entity.

      entity ?= current.

      coll = entity->get_related_entities(

               iv_relation_name = 'BTHeaderCustExt' ). "#EC NOTEXT

      current = coll->get_current( ).

      IF current IS NOT BOUND.

        RETURN.

      ENDIF.

    TRY.

        dref = current->get_property( '/RCRM/F005H' ). "#EC NOTEXT

      CATCH cx_crm_cic_parameter_error.

    ENDTRY.

    CATCH cx_sy_ref_is_initial cx_sy_move_cast_error

          cx_crm_genil_model_error.

      RETURN.

  ENDTRY.

    IF dref IS NOT BOUND.

      value = ' '."#EC NOTEXT

      RETURN.

    ENDIF.

    TRY.

        value = if_bsp_model_util~convert_to_string( data_ref = dref

                                    attribute_path = attribute_path ).

*      CATCH cx_bsp_conv_illegal_ref.

*        FIELD-SYMBOLS: <l_data> type DATA.

*        assign dref->* to <l_data>.

*       please implement here some BO specific handler coding

*       conversion of currency/quantity field failed caused by missing

*       unit relation

*       Coding sample:

*       provide currency, decimals, and reference type

*       value = cl_bsp_utility=>make_string(

*                          value = <l_data>

*                          reference_value = c_currency

*                          num_decimals = decimals

*                          reference_type = reference_type

*                          ).

          value = '-CURR/QUANT REF DATA MISSING-'.

      CATCH cx_root.

        value = '-CONVERSION FAILED-'.                  "#EC NOTEXT

    ENDTRY.

ENDMETHOD.

method SET_WARRANTY.

    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.

  DATA: coll   TYPE REF TO if_bol_entity_col.

  DATA: entity TYPE REF TO cl_crm_bol_entity.

      entity ?= current.

      coll = entity->get_related_entities(

               iv_relation_name = 'BTHeaderCustExt' ). "#EC NOTEXT

      current = coll->get_current( ).

      IF current IS NOT BOUND.

        RETURN.

      ENDIF.

    TRY.

        dref = current->get_property( '/RCRM/F005H' ). "#EC NOTEXT

      CATCH cx_crm_cic_parameter_error.

    ENDTRY.

    CATCH cx_sy_ref_is_initial cx_sy_move_cast_error

          cx_crm_genil_model_error.

      RETURN.

  ENDTRY.

*   assure that attribue exists

    CHECK dref IS BOUND.

*   set <oval> to old value

    ASSIGN dref->* TO <oval>.

*   create a copy for new value

    CREATE DATA copy LIKE <oval>.

*   set <nval> to new value

    ASSIGN copy->* TO <nval>.

*   fill new value using the right conversion

    TRY.

*        TRY.

        CALL METHOD if_bsp_model_util~convert_from_string

          EXPORTING

            data_ref       = copy

            value          = value

            attribute_path = attribute_path.

*        CATCH cx_bsp_conv_illegal_ref.

*          FIELD-SYMBOLS: <l_data> type DATA.

*          assign copy->* to <l_data>.

*         please implement here some BO specific handler coding

*         conversion of currency/quantity field failed caused by missing

*         unit relation

*         Coding sample:

*         provide currency for currency fields or decimals for quantity (select from T006).

*          cl_bsp_utility=>instantiate_simple_data(

*                             value = value

*                             reference = c_currency

*                             num_decimals = decimals

*                             use_bsp_exceptions = abap_true

*                             data = <l_data> ).

*      ENDTRY.

      CATCH cx_sy_conversion_error.

        RAISE EXCEPTION TYPE cx_bsp_conv_failed

          EXPORTING

            name = 'Warranty'."#EC NOTEXT

    ENDTRY.

*   only set new value if value has changed

    IF <nval> <> <oval>.

      current->set_property(

                      iv_attr_name = '/RCRM/F005H' "#EC NOTEXT

                      iv_value     = <nval> ).

    ENDIF.

endmethod.

former_member198180
Active Participant
0 Kudos

Hi garcia,

affter creating BTCUSTOMERH context node on bt116hsrvo component ,all fields available in configuration, i have added 3 fields on configuration ,and implementing drop down logic.here 1st drop down user selecs second drop values filled and based on 2dn drop down 3rd down values get filled.now i am trying to implementing the logic i am gettin error like as below,here ineed to do any binding or initialization?

BGarcia
Active Contributor
0 Kudos

Hi Kalpana,

If the goal is to initialize BTCUSTOMERH, I don't think you need to do anything there. In the wizard tool that is opened when you create BTCUSTOMERH context node, you can bind your desired entity through relationship BTHeaderCustExt with already define node BTADMINH. That should be enough.

Also, select also checkbox 'allways create instance' so that this relationship is always initiated.

If the goal is to do some other logic with BTCUSTOMERH node in that method, then you can access it using variable ZTYPED_CONTEXT and not TYPED_CONTEXT.

Kind regards,

Garcia

former_member198180
Active Participant
0 Kudos

Thanks Garcia...its working...

Regards

kalpana

Answers (0)