sysntax error in subroutine

ABAP, Java, BSP, etc.
6 Beiträge • Seite 1 von 1
6 Beiträge Seite 1 von 1

sysntax error in subroutine

Beitrag von saajay ( / / 0 / 3 ) » 24.06.2005 18:58

hi ,
im having a problem in executing

a subroutine . the
error i get when i do a syntax check

is
"statement is not accessible" row

12.

the program is:

Code: Alles auswählen.

PROGRAM  zexample2.

DATA: var1 TYPE i.
WRITE:/ 'value before changing', var1.
PERFORM sub1 USING var1.
WRITE:/ 'value in after changing', var1.
*&---------------------------------------------------------------------*
*&      Form  sub1
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_VAR1  text
*----------------------------------------------------------------------*
FORM sub1  USING  value (p_var1).

  WRITE:/ 'value in subroutine before changing ', p_var1 .
  p_var1 = 999.
  WRITE:/ 'value in subroutine after changing ', p_var1 .

ENDFORM.                         " sub1
this is very improtant for me. can you please help
me.


bye
ajay
aksikha@gmail.com


Beitrag von Jan (Site Admin / 174 / 2 / 14 ) » 24.06.2005 20:13

Hi saajay,
i had to format your posting.

You should try to replace this line
FORM sub1 USING value (p_var1).

with the following:
FORM sub1 USING p_var1.

ciao,
Jan

Beitrag von Gast ( / / 0 / 3 ) » 27.06.2005 09:53

Jan hat geschrieben:You should try to replace this line
FORM sub1 USING value (p_var1).

with the following:
FORM sub1 USING p_var1.
No, with

Code: Alles auswählen.

FORM sub1  USING  VALUE(p_var1).

Beitrag von babap (Expert / 677 / 1 / 1 ) » 27.06.2005 11:16

Hi,

sometimes some more blanks would be helpful:

Code: Alles auswählen.

FORM sub1  USING  VALUE( p_var1 ).
[/quote]

Regards
babap

Beitrag von murali_mn (ForumUser / 2 / 0 / 0 ) » 20.11.2005 15:31

hi sanjay,

u should replace u r statement like

form sub1 using value ( p_var1 ).

dont forget giving the spaces before and after the variable p_var1.

Beitrag von babap (Expert / 677 / 1 / 1 ) » 21.11.2005 14:17

Thanks for the clarifying comment to my previous posting!
Regards
babap

Seite 1 von 1