2013 May 31 4:43 PM
Hello Abap experts,
I am testing a new logic in an abap code, it's not completely finished...so don't keep to much attention to the logic
I have no syntax error in my editor, but while debugging or testing it i get a short dump : illegal sign.
I think that is proviked by the IF written after the loop, i don't know how to bypass it, Normally I am supposed to add treatments after the IF.
Thanks for support.
Amine
2013 May 31 5:33 PM
Hello.
I think that the problem is located in the IN statement of the IF. Probable the variable R_ZPCFROM has some wrong values.
comment the IN part of the IF and check if the program works correct, if no dump means the problem is there.
Regards
Hello.
I think that the problem is located in the IN statement of the IF. Probable the variable R_ZPCFROM has some wrong values.
comment the IN part of the IF and check if the program works correct, if no dump means the problem is there.
Regards
2013 May 31 5:02 PM
Just before this loop, In debug, check the SIGN field in range variable t_zpcfrom. You might have some undesired character assigned there.
2013 May 31 5:33 PM
Hello.
I think that the problem is located in the IN statement of the IF. Probable the variable R_ZPCFROM has some wrong values.
comment the IN part of the IF and check if the program works correct, if no dump means the problem is there.
Regards
2013 May 31 5:46 PM
Hi Miguel,
In fact you are right.
But i need the two conditions for my treatments any idea how can i bypass it?
Thanks.
Amine
2013 May 31 5:55 PM
You can keep the condition there, but the way you are populating that range variable is wrong. Track back and see what values are there in that range variable r_zpcfrom. Pay attention to the column SIGN of the range variable, there has to be some wrong character there. Best way is to put a break point at this statement where you are getting error and then see the range variable in debugger and look for the values in SIGN column, you might want 'I' there for include.
Example:
2013 May 31 6:10 PM
Hi Shafiq,
Here my declaration part, i am not very comfortable with ranges, could you tell me if smthg is wrong with my coding:
DATA : r_zfuncfrom TYPE RANGE OF /bic/pzsplit-/bic/zfuncfrom,
r_zpcfrom TYPE RANGE OF /bic/pzsplit-/bic/zpcfrom,
r_zfuncfrom_line LIKE LINE OF r_zfuncfrom,
r_zpcfrom_line LIKE LINE OF r_zpcfrom.
r_zfuncfrom_line-sign = 'I'.
r_zfuncfrom_line-option = 'BT'.
r_zpcfrom_line-sign = 'I'.
r_zpcfrom_line-option = 'BT'.
SELECT /bic/zsplit
/bic/zfuncfrom
/bic/zfromto
/bic/zpcfrom
/bic/zpcto
/bic/y_rmaccnt
INTO TABLE t_tablesource
FROM /bic/pzsplit WHERE objvers = 'A' AND /bic/zsplit IS NOT NULL.
IF sy-subrc EQ 0.
SORT t_tablesource BY /bic/zsplit.
ENDIF.
Thanks.
Amine
2013 May 31 7:34 PM
I can see that you have APPEND on line 2071 and 2072, they are fine. And as you mentioned above that you are assigning the sign 'I' as well, I hope you are not using CLEAR on this range variable in the middle somewhere?
Another thing is that you are using 'BT' (i.e. Between) try changing that to 'EQ' and only use 'low' field of the range and keep the 'high' as blank.
If that does not work as well, then can you take a screenshot of the range table in debugger? like I have one in my earlier post?
2013 May 31 9:14 PM
Hello.
Change the variable staments
yours:
data: r_zfuncfrom TYPE RANGE OF /bic/pzsplit-/bic/zfuncfrom,
r_zpcfrom TYPE RANGE OF /bic/pzsplit-/bic/zpcfrom,
r_zfuncfrom_line LIKE LINE OF r_zfuncfrom,
r_zpcfrom_line LIKE LINE OF r_zpcfrom.
Use this:
data: r_zfuncfrom TYPE RANGE OF /bic/pzsplit-/bic/zfuncfrom with header line,
r_zpcfrom TYPE RANGE OF /bic/pzsplit-/bic/zpcfrom with header line,
r_zfuncfrom_line TYPE RANGE OF /bic/pzsplit-/bic/zfuncfrom with header line,
r_zpcfrom_line TYPE RANGE OF /bic/pzsplit-/bic/zpcfrom with header line.
r_zfuncfrom_line should be same type as r_zfuncfrom.
I think that ur problem is in the declaration of R_ZFUNCFROM_LINE AND R_ZPCFROM_LINE.
Check it and replace R_ZFUNCFROM_LINE for R_ZFUNFROM.
I guess that it will work...and then u can fix
Regards
2013 Jun 04 9:07 AM
Hi Shafiq,
It's a range, if i replace it by 'EQ' it's not a range anymore, isn't it?
Amine
2013 Jun 04 9:11 AM
Thanks Miguel,
It's not working, by changing my declaration as you mentioned, i am getting the following error:
"Type "R_ZFUNCFROM" is unknown"
Amine
2013 Jun 04 2:55 PM
It will still be a range variable, even if there is only one line with EQ in it. You will have multiple lines with EQ. You can have lines with BT as well, but you need to make sure that low and high are assigned properly and the sign is also assigned properly. That's why I was asking for a screenshot of the range variable from debug, that will solve the problem very easily.
2013 May 31 5:57 PM
Hi
Enter the value for sign and option field while appending values in select option.
Thanks,
Neha
2013 Jun 04 9:12 AM
2013 May 31 9:09 PM
Dear Amine,
Can you please look in this way..
Generally when a negative sign is coming in the field where that field as defined as Currency type...
Please refer to your variable as
1. At the time of dump, what is the value it is having... is it -ve?
2. What is the variable type... It should be a normal P decimals 2 .... if it is like DMBTR, like currency ... then it will give short dump...
Regards,
Venkat
2013 Jun 04 9:14 AM
2013 Jun 04 12:13 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |