Skip to Content
avatar image
Former Member

Insert

Hi Gurus,

I need to get data from one of my custom table z_header into one of my internal table it_tab.

What would be the easiest way of doing that.

Thanks

Rajeev Gupta

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Aug 16, 2007 at 03:32 PM
    data: lt_tab type table of z_header,
                ls_tab type z_header.
    
    
    select * from z_header into table lt_tab.
    if sy-subrc eq 0.
    loop at lt_tab into ls_tab.
    * do your data manupulation here.
    endloop.
    endif.
    

    A

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 16, 2007 at 03:29 PM

    Hi Use following code :

    select f1 f2 ... from z_header into table it_tab .

    Reward points if helpful.

    Regards.

    Srikanta Gope

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 16, 2007 at 03:30 PM

    SELECT * FROM Z_HEADER INTO TABLE IT_ITAB.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 16, 2007 at 03:37 PM

    hi

    good

    use select statement.

    thanks

    mrutyun^

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 16, 2007 at 03:40 PM

    Thanks for the reply,

    I tried doing this and i m getting the following error:

    " it_tab are not unicode convertible.

    Thanks

    Rajeev Gupta

    Add comment
    10|10000 characters needed characters exceeded

    • Try it like this:

      Data : itab like standard table of z_header,

      wa like line of itab.

      select * from z_header into table itab.

      if sy-subrc eq 0.

      loop at itab into wa.

      • You should print each field of wa separately

      write: wa-field1, wa-field2, wa-field3.

      endloop.

      endif.

      See if that works.