on 04-14-2010 7:31 AM
Hello everyone,
I am new in the topic SAP CRM Web Client and I have to create a new assignment block for the accounts site.
In this assignment block you should see the last ten orders of the account. I already have the code to get the data from the tables. But I have no idea how to show this in a new assignment block. Can anybody help me, please? Or do you know a good document, where the process is described?
I have the book SAP CRM Web Client Customizing and Development. So I've understood the basics. But it was not really helpful for my project.
So help me, please.
Thanks and regards,
Stefanie
Stefanie,
Assignment block is nothing but a view. So you need to create one view with view type as Table view. Columns of the table would be the value attributes of the view. Write the population logic in ON_NEW_FOCUS method of the CNxx class associated with the view you created.
You can refer following code to get the TABLE View populated -->
data: lr_wrapper type ref to cl_bsp_wd_collection_wrapper, " BP collection wrapper
lr_entity type ref to if_bol_bo_property_access, " wrapper entity
lv_bp_nr type string, " BP (business partner) number as string
lv_partner type bu_partner, " BP number in correct format (for RFC call)
ls_smof_erpsh type smof_erpsh, " structure of the RFC destination
lr_col type ref to if_bol_bo_col, " collection to fill node ZBP_FAVS
lr_valuenode type ref to cl_bsp_wd_value_node, " value nodes to fill a collection
lr_tabline type ref to zbp_favs_s, " table line reference to fill value node
lt_favs type zbp_favs_tab, " local table with data from ERP-table ZBP_FAVS
ls_favs type zbp_favs_s. " local structure of table above
get partner entity and partner number
try.
lr_entity ?= focus_bo.
catch cx_sy_move_cast_error.
return.
endtry.
lv_bp_nr = lr_entity->get_property_as_string( 'BP_NUMBER' ).
if lv_bp_nr is initial. " no partner...
return. "...return without selection
endif.
get RFC destination of ERP system, if needed
if ZL_ZBP_FAVS_ZBPFAVORITES_IMPL=>gv_destination is initial.
call function 'CRM_GET_ERP_SYSTEM'
exporting
iv_rfcdest =
iv_siteid =
importing
es_smof_erpsh = ls_smof_erpsh.
if sy-subrc = 0 and ls_smof_erpsh-rfcdest is not initial.
ZL_ZBP_CUCL_ZCURRENCYCLAU_IMPL=>gv_destination = ls_smof_erpsh-rfcdest.
endif.
endif.
get favorite things for partner
lv_partner = lv_bp_nr. " call RFC function in ERP system
call function 'Z_CRM_GET_FAVS_FOR_BP'
destination ZL_ZBP_CUCL_ZCURRENCYCLAU_IMPL=>gv_destination
exporting
iv_partner = lv_partner
importing
et_favs = lt_favs
exceptions
others = 4.
if sy-subrc <> 0.
" should never happen
endif.
create collection object to transfer data
create object lr_col
type
cl_crm_bol_bo_col.
loop through all found data...
loop at lt_favs into ls_favs.
"...create line object
create data lr_tabline.
"...create value object with current line for colleciton
create object lr_valuenode
exporting
iv_data_ref = lr_tabline.
"...set current line data
lr_valuenode->set_properties( ls_favs ).
"...add current line to collection
lr_col->add( lr_valuenode ).
endloop.
set collection
me->set_collection( lr_col ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you all!
@Harshit: The problem is that there is not much time left to finish the project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello!
There is a Whitepaper available about the creation of Assignment-Blocks for the Account-Overview-Page.
I guess, this can help.
In this example it is the "Complaints" Assignment-Block which has been added to the Account-Overview-Page.
[https://portal.wdf.sap.corp/irj/go/km/docs/gcp_content/gcp_documents/functional Groups/Customer Relationship Management/US CRM Consulting - White Papers Qualified Content/2009_06_15 CRM WP_Integrating Complaints with Account Management.doc|https://portal.wdf.sap.corp/irj/go/km/docs/gcp_content/gcp_documents/functional Groups/Customer Relationship Management/US CRM Consulting - White Papers Qualified Content/2009_06_15 CRM WP_Integrating Complaints with Account Management.doc]
Best regards
Arno
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Stefanie,
That's the only book that is available in the Market right now. It has all the basics that need to be understood before one starts with SAP CRM. It would be good if you invest more time in Hands On going forward. Once you get a hang of the System, then and only then things will make sense, and it's a step by step process which will take time.
Regards,
Harshit
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.