Skip to Content
author's profile photo
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 comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

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

    what exactly is the error?

    Regards,

    Ravi

    Add comment
    10|10000 characters needed characters exceeded

  • 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 comment
    10|10000 characters needed characters exceeded

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

    hi,

    see this.

    Types: begin of st_order occurs 0,

    .......

    ......

    end of st_order.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    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 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