on 10-08-2007 12:45 PM
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
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..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Hi Khushboo,
You can mail me at pranaynayyar@gmail.com,
Regards,
Pranay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.