Skip to Content
avatar image
Former Member

Syntax Error in Test - Class Method

Hello all,

I've created a Class, and when I try to test one of the methods (from within SE24), I'm getting the following error: "Syntax error in test. Display generated test environment?" (When I say Yes, I'm taken to %_JJ_TESTFRAME_CLASS program)

The strange thing is that the code passed the sytax check, and has been activated. Additionally, there's no error logged in ST22.

Any ideas as to what might cause this?

Thanks in advance,

Lisa

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 17, 2007 at 05:05 PM

    a@s,

    Thanks for the quick reply. I do not have anything in either the Protected or Private sections. Here's the definitions in my Public section:

    public section.
    
      types TYPE_V_CUST type STRING .
      types TYPE_V_ZIP type STRING .
      types TYPE_V_OFFICE type STRING .
      types TYPE_SHORT type STRING .
      types TYPE_LONG type STRING .
      types TYPE_BDCDATA type BDCDATA .
      types:
        type_table_bdcdata type TABLE OF type_bdcdata .
      types TYPE_V_STATUS_FOUND type STRING .
      types:
        begin of type_statab,
          city_state(30),                   " City/State
          store_location(20),               " Store # or Loc Name
          service_office(20),               " Office Name
          phoned_in_by(20),                 " Phoned/Reported by
          date_phoned_in(10),               " Date phoned in
          response_date(10),                " Response date
          notification type qmel-qmnum,     " Notification #
          po_number type viqmel-bstnk,      " PO number
          invoice_number(80),               " Invoice #
          invoice_amount type vbak-netwr,   " Inv Amt
          invoice_due_date type vbak-erdat, " Inv Due date
          aufnr type aufk-aufnr,            " Service Order #
          text_line type zlbbil_repairs-text_line1,
          END OF type_statab .
      types:
        type_table_statab type TABLE OF type_statab .
    
      class-data WA_BDCDATA type BDCDATA .
      class-data BDCDATA type TYPE_TABLE_BDCDATA .
      class-data WA_VIQMEL type VIQMEL .
      class-data WA_VBAK type VBAK .
      class-data WA_STATAB type TYPE_STATAB .
      class-data:
        statab TYPE TABLE OF type_statab .
    
      class-methods CREATE_NOTIF
        importing
          !V_ZIP type TYPE_V_ZIP
          !V_CUST type TYPE_V_CUST
          !V_OFFICE type TYPE_V_OFFICE
          !V_SHORT_TEXT type TYPE_SHORT
          !V_LONG_TEXT type TYPE_LONG
        exporting
          !V_NOTIF_FMT type BAPI2080_NOTHDRE-NOTIF_NO .
      class-methods FILL_BDC_DYNPRO
        importing
          !PROGRAM type BDCDATA-PROGRAM
          !DYNPRO type BDCDATA-DYNPRO .
      class-methods FILL_BDC_FIELD
        importing
          !FNAM type BDCDATA-FNAM
          !FVAL type BDCDATA-FVAL .
      class-methods EMAIL_NOTIF_OFF
        importing
          !V_NOTIF_FMT type BAPI2080_NOTHDRE-NOTIF_NO .
      class-methods EMAIL_NOTIF_CUST
        importing
          !V_NOTIF_FMT type BAPI2080_NOTHDRE-NOTIF_NO
          !V_EMAIL type STRING .
      class-methods GET_NOTIF_STATUS
        importing
          !V_NOTIF type BAPI2080_NOTHDRE-NOTIF_NO
        exporting
          !V_STATUS_FOUND type TYPE_V_STATUS_FOUND .
      class-methods GET_REPAIRS_DONE
        importing
          !WA_VIQMEL type VIQMEL
        changing
          !STATAB type TYPE_TABLE_STATAB
          !WA_STATAB type TYPE_STATAB .

    Anything jump out?

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 17, 2007 at 03:35 PM

    Hi,

    Have you define any private types in your class?. I think you cannot use your own private types with public class attributes. if yes you need to define a table type having line structure.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 17, 2007 at 06:06 PM

    a@s,

    Thanks so much for the suggestion! It worked. I had already created the type as you mentioned, but just hadn't refered to it when defining the table. I did and it fixed it!! Now it seems to be working properly 😊

    Lisa

    Add comment
    10|10000 characters needed characters exceeded