cancel
Showing results for 
Search instead for 
Did you mean: 

Stop Expense Type Change using Exit in Webdynpro

0 Kudos

Hi ,

     I have a requirement to stop user from changing Specific Expense Type to some other Expense Type.But user can be allowed to delete that expense type. Webdynpro Component being used is FITE_VC_RECEIPTS. View is RECEIPTS_VIEW and Method being ONACTIONEXPENSE_TYPE_SELECT.

My question is where do i do this change? Post Exit or Override Exit? Also is there any sample code for this kind of change? Please let me know.

Accepted Solutions (0)

Answers (1)

Answers (1)

amy_king
Active Contributor
0 Kudos

Hi Anandkumar,

Post exit and overwrite exit are both good options. For examples, please take a look at component WDR_TEST_ENH_09 in your system. This component shows examples of Enhancements in a Controller and is a used component of demo component WDR_TEST_ENHANCEMENTS. You can run the application of component WDR_TEST_ENHANCEMENTS to see the controller enhancements in action.

Cheers,

Amy

0 Kudos

Thanks a lot Amy I will check that

0 Kudos

I am trying to do changes in Post Exit of ONACTIONEXPENSE_TYPE_SELECT.

But I am facing a problem in capturing the previous value and current value selected. How do i achieve this?   The page is getting displayed with an entry with specific Expense Type. When user tries to change it to something else i should give a message. But user can delete the same.

amy_king
Active Contributor
0 Kudos

Hi Anandkumar,

Take a look at how the EXPENSE_TYPE_SELECT action handler method determines these values and do something similar in your post-exit. In the action handler code, I can see a statement...


if lv_check_result is initial.

    ...

elseif lv_previous_exp_type ne ls_expense_type-exp_type. "Expense type has changed

    ...

endif.


Take a look at how fields lv_previous_exp_type and ls_expense_typ were populated. These are the previous and current values for expense type.


Cheers,

Amy



0 Kudos

i somehow dont see different values in those fields. both values are same