0% found this document useful (0 votes)
30 views5 pages

BW Start Routine ABAP Error Solution

The document discusses an error that occurs when trying to load data from an internal table into a BW infoobject for further processing. Specifically, the fields "/BIC/ZSSFPK1" and "LT_DATA-STSMA" have different data types and lengths. The suggested solution is to define a local internal table type with fields matching the BW infoobject, populate it from the source table in a loop, and use the local table in the SELECT statement instead of the source table to resolve the type/length mismatch. No changes to the existing BW modeling are required.

Uploaded by

Bac Aston
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views5 pages

BW Start Routine ABAP Error Solution

The document discusses an error that occurs when trying to load data from an internal table into a BW infoobject for further processing. Specifically, the fields "/BIC/ZSSFPK1" and "LT_DATA-STSMA" have different data types and lengths. The suggested solution is to define a local internal table type with fields matching the BW infoobject, populate it from the source table in a loop, and use the local table in the SELECT statement instead of the source table to resolve the type/length mismatch. No changes to the existing BW modeling are required.

Uploaded by

Bac Aston
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

BW Start Routine - error

1 of 5

[Link]

10/31/2016 7:05 PM

BW Start Routine - error

2 of 5

[Link]

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

[Link]

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

[Link]

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

[Link]
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

You might also like