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

Looping Problem....

Former Member
0 Likes
747

Dear All ,

I faced a problem , when i tried to loop the table and used the funtion AT END OF lines ..... ENDAT ..

why the somes the table field will become ************** ?? and i cnt get the value ........ example like below.

how i going to solve this problem ? and make the value come out .

3107 |07 |**** | 0.000 |*******|********|********|*** |

1 3107 |02 |CL | 1.000 |20090811|310702 |ST-ADJ IN |CL21 |

2 3107 |05 |CL | 1.000 |20090811|310705 |ST-ADJ IN |CL21 |

3 3107 |07 |CL | 1.000 |20090811|310707 |ST-ADJ OUT|CL21 |

Thanks,

SAP Funs ..

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
722

Try to something


loop at itab.
at end of matnr.
    move 'Y' to v_flag.
endat.
if v_flag eq 'Y'.
   " Here you will get record without *******
endif.
endloop.

6 REPLIES 6
Read only

former_member194669
Active Contributor
0 Likes
723

Try to something


loop at itab.
at end of matnr.
    move 'Y' to v_flag.
endat.
if v_flag eq 'Y'.
   " Here you will get record without *******
endif.
endloop.

Read only

Former Member
0 Likes
722

Dear ,

i need to read the value before the ENDAT ........

THanks

Read only

0 Likes
722

Try this.



data: wa like line of itab.

Loop at itab.

  wa = itab.

  at end of matnr.
* You should now see all the values in WA while inside the AT statement.
  endat.

endloop.

Regards,

Rich Heilman

Read only

former_member585060
Active Contributor
0 Likes
722

Hi,

In Control break events

All components with a character-type, flat data type to the right of the current control key are set to character "" in every position.*

So at the beginning of the loop move all the records to another workarea.

LOOP AT lt_itab INTO wa_itab.

wa_itab1 = wa_itab.    "---> move all the values to another workarea of same structure, now that workarea will show all values

Process all your events  " Use wa_itab1 values for processing.

CLEAR : wa_itab1.

ENDLOOP.

Regards

Bala Krishna

Edited by: Bala Krishna on Aug 11, 2009 9:32 AM

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
722

Loop at itab into wa.

g_tabix = sy-tabix

at end of matnr.

read table itab into wa index g_tabix. "<---add this

***you will not get the symbols here

endat.

Read only

Former Member
0 Likes
722

Hi,

Please try Richi method that will work.

One more way is also there,

Place matnr after ENDAT in structure postion .

Thanks & regards,

ShreeMohan