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

Please explain the meaning of "with control f" addition in loop at statemen

loop at g_MATERIALS_itab

into g_MATERIALS_wa

with control MATERIALS

cursor MATERIALS-current_line.

module MATERIALS_move.

module MATERIALS_get_lines.

endloop.

please lemme know wht effect does "with control MATERIALS" addition statement have in this loop.

Here MATERIALS is a Screen table.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2005 at 06:34 AM

    hi,

    MATERIALS is the name of table control in the screen.

    so, you are moving the data from internal table g_MATERIALS_itab to work area g_MATERIALS_wa and from work area to table control MATERIALS.

    i think in 'module MATERIALS_move' you are moving the values from work area to table control of MATERIALS.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 03, 2005 at 06:24 AM

    this is TABLE CONTROL specific statement.

    loop at g_MATERIALS_itab

    into g_MATERIALS_wa

    with control MATERIALS

    its will loop at the contents of the table control <b>MATERIALS</b>

    Regards

    Raja

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2005 at 07:22 PM

    Hi,

    when you loop in PBO, that means you are looping thru a table control defined in that screen.

    You can use

    LOOP.

    ENDLOOP.

    this will just loop thru your table control and initialize it. but you need to pass you internal table data to table control.

    so you write it like :

    Loop at itab with table control TC cursor TC-current_line.

    pass internal table data to screen fields used in TC.

    endloop.

    In above loop, you are parallely looping thru internal table ITAB also. so when your cursor is at first row of TC, it is at first row of ITAB also. so you just assign itab fields to screen field.

    You can do the same using LOOP. ENDLOOP. without TC but in that case you need to read the internal table with read statement and pass the read data.

    I hope this clears your confusion.

    regards,

    Gagan

    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.