2023 Sep 18 1:32 PM
I recently done screen enhancement in ML81N . I added new field with sy-datum as default value and the date is getting stored in ESSR
data base table.
Now, when I am trying to see details of earlier service entry sheets in display mode, the new field is showing current date (SY-DATUM ) only. rather than picking the value from the ESSR table.
So first I have to find out how the system identifies if it is change mode or display mode.
I have checked SY structure and can see UCOMM , XPROG and CPROG is same for both in display and change mode.
I was expecting sy-ucomm to be different for both change and display mode so that I can get current date in change mode and Fetch date value from
ESSR table in display mode.
But here i can see SY-UCOMM = HC12 for both change and display mode.
The code is working perfect in change mode.
The issue is with display mode also , getting today's date in newly added date.
Kindly please help me to fix this issue.
2023 Sep 18 2:01 PM
I think you need to implement those two user exits in the opposite way.
ZXMLUU27 is to transfer data from table ESSR to the screen. The code should be:
MOVE-CORRESPONDING i_essr TO essr.
In ZXMLUU28 you must fill code as following in order to store the current date in ESSR:
e_essrdb-zinvdat = sy-datum.
2023 Sep 18 1:54 PM
It seems the user exits are only processed in change mode...
Did you check in the debugger?
2023 Sep 18 2:01 PM
I think you need to implement those two user exits in the opposite way.
ZXMLUU27 is to transfer data from table ESSR to the screen. The code should be:
MOVE-CORRESPONDING i_essr TO essr.
In ZXMLUU28 you must fill code as following in order to store the current date in ESSR:
e_essrdb-zinvdat = sy-datum.
2023 Sep 18 2:44 PM
Brilliant Kolz
It worked for me. Now I am getting the value in the field value from table in display mode and sy-datum default on to screen in change mode.
Thanks alot 🙂
Hope you will comeup with solution to my other issue BADI implementation method PAYMENT_TERMS_SET.
2023 Sep 21 10:56 AM
After UAT testing, the decision was taken that the new custom date field has to be kept blank but should be made mandatory.
I have opened the layout and made it mandatory as shown below
Then I have removed the sy-datum and replaced with ci_essrdb-ZINVDAT in its place as shown below.
No changes done in importing function exit as shown below.
MOVE-CORRESPONDING I_ESSR TO ESSR.
Then save and activate the project.
When I run the ML81N I am facing 2 issues here.
1. as I have made the new custom field mandatory, it is asking to enter the value and when I inserted value in it, it is getting disappeared when I do navigate across the other standard tabs.
Before I save it. I have to fill the field multiple times.
2.The value is not getting saved in the ESSR table.