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

statement not accessible - Syntax error

selvakumar_mohan
Active Participant
0 Likes
5,457

Hi all,

There is a form within a standard include. The form has an include within it. Its a custom include. So its an exit i suppose. Now i have a problem in the custom include. There is "statement not accessible" error. Find below the code in the custom include.

*&---------------------------------------------------------------------*
*&  Include           ZZIMOVEKVGR4                                     *
*&---------------------------------------------------------------------*
DATA: r_vkorg TYPE RANGE OF vkorg.
CONSTANTS: c_z_salesorg_zzkvgr4 TYPE rvari_vnam VALUE
                                                'Z_SALESORG_ZZKVGR4'.
* Get the values from variant Z_SALESORG_ZZKVGR4 of TVARVC tavle
CALL FUNCTION 'Z_FILL_RANGE_TABLE_FROM_TVARV'
EXPORTING
 name                 = c_z_salesorg_zzkvgr4
*   INITLINE             = ' '
*   LINE_SEPARATOR       = ','
TABLES
 rngtab               = r_vkorg.
* Check for the sales orgranisation in TVARVC table
IF vbrk-vkorg IN r_vkorg.
* Move field Customer group 4 to KOMPCV structure
  MOVE vbrp
ENDIF.

Please help me understand how to overcome the same. The function module called has a select query. Does it have something to do.

Pasting here the form that calls this include.

FORM USEREXIT_ACCOUNT_PREP_KOMPCV.

*  KOMPCV-zzfield = xxxx-zzfield2.
*{   INSERT         TSTK9B000H                                        1
* TSTK9A05ZS-Begin of changes For scr 7060
* Only for the sale organisation S096
    INCLUDE ZZIMOVEKVGR4.                                "TSTK9A05ZS
* TSTK9A05ZS-End of changes
*}   INSERT

ENDFORM.

Thanks & Regards,

Selvakumar M.

6 REPLIES 6
Read only

Former Member
0 Likes
1,533

MOVE vbrp

Above statement is not valid. If the problem persists after you take care of the above line, please post the true code. That will help us to diagnose the problem.

Read only

Rushikesh_Yeole
Contributor
0 Likes
1,533

Include your code mentioned in include ZZIMOVEKVGR4 in Form -end-form statements.

Form XYZ.

endform.

Call this perform XYZ in the main program...where you want.

Read only

Former Member
0 Likes
1,533

Hi,

this form in RV60AFZZ is to modify KOMPCV fields.

I can't see any attempts to change those fields in your include.

You can either move your code directly into form routine USEREXIT_ACCOUNT_PREP_KOMPCV, or correct your code in your include to make it work (as Sudhi told before).

Regards.

Klaus

Read only

0 Likes
1,533

Hai...

Write your form routine after end of the function module... if need declare the variables as Globally..

So that you can run as you need.

With Regards,

Samba

Read only

0 Likes
1,533

Hai...

Write your form routine after end of the function module... if need declare the variables as Globally..

So that you can run as you need.

With Regards,

Samba

Read only

0 Likes
1,533

Hi,

While Activating it , it will show process Error ,

Activate both the include pgm with Errors,

And Try to Execute it.it may Execute.Try it out.

Thanks and Regards,

Prakash K