in this user exit i made
I_AKTYP = 'X'.
i_essr-lblni = '1212121'.
and i get message that this structure cannot be change why?
max bianchi replied
I checked the exit EXIT_SAPLMLSR_010 and it can change only the values of the fields of enhancement structure.
So I don't think you can change a value of a standard field.
You should do this thing:
set a break-point in EXIT_SAPLMLSR_010 and find the point if standard program where this exit is called, after past (in a post) the abap code placed before calling it.
In this way we can see the standard program used before calling the exit and perhaps we can explain you a way to change a value for standard field.
> I'm very sorry
I'm wrong the exit EXIT_SAPLMLSR_021 is to change the data for enhancement structure, so EXIT_SAPLMLSR_010 should be good for you.
The exit EXIT_SAPLMLSR_010 and EXIT_SAPLMLSR_020 belong to the same function group so they can read all global data of function group.
I don't know where and how you fill the ITAB table, but if you define it in include ZXMLUTOP (in std LXMLUTOP), this table'll be able to be read by both user-exit.
So in EXIT_SAPLMLSR_020 you'll do the reading:
loop at itab assigning <ls_itab>.
select single aufnr from ebkn into <ls_itab>-aufnr
where banfn = <ls_itab>-banfn
and bnfpo = <ls_itab>-bnfpo
and loekz = ' '.
C_ESSR-lblni = itab-lblni.
and in the exit EXIT_SAPLMLSR_010 you set the value
it_ESSR-lblni = itab-lblni.
You haven't call this last exit in the EXIT_SAPLMLSR_020, but you have to check the sequence: the EXIT_SAPLMLSR_020 should be triggered before EXIT_SAPLMLSR_010, shouldn't it?