cancel
Showing results for 
Search instead for 
Did you mean: 

Input field in IC Web Client comes disabled

Former Member
0 Kudos

Hello All,

The requirement is to show Product Details in the LEAD page of IC Web Client.

Since Product ID and Description are not available in the context nodes with the LdOverview.htm page, I created a context node "AdminInew" and assosiated it with the BOL entity "BTAdminI". Also linked it to "CuCoAdminI.do" Custom Controller of "CRM_IC".

Then I created an attribute "PRODUCTNEW" and assosiated it with the BOL entity "BTAdminI" BOLAttribute "PRODUCT"

In the LDOverview.htm page I wrote the following code:

<crmic:gridLayoutCell colSpan = "3"

columnIndex = "1"

rowIndex = "8" >

<crmic:label design = "label"

for = "PRODUCTNEW"

text = "Product ID" />

</crmic:gridLayoutCell>

<crmic:gridLayoutCell colSpan = "6"

columnIndex = "4"

rowIndex = "8" >

<crmic:inputField width = "100%"

value = "//AdminInew/PRODUCTNEW"

id = "PRODUCTNEW"

disabled = "FALSE"

maxlength = "40" />

</crmic:gridLayoutCell>

The field Product Id does appear in the LEAD page of IC Web Client but it is disabled.

What could be the problem.

Please guide.

Your help will be greatly appreciated and rewarded.

Regards,

Khushboo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Khushboo,

Did you created a variable named 'AdminInew' type ref to ZL_CRM_IC_AdminInew_CN** in the page attributes of LDOverview.htm ??

If you have created the same try to put a break point in the get_PRODUCTNEW( )

method of ZL_CRM_IC_AdminInew_CN** and check whether the parameter VALUE is getting populated !.

Regards, Sudeep..

Former Member
0 Kudos

Hello Sudeep,

Yes I did create an attribute named 'AdminInew' type ref to ZL_CRM_IC_LDOVERVIEW_CN02 in the page attribute of LDOverview.htm.

In the get_PRODUCTNEW method the parameter VALUE does not get populated. Rather an exception gets raised and subsequently caught in the following lines of code which are a part of get_PRODUCTNEW method:

TRY.

dref = current->get_property( 'PRODUCT' ). "#EC NOTEXT

CATCH cx_crm_cic_parameter_error.

ENDTRY.

What do I do ?

How to ascertain that the VALUE parameter gets populated ?

Regards,

Khushboo

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Khushboo,

You can mail me at pranaynayyar@gmail.com,

Regards,

Pranay

Former Member
0 Kudos

Hi ,

Try creating the relation ship in Do_Prepare_Output as well. which i told you to skip. Coz these were the similar steps which i followed and got the answer.

In case yo are still not getting it, Please give the exact steps you have followed, possibly with code.

This might even help me in getting you the correct answer.

Regards,

Pranay

Former Member
0 Kudos

Hi Pranay,

I have created the relationships in do_prepare_output as well. Still no luck. Also, I am still not able to hit the code in On_New_Focus.

Please share your E-mail ID so that I can send across the code in detail.

Looking forward to your help.

Regards,

Khushboo

Former Member
0 Kudos

Hi Khushboo,

The solution to this is that you need to code in Do_Prepare_output method of controller, where you will handling the data from the .htm page and passing it on.

Here is the sample code.

gr_bol_entity ?= me->ztyped_context->btadminh->collection_wrapper->get_current( ).

TRY.

lr_bol_entity ?= gr_bol_entity->get_related_entity( 'BTHeaderCustExt').

IF lr_bol_entity IS NOT BOUND.

lr_bol_entity ?= gr_bol_entity->create_related_entity('BTHeaderCustExt').

ENDIF.

CATCH cx_root.

ENDTRY.

lr_bol_entity->if_bol_bo_property_access~get_property_as_value( EXPORTING iv_attr_name = 'ZZCUSTOMER_H0401'

IMPORTING ev_result = lv_flag1 )

Here you can skip the part of creating the relationship, as we have alredy done in the EH_ONNEWFOCUS method.

Now the exporting parameters should have

iv_attr_name - your database field name

ev_result - value of the field. This can be fetched at run time.

I hope this solves your problem,

Regards,

Pranay

Note: Please reward pints

Nigel_James
Active Contributor
0 Kudos

Hi Panray,

Why two ID's.

This can be a little confusing for point rewarders so why not just email the moderators at sdn@sap.com and ask them if they can merge your id's.

regards,

Nigel

Former Member
0 Kudos

Hi Pranay,

I wrote the code accordingly. But to my dismay the collection wrapper for the context node I created (AdminInew) always remains INITIAL.

Is there something in the code that I am missing ?

Please do guide, I need your help urgently.

Regards,

Khushboo

Former Member
0 Kudos

Hi ,

Hope the answer solves your problem.

If not please revert back and also reward points, if you have got the solution.

Regards

Pranay

Note: reward points to this ID

Former Member
0 Kudos

Hi Khushboo,

Here are the steps:

1) you need to create a method in the context node class of node "AdminInew" , name it as ON_NEWFOCUS.

2) Now change the method to event handler.

3) here is the code which i used

METHOD ON_NEW_FOCUS .

DATA: LR_ENT_COL_ACTH TYPE REF TO IF_BOL_BO_COL,

LR_ENT_ADMH TYPE REF TO CL_CRM_BOL_ENTITY,

LR_ENT_ACTH TYPE REF TO CL_CRM_BOL_ENTITY.

check: focus_bo is bound.

LR_ENT_ADMH ?= FOCUS_BO.

TRY.

LR_ENT_COL_ACTH = LR_ENT_ADMH->GET_RELATED_ENTITIES( IV_RELATION_NAME = 'BTHeaderSalesSet' ). "#EC NOTEXT

IF LR_ENT_COL_ACTH IS NOT BOUND OR LR_ENT_COL_ACTH->SIZE( ) IS INITIAL.

if lr_ent_admh->is_changeable( ) = abap_true.

TRY.

LR_ENT_ACTH = LR_ENT_ADMH->CREATE_RELATED_ENTITY( IV_RELATION_NAME = 'BTHeaderSalesSet' ). "#EC NOTEXT

CATCH: CX_CRM_GENIL_MODEL_ERROR, CX_CRM_GENIL_DUPLICATE_REL.

EXIT.

ENDTRY.

endif.

IF LR_ENT_ACTH IS BOUND.

CREATE OBJECT LR_ENT_COL_ACTH TYPE CL_CRM_BOL_BO_COL.

LR_ENT_COL_ACTH->ADD( LR_ENT_ACTH ).

ENDIF.

ENDIF.

CATCH CX_CRM_GENIL_MODEL_ERROR.

EXIT.

CATCH CX_SY_REF_IS_INITIAL.

ENDTRY.

ME->COLLECTION_WRAPPER->SET_COLLECTION( LR_ENT_COL_ACTH ).

4) You need to check out for the relationship name in this case.

Reagards,

Pranay

Note: Reward points if you feel the answer is useful

Former Member
0 Kudos

Hello Pranay,

Thank you so much for your valuable inputs.

I have created the ON_NEW_FOCUS method and have appropriately used the Relationship name.

An editable field is now appearing, but values entered are not getting saved. As soon as I click SAVE after entering values, the input field I created goes blank.

I have put a break point on the newly created ON_NEW_FOCUS method, but the code doesn't break there.

Please help me. I'll be extremely grateful.

Regards,

Khushboo

Former Member
0 Kudos

Hi Khushboo,

I too had similar problem. And the problem is resolved.

Just go through the following thread. This might help you certainly.

Regards,

Pranay

Former Member
0 Kudos

Hello Pranay,

Thanks for the input.

Can you just help me with the code you wrote for the on_new_focus method. In my case too the on_new_focus method does not exist.

A snippet of the code would be so much of a help.

Thanks in advance !

Regards,

Khushboo