Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

strange select behavior in batch (bw extractor)

Former Member
0 Likes
748

Hi, All..

I'm receiving some odd behavior from a select statment being processed in batch mode (specifically, when run in a normal BW extractor - start routine), the select yields no results .. sy-subrc = 4 and target itab is empty. however, when i run this same select statement in debug, i get sy-subrc = 0 and records are returned!! I tried putting the select statement in a standard abap program & it came back successfully in both foreground & background. something is strange when run in the BW extractor process?? anyone familiar with this?? any help is appreciated!! Thanks!!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
725

what is the code you are writing can you show the code...

vijay

Hi, All..

I'm receiving some odd behavior from a select statment being processed in batch mode (specifically, when run in a normal BW extractor - start routine), the select yields no results .. sy-subrc = 4 and target itab is empty. however, when i run this same select statement in debug, i get sy-subrc = 0 and records are returned!! I tried putting the select statement in a standard abap program & it came back successfully in both foreground & background. something is strange when run in the BW extractor process?? anyone familiar with this?? any help is appreciated!! Thanks!!

5 REPLIES 5
Read only

former_member186741
Active Contributor
0 Likes
725

Hi Catherine,

sorry but I've got no idea what you're talking about.

Maybe you should post this question in the Data Warehousing forum?

Or somewhere else anyway.

Read only

0 Likes
725

Hi, Thanks for the reply. This message is also posted in the BW forum as well:

Read only

Former Member
0 Likes
726

what is the code you are writing can you show the code...

vijay

Read only

0 Likes
725

Thanks everyone for the comments!

The code is in the start routine from 0BBP_CONF_TD_1 into 0BBP_CON.

-The select returns records when in debug

-I've tried running it open without the "for all entries" & it still fails in batch

-The select works during the delta but always fails on the initial load

The select is a join:

DATA: BEGIN of t_JOIN1 OCCURS 0,

CONNUM LIKE /BI0/ABBP_CON00-BBP_CON_ID,

CONITEM LIKE /BI0/ABBP_CON00-BBP_COITEM,

PONUM LIKE /BI0/ABBP_PO00-BBP_PO_ID,

POITEM LIKE /BI0/ABBP_PO00-BBP_POITEM,

ACGUID LIKE /BI0/ABBP_PO00-BBP_ACGUID,

SCNUM LIKE /BI0/ABBP_SC00-BBP_SC_ID,

SCITEM LIKE /BI0/ABBP_SC00-BBP_SCITEM,

REQSTR LIKE /BI0/ABBP_SC00-BBP_REQSTR.

DATA: END of t_JOIN1.

SELECT a~BBP_CON_ID

a~BBP_COITEM

a~BBP_PO_ID

a~BBP_POITEM

b~BBP_ACGUID

c~BBP_SC_ID

c~BBP_SCITEM

c~BBP_REQSTR

INTO TABLE t_JOIN1

FROM /BI0/ABBP_CON00 as a

INNER JOIN /BI0/ABBP_PO00 as b

ON aBBP_PO_ID = bBBP_PO_ID AND

aBBP_POITEM = bBBP_POITEM

INNER JOIN /BI0/ABBP_SC00 as c

ON bBBP_SC_ID = cBBP_SC_ID

  • AND bBBP_SCITEM = cBBP_SCITEM

FOR ALL ENTRIES IN DATA_PACKAGE

WHERE a~BBP_CON_ID = DATA_PACKAGE-BBP_CON_ID AND

a~BBP_COITEM = DATA_PACKAGE-BBP_COITEM AND

a~BBP_COITEM <> 0 AND

b~BBP_ACGUID <> '0000' AND

c~BBP_SCITEM <> 0.

Read only

0 Likes
725

really sorry to waste everyone's time.. please see the BW forum posting to read the entire thread.

This issue was basically a tremendous oversight in the design!

one of the tables in the select is actually the table that the BW extractor is loading. Therefore, on the initial load, the select never returns records bc records don't exist yet!

Thanks for the contributions!