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

Program does not work

Anyone who understands why my program does not work?

*The programs task: The user write an ordernumber and the system shows information about the order.

*Parameter

PARAMETERS: pa_order TYPE vbak-vbeln,

*Structure

TYPES: BEGIN OF st_order,

vbeln TYPE vbak-vbeln,

audat TYPE vbak-audat,

posnr TYPE vbap-posnr,

matnr TYPE vbap-matnr,

rfsta TYPE vbup-rfsta,

rfstk TYPE vbuk-rfstk,

END OF st_order.

*Internal table and workarea

DATA: it_order TYPE STANDARD TABLE OF st_order,

wa_order LIKE LINE OF it_order.

*Fill the interntable with information

SELECT vbakvbeln vbakaudat vbapposnr vbapmatnr vbuk~rfstk

vbup~rfsta

INTO CORRESPONDING FIELDS OF TABLE it_order

FROM vbak

INNER JOIN vbap

ON vbakvbeln = vbapvbeln

INNER JOIN vbuk

ON vbukvbeln = vbakvbeln

INNER JOIN vbup

ON vbupvbeln = vbapvbeln

AND vbupposnr = vbapposnr

WHERE vbak~vbeln = pa_order.

*Write the information in the internal order

LOOP AT it_order INTO wa_order.

WRITE: / wa_order-vbeln, wa_order-audat, wa_order-posnr,wa_order-matnr, wa_order-rfsta, wa_order-rfstk.

ENDLOOP.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2005 at 08:58 AM

    what exactly is the error?

    Regards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 04, 2005 at 09:04 AM
    *Structure
    TYPES: BEGIN OF st_order,
           vbeln <b>LIKE</b> vbak-vbeln, 
           audat LIKE vbak-audat, 
           posnr LIKE vbap-posnr, 
           matnr LIKE vbap-matnr, 
           rfsta LIKE vbup-rfsta, 
           rfstk LIKE vbuk-rfstk, 
      END OF st_order.
    
    DATA: i_
          wa_
    
    START-OF-SELECTION.
    Select........
    
    Loop......
    
    Write....
    ENDLOOP.

    Tyr this one alos have u used TABLES: vbak.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2005 at 09:05 AM

    hi,

    see this.

    Types: begin of st_order occurs 0,

    .......

    ......

    end of st_order.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2005 at 09:10 AM

    Hi,

    Its Simple.

    The error is because you havn't ended the PARAMETERS statement with<b> fullstop</b>.

    PARAMETERS: pa_order TYPE vbak-vbeln<b>,</b>-> Note this

    Instead you have typed <b>Comma</b> there.

    Please reward poitns if this helps you.

    Regards,

    Siva

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Linn,

      Here's your code with the corrections:

      REPORT ZORDERTEST.
      
      *The programs task: The user write an ordernumber and the system shows *information about the order.
      
      *Parameter
      PARAMETERS: pa_order TYPE vbak-vbeln.
      
      *Structure
      TYPES: BEGIN OF st_order,
      vbeln TYPE vbak-vbeln, 
      audat TYPE vbak-audat, 
      posnr TYPE vbap-posnr, 
      matnr TYPE vbap-matnr, 
      rfsta TYPE vbup-rfsta, 
      rfstk TYPE vbuk-rfstk, 
      END OF st_order.
      
      *Internal table and workarea
      DATA: it_order TYPE STANDARD TABLE OF st_order,
      wa_order LIKE LINE OF it_order.
      
      *Fill the interntable with information 
      SELECT vbak~vbeln vbak~audat vbap~posnr vbap~matnr vbuk~rfstk
      vbup~rfsta
      INTO CORRESPONDING FIELDS OF TABLE it_order
      FROM vbak
      INNER JOIN vbap
      ON vbak~vbeln = vbap~vbeln
      INNER JOIN vbuk
      ON vbuk~vbeln = vbak~vbeln
      INNER JOIN vbup
      ON vbup~vbeln = vbap~vbeln
      AND vbup~posnr = vbap~posnr
      WHERE vbak~vbeln = pa_order.
      
      *Write the information in the internal order
      LOOP AT it_order INTO wa_order.
      WRITE: / wa_order-vbeln, wa_order-audat, wa_order-posnr,wa_order-matnr, wa_order-rfsta, wa_order-rfstk.
      ENDLOOP.

      Regards,

      Ville

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.