on 03-04-2015 9:23 AM
Hi Jerry,
You can code in do_init_context method to fill your selected data to the bol context node.
create object lr_bol_col type cl_Crm_bol_bo_col.
CREATE DATA ls_structure_name
assign your custom data to reference ls_structure_name and then create bol entity like below code, here if you have multiple rows you have to use loop on table and each time you need to create entity and assign it to collection. Once the loop is done you need to assign full collection data to context node.
create object lr_bol_entity exporting ls_structure_name.
then fill the entities into collection lr_bol_col->add( lr_bol_entity).
and then add lr_bol_col to context node collection, this statement would come after loop the loop of data.
me->typed_context->context node name->collection_wrapper->add_collection( lr_bol_col ).
Best Regards,
Dharmakasi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dharmakasi,
thanks for your great help.
As you can see in my above screen shot, the base entity of my view is "Product" and attribute "STRUCT.Produt_ID" was automatically created as soon as the view was created.
Now,I have a problem, the system do not get into the GET method of attribue "STRUCT.Product_ID",and thus could not get the value for this attribute. But it can get into the other value attributes and get the value for them.
Do you know what the problem is? Is there anything I should do?
Thank you.
Jerry.
Hi Jerry,
Have you changed the attribute name, i did not see the STRUCT.PRODUCT_ID in above screen shot. keep break point in GET_S_STRUCT method in context node class and see whether the structure is having product id or not. All attributes in context node get method will be triggered from GET_S_STRUCT method.
Check you are using STRUCT.PRODUCT_ID field in web ui configuration.
Best Regards,
Dharmakasi.
Hi Jerry,
This issue seems strange thing, i see there is another field with name product id what is that field?
You can check the structure used for context node in GET_TABLE_LINE_SAMPLE in context node class.Here you will be having all the list of attributes used in context node attributes.
You can check whether you will be able to see product id field. I think you have added product id 2 one is value attribute and bol attribute.
Best Regards,
Dharmakasi.
Hi Jerry,
i have seen your previous reply's in that you have mentioned product_id get method is not triggering right. now you have added product_id attribute into your context node right check weather getter and setter method of that product_id is triggering or not. then write the fetching logic over there if the values are not populating.
check this link..
Thanks & Regards,
Srinivas.
Hi Srinivas,
the attribute "Product_id" was generated when the view was created with base entity "product".
I also didn't set the flag "HIDE" and it is also listed in the displayed fields in the user's personalization. The wierd thing is ,the system do not get into the GET method of attribute "Product_id" at all.
do you have any suggestions to check?
Thank you.
Jerry
Hi Srinivas,
Yes, I do move the field to display.
Now,I solved the problem by changing the setting in "Deactivting Hiding of Fields". Disable hiding of fields by design layer checkbox.
It seems that my field "Product_ID" is hide,But I'm sure the "Hide" checkbox is not set.
I still don't understand.
Jerry.
Hi Jerry Cui,
you can fetch the data in do_init_context method for displaying default values when ever your login into web ui the data will displayed in your table view.
just fallow Dharmakasi approch what he said you can achieve your requirement
see this logic for your reference purpose..
here i have used the standard structure that i have converted into collection assign to the node level..
just go through this link..
SAP CRM WEB UI : 57.VALUE NODE - DISPLAYING CUSTOM TABLE ON WEB UI
Srinivas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
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.