09-15-2008 3:45 PM
Hi Gurus,
Is it possible to retrieve values from the main program (SAPMM07M in my case) while being in an user-exit, several levels 'deeper' in the source?
And, secondly is it possible to alter these values, eventhough they're not exported from the user-exit?
09-15-2008 3:55 PM
Hi Ron,
If you are out of the visibility of the data objects of SAPMM07M program you will not see its variables.
You can check when debugging if you see them. If they are global ones you may be lucky one, otherwise I am sorry.
There is one way to make these data objects visible at that point. You would have to use SAP memory or ABAP memory, but it requires adapation of main program. It means you would first have to export data objects you are interest in from main SAPMM07M, then when you are at lower level just import them back from the memory.
Unfortunatelly in this case changing stand. SAP programs is not possible so I affraid you can't do this.
BR
Marcin
09-15-2008 3:55 PM
Hi Ron,
If you are out of the visibility of the data objects of SAPMM07M program you will not see its variables.
You can check when debugging if you see them. If they are global ones you may be lucky one, otherwise I am sorry.
There is one way to make these data objects visible at that point. You would have to use SAP memory or ABAP memory, but it requires adapation of main program. It means you would first have to export data objects you are interest in from main SAPMM07M, then when you are at lower level just import them back from the memory.
Unfortunatelly in this case changing stand. SAP programs is not possible so I affraid you can't do this.
BR
Marcin
09-15-2008 4:06 PM
Hi,
I know I can see the vars during debugging with viewing (SAPMM07M)mseg.
I tried making it visible by:
statics: lw_table(100),
lt_mseg type standard table of mseg with header line.
field-symbols: <lfs_mseg> type any table.
lw_table = '(SAPMM07M)mseg[]'.
assign (lw_table) to <lfs_mseg>.
lt_mseg[] = <lfs_mseg>[].
09-15-2008 4:13 PM
Yes, the solution for using the value is to create a field-symbol:
FIELD-SYMBOLS: <fs> TYPE ANY TABLE.
DATA: name(14) VALUE '(SAPMM07M)mseg'.
ASSIGN (name) TO <fs>
I'm not sure about modifying ... just try it ... but if it works just do it carefull.
Regards.
Valter Oliveira.
09-15-2008 4:19 PM
>
> I'm not sure about modifying ... just try it ... but if it works just do it carefull.
>
> Regards.
> Valter Oliveira.
Hi Valter,
A small update. It's not really about reading the value ( I know see that the value of MSEG fields are visible) but the challenge is to update the field, while it is not an export parameter of the exit.
09-15-2008 4:54 PM
Well, did you try it? Change (SAPMM07M)mseg in debug mode (not programatically, see the value of the itab itself) .. and see if changes are stored in main program.
10-08-2008 10:23 AM