Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Customer tab on VL02N overview screen - Back button issue

rajesh_tummala5
Explorer
0 Kudos

Dear Experts,

I built a customer tab with a table control on delivery (VL02N) overview screen using BADI LE_SHP_TAB_CUST_OVER and LE_SHP_DELIVERY_PROC, everything is working with respect to data. Save is working as expected however a small issue with back button.

After making a change in the customer tab and back button is hit, there's no prompt for "do you want to save your data?"

Any ideas please.. I found something about screen sequences via VFBS Tcode maintaining T185 tables with Function codes but i do not have any function codes in my customer tab.


In standard SAP delivery, if a change is made and back button is hit without save, the following message is displayed.

Thanks in Advance.

Rajesh

2 REPLIES 2

Former Member
0 Kudos

You will have to check field sy-datar to see if data has changed and then add some logic when the BACK button is pressed.

Is the BACK button defined as an exit command?

Rob

0 Kudos

Thank You Rob for the suggestion, BACK button is SAP standard back button on VL02N Tcode, I just added a new tab on overview screen with item details(ZZ fields). So If I write my own logic in PAI for back button, it's not going to work.

I somehow figured it out. I debugged the SAP standard program to understand how "Do you want to save your data?" is displayed. It's using SAP screen sequence defined in VFBS transaction using function module  SCREEN_SEQUENCE_CONTROL. This function module is reading T185* tables and raising this message if there's a change and is not saved.

Actually LE_SHP_TAB_CUST_OVER BADI would have taken care of this automatically if i was to change delivery header data in customer screen but since i am changing Item data in a table control in customer tab, this BADI is not working properly.

LE_SHP_TAB_CUST_ITEM BADI would have served the purpose but our client wants to have the custom tab on the overview screen only.

I am changing CS_LIKP-AEDAT field with SY-DATUM in method TRANSFER_DATA_FROM_SUBSCREEN when there's a change in item data so LE_SHP_TAB_CUST_OVER BADI is working fine with item data also.

Thank You,

Rajesh.