2023 Sep 22 12:54 PM
Hi, Gurus,
I am working on transaction ML81N and I could successfully managed to get value in the custom field which I have added using customer exit .
1. I want to make the custom field which I have added as non editable in display mode . You can see the order in the below which is standard is in non editable mode. But the field which I have added as part of screen exit , is in editable mode . I want to make it non editable as it is display mode.
The below is custom field added as part of screen exit is showing in editable mode as below.
I have used SRVEUSCR customer exit and I have tried the below code in the import function exit EXIT_SAPLMLSR_020 but it is not making the field non-editable.
It looks like it is getting faded for fraction of second the moment save button is clicked and then getting editable again while all other standard fields remain in non editable mode.
2023 Sep 22 2:25 PM
Basically one of the function module of the exit, pass a flag 'editing mode' to the exit, save this value and use it in the PBO of your subscreen, not in the exit function module.
2023 Sep 22 3:09 PM
This is the first customer exit I am working with. Kindly make it as simple as possible.
As far the point 1 , which you have mentioned, I have made the changes as shown below
For the 2nd point , I have made the changes as below.
3rd point I could not able to make myself clear about it. However, I have created pbo of subscreen and added loop endloop in it. Kinldy can you please help me out with it.2023 Sep 22 3:19 PM
That's the correct part of code, try something such as
" I_AKTYP - 'X' in Editing Mode, Otherwise SPACE - saved in edits
LOOP AT SCREEN.
IF edits NE abap_true.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
NB: In your first version, at the start of the PBO, Abap reset every field to its dynpro definition attributes, so the modification in the function module were rolled back. The code in the PBO will overwrite those values.
2023 Sep 22 4:44 PM
Very sorry to ask this. If I use the code above which you have written in the pbo of subscreen , it should work. No need of the code which I have written in pbo . Correct me if I am wrong .
the code in both the exits are as follows.
2023 Sep 23 9:48 AM
I can see the pbo module of subscreen is not getting triggered when I applied break point. Any idea why it is happening so.?
The requirement is to meet 2 things.
1. the added field on the subscreen should be faded (non editable ) in display mode.
2. In editable mode it should be mandatory field.
I have used loop at screen to control the field on the subscreen. The code is as below to achieve the 2 requirements.
Kindly, please suggest me how can I achieve these two functionalities.
Why is it the ML81N transaction this pbo event is not getting triggered in display mode.