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: 

itemtext

Former Member
0 Kudos

Hi All,

Can any one give me logic to do the following:

I have item text(boxno,boxqty)

d.no:12345

item 10

p_box_qty[] = 1,1

p_box_num[] = 1,2

I am reading the same structure using READ_TEXT function module into a internal tabel t_lines like lines.

for a perticuler delivery no for perticular item.

that means for boxnum 1 qty 1

boxnum 2 qty 1

so

p_box_qty[] = 1,1

p_box_num[] = 1,2

in above structure only ihave to take 1,1 for qty and 1,2 for boxnum .i need to pass these values to a final internaltable .

Please suggest me.

Thanks in Advance.

Thanks&Regards.

Ramu.

1 REPLY 1

Clemenss
Active Contributor
0 Kudos

Hi ramu,

<pre>

data:

lt_qty type table of i with header line,

lt_boxnum type table of i with header line,

begin of ls_box_qty,

box type i,

qty type i,

end of ls_box_qty,

lt_box_qty like table of ls_box_qty.

loop at t_lines.

if t_lines(13) = 'p_box_qty[] ='.

split t_lines+13 into table lt_qty.

elseif t_lines(13) = 'p_box_num[] ='.

split t_lines+13 into table lt_boxnum.

endif.

endloop.

loop at lt_boxnum.

ls_box_qty-box = lt_boxnum.

read table lt_qty index sy-tabix.

if sy-subrc = 0.

ls_box_qty-qty = lt_qty.

endif.

append ls_box_qty-qty to lt_box_qty-qty.

endloop.

</pre>

Hope it helps,

Clemens