‎2011 Apr 04 7:05 PM
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.
‎2011 Apr 04 8:26 PM
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.
‎2011 Apr 05 6:36 AM
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.
‎2011 Apr 05 6:53 AM
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
‎2011 Apr 05 8:04 AM
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
‎2011 Apr 05 8:40 AM
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
‎2011 Apr 05 10:21 AM
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