Functional module extractor for INDX
Help to write please an optimum code of the functional module for an extractor from table INDX
While in the functional module on the basis of RSAX_BIW_GET_DATA_SIMPLE ' has made the following
* Data transfer: First Call OPEN CURSOR + FETCH
* Following Calls FETCH only
* íà÷àëî îáðàáîòêè
* First data package -> OPEN CURSOR
IF S_COUNTER_DATAPAKID = 0.
delete from zdbasetable1.
import inttable1 inttable2 inttable3 from database INDX(IM) ID 'IDENT'.
loop at inttable1.
move-corresponding inttable1 to zdbasetable1.
modify zdbasetable1.
clear zdbasetable1.
endloop.
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT (S_S_IF-T_FIELDS) FROM zdbasetable1.
ENDIF. "First data package ?
* 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
PACKAGE SIZE S_S_IF-MAXSIZE.
IF SY-SUBRC <> 0.
CLOSE CURSOR S_CURSOR.
RAISE NO_MORE_DATA.
ENDIF.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
ENDIF.
But it would be desirable, without use database table - zdbasetable1
Similar Messages
-
Function Module in a Generic Function Module Extractor
I want to use a generic function module (ZFM_CONNECTION_DETAIL) in a Generic Function Module based Extractor.
After Creating, I have checked it in RSA3... Data is showing properly on the Extractor Check.
And replicated on BW side, after triggering the extractor using infopackageu2026 only one record is coming on the target side (BW).
And one job is running endless on the source system.
Generic extractor on the normal code is working properly on both sides.
But problem occurs while I was using Function Module in the Generic function Module extractor.
Waiting for a Reply with solution...........
Hi Siegfried Szameitat,
I have searched a lot to find out the solution of my Question (Problem). But there is no solution for the problem I have.
Please let me to find out a proper solution of my issue....
ThanksFUNCTION zcrm_questionnaire.
Its a full Load...
Codes are as followed..........
DATA:lv_times TYPE i.
DATA:lv_datapakid TYPE numc4.
CLEAR:lv_datapakid,lv_times .
STATICS: s_s_if TYPE srsc_s_if_simple,
sd_no_more_data TYPE flag.
DATA: l_s_select TYPE srsc_s_select.
DATA : s_counter_datapakid LIKE sy-tabix,
s_cursor TYPE cursor.
RANGES : date FOR zresult_lt-date.
DATA: lv_count TYPE i VALUE 1.
IF i_initflag = sbiwa_c_flag_on.
Initialization: check input parameters
buffer input parameters
prepare data selection
Check InfoSource validity
CASE i_dsource.
WHEN 'ZCRM_QUESTIONNAIRE'.
WHEN OTHERS.
IF 1 = 2. MESSAGE e009(r3). ENDIF.
log_write 'E' "message type
'R3' "message class
'009' "message number
i_dsource "message variable 1
' '. "message variable 2
RAISE error_passed_to_mess_handler.
ENDCASE.
APPEND LINES OF i_t_select TO s_s_if-t_select.
s_s_if-requnr = i_requnr.
s_s_if-dsource = i_dsource.
s_s_if-maxsize = i_maxsize.
APPEND LINES OF i_t_fields TO s_s_if-t_fields.
ELSE. "Initialization mode or data extraction
IF NOT sd_no_more_data IS INITIAL.
RAISE no_more_data.
ENDIF.
LOOP AT s_s_if-t_select INTO l_s_select .
MOVE-CORRESPONDING l_s_select TO date.
ENDLOOP.
DATA : v_questionire TYPE crm_svy_db_sid.
DATA : itab_questionire TYPE zsurveyid.
DATA : e_tt_data_get TYPE zresult_lt OCCURS 10.
v_questionire = 'CALL CENTER'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'METER INSTALLATION TEAM'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'METER READING & BILLING'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'NO SUPPLY'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'CASH COLLECTION CENTER'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'STREET LIGHT'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'CONSUMER CARE CENTER'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'WEBSITE'.
APPEND v_questionire TO itab_questionire.
DATA : counter TYPE i,
high LIKE sy-datum,
low LIKE sy-datum.
CONCATENATE
l_s_select-high+6(4)
l_s_select-high+3(2)
l_s_select-high+0(2)
INTO
high.
CONCATENATE
l_s_select-low+6(4)
l_s_select-low+3(2)
l_s_select-low+0(2)
INTO
low.
BREAK-POINT.
do i_maxsize times.
CALL FUNCTION 'ZCRM_SURVEY_REPORTING'
EXPORTING
e_date_frm = low
e_date_to = high
e_questionire = itab_questionire
CHANGING
it_result = e_tt_data_get.
IF sy-subrc IS INITIAL.
e_t_data[] = e_tt_data_get[].
APPEND e_t_data.
ELSE.
EXIT.
ENDIF.
sd_no_more_data = 'X'.
ENDIF. "Initialization mode or data extraction ?
ENDFUNCTION.
lk -
How to Function module extractor
Can anybody give me a step by step procedure to do a function module extractor ?
Like the steps that I need to perform even before i start writing my code
Thanks
ShrutiDear Shruthi,
Do a Search in SDN .you get lot of threads for FM Extraction ...
The easiest way to work out with Function Module is to copy the standard one and modify according to your reqirement.
The standard one is RSAX_BIW_GET_DATA_SIMPLE .
Dont forget to copy the Function grp RSAX into a custom defined Grp and Modify the Ranges options as per ur req.
and in Function module, in Sourcecode and Tables, Do modify the E_T_data with ur Generic datasource ,make sure u also modify the select statements within the sourcecode. If you have an idea on ABAP its really easy to work out.
And regarding the creation of Datasource.
Its really Simple.
Goto RSo2.
Give the name of Datasource.
Give the Fm name and Extract Struc ( name of D.S only).
Save and Generate.
thats it.
Dont forget to assign points.Its a way of saying thanks.
Thanks,
Krishna -
Function Module extractor extracting as a Single Package?
Hi All,
I have created a generic function module extractor, which works fine, but extracts all the records in a single package. The default is set in SBIW as 50000 records. But right now I have only 2500 records. But I changed the packet size to 100 in my info package setting and also specified as 100 with in the function module.
But still I get all the data come as a single package of 2500. I want to make sure that this extractor will not create any problem in production, so I want to test the data packet size. Any suggestion. I have used he standard function module DATASIMPLE and I do setup I_MAXSIZE as 100 in the IMPORT parameter in the function and hav ethe following code in the function module...
APPEND mgremp_stru to E_T_DATA.
mseq = mseq + 1.
if mseq = 100.
G_COUNTER_DATAPAKID = G_COUNTER_DATAPAKID + 1.
mseq = 0.
endif.
endloop.
IF SY-SUBRC <> 0.
RAISE NO_MORE_DATA.
ENDIF.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
Any Suggestions?
Thx,
Alex.Ramesh,
The simple truth is that what ever you define as a data structure for E_T_DATA should be exactly matching to your selections in the CUSOR. My scenario is way too trichy not just because too many sqls, but because of the nature of HR Tables. Same field will have two different values such as in one record SOBID refers to Org Unit, in the next record the same is Person and in the next record it is Position. So I should have the same field 3 times in a single record. But it is not possible. SO what I did was found 3 different fields whose length and type are same as what I need and selected them but inside my function module I manipulated with internal tables. So the extractor thinks I declare cursor for the same fields I defined in the data source (the value you use in E_T_DATA) and extract them in the FETCH. In the fetch all it checks internally is that whether the only the CURSOR selected fields are extracted , because you will update the E_T_DATA. I know this is little more than what I explained here, but this is the concept.
I am planning to have a weblog or a white paper published on this in a week or two.
If this idea helps assign points.
Goodluck,
Alex. -
Function module exits for Tcode MD11.
Please tell me, Function module exits for Tcode MD11.
Reg .
PrajuHi
LMDR2001
LMDZU001
Try out these exits.
Check the folloing BADI's
MD_PLDORD_SCHEDULING
MD_PIR_FLEX_CONS
MD_PLDORD_SCHEDULING
Regards
Divya -
Function module name for routing fom production orders
Function module name for routing fom production orders
Hi
There are lot of fun modules related to routing
like
BAPI_ROUTING_CREATE
BAPI_ROUTING_EXISTENCE_CHECK
goto SE37 Tcode
enter routing press F4
you will get a lot out of that use the required one
Reward points for useful Answers
Regards
Anji -
Function Module (BAPI) for Delivery Change
Dear All,
We have a Function Module "BAPI_SALESORDER_CHANGE" for changes in sales order, wherein we also can enter Texts in sales order.
Please tell me similar such function module for Outbound Delivery, wherein I can enter / insert / change the Texts (both Header & Item) in a deivery document.
Regards,
DhananjayThanks
Where in this Function Module do I find the table / parameter for adding text at item & header level.
Regards
Dhananjay -
Function module need for 0fiscvarnt
Hi i have 0comp_code,budat and 0fiscper as a source fields,now i want to get 0fiscvarnt...please give me any logic or function module available for that
thanksHi,
Usually fiscal year variant is constant if not getting populated from source system.
Check with function team member what Fiscal year variant they using.
Regards,
Akshay -
Function module used for ENQUEUE_EIQMEL & DEQUEUE_EIQMEL function
Hi All,
It should be highly appreciable if any one could please help.
I need the name of the function module used for ENQUEUE_EIQMEL & DEQUEUE_EIQMEL function.
waiting for help.
Thanks
ShawHi,
The names 'ENQUEUE_EIQMEL' and 'DEQUEUE_EIQMEL ' you have mentioned are itself the function modules. Which other FM's you need i didnt understand.
These are FM to ahndle lock objects 'QMEL'.
please reframe your question in case of further issues.
Regards,
Mansi. -
Function module(s) for Cube Collapsing/Compression
Hi Experts,
can anybody tell me if there's a SAP Function module availbale for Collapsing/Compressing requests of a cube ?
Background is we want to automate collapsing of cubes by an APAB report instead of using a process chain or RSA1.
Any suggestions? Any pitfalls for such an implementation ? Any expieriences ?
We're on SAP BI 7.00 19, Oracle 10.2.0.4
Best regards,
ykHi Srinivas,
thanks for the quick answer, I will check the FM you mentioned.
We think of a cube exceptions list wich should NOT be condensed, and all OTHER cubes should be condensed.
With a process chain we have to maintain these OTHER list manually. In an ABAP report we could exclude the exceptions and condense the rest.
Developers tend to "forget" to add the CONDENSE step. So with time more and more cubes store only in F-tables and nothing in the E-tables (producing more workload as query runtime, DB maintanence like index creation runtime , statistic runs ...) and last but not least occupy disk space wich is expensive if you have a mirrored high performance disk system .
Best regards,
yk -
Function module/BAPI for executing VD51/VD52 transactions
Hi
Warm greetings to all,
I require a function module/BAPI for executing VD51/VD52 transactions. Can anyone help on this
SreekanthHi Sreekanth,
Use this.
There is an FM which is used by standard transaction
'RV_CUSTOMER_MATERIAL_UPDATE' .
Ex Code -
CALL FUNCTION 'RV_CUSTOMER_MATERIAL_UPDATE'
IN UPDATE TASK
TABLES
XKNMT_TAB = XKNMT
YKNMT_TAB = YKNMT
TCATALOG_TAB = LT_CATALOG.
commit work.
Regards,
Vijay -
Function Module / BAPI for Creating Material freight Group
Hi All,
Can anyone tell me the Function Module / Bapi for creating material freight group.
Regards,
Raj.Bapi for creating material freight group. :: You actually use mm01 or mm02 to change data for material flight.
So you can use BAPI for mm02 and mm01
For Ex:
BAPI_MATERIAL_SAVEDATA
Hope this helps -
Function Module Name for Graph
HI,
Can any body tell me Function Module name for creating graph with horizontal scrollable.I dont want standard graph button.
Thanks,
RakeshHello,
Check this standard programs they are using the same FM
RFDOPR20 Customer Payment History
RFVD_COMPRESSION_01_I01
RPRSTA01 Travel Expense Reporting by Period
RPSTA100 Time-Related Statistical Reporting
RPSTA200 Time-Related Statistical Reporting
RPSTA2GR
RQALVF16
RQETBI10 Inspection lot selection
RSDB4007 iSeries: Display Wait Statistics by SAP Instance
RSHOST10 Monitor for OS Collector (ST06)
RSORA003 Statistics of Physical Accesses to Oracle Data Base
RSORA007 Statistics of Data Base Wait Situations
RSORA138 IO Stat for Each User Session (ORA7 V$SESS_10)
Check this 3 FM
GRAPH_2D Calling up the 2D business graphics
GRAPH_2D_MENUE DO NOT USE (use 'GRAPH_2D' and 'GRAPH_BUSG_MENU_SET')
GRAPH_MATRIX_2D Calling up the 2D graphics (user-friendly version) -
Function module / BAPI for FBRA IN 3.1 VERSION?
Hello all,
Could you please suggest Function module / BAPI for FBRA (Reverse and cancel) transaction in 3.1 version.
Thanks,
SubbaPlease check this FM perhaps it may help.
CALL_FB08
REVERSE_CLEARING
RESET_CLEARED_ITEMS_BDC_WRITE.
Regards
Kiran Sure -
Function Module/BAPI for posting of Parked Invoice/Documnet
Dear all,
Please provide me.
Function Module/BAPI for posting of Parked Invoice/Documnet
Regards
RickyHi Ricky,
What about MR_POST_PP_INVOICE?
In my current project, though, we had to develop a function module for this.
Regards,
Eli
Maybe you are looking for
-
PLSQL Web Tool Kit (HTP) disabled in R12 - What are the alternitives
We have developed a fair amount of add-on applications in our e-business suite using the plsql web toolkit (htp). This functionality has been disbaled in R12. My question to Oracle, "What is the work around for using applications we developed in 11i
-
how can i get my facetime to start working again
-
Device Controls in Final Cut Express-how to disable device control??
How do I disable device control on a 3ccd panasonic mini dv camcorder using final cut express. It is very simple on final cut pro, but for some reason I cannot figure it out on final cut express. Do I need to do something with the camera itself first
-
Greek Fonts for TOC Book and Topic Titles
Good Morning. I Create o project using RoboHelp for HTML. I rename TOC book and topic titles using greek fonts. If i generate the project using Webhelp as layout with Section 508 Compliant Output everything is ok at runtime but if i use Skin TOC book
-
Why won't my Wi-Fi stay on my phone
I tried resetting my Wi-Fi settings and still I'm not able to get on Wi-Fi