Skip to Content

Looping through an internal table order/operation

hie guys

My smart-forms are not very good so can you please help me.

I have a report done in smart-forms which displays only a single name instead of a list of names per order operation.

i have done reports in abap only and i'm comfortable with using abap loops to write the output but

but now i need to display the employee # and the personnel name using internal tables in smart-forms

as you can see that only one name is appearing but i need a whole list.

below is a code snippet that is writing the personnel name.

any ideas how i can loop and display the list which will be dynamic

so how can i tackle this issue

please help.



names_list.jpg (51.8 kB)
code..png (82.2 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Jan 22, 2014 at 09:04 AM

    Hi Brayan,

    just loop into your internal tables with your work area (if you have work area) where you have shown your data

    i.e, if you are showing your data in a table, then you can use as shown in screenshot

    Means just loop into your internal table where you are showing data

    22jan.PNG (23.6 kB)
    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Brayan,

      please understand, whatever you wants to create in smartforms (tables, variable, etc),

      these are declared in global declarations, so define your internal table and work area

      in global declaration, and also please declare your all variables, which is giving error that


      Then use all these in the import/export parameters, so that it will get accessed

      into the program,

      so please declare all of them in import/export parameters as shown in your third pic here.

      Now when it comes to looping, be sure that, put your this field you wants to show your data

      in the same table having other data too, so that, when you will populate your data to be used

      for all records, all data should get shown.

      Suppose i have already 10 fields to be shown in an internal table, then please add this text field

      in the same table, and creates a work area, and define in global declarations as shown in my previos post.

      Then you can simply loop into your table to show all the data at same time.

      Please do as sujjested, you will get what you need.

  • Posted on Jan 22, 2014 at 11:24 AM

    Hi Bryan,

    We have global definitions in the smartform .( Data declared can be accessed by the the whole smartform ).

    You can declare your Internal table and work area in global definitions

    Kindly avoid like statements.Instead you can create a table type and use that.


    Subeesh Kannottil 😊

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 22, 2014 at 09:07 AM

    hi bryan,

    you have an option use loop on a window or inside a window(according to your convinience).

    and display data where ever required. you are passing one pernr so you are able to display only one.

    Be more clear so that we can help u out.


    Add a comment
    10|10000 characters needed characters exceeded

    • Brayan,

      just tell me one thing, while reviewing this thread (actually i missed what your queries are).

      Let me explain, while fetching the data in your report program, please debug and see

      are you getting all employee name in your report program.

      If not please check your code once, and if you are getting all name in your report, then please

      revert me back.

  • Posted on Jan 22, 2014 at 09:06 AM

    Hi Brayan,

    why you have used SELECT SINGLE statement, please delete it,

    if it will be, then it will fetch only single entry.

    Just use SELECT

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 22, 2014 at 09:38 AM

    Hi Bryan,

    Fetch all data in the driver program itself if you find difficult to update a existing table in the smartforms. Just fetch all the fields that you have to display in the internal table and just show them up in smartforms.


    Tooshar Bendale

    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.