Vous êtes sur la page 1sur 5

BW Start Routine - error

1 of 5

https://archive.sap.com/discussions/thread/3881843

10/31/2016 7:05 PM

BW Start Routine - error

2 of 5

https://archive.sap.com/discussions/thread/3881843

This question is answered

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

BW Start Routine - error

3 of 5

https://archive.sap.com/discussions/thread/3881843

routine abap bwroutine

Vincent Ong
March 23, 2016 at 08:31 AM
0 Likes

Correct Answer

replied March 23, 2016 at 15:36 PM

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.

APPEND ls_data to lt_data.

ENDLOOP
Use lt_table in your selection
Hope that will be useful,
Best Regards,

10/31/2016 7:05 PM

BW Start Routine - error

4 of 5

https://archive.sap.com/discussions/thread/3881843

Hope that will be useful,


Best Regards,
Mustapha,
0

View this answer in context

Helpful Answer by Raymond Giuseppi

Helpful Answer

Raymond Giuseppi

replied
March 23, 2016 at 09:08 AM

No need of a new InfoObject,, just define a local internal


table of type /bic/zssfpk1 in the routine, fill it in a loop
from source_package, and use it in the FOR ALL
ENTRIES clause.
Regards,
Raymond
1

Chandra Mouli

replied

March 23, 2016 at 09:46 AM

In BW Info Object maintenance change length ZSSFPK1,


use ALPHA conversion
or
Transformation rule details in source fields give info object name.
0

10/31/2016 7:05 PM

BW Start Routine - error

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.

APPEND ls_data to lt_data.

ENDLOOP
Use lt_table in your selection
Hope that will be useful,
Best Regards,
Mustapha,

10/31/2016 7:05 PM

Vous aimerez peut-être aussi