cancel
Showing results for 
Search instead for 
Did you mean: 

TextArea/Notes in Web UI

Former Member
0 Kudos

Hi,

I have created a text area based on text types by following the below link;

http://scn.sap.com/community/crm/webclient-ui-framework/blog/2012/06/04/crm-70-adding-custom-text-ty...

Now the text types which I used are specific to a "Process Type". There is a requirement to have these text areas only for a specific "Process Type". So I put a check on top of my code in "DetailsViewSet.htm" file of BT111H_OPPT component. Now the problem is when I open the opportunity other then this Process Type - I am getting this error.

Text type 'ZK02' is not assigned to current text determination procedure

This error is coming becuase this text type is not assigned to the process type and hence it's saying that its not assigned to text determination procedure.

How to get rid of this error.

Thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks Andrei.

How to access the BTADMINH-Process_type attribute in the ON_NEW_FOCUS method of my z-textnode. Could you please write the code for that. I am inside a custom controller.

VishnAndr
Active Contributor
0 Kudos

Sal,

one of the option would be not to set the flag "Always create entity" for your BTZTEXT context node while you were adding the context node to custom controller.

As far as you've already done you should modify the code ON_NEW_FOCUS something like this (yeah, I know it can be better; and I know that it will not probably work from the scratch because I've just write it here and not in the system; as a result - didn't test it; but the idea should be the same):

method ON_NEW_FOCUS.

     DATA: lr_parent TYPE REF TO if_bol_bo_property_access,

               lr_entity TYPE REF TO cl_crm_bol_entity,

               lv_process_type TYPE string.

     lr_entity ?= focus_bo.

     lr_parent ?= lr_entity->get_parent( ). "because focus_bo is a BTHeaderTextSet, and we need BTAdminH

     IF lr_parent IS BOUND.

          lv_process_type = lr_parent->get_property_as_string( 'PROCESS_TYPE' ). "here we get proccess type

          IF lv_process_type EQ 'ZZZZ'. "the one which we need to check

               "the rest of the standard code should be placed here

               " or probably just creation of a new entity (create_related_entity)

               "...........

          ENDIF.

     ENDIF.

endmethod.

Former Member
0 Kudos

Andrey,

You rock!!!

Thanks, the issue has been solved.

VishnAndr
Active Contributor
0 Kudos

Glad to hear it works for you. You're welcome!

Former Member
0 Kudos

Hello Andrei, Could you have have a look of this issue. Thanks a lot!

http://scn.sap.com/thread/3264392

Cheers,

XP

Answers (2)

Answers (2)

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Any idea?

VishnAndr
Active Contributor
0 Kudos

Hello, Sal.

In Step 4 in Custom Controller you have to adjust ON_NEW_FOCUS method of your Z-textnode. In this method you should create an entity only if there is a relevant process type you're working on. E.g. check additionaly your process type there.