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: 

Enhancement SRVDET in T-Code ML81N

Former Member
0 Kudos

Hi,

My requirement is to add certain custom fields in T-Code ML81N. For this I am using the Enhancement SRVDET - User screen on tab strip of service detail screen.

I have added the fields in Table CI_ESLLDB. and then mapped these Custom fields in the Screen Exit on Screen 0299. The custom fields have appeard on the Tabstrip.

But the problem is even if I am viewing the line item in ML81N in Display mode, my custom fields are appearing in editable mode. And if I am entering the values in the custom fields(either in Change mode or Display mode of ML81N), these entries are not getting stored.

I am not writing any code in the Function Exit of this Enhancement.

I have tried by giving INP in Group2 in Attributes of Custom Fields in Screen(by seeing the Screen Group of other fields in Tabstrip).

But still it is not working. If anyone has worked on Enhancement SRVDET plz tell tell me where I am commiting the mistake.

Regards,

Nitin

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

Follow the below steps to find out what all BADI's are called when you press any button in any transaction.

1) Goto se24 (Display class cl_exithandler)

2) Double click on the method GET_INSTANCE.

3) Put a break point at Line no.25 (CASE sy-subrc).

Now

4) Execute SAP standard transaction

5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.

6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.

7) This way you will find all the BADIs called on click of any button in any transaction.

Regs,

Venkat

14 REPLIES 14

Former Member
0 Kudos

Hello,

Follow the below steps to find out what all BADI's are called when you press any button in any transaction.

1) Goto se24 (Display class cl_exithandler)

2) Double click on the method GET_INSTANCE.

3) Put a break point at Line no.25 (CASE sy-subrc).

Now

4) Execute SAP standard transaction

5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.

6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.

7) This way you will find all the BADIs called on click of any button in any transaction.

Regs,

Venkat

Former Member
0 Kudos

Nitin,

You have to write the code in Save exit to save the data to SAP. There may be structure in which u have pass the data. Keep break points and check which exit is called during saving. Also u have write the explicit code for showing the Zfields in Display mode when u go in ML83N.

Like

loop at screen.

if screen-name = 'ZFIELD'.

screen-input = '0'.

modify screen.

endif.

endloop.

Prakash.

0 Kudos

Hi Prakash,

T-Code ML83N does not exist. And also the screen fields are not visible in the corresponding Function Exits of this Enhancement so I can't use Loop at screen statement in Function Exit.

Again I think it should be SAP who will take care the saving of data bcoz these customes fields needs to be updated in standard table ESLL.

Regards,

Nitin

Former Member
0 Kudos

I am having the exact problem with the new fields and the subscreen with ML81N. Is there any solution to this issue?

Much thanks.

Former Member
0 Kudos

OK, I got the issue straighten out.

We need to write code to transfer the data between the screen field and the custom field.

First, declare the new fields in ehancement SRVDET, append new fields to CI_ESLLDB, eg. I declared zzcharg - batch number.

At EXIT_SAPLMLSP_040, declare a global variable to store the custom field information. This will allow the user input data to be stored in a temporary variable. eg. I did the following:

At ZXMLUTOP:

*----


***INCLUDE ZXMLUTOP .

data g_esll_zzcharg like esll-zzcharg. "global variable

At the enhancement EXIT_SAPLMLSP_040, I did:

*& Include ZXMLUU23

*&----


g_esll_zzcharg = i_esll-zzcharg.

The trick is, at Screen 299. Do the following.... declare module status_0299.

process before output.

module status_0299.

Inside module status_0299, do the following:

*----


***INCLUDE ZXMLUO01 .

----


&----


*& Module STATUS_0299 OUTPUT

&----


text

*----


module status_0299 output.

i_esll-zzcharg = g_esll_zzcharg.

endmodule. " STATUS_0299 OUTPUT

Now, the input field will show up correctly and saved correctly.

If you dun want to field to be editable, do a loop at screen, when screen-name = 'ESLL-ZZCHARG', screen-input = '0'.

I am also working on assigning a value to the field automatically, and found the exit to do this already. So the whole thing is automatic.

Good luck. Hope this help and please award points accordingly.

Thank you,

Jinson Wong

Former Member
0 Kudos

Missed a piece of code...

AT the include inside EXIT_SAPLMLSP_041. Do the following.

&----


& Include ZXMLUU26

*&----


e_eslldb-zzcharg = i_esll-zzcharg.

This will return the value back to the main program and eventually stored back to the database.

0 Kudos

Hi Jinson,

I am using the same procedure as you have illustrated but still it is not working.

Is the same thing working in your case. If yes, plz check if you have missed something bcoz it is working in my case.

Regards,

Nitin

0 Kudos

i_esll-zzcharg is the screen field I used. so zzcharg is the extended field.

It is working in my case.

Try to set break points in the code. The trick is to have the <u>global variable</u> store the temporary screen value, else it gets overwritten by the standard program.

0 Kudos

Hi Jinson,

Even after storing the scrren fields in Global data as advised by you it is still not saving the data in the end of the transaction.

Anyways thanks for your help.

Rgds,

Nitin

0 Kudos

This message was moderated.

0 Kudos

I have been searching for a working response to this issue of the screen value not being copied on the custom screen fields of transaction ML81n using screen exit SRVDET.

Wow..! Thanks a lot for the detailed explanation above. This is working well for me!!

Data fetch, data save, data change! all works!

Former Member
0 Kudos

Hi Nitin,

There are three steps involved.

1. save the screen field to temporary global variable: g_esll_zzcharg = i_esll-zzcharg.

2. push the global variable back to the screen field

i_esll-zzcharg = g_esll_zzcharg.

3. assign the global variable to the internal table for update, this is another user exit (EXIT_SAPLMLSP_041): e_eslldb-zzcharg = i_esll-zzcharg.

So these code were developed at different modules, the user exit and the screen enhancement exits.

The issue is that the standard program overwrites the new field to blank, so, that is where the global variable comes in. My recommandation is the put breakpoints at the three different modules, and it will show you the field gets clear out. When its clear out, use the global variable to put the information back to the field at another user exit described above.

Hope this help.

Jinson

Former Member
0 Kudos

Was ur requirement to add fields in ESLL or ESSR??

Former Member
0 Kudos

Open Link

scn.sap.com/message/15965609#15965609

Thanks