2011 Sep 19 10:28 AM
Hi
how can i change the data type of a field symbol at run time..(say Packed to char)
may be it can have a field data or structure data..
please help me ..........
Regards
albert
Hi
how can i change the data type of a field symbol at run time..(say Packed to char)
may be it can have a field data or structure data..
please help me ..........
Regards
albert
2011 Sep 19 11:25 AM
Hi Albert,
Can't you just make an untyped field symbol and then assign it dynamically (using unsassign/assign) to the variable of the correct data type?
Best Regards,
Martin
2011 Sep 21 1:34 PM
hi
thank you for your reply
i am trying to do as follows but i am not getting the expected output
where do i go wrong.............
*"*"Local Interface:
*" TABLES
*" IT_OUT STRUCTURE THENV OPTIONAL
DATA: v_date type sy-datum,
mytype type C.
FIELD-SYMBOLS: <fs>,
<fs1>.
v_date = sy-datum.
ASSIGN v_date TO <fs>.
append <fs> to it_out.
WRITE / <fs>. " ---------------->20.09.2011
ASSIGN v_date TO <fs1> casting TYPE C.
append <fs1> to it_out.
WRITE / <fs1>. " --------------->20110920LT_OUT is having the data as 20110920
20110920
but i expect in date format 20.09.2011
20.09.2011
2011 Sep 21 1:44 PM
Hi
data:V_DATE2 TYPE STRING.
CONCATENATE V_DATE6(2) '.' V_DATE4(2) '.' V_DATE+0(4) INTO V_DATE2.
ASSIGN v_date2 TO <fs>.
append <fs> to it_out.
WRITE / <fs>. " -
>20.09.2011
ASSIGN v_date2 TO <fs1> casting TYPE C.
append <fs1> to it_out.
WRITE / <fs1>. " -
>20110920
Regards,
muralii
2011 Sep 21 2:04 PM
hi,
Thats good idea....
now the challenge how to handle DEC(float values).. at runtime
i need your help....
Regards
albert
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |