Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

USING system field SY-FDPOS

Former Member
0 Likes
1,834

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..

5 REPLIES 5
Read only

Former Member
0 Likes
979

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.

Read only

former_member242255
Active Contributor
0 Likes
979

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.

Read only

Sm1tje
Active Contributor
0 Likes
979

Basic ABAP question!!

Edited by: Micky Oestreich on May 19, 2009 8:24 AM

Read only

Former Member
0 Likes
979

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

Read only

faisalatsap
Active Contributor
0 Likes
979

Hi, ABAPer

Please Search Before Posting Basic Questions

Regards,,

Faisal