2009 May 19 7:12 AM
Hi experts...
I want to get data by using system field SY-FDPOS.
In internal table, there is one field containing data as "REFTG:HT1", and I want to get that "HT1" only,
means code which is after colon.
how to get it?
plz help me..
thanks in advance..
Hi experts...
I want to get data by using system field SY-FDPOS.
In internal table, there is one field containing data as "REFTG:HT1", and I want to get that "HT1" only,
means code which is after colon.
how to get it?
plz help me..
thanks in advance..
2009 May 19 7:18 AM
Hi ABAPER,
Try taking the offset of that variable and save it in a temprary variable. Or try using split syntax and save it to a temporary variable. Hereis a sample.
itab-w_var = 'REFTG:HT1' .
w_del = ':'.
SPLIT itab-w_char AT w_del INTO w_var1 w_var2.Here w_var2 is what you need. You can also loop it around keep sending it to your tempory variable, save it, claer it and save the next one.
Regards,
Amuktha.
2009 May 19 7:21 AM
you can SPILT the field at colon making it as a separator and take the ata into two variables..
and then u can use the same.
2009 May 19 7:24 AM
Basic ABAP question!!
Edited by: Micky Oestreich on May 19, 2009 8:24 AM
2009 May 19 7:25 AM
Hi,
data:
w_data(20) type c value 'REFTG:HT1',
w_data1 like w_data,
w_len type i.
if w_data ca ':'.
w_len = sy-fdpos + 1.
endif.
w_data1 = w_data+w_len.
write:w_data1.
Regards,
Nithya
2009 May 19 7:27 AM
Hi, ABAPer
Please Search Before Posting Basic Questions
Regards,,
Faisal
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |