Application Development 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: 

Urgent!! How to access a part of a character field using offset??? Urgent!!

Former Member
0 Kudos

Hi all,

Please tell me how to access the first 15 characters and put them in a variable ? I am writing this code but v_qty_c is not getting the value. Why?

code::

DATA v_qty_c(18) TYPE c.

LOOP AT dedidd INTO wa_dedidd WHERE segnam = 'E1EDP20'.

v_qty_c = wa_dedidd-sdata+0(15).

....

....

Please tell me where am I doing the mistake?? sdata is a 1000 char long field in the internal table dedidd. How do i tell it to copy the chars from 1 to 15 in v_qty_c???

Thanks,

Charles.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hey ur code is correct. just check by putting a break-point inside loop. i doubt there is no data in wa_dedidd-sdata+0(15).

Check the same...

3 REPLIES 3

Former Member
0 Kudos

hey ur code is correct. just check by putting a break-point inside loop. i doubt there is no data in wa_dedidd-sdata+0(15).

Check the same...

Former Member
0 Kudos

Hi Charles,

the code which have written was correct. Can you check if wa_dedidd-sdata has any value or not while debugging.

Reward if it helps,

Satish

Former Member
0 Kudos

Hi,

v_qty_c = wa_dedidd-sdata(15).

this works.

rgs