on 02-26-2015 10:16 PM
Hi all,
When I am running the query in RSRT I am getting the error "Error for variable in customer enhancement D_PBACALM12ROLL".
This internal error is an intended termination resulting from an illegal program status.
The error occurred with variable in customer enhancement D_PBACALM12ROLL .
I have created customer exit variable to get last 12 month from given user values.
ORM execute_user_exit USING VALUE(u_i_vnam) TYPE rszvnam
VALUE(u_i_vartyp) TYPE rszvartyp
VALUE(u_i_iobjnm) TYPE rsiobjnm
VALUE(u_i_s_cob_pro) TYPE rsd_s_cob_pro
VALUE(u_i_s_rkb1d) TYPE rsr_s_rkb1d
VALUE(u_i_periv) TYPE periv
VALUE(ut_i_t_var_range) TYPE rrs0_t_var_range
VALUE(u_i_step) TYPE i
CHANGING ct_e_t_range TYPE rsr_t_rangesid.
DATA: l_year TYPE d,
l_month TYPE d,
l_s_range LIKE LINE OF ct_e_t_range,
loc_var_range LIKE rrrangeexit.
CHECK u_i_step = 2.
* Determine the last 12 month incliuding the given month
READ TABLE ut_i_t_var_range WITH KEY vnam = 'D_PBACALM' INTO loc_var_range.
IF sy-subrc EQ 0.
l_year = loc_var_range-low(4).
l_month = loc_var_range-low+4(2).
endif.
l_s_range-high = loc_var_range-low.
IF
l_month = '01'.
l_year = l_year - 1.
concatenate l_year'12' into l_s_range-low.
ELSE.
l_month = l_month - 1.
l_year = l_year - 1.
concatenate l_year l_month into l_s_range-low.
ENDIF.
l_s_range-sign = 'I'.
l_s_range-opt = 'BT'.
APPEND l_s_range TO ct_e_t_range.
ENDFORM.
When I am checking the the code, it says no Sytax error. Then why it is not working? and what is this illegal program status means? Can someone please help in this?
Thanks and Regards,
Sarika
Hi Sarika,
Can you please give a bit more information on the error? Do you get a shortdump? If you get an error message, what is the message code and long text?
It is interesting to know where the error occurs, in standard SAP or your own implementation (which looks OK by the way). Please enter a break-point in the coding and run again using t/code RSRT. Does the debugger starts or the error occurs before it?
Just to be sure, please regenerate the BEx Query using t/code RSRT.
Best regards,
Sander
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
please see below is the detils on the error:
Message no. BRAIN649
This internal error is an intended termination resulting from an illegal program status.
The error occurred with variable in customer enhancement D_PBACALM12ROLL .
Check your customer enhancement.
I did check the code by entering the break point, the debugger starts and I am getting the 12 month range in the structure.
thanks and regards,
Sarika Gattawar
Hi Sarika,
I can see that iin your code you have mentioned as l_year TYPE d, and l_month TYPE d.
Please change them to:
Data: l_year TYPE n LENGTH 4,
l_month TYPE n LENGTH 2,
I think system is having issues while assinging values of type d to the ct_e_t_range.
Specifically, in your current code i.e. when its of data type d:
l_month = '01'. - will work just fine
l__year = l_year - 1. - will have wierd results
So change the data type to n and length as above.
Please let me know if this helps.
Thanks
Amit
Hi Amit,
you are absolutely right, When I was debugging eh code, i did notice that so I have updated the code as below:
DATA: l_year(4) TYPE n,
l_month(2) TYPE n,
But with this changes, still getting the same error.
please see below is the details on the error:
Message no. BRAIN649
This internal error is an intended termination resulting from an illegal program status.
The error occurred with variable in customer enhancement D_PBACALM12ROLL .
Check your customer enhancement.
Thanks
Sarika
Hi Sarika,
BRAIN649 is a error of invalid range being passed to the variable.
Whats the length of 'loc_var_range-low' in your code? It should be 6 as per your code.
Can you variable 'D_PBACALM' handle a range? I mean is it a select-options?
Can you debug your code and check what the values are finally being passed to ct_e_t_range?
Also let us know what is the input you are providing to the variable?
Thanks
Amit
This was pointed out by Akansha long back.If you had noticed it carefully your issue would have resolved earlier.
rdate- to calculate range (interval value, mandatory,not ready for input)
Regards,
AL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not sure but just thinking if you have written the code inside the Include ZXRSRU01,then the name of customer exit variable is missing.
Regards,
AL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can some one please help in this?
thanks
Sarika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sarika,
I got your customer exit rqmnt like this-
Based on the date entered by the user in input variable,
the customer exit variable should have interval of last 12 months including the given month.
You have to define 2 customer exit variables based on calday-
udate-user input variable (single value, mandatory, ready for input)
rdate- to calculate range (interval value, mandatory,not ready for input)
then modify your code accordingly.
Thanks,
Akanksha
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.