2012 Nov 19 11:43 AM
data: r_vkont TYPE RANGE OF fkkvk-vkona,
e_vkont LIKE LINE OF r_vkont.
So while declaring a subroutine with following parameters and r_vkont a structure of type r_vkont as below
We are getting a syntax error.
So what should be the possible solution.
FORM check_existence_zr021
TABLES t_zr006sat STRUCTURE zr006sat
t_zr021sat STRUCTURE zr021sat
t_zr006sat_zr021sat STRUCTURE e_zr006key
r_vkont STRUCTURE r_vkont.
data: r_vkont TYPE RANGE OF fkkvk-vkona,
e_vkont LIKE LINE OF r_vkont.
So while declaring a subroutine with following parameters and r_vkont a structure of type r_vkont as below
We are getting a syntax error.
So what should be the possible solution.
FORM check_existence_zr021
TABLES t_zr006sat STRUCTURE zr006sat
t_zr021sat STRUCTURE zr021sat
t_zr006sat_zr021sat STRUCTURE e_zr006key
r_vkont STRUCTURE r_vkont.
2012 Nov 19 11:56 AM
2012 Nov 19 12:11 PM
Try like this:
data: r_vkont TYPE RANGE OF fkkvk-vkona,
e_vkont LIKE LINE OF r_vkont.
FORM check_existence_zr021
TABLES t_zr006sat STRUCTURE zr006sat
t_zr021sat STRUCTURE zr021sat
t_zr006sat_zr021sat STRUCTURE e_zr006key
r_vkont like r_vkont.
endform.
~SS~
2012 Nov 19 12:18 PM
Hi Subrat
Try like this instead:
FORM check_existence_zr021
TABLES t_zr006sat STRUCTURE zr006sat
t_zr021sat STRUCTURE zr021sat
t_zr006sat_zr021sat STRUCTURE e_zr006key
r_vkont STRUCTURE e_vkont.
regards
Prince Isaac
2012 Nov 19 12:19 PM
Hello subrat,
You must be getting syntax error r_vkont is not a structure. Instead of structure use 'LIKE' as below
FORM check_existence_zr021
TABLES t_zr006sat STRUCTURE zr006sat
t_zr021sat STRUCTURE zr021sat
t_zr006sat_zr021sat STRUCTURE e_zr006key
r_vkont LIKE r_vkont.
2012 Nov 19 12:30 PM
ya ,i changed to like,
But issue is that, inside the subroutine,the r_vkont being populated as values are passed into the sign option low and high.
And the problem is that the r_vkont is a table without header line.
2012 Nov 19 12:33 PM
ya ,i changed to like,
But issue is that, inside the subroutine,the r_vkont being populated as values are passed into the sign option low and high.
And the problem is that the r_vkont is a table without header line.
2012 Nov 19 12:54 PM
Subrat,
Declare a structure local to your subroutine and read/loop at the entries in r_vkont. As below:
data: lw_vkont type range of fkkvk-vkona.
regards
Prince Isaac
2012 Nov 19 12:58 PM
Yeah..then too it will work.
You can append the r_vkont with sign, option, low and high values in routine.
and Access those values using loop at r_vkont...
Regards,
Deepti
2012 Nov 19 1:04 PM
Hello Subrat,
Let me know , whether the subroutine mentioned above are going to used by some other programs or only by the current one. In case of current one you can Declare the ranges at the top of the program and that will be accessiable at any point of time in the program. Once you declare a range the structure will be similar to the select-option .
To avoid this issue you create an structure in SE11 with sign,option, low and high.
Thanks & Regards,
Sumodh.P
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |