Question:
Hi All
I am extracting data from a SAP standard transaction data extractor and in the data source user exit on the R/3 system I want to check for a series of conditions on the transaction data and if the condition is met I do not want that data to be transmitted by R/3 to BW.
Can any of you please throw some light how in the user exit on the R/3 side I can skip unwanted records. I do not want to bring them to BW and skip them.
Your help is highly appreciated.
Thanks
Charlotte
Answer:
proceed as follows :
* copy evrything from your data package into an internal table
* loop over that internal table and check your conditions.
* if they are fullfilled correctly, append the line into which you looped to your datapackage, otherwise, just go to the next loop.
In pseudo-coding:
itab_data [] = c_t_data[]
clear c_t_data.
refresh c_t_data
loop at itab_data into line_data.
<check your conditions>
if ok
append line_data to c_t_data.
clear line_data.
else.
clear line_data.
endif.
endloop.
Answer:
Hi TFR
Many thanks for your input. I did the following:
loop at c_t_data into l_s_rec.
if condition is met
delete c_t_data index l_s_tabix
end if
endloop.
I am assigning sy-tabix to l_tabix but appears the delete I have indicated above seems not to work. Not sure what is wrong with that approach.
Thanks
Charlotte
Answer:
Hi TFR
I tried the code segment you suggested:
itab_data [] = c_t_data[]
clear c_t_data.
refresh c_t_data
loop at itab_data into line_data.
<check your conditions>
if ok
append line_data to c_t_data.
clear line_data.
else.
clear line_data.
endif.
endloop.
my data source is still returning all the dataset not just the ones that met the critieria I have specified.
Thanks
Charlotte
Answer:
Did you program this in the correct IF or CASE statement?
Your code will only be read if it is coded following a statement specifying your datasource:
IF i_datasource = '<your DS Name>'.
...
ENDIF.
Answer:
Hi TFR
I am using the case statement as follows:
CASE I_ISOURCE.
WHEN '2LIS_01_S782'.
.....
But not sure it does not work perhaps SAP does not let entries in the extract to be deleted. Not sure.
Thanks
Charlotte
Answer:
Hi Charlotte,
: maybe the problem is your "CASE I_ISOURCE" statement. OSS Note 392280 states that you must use I_DATASOURCE instead.
Try in debugging via RSA3 if he actually goes into the coding within your current case. If not replace the case statement and try again.
If this doesn't work, i'm all out of ideas...
T.