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: 

User Exit in ML81N while saving

EkanshCapgemini
Active Contributor
0 Kudos

Hi,

I need to popup a window when a user clicks on save. On this window I will need agreement no.

I tried all the exits listed in the common list posted on various threads but it didn't help me.

Please provide me the solution.

1 ACCEPTED SOLUTION

Former Member

Hi Ekansh,

Whenever the user clicks on SAVE the include LMLSRF0F is called and the subroutine PERFORM SAVE is executed.

By writing the code for the popup in the include LMLSRF0F will popup a window when user clicks on save. You can use function module POPUP* for the popup window. The include LMLSRF0F contains enhancement spot so you can easily accomodate your code. Let me know if any additional information is required.

Hope this helps.

Thanks,

Tooshar Bendale

13 REPLIES 13

Former Member
0 Kudos

Please search

http://scn.sap.com/thread/1219087

Mark if correct.

Former Member

Hi Ekansh,

Whenever the user clicks on SAVE the include LMLSRF0F is called and the subroutine PERFORM SAVE is executed.

By writing the code for the popup in the include LMLSRF0F will popup a window when user clicks on save. You can use function module POPUP* for the popup window. The include LMLSRF0F contains enhancement spot so you can easily accomodate your code. Let me know if any additional information is required.

Hope this helps.

Thanks,

Tooshar Bendale

0 Kudos

Hi Tooshar,

I have checked include LMLSRF0F, there is no enhancement spot but enhancement spot is there in main program SAPLMLSR,  same is not usable "Statement inaccessible" message. Pls. help how to add code in include.

regards,

Rajesh

0 Kudos

Hi Rajesh,

I double checked the include LMLSRF0F, and yes there are enhancement spots available for this include.

1)  Go to SE38 -> LMLSRF0F -> Display

2)  Program -> Enhance

3)  Edit -> Enhancement operations -> Show Implicit Enhancement options

4)  Create an enhancement spot inside the subroutine SAVE.

If you write / create a enhacement spot outside the subroutine, during activation of the program its going to give an error Statement inaccessible because its outside the subroutine and will never be executed. Hope this answers your question.

Let me know if any additional information is required.

Thanks,

Tooshar Bendale

0 Kudos

Hi Tooshar,

Thanks, I am able to create enhancement spot as you suggest. Thank you very much.

I am getting ESSR data but I also want to have ESLL (line item data) at the time of SAVE to validate quantity entered. Which structure is used for ESLL data at the time of save? I checked T_ESLL, IS_ESLL_KEY, IX_ESLL but these are not accessible at the time of save.

regards,

Rajesh

0 Kudos

Hi Rajesh

Can you please put a break poiint in MS_CREATE_SERVICE_ENTRY_MULTI.

If it comes their you can do an implicit enhancement and raise an exception for invalid inputs.

Thanks

Nabheet

0 Kudos

Hi Nabheet,

Thanx for the reply.

I have checked FM MS_CREATE_SERVICE_ENTRY_MULTI by putting break point, it is not coming.

Please suggest how can I validate quantity entered at the time of SAVE.

regards,

Rajesh

0 Kudos

Actually i am not able create service entry in my system so cant exactly tell you but still you can do one thing. Before press save start debugger and put a breakpoint at statement call function. The you can choose accordinlgy which FM satsifies your criteria and proceed.

Thanks

Nabheet

0 Kudos

OK,

I will check like this. Thank you very much.

regards,

Rajesh

0 Kudos

Thanks Tooshar Bendale!

I created an enhancement point to validate and change account information at XESKN[]. It helped a lot.

0 Kudos

Hi Rajesh,

For ESLL entries, use the function module MS_READ_ENTRY_SHEET at the Enhacement Spot provided by Tooshar.

Regards,

Harshil

Former Member
0 Kudos

Hi,

There are 2 options.

Use screen exit

Screen exits available for your application are,

SRVDET : User screen on tab strip of service detail screen

SRVEUSCR : User screen on entry sheet tabstrip

OR

Use FM

POPUP_GET_VALUES to get the value.

There are also FM where the value will be checked against DB

Check the FG of this FM.

Regards,

0 Kudos

Guy's,

Just in case if the process is automated (CATM) and there is a requirement to update any field then we can do it in FM MS_CREATE_SERVICE_ENTRY_MULTI. My requirement was to default the GL account once the service entry sheet is created. Create a source code enhancement at start of the FM and change the value.

Hope it helps and saves time for others as i was trying to achieve it using one of the user exits found (SMOD-Package ML) and it did not worked.

Thanks/AJ