on 04-03-2018 3:08 PM
Hi Experts,
My requirement is In Business Aggrement whenever i can change the Address and click on save button data should be save and save button can be disable mode but in my case data was save and save button was not disable mode.
Component : BUGA_DETAIL
BUAGOVERVIEW->EH_ONSAVE
please give me suggestion.
Hi,
1. Need to confirm firstly, does this issue happen under standard environment?
To check this, Please execute SU3, set user parameter WCF_IGNORE_ENHANCEMT to A. And reopen the webui to test.
2. Which BBPCRM version is it in your system? For example, is it SAPKU71312 or something like this?
3. Maybe you can check method
CL_BUAG_DET_BUAGOVERVIEW_IMPL->IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS, set breakpoint there to see if it is executed after click 'SAVE' button. And if the logics for 'SAVE' button is not expected?
Best Regards, Corrine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Solved the issue.
call ME->SET_BP_TRANSACTION( LR_BUAG_ENTITY ). in BUAG_SAVE end of the method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Corrine Guan,
Thanks for your reply,
my system is BBPCRM version. and get_button method
* Read BuAg from Custom Controller
LR_BUAG_ENTITY ?= ME->CUCOBUAG->TYPED_CONTEXT->BUAG->COLLECTION_WRAPPER->GET_CURRENT( ).
IF ME->CUCOBUAG->GV_VIEW_DISPLAY = ABAP_TRUE
OR LR_BUAG_ENTITY->IS_CHANGEABLE( ) = ABAP_FALSE.
* set enable for edit button
LV_EDIT_BUTTON_ACTIVE = ABAP_TRUE.
* set enable for cancel and save and save and back
LV_BUTTON_ENABLE = ABAP_FALSE.
ELSE.
* set enable for edit button
LV_EDIT_BUTTON_ACTIVE = ABAP_FALSE.
* set enable for cancel and save
LV_BUTTON_ENABLE = ABAP_TRUE.
ENDIF.
* we only want to check if Button was set. Don't check other attributes, could get wrong buttons
* e.g. attribute SELECTED_LINK_ID could be filled but has nothing to do with buttons
MOVE-CORRESPONDING LS_CONFIG TO LS_BUTTON_STRUC.
IF LS_BUTTON_STRUC IS INITIAL.
*** Config node was NOT set in the calling component => set default butons (Save + Cancel + Edit)
*--- Save ---*
LS_BUTTON-ID = 'Save'. "#EC NOTEXT
LS_BUTTON-ON_CLICK = 'Save'. "#EC NOTEXT
LS_BUTTON-TEXT = CL_WD_UTILITIES=>GET_OTR_TEXT_BY_ALIAS( 'CRM_IC_APPL/SAVE' ).
LS_BUTTON-TOOLTIP = CL_WD_UTILITIES=>GET_OTR_TEXT_BY_ALIAS( 'CRM_IC_APPL/SAVE' ).
LS_BUTTON-TYPE = CL_THTMLB_UTIL=>GC_ICON_SAVE.
LS_BUTTON-ENABLED = LV_BUTTON_ENABLE.
LS_BUTTON-PAGE_ID = ME->COMPONENT_ID.
APPEND LS_BUTTON TO RT_BUTTONS.
CLEAR LS_BUTTON.
* separator
LS_BUTTON-TYPE = CL_THTMLB_UTIL=>GC_SEPARATOR.
APPEND LS_BUTTON TO RT_BUTTONS.
CLEAR LS_BUTTON.
*--- Cancel ---*
This is the code in my Get_method.
regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Malleswar,
Sorry for late reply...
whenever i change the address and click on save button, the data will save and save button must be disable. but in my case when click on save button data is saving but button not able to disable.
Below code is save related code in component:BUAG_DETAIL overview page EH_ONSAVE
METHOD BUAG_SAVE.
DATA:
LR_CORE TYPE REF TO CL_CRM_BOL_CORE,
LR_COL_WRAPPER TYPE REF TO CL_BSP_WD_COLLECTION_WRAPPER,
LR_BUAG_ENTITY TYPE REF TO CL_CRM_BOL_ENTITY,
LR_TRANSACTION TYPE REF TO IF_BOL_TRANSACTION_CONTEXT,
LR_MSGSRV TYPE REF TO CL_BSP_WD_MESSAGE_SERVICE,
LR_GLOBAL_MESSAGE_CONTAINER TYPE REF TO CL_CRM_GENIL_GLOBAL_MESS_CONT,
LR_CUSTOM_TRANSACTION TYPE REF TO CL_CRM_BOL_CUSTOM_TX_CTXT.
DATA:
LV_SUCCESS TYPE CRMT_BOOLEAN,
LT_MESSAGES TYPE CRMT_GENIL_MESSAGE_TAB.
* get the core object out of the factory
LR_CORE = CL_CRM_BOL_CORE=>GET_INSTANCE( ).
LR_CORE->MODIFY( ).
LR_COL_WRAPPER = TYPED_CONTEXT->BUAG->GET_COLLECTION_WRAPPER( ).
* read mixed entity and cast into normal entity
LR_BUAG_ENTITY ?= LR_COL_WRAPPER->GET_CURRENT( ).
* check if error message exist
IF ( LR_BUAG_ENTITY IS BOUND " canceled new buag
AND CL_CRM_BUAG_TOOLS=>CHECK_BUAG_MESSAGE_CONTAINER( IR_ENTITY = LR_BUAG_ENTITY ) = ABAP_FALSE ).
* no navigation
RAISE SAVE_FAILED.
ELSE.
* we save now via custom transaction => several BP can be saved independant from entity
IF GR_CUSTOM_TRANSACTION IS BOUND AND GR_CUSTOM_TRANSACTION->IF_BOL_TRANSACTION_CONTEXT~CHECK_SAVE_NEEDED( ) = ABAP_TRUE.
IF IV_TESTRUN = ABAP_FALSE.
IF ME->GR_CUSTOM_TRANSACTION->IF_BOL_TRANSACTION_CONTEXT~SAVE( ) = ABAP_TRUE.
ME->GR_CUSTOM_TRANSACTION->IF_BOL_TRANSACTION_CONTEXT~COMMIT( ).
ME->GR_CUSTOM_TRANSACTION->START_RECORDING( ).
ELSE.
ME->GR_CUSTOM_TRANSACTION->IF_BOL_TRANSACTION_CONTEXT~ROLLBACK( ).
ENDIF.
ENDIF.
ELSE.
IF IV_TESTRUN = ABAP_FALSE.
* save not needed => Revert => View change to Display mode
ME->BUAG_REVERT_CUST_TRANS( ).
ENDIF.
RAISE SAVE_NOT_NEEDED.
ENDIF.
ENDIF.
ENDMETHOD.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do u want to hide the save button after service contract is saved after address change? or just button available but should not work?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Thanks for ur advice
but my problem was not solved...
when i change my address field data in service contract and click on save...
that save button should be disable mode but its not possible in my case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1. Do you mean exactly the same issue still happens even when you set user parameter WCF_IGNORE_ENHANCEMT to A?
2. When you set wcf_ignore_enhancemt to A and set breakpoint in method CL_BUAG_DET_BUAGOVERVIEW_IMPL->IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS, does the breakpoint stop there when you click 'Save' button? If yes, can you upload the source codes here so that we can know exactly where the codes we should look into.
Best Regards, Corrine
User | Count |
---|---|
5 | |
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.