Skip to Content
author's profile photo Former Member
Former Member

structure and internal table

is it possible to made a report by using internal talbe and structure....if yes how and if u have sample code for that pls tell me....

raju

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Oct 11, 2005 at 08:02 AM

    Hi Raju,

    Yes. It is possible. But it depends upon your requirement. Please check the transaction ABAPDOCU for examples.

    Here are some examples

    http://www.sapgenie.com/abap/code/chap1201.txt

    http://www.sapgenie.com/abap/code/chap0103.txt

    http://www.sapgenie.com/abap/code/chap0407.txt

    http://www.sapgenie.com/abap/code/chap1112.txt

    There are many examples here.

    http://www.sapgenie.com/abap/example_code.htm

    Cheers

    Vinod

    Message was edited by: Vinod C

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 11, 2005 at 08:09 AM

    Hi,

    Types : begin of ty,

    matnr type mara-matnr,

    end of ty.

    data : itab type standard table of ty,

    wa type ty.

    select matnr from mara into table itab.

    loop at itab into wa.

    write : wa-matnr.

    endloop.

    Kindly reward points by clicking the star on the left of reply,if it helps.

    Add a comment
    10|10000 characters needed characters exceeded

    • Try this out

      TABLES: iseg, t5d5e.
      
      TYPES: BEGIN of ty_out,
              matnr LIKE iseg-matnr,
              gjahr LIKE iseg-gjahr,
              werks LIKE iseg-werks,
              iblnr LIKE iseg-iblnr,
              zeili LIKE iseg-zeili,
              buchm LIKE iseg-buchm,
              menge LIKE iseg-menge,
              dmbtr LIKE iseg-dmbtr,
              usnam LIKE iseg-usnam,
              lgort LIKE iseg-lgort,
              meins LIKE iseg-meins,
              difmg LIKE t5d5e-difmg,
      END OF ty_out.
      
      DATA: i_out TYPE STANDARD TABLE OF ty_out,
      * work area
            wa_out TYPE ty_out.
      
      SELECT a~matnr
             a~gjahr
             a~werks
             a~iblnr
             a~zeili
             a~buchm
             a~menge
             a~dmbtr
             a~usnam
             a~lgort
             a~meins
             b~difmg
             from iseg
             as a inner join t5d5e as b
             on a~ZEILI = b~MELGR
             into table i_out.
      
      if sy-subrc = 0.
      
      endif.
      
      LOOP AT i_out into wa_out.
        write: / wa_out-difmg.
      clear wa_out.
      ENDLOOP.

      Check once the way of retrieval with ur FCs.

  • Posted on Oct 11, 2005 at 08:24 AM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.