Professional Documents
Culture Documents
BW Start Routine - Error
BW Start Routine - Error
1 of 5
https://archive.sap.com/discussions/thread/3881843
10/31/2016 7:05 PM
2 of 5
https://archive.sap.com/discussions/thread/3881843
Hi ABAP gurus,
Appreciate if anyone can suggest a way on solving this issue.
Currently I am trying to load data into my Internal table for further uses later.
however, the codes below have error occurs.
It displayed error:When you use the addition "FOR ALL ENTRIES IN itab", the fields "/BIC/ZSSFPK1" and "LT_DATASTSMA" must have the same type and the same length.
DATA:
lt_data TYPE _ty_t_sc_1.
lt_data[] = source_package[].
IF lt_data[] IS NOT INITIAL.
SELECT /bic/zssfpv2
INTO TABLE it_rs[]
FROM /bic/azssfomp200
FOR ALL ENTRIES IN lt_data[]
WHERE /bic/zssfpk1 = lt_data-stsma
AND /bic/zssfpk2 = lt_data-estat.
I well aware of the error is due to /BIC/ZSSFPK1 is length 15 and LT_DATA-STSMA is length 8.
but is there a way to make this work without creating a new BW infoObject for staging to make them the
same length (8)?
Many thanks.
routine abap bwroutine
10/31/2016 7:05 PM
3 of 5
https://archive.sap.com/discussions/thread/3881843
Vincent Ong
March 23, 2016 at 08:31 AM
0 Likes
Correct Answer
CHABBI Mustapha
Hello,
No , you don't need to create an infoobjet.
The solution is hereunder.
TYPE:
Define a type for lt_data.
zssfpk1
estat
DATA:
ls_package like line of source_package.
LOOP AT Source_package into ls_package.
ls_data-zssfpk1 = ls_package-stsma.
ls_data-estat
= ls_package-estat.
ENDLOOP
Use lt_table in your selection
Hope that will be useful,
Best Regards,
10/31/2016 7:05 PM
4 of 5
https://archive.sap.com/discussions/thread/3881843
Helpful Answer
Raymond Giuseppi
replied
March 23, 2016 at 09:08 AM
Chandra Mouli
replied
10/31/2016 7:05 PM
5 of 5
https://archive.sap.com/discussions/thread/3881843
Transformation rule details in source fields give info object name.
0
Correct Answer
CHABBI Mustapha
replied
March 23, 2016 at 15:36 PM
Hello,
No , you don't need to create an infoobjet.
The solution is hereunder.
TYPE:
Define a type for lt_data.
zssfpk1
estat
DATA:
ls_package like line of source_package.
LOOP AT Source_package into ls_package.
ls_data-zssfpk1 = ls_package-stsma.
ls_data-estat
= ls_package-estat.
ENDLOOP
Use lt_table in your selection
Hope that will be useful,
Best Regards,
Mustapha,
10/31/2016 7:05 PM