on 04-23-2010 5:44 PM
Hi all,
I'm new to WDA and now in a project upgrading to SRM7. I had implemented an enhancement (for testing) to shopping cart professional header WDC: /SAPSRM/WDC_UI_SC_DOFC_HD, view: V_SC_BOFC_HD with below statements in a post-exit on method WDDOMODIFYVIEW:
lr_nd_int = wd_context->get_child_node( name = wd_this->wdctx_HEADER ).
lr_el_int = lr_nd_int->get_element( ).
lr_el_int->Set_attribute( name = `ZZAPRID1` value = 'APPROVER-A' ).
A textview was added on the layout to show the value of ZZAPRID1. The view context HEADER (structure
/SAPSRM/S_CLL_WD_SC_HEADER had include structure CI_BBP_HDR_SC from previous SRM version), and attribute ZZAPRID1 is type CHAR12 to store approver user ID.
The problem is: only when I manually change something (e.g. shopping cart name) on shopping cart header, the ordered/saved shopping cart will successfully updated with ZZAPRID1 and I can locate the user ID in table BBP_PDHGP. If I did not change anything, the ordered/ saved shopping cart will not updated with ZZAPRID1, it is blank in table BBP_PDHGP.
May I know how to ensure the attribute is updated by my enhanced method? Thanks.
>May I know how to ensure the attribute is updated by my enhanced method? Thanks
Since you enhancement is in WDDOMODIFYVIEW it should be firing on any server request. However WDDOMODIFYVIEW occurs after event handling in the phase model:
http://help.sap.com/saphelp_nw70ehp2/helpdata/en/d2/8acd409cc4dd50e10000000a1550b0/frameset.htm
It is quite possible that your enhancement is too late and the data has already been sent into the model layer for updating the database by the time it reaches the WDDOMODIFYVIEW.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
Thanks for your reply. I relocated the codes to post-exit of method WDDOBEFOREACTION but the result is same:
When I manually update shopping cart name, the ordered shopping cart will successfully updated with ZZAPRID1. If there is nothing update before order, ZZAPRID1 is not update.
Do you have further advise?
Hi Donald,
are you after more of a "this is the last person to view this cart" type functionality?
If the user does nothing to the cart why would you want to update the backend DB?
Look at the logic in the program - obviously the DB representation of the cart is only updated when it changes - if you want to store something when the cart doesn't change then look at what gets triggered on other actions - or potentially include a call to update DB version of the cart after every user action.
Hope this helps,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.