sysntax error in subroutine

ABAP, Java, BSP, etc.

sysntax error in subroutine

Postby Marlon4078 » Fri Jun 24, 2005 6:58 pm

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: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. PROGRAM  zexample2.
  2.  
  3. DATA: var1 TYPE i.
  4. WRITE:/ 'value before changing', var1.
  5. PERFORM sub1 USING var1.
  6. WRITE:/ 'value in after changing', var1.
  7. *&---------------------------------------------------------------------*
  8. *&      Form  sub1
  9. *&---------------------------------------------------------------------*
  10. *       text
  11. *----------------------------------------------------------------------*
  12. *      -->P_VAR1  text
  13. *----------------------------------------------------------------------*
  14. FORM sub1  USING  value (p_var1).
  15.  
  16.   WRITE:/ 'value in subroutine before changing ', p_var1 .
  17.   p_var1 = 999.
  18.   WRITE:/ 'value in subroutine after changing ', p_var1 .
  19.  
  20. ENDFORM.                         " sub1
GeSHi ©

this is very improtant for me. can you please help
me.


bye
ajay
aksikha@gmail.com
Marlon4078
.
.
 
Posts: 1
Joined: Fri Jun 24, 2005 6:58 pm

Postby Jarne2165 » Fri Jun 24, 2005 8:13 pm

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
Jarne2165
..
..
 
Posts: 42
Joined: Mon Dec 02, 2002 1:25 pm

Postby Alva1590 » Mon Jun 27, 2005 9:53 am

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: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. FORM sub1  USING  VALUE(p_var1).
GeSHi ©
Alva1590
.....
.....
 
Posts: 4387
Joined: Mon Dec 02, 2002 3:01 pm

Postby Erich410 » Mon Jun 27, 2005 11:16 am

Hi,

sometimes some more blanks would be helpful:

Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. FORM sub1  USING  VALUE( p_var1 ).
GeSHi ©
[/quote]

Regards
babap
Erich410
....
....
 
Posts: 680
Joined: Thu Feb 05, 2004 4:22 pm

Postby Denny3363 » Sun Nov 20, 2005 4:31 pm

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.
Denny3363
.
.
 
Posts: 2
Joined: Sat Nov 19, 2005 10:18 am

Postby Erich410 » Mon Nov 21, 2005 3:17 pm

Thanks for the clarifying comment to my previous posting!
Regards
babap
Erich410
....
....
 
Posts: 680
Joined: Thu Feb 05, 2004 4:22 pm


Return to Development Related

Who is online

Users browsing this forum: No registered users and 1 guest

cron