09-23-2008 10:16 AM
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
09-23-2008 11:40 AM
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
09-23-2008 12:59 PM
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.
09-23-2008 2:36 PM
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.
09-23-2008 3:01 PM
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
09-23-2008 3:07 PM
Hi
In the screen layout of the field LIKP-ZZCAUTR, in the attributes tab, FROM DICTIONARY is checked?
09-23-2008 3:24 PM
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
09-23-2008 3:46 PM
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 .
09-23-2008 4:04 PM
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.
09-23-2008 4:15 PM
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
09-24-2008 9:09 AM
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.
09-24-2008 10:36 AM
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.
09-24-2008 1:05 PM
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.
09-23-2008 2:09 PM
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
09-23-2008 2:35 PM
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
11-20-2008 12:50 PM
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