2014 Jul 03 6:49 AM
Hi all!
I want to know the content of a field from another program, I have tried something like this but it doesn't work:
FIELD-SYMBOLS: <fs_wa> TYPE syucomm.
DATA: var_name(50) TYPE c.
var_name = '(PROGRAMNAME)VALUE'.
ASSIGN (var_name) TO <fs_wa>.
The program is a 'Z' program.
I have to use the code in a BADI, so passing the content is not an option.
2014 Jul 03 7:20 AM
Hi,
The method you are using is possible only when the data objects are in same session memory i.e ( as you said you have to write the code in the BADI ) the badi and the zprogram needs to be in the same program flow else it will not work.
Therefore, use EXPORT TO MEMORY or SET PARAMETER options.
Regards,
Ashish
Hi all!
I want to know the content of a field from another program, I have tried something like this but it doesn't work:
FIELD-SYMBOLS: <fs_wa> TYPE syucomm.
DATA: var_name(50) TYPE c.
var_name = '(PROGRAMNAME)VALUE'.
ASSIGN (var_name) TO <fs_wa>.
The program is a 'Z' program.
I have to use the code in a BADI, so passing the content is not an option.
2014 Jul 03 6:56 AM
Hi Jonas ,
Try ABAP memory concept
EXPORT TO MEMORY & IMPORT FROM MEMORY can help a lot here
Regards
Yogendra Bhaskar
2014 Jul 03 6:58 AM
Okay will have a look at it, but I prefer the way I'm trying with my code...
2014 Jul 03 7:01 AM
Have you tried using RTTI, search in SCN for cl_abap_structdescr.
2014 Jul 03 7:20 AM
Hi,
The method you are using is possible only when the data objects are in same session memory i.e ( as you said you have to write the code in the BADI ) the badi and the zprogram needs to be in the same program flow else it will not work.
Therefore, use EXPORT TO MEMORY or SET PARAMETER options.
Regards,
Ashish
2014 Jul 03 7:37 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |