2016 Jul 15 10:45 AM
Hi everyone,
i would like to create a dynamic type of variable but I am not really sure how to do it. I already know that the type is char but the length is going to be variable, depends on the execution.
DATA: lv_number(lv_variable_length) TYPE c.
I made that but it does not work
Anyone can help me please? Thanks in advanced!
Moderator message: Please search in SCN before posting, there are lot of threads available regarding this topic. ( search for "Dynamic variable creation" )
Message was edited by: Kesavadas Thekkillath
Hi everyone,
i would like to create a dynamic type of variable but I am not really sure how to do it. I already know that the type is char but the length is going to be variable, depends on the execution.
DATA: lv_number(lv_variable_length) TYPE c.
I made that but it does not work
Anyone can help me please? Thanks in advanced!
Moderator message: Please search in SCN before posting, there are lot of threads available regarding this topic. ( search for "Dynamic variable creation" )
Message was edited by: Kesavadas Thekkillath
2016 Jul 15 11:00 AM
Dear Borja Huerta,
Don't you try to use Field symbol ?
field-symbols: <fs_matnr> type any.
ASSIGN : lwa-matnr TO <fs_matnr>.
Regards,
Yance
2016 Jul 15 11:04 AM
Hi Yance,
It a really good answer but i am not going to know the type never. I only know that the type it's gonna be always char but the problem is the length.... sometime i would like to create a variable DATA: lv_number(20) TYPE c. another times i have to create a variable DATA: lv_number(4) TYPE c.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |