on 12-04-2014 9:55 AM
Dear Friends
I am facing the following challange:
in SRM7 Classic Scenario
Web Dynpro Component: /SAPSRM/WDC_DODC_SC_I_BD
View Information: V_DODC_SC_I_BD
I added the custom checkbox
Field ID: ZZDIRECTMAT
Type of UI Element: CHECKBOX
UI Element Library: STANDARD
Web Dynpro Component: /SAPSRM/WDC_UI_SC_DOTC_BD
View Information: V_SC_DOTC_BASIC
Requirement: Deactivate or hide the Account Assigment COLUMN if the checkbox above is checked
Web Dynpro Component: /SAPSRM/WDC_UI_SC_DOFC_D1
View Information: V_SC_DOFC_D1
Requirement: Deactivate or hide the Account Assigment TAB if the checkbox above is checked
could anybody guide me to a solution?
thanks
Imi
Hi Imi,
If you delete the accounting data of the shopping cart when the checkbox is checked, the account assignment tab will not be visible.
This is already implemented for DIrect Materials in standard.
When you check the Direct Material checkbox the following stack is observed-
METHOD /SAPSRM/CL_PDO_BO_SC==========CP UPDATE_ITEM_INTERNAL
METHOD /SAPSRM/CL_PDO_BO_SC==========CP /SAPSRM/IF_PDO_BO_SC~UPDATE_ITEM
METHOD /SAPSRM/CL_PDO_BO_SC==========CP /SAPSRM/IF_PDO_BO_SC~CHANGE_TO_DIRECT_MATERIAL
METHOD /SAPSRM/CL_CH_WD_DODM_SC_I_BD=CP /SAPSRM/IF_CLL_DODM_SC_I_BD~CHANGE_TO_DIRECT_MATERIAL
METHOD /1BCWDY/PH5AZ8WQT1P84GS6R3OK==CP ONACTIONON_CHANGE_TO_DIRECT
In class /SAPSRM/CL_PDO_BO_SC, method /SAPSRM/IF_PDO_BO_SC~UPDATE_ITEM
line 163
Here me refers to an object of /SAPSRM/CL_PDO_BO_SC
IF iv_direct_material EQ abap_true.
CALL METHOD me->acct_reset
EXPORTING
iv_item_guid = ls_item_pd-guid
is_header = ls_header
IMPORTING
co_message_handler = co_message_handler
CHANGING
ct_account = lt_account.
endif.
You need to call the above method in case the checkbox is checked.
Then call the following method by passing the updated account assignment as
lt_account[]
CALL METHOD me->update_item_internal
EXPORTING
is_header = ls_header
is_item_new = ls_item
it_old_partner = lt_old_partner
IMPORTING
es_item_updated = ls_item_pd
CHANGING
ct_new_partner = lt_partner_new
ct_org = lt_orgdata_new
ct_account = lt_account
co_message_handler = co_message_handler
ct_pridoc = lt_pridoc_new.
This method will take care of hiding the account assignment tab.
Regds,
Siddharth.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Imi,
this requirement has more to deal with ABAP WD development rather than updating the document itself.
My proposal is: create a Context attribute, bound to your ZZDIRECTMAT checkbox.
Then in WDDOMODIFYVIEW access to the column element you want to hide and set the visible property according to the value of the context attribute ZZDIRECTMAT (or eventually, remove directly the element from the table)
Hope that helps,
Matteo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Imi,
What is your current version of SRM ?
There is a standard field called " Order as direct Material" in the shopping cart if you check it automatically the account assignment category tab will become invisible.
Regards,
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.