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

control break statement

hi experts,

i hav one internel table having 5 field werks,maktx,matnr,fkimg,kbetr..my requirement is as such that werk should come first..then corresponding to dat werk first material description shoul b displayed,and finally corresponding to dat matnr maktx fkimg kbetr should b displayed...plz help how to use control break statements related to this problem..output structure shoud d as follows..

PLANT1

mat desc1

matnr fkimg kbetr

mat desc2

matnr fkimg kbetr

PLANT2

mat desc2

matnr fkimg kbetr

mat desc2

matnr fkimg kbetr

I HOPE U UNDESTAND WAT I WAN TO SHOW.<REMOVED BY MODERATOR>

regards,

raman.

Edited by: Alvaro Tejada Galindo on Jan 29, 2008 11:20 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 04:25 PM

    There are control break statements that you can use inside a LOOP. In this case you should use AT NEW werks. Have in mind that inside the AT NEW ... ENDAT the field WERKS will be filled with asterisqs (*****).

    This sample code will help:

    SORT itab BY werks ASCENDING.
    
    LOOP AT itab.
    lv_werks = itab-werks.
    AT NEW werks.
    WRITE /lv_werks.
    ENDAT.
    
    WRITE: / 'mat', maktx.
    WRITE: / matnr fkimg kbetr
    
    ENDLOOP.

    Note the use of lv_werks!

    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.