on 04-22-2009 9:00 AM
Hi.
The component BT115QH_SLSQ (orders) has standard assignment block for items BT115QIT_SLSQ/ItemsList. I noticed that this is present in BT115QH_SLSQ as window.
Now I would like to create in BT115QH_SLSQ one new assignment blocks for items which would look like BT115QIT_SLSQ/ItemsList but would not show all items but just certain items (that belong to item category group YC01).
Could please someone provide me with step-by-step instructions on how to acchive that? Help will be appreciated.
old post
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Robert,
Instead of closing this as "old post" can you please post the solution you used. Many other CRM folks including myself find great value in a topic such as the one you posted. In fact, I would be interested in a solution to this as well.
It really does help the community if you state what your solution is rather then just closing it with a one liner. In the end its about helping others just as you yourself asked for help.
Thanks,
Jon
Step 1: Prepare the component BT115QIT_SLSQ
Step 2: Copy view BT115QIT_SLSQ/Items to a z-version in your enhancement
Step 3: Adjust/Filter the BTADMINI context node key methods will be:
CREATE_BTADMINI of the context and
ON_NEW_FOCUS of BTADMINI in the context
In the ON_NEW_FOCUS you will need to loop through the returned collection and create a new collection copied from that collection that only contains nodes with your item category.
You'll do this right before the coding line:
me->set_collection( lv_collection ).
I believe the coding should look similar to, however rember this replaces the last line of setting the collection.
data: lv_itm_cat type CRMT_ITEM_TYPE_DB,
lv_col_bo type ref to IF_BOL_BO_PROPERTY_ACCESS,
lv_fin_collection TYPE REF TO if_bol_bo_col.
CREATE OBJECT lv_fin_collection
TYPE
cl_crm_bol_entity_col.
lv_col_bo = lv_collection->IF_BOL_ENTITY_COL~GET_FIRST( ).
while lv_col_bo is bound.
lv_col_bo->get_property_as_value( EXPORTING iv_attr_name = 'ITM_TYPE'
IMPORTING ev_result = lv_itm_cat ).
if lv_itm_cat eq 'YC01'.
lv_fin_collection->add( iv_entity = lv_col_bo ).
endif.
lv_col_bo = lv_collection->IF_BOL_ENTITY_COL~GET_NEXT( ).
endwhile.
me->set_collection( lv_fin_collection ).
Step 4: Add the view to the corresponding viewset in the runtime repository and configure the viewset to display your new assignment block.
This is a ball park estimate, so please if my approach is worng, someone else jump in and correct the mis-steps.
Good luck,
Stephen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
1 | |
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.