Skip to Content
0
Jun 02, 2008 at 04:27 AM

AT NEW usage.

24 Views

Hi Gurus,

I have an internal table i_final2 with values Country, brand, pack and curr pri. I need to extract only the first value for any country and put iti n another internal table i_final2. I used AT NEW statment and wrote the following code.

loop AT i_temp INTO w_temp.
              MOVE w_temp-country TO w_final1-country.
              MOVE w_temp-brand TO w_final1-brand.
              MOVE w_temp-pack TO w_final1-pack.
              MOVE w_temp-curr_pri  TO w_final1-curr_pri.
             APPEND w_final1 TO i_final1.
         endloop.
        IF i_final1 IS NOT INITIAL.
          Loop AT i_final1 INTO w_final1.
            AT NEW country.
              APPEND w_final1 TO i_final2.
              CLEAR w_final1.
            ENDAT.
          endloop.
        ENDIF.

But in the output i get the country code properly , where as the other values appear as astericks like *****, *******, etc. Can anyone help me in the regard?

Thanks & Regards.