Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Syntax error in program

Former Member
0 Likes
1,991

Moderator message: do not offer rewards

Hi ABAPers

Im getting the following error when ending a session on my Win client

The following syntax error occurred in program " Z********* " in include " Z*********** "

"LV_BPROLE_CHANGE" is not type-compatible with formal parameter "IV_VA"

"LUE"

" "

Guys please assist as I have no clue on how to correct this. <<text removed>>

I was told to make sure that the parameter type is the same as the actual parameter passed in the string

Tx

Jogi ( CRM Consultant )

Edited by: Matt on Feb 17, 2009 11:31 AM

9 REPLIES 9
Read only

Former Member
0 Likes
1,658

hi,

Can you post the corresponding code here..?? so that it can be more informative about the error.

Thanks

Sharath

Read only

Former Member
0 Likes
1,658

Hi Sharath

Source Code Extract

Line SourceCde

5 *" VALUE(OBJECT) LIKE SWOTRTIME-OBJECT

6 *" EXPORTING

7 *" VALUE(RETURN) LIKE SWOTRETURN STRUCTURE SWOTRETURN

8 *"----


9 DATA:

10 l_object TYPE swc_object,

11 l_programs TYPE TABLE OF swotbasdat-progname,

12 l_program TYPE swotbasdat-progname.

13 swc_container l_container.

14

15 IF init_control = false. PERFORM init_control USING return. ENDIF.

16 PERFORM runtime_set USING object

17 CHANGING return.

18 IF return-code NE 0.

19 EXIT.

20 ENDIF.

21

22 READ TABLE runtime WITH KEY object = object BINARY SEARCH.

23 IF sy-subrc = 0.

24 IF runtime-refcount = 0.

25 IF _basedata-ownhandle = true AND runtime-rfcdest IS INITIAL.

26 * local call -> call destructor

27 l_object-handle = object.

28 swc_call_method l_object 'DESTRUCT' l_container.

29 PERFORM system_error_get CHANGING return.

30 ENDIF.

31 DELETE runtime INDEX sy-tabix.

32 * clear instance

33 PERFORM swo_%refresh_instance IN PROGRAM (_basedata-progname) USING object IF FOUND.

34 * clear supertype programs

>>>>> PERFORM get_instance_programs TABLES l_programs USING runtime-lobjtype.

36 LOOP AT l_programs INTO l_program.

37 PERFORM swo_%refresh_instance IN PROGRAM (l_program) USING object IF FOUND.

38 ENDLOOP.

39 ELSE.

40 SUBTRACT 1 FROM runtime-refcount.

41 MODIFY runtime INDEX sy-tabix.

42 ENDIF.

43

44 IF NOT runtime-rfcdest IS INITIAL.

45 * remote call -> free remote object

46 CALL FUNCTION 'SWO_FREE'

47 EXPORTING

48 object = object

49 IMPORTING

50 return = return

51 EXCEPTIONS

52 OTHERS = 1.

53 ENDIF.

54 ENDIF.

Read only

kamesh_g
Contributor
0 Likes
1,658

Hi

It seems the variables u r using in form and perform are different types .

Use the same type for formal parameter and actual parameter .

then u can easily solve the problem .

If not solved reply it please with modified code .

Read only

matt
Active Contributor
0 Likes
1,658

Please supply the types of:

1. lv_bprole_change

2. iv_va

3. lue

Supply the PERFORM statement and the FORM.

Then we can tell you what's wrong.

matt

Read only

Former Member
0 Likes
1,658

plsea see the datatype of both the sending parameters and eveive paameters.

regards

Read only

Former Member
0 Likes
1,658

Hi

IF init_control = false. PERFORM init_control USING return. ENDIF.

PERFORM runtime_set USING object

CHANGING return.

IF return-code NE 0.

EXIT.

ENDIF.

READ TABLE runtime WITH KEY object = object BINARY SEARCH.

IF sy-subrc = 0.

IF runtime-refcount = 0.

IF _basedata-ownhandle = true AND runtime-rfcdest IS INITIAL.

  • local call -> call destructor

l_object-handle = object.

swc_call_method l_object 'DESTRUCT' l_container.

PERFORM system_error_get CHANGING return.

ENDIF.

DELETE runtime INDEX sy-tabix.

  • clear instance

PERFORM swo_%refresh_instance IN PROGRAM (_basedata-progname) USING object IF FOUND.

  • clear supertype programs

PERFORM get_instance_programs TABLES l_programs USING runtime-lobjtype.

LOOP AT l_programs INTO l_program.

PERFORM swo_%refresh_instance IN PROGRAM (l_program) USING object IF FOUND.

ENDLOOP.

ELSE.

SUBTRACT 1 FROM runtime-refcount.

MODIFY runtime INDEX sy-tabix.

ENDIF.

IF NOT runtime-rfcdest IS INITIAL.

  • remote call -> free remote object

CALL FUNCTION 'SWO_FREE'

EXPORTING

object = object

IMPORTING

return = return

EXCEPTIONS

OTHERS = 1.

ENDIF.

ENDIF.

ENDFUNCTION.

FORM get_instance_programs TABLES p_programs

USING p_objtype TYPE swotrtime-lobjtype.

DATA:

l_supertypes TYPE TABLE OF swotip,

l_interfaces TYPE TABLE OF swotsuper.

CLEAR p_programs.

  • get programs of implemented interfaces

CALL FUNCTION 'SWO_INTERFACE_COLLECT'

EXPORTING

objtype = p_objtype

TABLES

interfaces = l_interfaces.

DELETE l_interfaces WHERE objtype = p_objtype.

IF NOT l_interfaces IS INITIAL.

SELECT progname FROM tojtb APPENDING TABLE p_programs

FOR ALL ENTRIES IN l_interfaces

WHERE name = l_interfaces-objtype.

ENDIF.

  • get programs of supertypes

CALL FUNCTION 'SWO_QUERY_SUPERTYPES'

EXPORTING

objtype = p_objtype

TABLES

supertypes = l_supertypes

EXCEPTIONS

OTHERS = 1.

IF NOT l_supertypes IS INITIAL.

SELECT progname FROM tojtb APPENDING TABLE p_programs

FOR ALL ENTRIES IN l_supertypes

WHERE name = l_supertypes-parent.

ENDIF.

ENDFORM.

Read only

Former Member
0 Likes
1,658

Hi,

Cehck the variable type are using perform or Function mdules data type is differ.

Regards

Md.MaahboobKhan

Read only

Former Member
0 Likes
1,658

Hi Mohammed

Where do i check or correct this? Im not familiar with ABAP at all

Response appreciated

Jogi

Read only

Former Member
0 Likes
1,658

Closing thread, managed to resolve this issue

Jogi