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: 

BAdI: LE_SHP_TAB_CUST_HEAD: warning when leaving without saving.

Former Member
0 Kudos

Hi all,

I have implemented the BAdI LE_SHP_TAB_CUST_HEAD or transaction VL02N in order to add a new tab with a new field and everything works fine.

However I have found that when I change the value in the new field, if I leave the transaction without saving no warning message is displayed ("System will exit processing, Do you want to save your data?").

Does anybody can help me to get the warning message ?

I thank you in advance.

Paolo

Edited by: Paolo Cavallini on Sep 23, 2008 11:30 AM

Edited by: Paolo Cavallini on Sep 23, 2008 11:32 AM

15 REPLIES 15

Former Member
0 Kudos

Hi

You can checkout this BADI definition LE_SHP_SAVE_WO_DELIVERY method SAVE_WO_DELIVERY error log value can be filed in paramater

CT_VBFS

Regards,

Surender

0 Kudos

Hi Yadav,

thank you for your reply.

I' ve not found the BAdI definition LH_SHP_SAVE_WO_DELIVERY in my system ( Sap release 4.7), however you've given me a good indication and I hope to

find a similar method in BAdI LE_SHP_DELIVERY_PROC.

If you have additional suggestions, I would be happy to know them.

Thanks again.

0 Kudos

Hi

No need of any other BADI or user exits.

It should pop-up for SAVE in this BADI LE_SHP_TAB_CUST_HEAD.

Make sure you created the screen fields thru DATA DICTIONARY LIKP. That is.. LIKP-ZZFIELD1.

0 Kudos

Hi Asik,

thank you for your reply; I have created the new field named

ZZCAUTR in the append for table LIKP and in the sub-screen

the field name is LIKP-ZZCAUTR.

Is this what you mean?

Best regards.

Edited by: Paolo Cavallini on Sep 23, 2008 4:02 PM

0 Kudos

Hi

In the screen layout of the field LIKP-ZZCAUTR, in the attributes tab, FROM DICTIONARY is checked?

0 Kudos

Hi,

yes, it is. These are the dict. attributes in the screen

Format --> CHAR

From dict. --> 'X'

Everything else --> initial.

Best regards.

Edited by: Paolo Cavallini on Sep 23, 2008 4:24 PM

0 Kudos

Hi

How you are updating the table LIKP.

1. Are you doing in the below way.

In the method TRANSFER_DATA_FROM_SUBSCREEN,

CS_LIKP-ZZCAUTR = SCREEN_VALUE.

2. Otherwise using UPDATE statement .

0 Kudos

Hi,

I use this instructons

in method --> transfer_data_from_subscreen.

set parameter id 'OZZCAUTR' field cs_likp-zzcautr.

in module pool --> user_command_9000 input.

get parameter id 'OZZCAUTR' field likp-zzcautr.

I'm new on BAdI, then I could have made some mistakes, but I can not really understand where.

0 Kudos

Hi

You are doing in the reverse ( SET / GET ).

Do like this.

In method --> transfer_data_from_subscreen.
GET parameter id 'OZZCAUTR' field cs_likp-zzcautr. " Change Here

in module pool --> user_command_9000 input.
SET parameter id 'OZZCAUTR' field likp-zzcautr.   " Change Here

0 Kudos

Hi Asik,

You're right, I have corrected the code. However everything works fine as before, but the message of wanring when I leave transaction without saving is not provided.

Are you sure not to implement other BADI?

Thank you.

0 Kudos

Hi Paolo

I'm sure. It should ask.

See If any changes made in the structure CS_LIKP, You'll be prompted to SAVE.

To confirm it, In the method TRANSFER_DATA_FROM_SUBSCREEN write the following.

cs_likp-LGTOR = '001'.

Just Open & Close a Delivery Note,Dont do any changes.

You'll be prompted to SAVE.

0 Kudos

Hi Asik,

you are very kind to dedicate to myself so much time.

I have tried the following code:

  METHOD if_ex_le_shp_tab_cust_head~transfer_data_from_subscreen.

    GET PARAMETER ID 'OZZCAUTR' FIELD cs_likp-zzcautr.
    cs_likp-LGTOR = '001 '.

Endmethod.

I open and close the delivery note, but I don't obtain any message.

Regards.

naimesh_patel
Active Contributor
0 Kudos

Once you are on that screen and if you are moving to other tab or do Save, control will go to your PAI (process after Input) in your Custom Screen. So, you can fire a message there if the fields are empty.

BADI LE_SHP_DELIVERY_PROC method SAVE_DOCUMENT_PREPARE gets triggered when you save the delivery. Although, I haven't tried to fire message in this method.

Regards,

Naimesh Patel

0 Kudos

hi Naimesh,

thank you for your reply. But my problem is the following:

- a user change the value of the new field;

- then he changes tab and push Exit button without saving;

- I need to catch this and display the message "You have made some changes, do you want to save your data?".

Thanks, Paolo

Former Member
0 Kudos

Hey Paolo,

Can you please send the full code for all the methods of BADI LE_SHP_TAB_CUST_HEAD to add the new TAB with 2 additional input fields whose data will be stored in delivery standard tables for TCode : VL01N/VL02N.

Thanks in anticipation,

Gaurav