Data packets/size - Generic extractor
Hi all,
We built a custom function module based datasource and it is extracting data to BW in one big packet of 900,000+ records and the load is taking about 18 hours. We are trying to spilt the BW extraction into smaller data packets to improve performance but unable to do so. Following is our extraction program...
Please let me know where we are doing it wrong...
This Program fetches/build e_t_data. The issue is, program does not splitting into packets as the SAP standard program does.
""Local interface:
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
*" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
*" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
*" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
*" VALUE(I_DATAPAKID) TYPE SBIWA_S_INTERFACE-DATAPAKID OPTIONAL
*" TABLES
*" E_T_DATA STRUCTURE Z0333W OPTIONAL
*" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT
*" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS
*" EXCEPTIONS
*" NO_MORE_DATA
DATA: lr_range_name TYPE rsselect-fieldnm.
DATA: st_e_t_data TYPE z0333w.
STATICS: l_cursor TYPE cursor.
STATICS: called(1) TYPE c VALUE 'N'.
Maximum number of lines for DB table
STATICS: l_maxsize TYPE sbiwa_s_interface-maxsize.
FIELD-SYMBOLS: <l_range> TYPE ANY,
<l_t_range> TYPE STANDARD TABLE.
IF i_initflag = 'X'.
Initialization: check input parameters
buffer input parameters
prepare data selection
Fill parameter buffer for data extraction calls
g_s_interface-requnr = i_requnr.
g_s_interface-isource = i_dsource.
g_s_interface-maxsize = i_maxsize.
g_s_interface-initflag = i_initflag.
g_s_interface-datapakid = i_datapakid.
g_flag_interface_initialized = sbiwa_c_flag_on.
REFRESH g_t_select.
REFRESH g_t_fields.
APPEND LINES OF i_t_select TO g_t_select.
APPEND LINES OF i_t_fields TO g_t_fields.
ELSE.
first data package of first table -> open cursor
IF g_counter_datapakid = 0.
*--Get selection ranges
LOOP AT i_t_select.
MOVE-CORRESPONDING i_t_select TO <l_range>.
APPEND <l_range> TO <l_t_range>.
ENDLOOP.
l_maxsize = g_s_interface-maxsize.
fetch plants for the company code
PERFORM get_plants.
fetch mast data into internal table as we will be using MAST for validation
of whether BOM exist or not.
SELECT * FROM mast INTO TABLE it_mast
WHERE stlan = '1' OR stlan = '6'.
SORT it_mast BY matnr werks stlan.
Material BOM information
First data package -> OPEN CURSOR
OPEN CURSOR WITH HOLD l_cursor FOR
SELECT mast~matnr
mast~werks
mast~stlnr
mast~stlan
mast~stlal
stko~stlty
FROM mast INNER JOIN stko
ON stkostlnr = maststlnr AND
stkostlal = maststlal
FOR ALL entries IN gt_werks
WHERE mast~matnr IN gr_matnr AND
mast~werks IN gr_werks AND
mast~stlan IN gr_stlan AND
mast~werks = gt_werks-werks AND
mast~stlal = '01' AND
stko~stlty = 'M' AND "Material BOM only
( maststlan = '1' OR maststlan = '6' ).
ENDIF.
Fetch records into interface table.
named E_T_'Name of extract structure'.
REFRESH: gt_mat_bom,gt_mat_bom1.
FETCH NEXT CURSOR l_cursor
APPENDING CORRESPONDING FIELDS
OF TABLE gt_mat_bom
PACKAGE SIZE i_maxsize.
IF sy-subrc <> 0.
CLOSE CURSOR l_cursor.
RAISE no_more_data.
ELSE.
get BOM data and fill E_T_DATA
PERFORM get_bom_data TABLES e_t_data.
ENDIF.
Increment Package
g_counter_datapakid = g_counter_datapakid + 1.
ENDIF.
ENDFUNCTION
Thanks,
Anirudh.
I'm not sure, but this might help:
* Fetch records into interface table.
* named E_T_'Name of extract structure'.
DO.
REFRESH: gt_mat_bom,gt_mat_bom1.
FETCH NEXT CURSOR l_cursor
APPENDING CORRESPONDING FIELDS
OF TABLE gt_mat_bom
PACKAGE SIZE i_maxsize.
IF sy-subrc <> 0.
EXIT.
ELSE.
* get BOM data and fill E_T_DATA
PERFORM get_bom_data TABLES e_t_data.
ENDIF.
* Increment Package
g_counter_datapakid = g_counter_datapakid + 1.
ENDDO.
CLOSE CURSOR l_cursor.
RAISE no_more_data.
Rob
Similar Messages
-
Hi
i have two questions
1) where can i set the data packet size in BW and R3 and also in BI how and where can we set .
2)by what method/logic we will select the key fields in dso.
ex: i have 5 tables in the sourse and each table will have primary keys, now how do we know that particular primary keys should be kept in KEY FIELDS folder in DSO.
full points will be assigned.HI,
Data package settings for the data to be extracted from R3 to BI can be done through :
1) SBIW>General Settings> Maintain Control Parameters for Data Transfer
These settings are common for all the info packages which extract data from R3.
2) If u want to do settings relevent to specific Infopackage then :
RSA1>Click On the Specific Infopackage>Scheduler(in the Menu Bar)-->DataS Default Data Transfer.
3) And if you want to do DSO Package settings then:
Got to Transaction RSODSO_SETTINGS
Here u can do package settings for DSO activation ,paramenter for SID generation ect.
And selection of Key fileds depends upon the requirement.
Based on the key fields what all the data fileds u want to overwrite or add the corespomding data fields
Regards,
Chaitanya. -
Data error with generic extractor
Hi Friends!
I have a generic extractor based on view z_customer
The view is easy:
table: KNVP
fields: KUNNR, KUNN2, PARVW, MANDT
conditions: PARVW eq 'RG'
When I check the table (SE16) with customer 'X', show me only one record,
but when I run the extractor (RSA3) show me four records.
- What is wrong in my view? Perhaps something relative with the client (MANDT)?
Thank you in advance!Hi.,
It's not mandatory that you must include MANDT field in view.
check check the number of records in the created view, not in the table.
If the number of records matches in view with RSA3, then it is fine.
-- Selva -
Problem with data records with generic extractor
I have created generic exractor based on function module.
When i fetch the data with one infopackage it fetches only 104,239 ( which is wrong correct record are 155,120 )
But when i fetch the data with six different infopackages with different filters it fetches 155,120
So is extracotr gives wrong values if it exceeds greater than 100 k records ?
I want to fetch all the records in one ifopackage please suggest.Hi Venkatesh,
Thanks a lot, my Bsource BI settings are like this
Source System Max KB Maximam line Frequency Max Proc.
CLNT700 100000 100000 10 10
Should i increase the values to more than 100000
Or should i cahnge the following code ?
Fetch records into interface table.
named E_T_'Name of extract structure'.
FETCH NEXT CURSOR S_CURSOR
APPENDING CORRESPONDING FIELDS
OF TABLE E_T_DATA
of TABLE gt_ebi
PACKAGE SIZE S_S_IF-MAXSIZE.
IF SY-SUBRC <> 0.
CLOSE CURSOR S_CURSOR.
RAISE NO_MORE_DATA.
ENDIF. -
How to identify update mode in function module for generic extractor
Hi All,
I have created generic extractor using function module which supports delta load.
Delta logic is handeled in coding...by using ROOSGENDLM table.
Now problem is we need to identify the update mode, requested from infopackage in our function module in order to apply logic for Repair full.
I would like to know table or parameter in source system, which contain the update mode (Init , Delta , Full).
Thanks,
NirajHi Niraj
You can use the FM import parameter "i_updmode" (This is of type "SBIWA_S_INTERFACE-UPDMODE") to determine if infopackage triggerred in full or delta mode.
I_REQUNR TYPE SBIWA_S_INTERFACE-REQUNR
I_ISOURCE TYPE SBIWA_S_INTERFACE-ISOURCE InfoSource Name
I_MAXSIZE TYPE SBIWA_S_INTERFACE-MAXSIZE Data Packet size
I_INITFLAG TYPE SBIWA_S_INTERFACE-INITFLAG Initial Flag
I_UPDMODE TYPE SBIWA_S_INTERFACE-UPDMODE Update Mode
I_DATAPAKID TYPE SBIWA_S_INTERFACE-DATAPAKID Datapacket Id
I_PRIVATE_MODE
I_CALLMODE TYPE ROARCHD200-CALLMODE Single-Character Flag
I_REMOTE_CALL TYPE SBIWA_FLAG
Cheers
Vasu Sattenapalli -
BW experts,
I need data packages from SAP 4.7 to get 50000 rows at one in a single packet. Right now in BW it is set to get 20000 max per packet. Where can I change it to get more per packet. I am not able to do it on BW side as it say the maximum source system will allow is 20000, where in the source system (SAP 4.7) can I make this change?
Thanks
AshwinHi..
Configuring ROIDOCPRMS table
Transaction SBIW
General Settings->Maintain Control Parameters for Data Transfer
Refer OSS Note : 417307
About ROIDOCPRMS
It is an IDOC parameter source system. This table contains the details of the data transfer like the source system of the data, data packet size, maximum number of lines in a data packet, etc. The data packet size can be changed through the control parameters option on SBIW i.e., the contents of this table can be changed.
with regards,
harikv -
Load hung due to hung data packet
Hi,
We are getting problem daily Load hung due to hung data packet.We are doing daily changed the qm status to red and manually updated the datapacket.load completed.Is there any solutions is there to prevent this problem other than manual?
Sridharhi
You can try reducing the data packet size of the IP.
Goto the maintanence of the IP.
Scheduler menu option --> DataS. Default Data trannfer.
Now in the pop up window you can see
MAximum size of a data packet in kByte mentioned for the Full Upload, Delta Upload and Initializing Delta.
eg. If you are facing the problem in full load
reduce the data packet size to half.
save and then execute the IP.
This will solve your problem.
Regards
Shilpa -
Data Package size will be detemined dynamically.
Dear SDNers,
I have seen for some DTPs in my projects the data packet size in DTP is determined dynamically .How do we get this.
I am getting this message in DTP->Extraction Tab
The package size corresponds to package size in source.
It is determined dynamically at runtime.
Thanks,
SwathiHello,
You would get this when semantic keys are not defined in the DTP.
Regards..
Balaji -
The setting for packet size (RSCUSTV6)
HI Guys
i want to know the setting for packet size (RSCUSTV6). can i do in production . or dev.
i want change as
Packet size = 20000
FrequencyStatus-Idoc = 5
please advise on this.
Regards
sivaHi Patel,
This will impact all the loads in the system as this wil change the parameters for all the loads.. And hence its always recommended to reduce the data packet size at the Infopackage level...
Also u can do the settings for the ODS Activation process as well using this RSCUSTV6 t-code.
Better chane it for the specific job.
thanks -
Creation of a generic extractor and data source for the FAGLFLEXA table
Hi All,
Need to create a generic extractor and data source for the FAGLFLEXA table to support AR reporting. This table contains the necessary profit center information to perform LOB reporting against the AR data.
Please advice on how to do this.
Regards, VishalHi Vishal,
Its seems a simple a work out.
1.Go to RSO2 & choose the relevant option ie. whether you want to create Transactional DS, Master Data DS or Text DS.
2. Name it accordingly & then create.
3. Give description to it & then give table name FAGLFLEXA.
4. Save it & activate. If you need it to be delta enabled then click over Delta & you can choose accordingly.
If you still face some problem then do mail me at [email protected]
Assign points if helpful
Regards,
Himanshu -
How to use 2 date field as delta control in generic extractor.
Hi colleagues:
I have developed a generic extractor to extract logistic data: Purchase Orders and Invoice. In order to do that, I have defined a view joining EKBE, EKKO, EKPO, EKET tables on R/3. By this approach, the delta mechanism is supposed to be controlled by the EKBE-BUDAT field and also by the EKPO-AEDAT field. Both fields are available on the view used to create the Datasource. However, the Datasource creation allows us to define just one field as delta control.
I have a few questions regarding to this scenario:
<b>1 - Is it possible to define 2 fields as delta control field on Generic Datasource?</b>
<b>2 - How about creating two similar Datasouces, one having AEDAT as delta control, the other having BUDAT as delta control, and then connect those Datasources to an unique Infosource on the bw side?</b>
Best regards
Waldemarhi,
1 - as far as I know it is not possible to define 2 fields
2 - this workaround is used often in cases like yours.
Just remember about order of extracting: first you extract new documents then changed
Regards,
Andrzej -
The maximum size of data packet set in configuration is 25MB.
I want to change the size of data packet as 50 MB. I don't want to change it globally(in SPRO). I want to change it only for specific info-package.
But in info-package system does not allow to change the packet size more than 25MB.
Please suggest the way.
Regards,
DheerajHi..
MAXSIZE = Maximum size of an individual data packet in KB.
The individual records are sent in packages of varying sizes in the data transfer to the Business In-formation Warehouse. Using these parameters you determine the maximum size of such a package and therefore how much of the main memory may be used for the creation of the data package. SAP recommends a data package size between 10 and 50 MB.
https://www.sdn.sap.com/irj/sdn/directforumsearch?threadid=&q=cube+size&objid=c4&daterange=all&numresults=15
MAXLINES = Upper-limit for the number of records per data packet
The default setting is 'Max. lines' = 100000
The maximum main memory space requirement per data packet is around
memory requirement = 2 * 'Max. lines' * 1000 Byte,
meaning 200 MByte with the default setting
3 THE FORMULA FOR CALCULATING NUMBER OF RECORDS
The formula for calculating the number of records in a Data Packet is:
packet size = MAXSIZE * 1000 / transfer structure size (ABAP Length)
but not more than MAXLINES.
eg. if MAXLINES < than the result of the formula, then MAXLINES size is transferred into BW.
The size of the Data Packet is the lowest of MAXSIZE * 1000 / transfer structure size (ABAP Length) or MAXLINES.
Message was edited by:
search -
Generic Extractor on DB Table without Date, Time stamp
Hi all,
We have requirement of creating a generic extractor on the table which doesnt have date or time stamp in the data field. The only option availabel is to extract from Document numbers.
And we cant put the extractor mode to "Read from view" because the table contains Currency field which refers to external table for currency key.
The moment we change the extractor mode from Extraction from view to Extraction from FM the option "Numeric pointer" gets hidden.
What shall we do in this scenario ?? Pls advice.
Thanks.
Regards
NimeshHello Tapan, Prakash
Prakash : Currency key is needed in BW .
Tapan : I was just trying diff. options i.e. extraction from view and FM . Problem with Generic Extractor is that i dont have any date fields getting updated in the table. The only field that can be used for delta is document number. And Generic extractor only allows date or time stamp option , its not allowing numeric pointer if one reads from FM.
Regards
Nimesh -
Setting maximum packet size in JDBC driver to send data to database
Could someone tell me how I can set the JDBC connection property of maximum packet size to send data to database?
Regards
RashedHi thanks....I'm having this strange SQLException while trying to insert BLOB image data to Oracle database. I'm saying this strange because for the same image that has been inserted before it's throwing the exception. My program is run from Oracle form and then some image data are inserted into database through a loop. I can't realize what's the problem inside my code that's causing this problem. In fact, when I run my program independently not from Oracle Form, it runs fine, every image data get inserted into database. Given below is my code snippet:
public void insertAccDocs(String[] accessions) throws SQLException
for(int q=0; q<accessions.length; q++)
final String docName = accessions[q];
dbThread = new Thread(new Runnable(){
public void run()
try{
System.out.println("insertDB before connection");
getConnected();
System.out.println("insertDB after connection");
st=con.createStatement();
//String docName = acc; commented
// String docName = singleAccession;
String text = formatFree;
String qry = "INSERT INTO DOCUMENT VALUES
('"+docName+"','"+text+"','"+formatted+"','"+uiid+"')";
System.out.println("parentqry"+qry);
int ok=0;
ok=st.executeUpdate(qry);
if(ok==1)
System.out.println("INSERTION SUCCESS= "+ok);
System.out.println("Image List Size"+ imgList.size());
// inserting into child
for(int i=0;i<imgList.size(); i++)
String imgPath = ""+imgList.get(i);
System.out.println("db"+imgPath);
FileInputStream fin = new FileInputStream(imgPath);
BufferedInputStream bufStr = new BufferedInputStream(fin);
byte[] imgByte = new byte[bufStr.available()];
String img = "" + imgNameList.get(i);
System.out.println("imgid="+i);
callable = con.prepareCall("{call prc_insert_docimage(?,?,?)}");
callable.setString(1,docName);
callable.setString(2,img);
callable.setBinaryStream(3, bufStr , (int)imgByte.length);
callable.execute();
callable.close();
con.commit();
con.close();
else
System.out.println("INSERTION NOT SUCCESS");
// } //else end of severalAcc
}catch(Exception err){ //try
System.out.println(err.toString());
} //run
}); //runnable
dbThread.start();
}And the exception thrown is :
java.sql.SQLException: Data size bigger than max size for this type: #####
Please let me know if possible how I can get around this.
Regards
Rashed -
Generic Extractor: enriching GL Data with Purchasing Data
Experts,
This is my first time with Generic Extractor.
Requirement:
We have a requirement to enrich GL data with Purchasing data via the Material Document Number.
I need to provide this upto to the datawarehouse layer wherein another team will take over.
Solution idea:
Material Document is not part of the datasource 2LIS_02_SCL.
a. Should I enhance this datasource to include material number OR
b. Develop a concept to create a generic delat enabled extractor that pulls data from EKBE, GR and IR information.
In EKBE multiple material documents can exist per PO. The extractor returns 2 record per PO (before and after image) with the updated information.So if we have the first GR with Material document 901 and then a second GR with material doc 902 the extractor loads 3 records. New record, Before image and after image and the only one stored in BI is the after image. material doc would have value 902 if enhanced.
For the generic extractor approach the the ability to load deltas is crucial, since the EKBE table is very big. Maybe
"CPUDT-Day On Which Accounting Document Was Entered" and "CPUTM-Time of Entry" can be leveraged as delta hook.
Any ideas???
Thanks,
JainNo one answered
Maybe you are looking for
-
Doubt Regarding SOAP to File Scenario
Hi All, I am trying to create a SOAP to File scenario .These are the following things I have done so far : IR - 2 datatypes ( 1 for soap message and 1 for file message ) 2 message types for the corresponding messages 2 Message interface
-
For the millions trying to use iMovie HD with Yosemite
A good discussion got started in iDVD about using iMovie HD (a.k.a. iMovie 06) with Yosemite. I am attempting to relocate some of that information into the iMovie forum. From jboolean: Find iMovie HD.app, control click on it and View Package Contents
-
White glow around matte screen border?
A white glow has been occuring on my screen that becomes especially prominent towards the bottom, and after a few hours of usage begins to move upwards. However I recently observed that this white glow continues around the border of my screen. Can
-
What happened to my crop tool?
I have Photoshop 11.0.2 running on my MacOS 10.6.8. The crop tool is no longer showing in my tool bar and the image drop-down menu has crop as grey text. Haven't used Photoshop for awhile so I'm not sure exactly when this disappeared. I remember u
-
Vanbasco for Mac? Trying to make some imovie vids to put to YouTube!
May be in the wrong place to post this but hey, here goes: I have made some videos of me playing the piano which I can upload to youtube no probs. Someone else has some groovy software on their vids, which shows a keyboard, and the notes being presse