on 06-05-2014 7:25 AM
Hi,
When I am trying to write below code in BW 7.4 i am getting error at highlighted line, same code was working in BW 7.3.
Error :- At the write position, you cannot use offset and length specifications with fields of type "STRING" or "XSTRING". -
WHEN 'ZABC_MTD'.
v_loc_date = sy-datum.
IF v_loc_date+6(2) LE 20.
v_loc_date+6(2) = '01'.
v_loc_date = v_loc_date - 1.
ENDIF.
l_s_range-low = v_loc_date.
l_s_range-low+6(2) = '01'.
l_s_range-high = v_loc_date.
l_s_range-sign = 'I'.
l_s_range-opt = 'BT'.
APPEND l_s_range TO e_t_range.
EXIT.
Kinldy help
Regards,
Anil
Hi All,
I found the solution.
In 7.4 its not not allowing to use offset for l_s_range-low.
Instead, what I did is below
SAP BW 7.3 Code
WHEN 'ZABC_MTD'.
v_loc_date = sy-datum.
IF v_loc_date+6(2) LE 20.
v_loc_date+6(2) = '01'.
v_loc_date = v_loc_date - 1.
ENDIF.
l_s_range-low = v_loc_date.
l_s_range-low+6(2) = '01'.
l_s_range-high = v_loc_date.
l_s_range-sign = 'I'.
l_s_range-opt = 'BT'.
APPEND l_s_range TO e_t_range.
EXIT.
SAP BW 7.4 Code
DATA : LV_DATE TYPE D.
WHEN 'ZABC_MTD'.
v_loc_date = sy-datum.
IF v_loc_date+6(2) LE 20.
v_loc_date+6(2) = '01'.
v_loc_date = v_loc_date - 1.
ENDIF.
LV_DATE = v_loc_date.
LV_DATE+6(2) = '01'.
l_s_range-low = LV_DATE.
l_s_range-high = v_loc_date.
l_s_range-sign = 'I'.
l_s_range-opt = 'BT'.
APPEND l_s_range TO e_t_range.
EXIT.
Regards,
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello everyone,
Note was created to solve this type of issues:
Regards,
Janaina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anil,
I'm experiencing the same issue now in a upgraded Sandbox system where we upgraded to SAP BW 7.4 SP07.
All Customer Exit include ZXRSRU01 is throwing samme error as you got.
Did you find any other solution on this or is the only solution to change ABAP logic?
Since we have approx 3000 lines with ABAP and many of the Customer Exits is using Offset and string loginc on l_s_range objects, it will be a hugh job to fix all this.
Btw, where did you find the information that In 7.4 its not not allowing to use offset for l_s_range-low?
regards
Oddmar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Anil
Please look SN-1823174 for more information. The domain RSCHAVL was changed from CHAR 60 to SSTRING 1333. As a result, some ABAP language constructs are no longer possible (syntax errors) or they cause runtime errors in customer-specific programs.
There are different data types in your case:
7.3 RRRANGESID-LOW was RSCHAVL (CHAR 60)
7.4 RRRANGESID-LOW now is RSCHAVL (SSTRING 1333)
Best regards.
Hiii,
Can you brief what you are trying to achieve .
So that can help with code better.
Regards,
Akshay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you just trying to check if the date is greater then 20 .
If it is less then you are assigning it 01.
and in next statement you are subtracting it by 1 which is wrong .
AND you need to specify diff variable to v_loc_date2 while assigning new value and then after condition use v_loc_date = v_loc_date2
Regards,
Akshay
Hi,
I am just writing a code to get month to date, actually i written the same code in 7.3 , there it's working fine, but when i try to write the same code in 7.4, i am getting error.
It's 7.4 new installation, we are testing in sandbox, do we need to do any thing in SPRO to make abap work properly.
Basically system is not allowing to use offset for this line l_s_range-low+6(2) = '01'.
Thanks,
Anil
Hi Former Member,
The only main change that has happened in 7.4 compared to 7.3 on coding part is the one mentioned in the note below:
1943752 - SYNTAX_ERROR Dump Occurs when Executing a BW Query with Customer Exit Variable after Upgrading to BW7.4
BR
Prabhith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.