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

At new Statement

dear all,

My problem is that , in the following code

at new matnr.

write: itab-matnr, itab-maktx.

end at.

It is displaying matnr properly .. but for maktx its is showing '****' . Can anybody tell why this happens .. How to solve that ? I have given enough spaces for displaying maktx.. Still its showing ''. Why ?

please help me to solve my problem ..

Thanking you ..

Shankar

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 Nov 23, 2004 at 07:36 AM

    Hi Shankara,

    You are looping over an internal table ITAB. Between the "AT NEW matnr." and "ENDAT" SAP will automatically fill all fields to the right of field matnr with '*'. If you want to write MAKTX you should move this field to the left of field MATNR in your internal table.

    Regards,

    John.

    Add a comment
    10|10000 characters needed characters exceeded

    • Another solution is to just move the current header line of the internal table to a work area.

      regards,

      Rich Heilman

      • Code Sample

      report zrich_0002 .

      types: begin of xmarc,

      matnr type makt-matnr,

      werks type marc-werks,

      maktx type makt-maktx,

      end of xmarc.

      data: itab type table of xmarc with header line.

      data: wa like line of itab.

      select * into corresponding fields of table itab

      from marc

      inner join makt

      on marcmatnr = maktmatnr

      where marc~matnr => '000000000060000000'

      and makt~spras = sy-langu.

      loop at itab.

      wa = itab.

      at new matnr.

      write:/ wa-matnr, at 20 wa-maktx.

      endat.

      endloop.

  • Posted on Nov 23, 2004 at 07:42 AM

    Hi Shankar,

    1) Why ? see F1 to : at new / at end of

    2) save itab in save_tab

    loop at itab.

    save_tab = itab.

    at new matnr.

    write: itab-matnr, save_tab-maktx.

    end at.

    Grx Andreas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 24, 2004 at 04:44 AM

    Hi ,

    Store the variable which you want to print into another varaiable and then display.

    Regards

    Arun

    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.