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

problem related to alv report : append and clear

hi friends,i have developed a report which provide us following informatin :

1) sales order with corresponding  outbound no,invoice no,freight per invoice,tax per invoice etc.

the report is working fine.only the thing is that the sale order no in the sale order field of report is repeating.

I think it is due to append and clear. i have tried a lot adjusting the things but still not working

plz help. a part of my code is :

Edited by: achalmehra on Jan 30, 2010 1:35 PM

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 30, 2010 at 12:37 PM
    select * from VBAK WHERE vkorg IN s_vkorg AND vtweg IN s_vtweg AND spart IN s_spart and KALSM = 'ZMSALE' and VBTYP = 'C'.       
      select * from VBAP where vbeln = vbak-vbeln  .                                            
        select * from LIPS where VGPOS = VBAP-POSNR.                                           
          select * from LIKP where VKORG in s_vkorg and WADAT_IST in s_date and VBTYP = 'J'and VBELN = LIPS-VBELN.       
            sale_ord = VBAK-VBELN.
            cust_no = VBAK-KUNNR.
            dist_channel = VBAK-VTWEG.
            nature_sale = VBAK-SPART.
             move sale_ord to itab1-field1.
             move cust_no to itab1-field2.
             move dist_channel to itab1-field4.     
             move nature_saLe to itab1-field3.
            outbnd_no = LIPS-VBELN.
            del_date = LIKP-WADAT_IST.
             move outbnd_no to itab1-field5.
             move del_date to itab1-field6.
               select * from VBRP where  VGBEL = LIPS-VBELN and VGPOS = LIPS-POSNR. 
                 invoice = VBRP-VBELN.
                 move invoice to itab1-field7.
                 select * from VBRK where VBELN = VBRP-VBELN.        
                   s_tax_amt = VBRK-NETWR + VBRK-MWSBK.            
                   move s_tax_amt to itab1-field8.
                   select * from KONV where KNUMV = VBRK-KNUMV.           
                       if KONV-KSCHL = 'ZM07'or KONV-KSCHL ='ZM04'.        
                         freight = KONV-KWERT.
                         move freight to itab1-field9.
                       if KONV-KSCHL = 'ZM02'or KONV-KSCHL ='ZM03'.      
                         s_tax_amt = KONV-KWERT.
                         move freight to itab1-field8.
                          if KONV-KRECH = 'A'.                 
                            rate_tax = ( KONV-KBETR ) / 10.
                            rate_tax = KONV-KBETR.  
                            move rate_tax to itab1-field10.
                    append itab1.
                    clear itab1.  
            clear itab1.
          clear itab1.
       clear itab1.

    Edited by: achalmehra on Jan 30, 2010 1:41 PM

    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.