2008 Feb 07 9:50 AM
helllo all,
In my function mdoule i have a top inculde
where i need to declare ranges but it gives me a error
message when i declareranges
-->statement not accessible
Very strange problem....any clue??
helllo all,
In my function mdoule i have a top inculde
where i need to declare ranges but it gives me a error
message when i declareranges
-->statement not accessible
Very strange problem....any clue??
2008 Feb 07 9:53 AM
Can you copy the declaration??? have you included the tables statement?
Ex:
tables: mara.
Ranges: r_matnr for mara-matnr.
2008 Feb 07 9:57 AM
TABLES:yvbfktorg.
DATA:r_yvbeln TYPE RANGE OF yvbfktorg-yvbeln,
wa_r_yvbeln LIKE LINE OF r_yvbeln.
wa_r_yvbeln-sign = 'I'.
wa_r_yvbeln-option = 'CP'.
wa_r_yvbeln-low = 'WEB*'.
APPEND wa_r_yvbeln TO r_yvbeln.
I GUESS THE ABOVE IS RITE
2008 Feb 07 10:00 AM
Hi Bhanu,
You cannot put anything other than data declearations or form routines in the TOP include.
The following code
wa_r_yvbeln-sign = 'I'.
wa_r_yvbeln-option = 'CP'.
wa_r_yvbeln-low = 'WEB*'.
APPEND wa_r_yvbeln TO r_yvbeln.
cannot be put directly in top include.
Put it in a subroutine and call subroutine from your function module.
Cheers,
Aditya
2008 Feb 07 10:02 AM
ok aditya i m gonna try tat nd i hvnt declare the include in my FM its in the FG only
thnkx
bhanu
2008 Feb 07 10:08 AM
Hi Bhanu,
First activate the FG, then after that activate that TOP include.
or At the time of activating the top include it will show u the all includes, so select all includes and activate it.
i hope it may work,
reward points if helpful,
regards,
ravi shankar reddy
2008 Feb 07 9:57 AM
Hi Bhanu,
By saying "In my function mdoule i have a top inculde" do you mean you have added an INCLUDE statement inside the code of the function module? If so, that is not the way.
Instead, every function module is attached to a function group, and the every function group has a top include (which is accessible to all function modules under the function group).
Hence, e.g. say your function group is ZFGRP, then your function module's top include would be program LZFGRPTOP which is added as an INCLUDE in the function group main program.
Please declare your RANGE in the LZFGRPTOP program and everything should be fine.
Regards,
Aditya
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |