on 09-16-2014 5:49 PM
Hi all,
I have used ZRSAX_BIW_GET_DATA_SIMPLE_AFRU FM and created a delta on a z field named zerdat as my delta relevant field.
after writing function module if i am extracting for Full i am able to get data
steps of execution in RSA3:
ZDS_AFRU and "F" as input and then execute it is working fine....
then i replicated in BI pulled data
then i created INIT pointer as i can see the same iin RSA7 in ECC side
HERE problem is
ZDS_AFRU and D as input then execute and i am unable to debug it is directly showing 0 records
as there are no records its fine atleast it should take me to debugger screenso that i can figure where i m going wrong
one more thing is
in ranges i kept zerdat in loop for filling L_S_SELECT but when it comes there it is not filling either not entering in to loop
as per my guess after INIT it should go and fill L_S_SELECT structure
can any one help me out in this regard
Thanks and regards
vijay
Hi Vijay,
Can you share you code for the FM yuo have wrote? I can tell what exactly is happening.
For debugging, are you selecting the top right check box for debug? If not then click on that then try to debug.
Also are you able to debug the FULL load?
Have you:
1. Created new data for delta selection before trying to test for delta?
2. Have you set a safety limit for the datasource? If no then I would suggest that you set the lower limit as 1. then try to check the deltas.
Thanks
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
Please find the code...
FUNCTION ZRSAX_BIW_GET_DATA_SIMP_AFRU.
*"----------------------------------------------------------------------
*"*"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_REMOTE_CALL) TYPE SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
*" TABLES
*" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
*" E_T_DATA STRUCTURE ZBW_AFRU_ST OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
*"----------------------------------------------------------------------
* Example: DataSource for table SFLIGHT
TABLES: ZBW_AFRU_ST,AFRU.
* Auxiliary Selection criteria structure
DATA: L_S_SELECT TYPE SRSC_S_SELECT,
INT_AFRU TYPE STANDARD TABLE OF AFRU.
* Maximum number of lines for DB table
STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
* counter
S_COUNTER_DATAPAKID LIKE SY-TABIX,
* cursor
S_CURSOR TYPE CURSOR.
* Select ranges
RANGES: L_R_RUECK FOR AFRU-RUECK,
L_R_ZERDAT FOR ZBW_AFRU_ST-ZERDAT.
* Initialization mode (first call by SAPI) or data transfer mode
* (following calls) ?
IF I_INITFLAG = SBIWA_C_FLAG_ON.
************************************************************************
* Initialization: check input parameters
* buffer input parameters
* prepare data selection
************************************************************************
* Check DataSource validity
CASE I_DSOURCE.
WHEN 'ZBW_ORDCNF_DS'.
WHEN OTHERS.
IF 1 = 2. MESSAGE E009(R3). ENDIF.
* this is a typical log call. Please write every error message like this
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.
* Fill parameter buffer for data extraction calls
S_S_IF-REQUNR = I_REQUNR.
S_S_IF-DSOURCE = I_DSOURCE.
S_S_IF-MAXSIZE = I_MAXSIZE.
* Fill field list table for an optimized select statement
* (in case that there is no 1:1 relation between InfoSource fields
* and database table fields this may be far from beeing trivial)
APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
ELSE. "Initialization mode or data extraction ?
************************************************************************
* Data transfer: First Call OPEN CURSOR + FETCH
* Following Calls FETCH only
************************************************************************
* First data package -> OPEN CURSOR
IF S_COUNTER_DATAPAKID = 0.
* Fill range tables BW will only pass down simple selection criteria
* of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'RUECK'.
MOVE-CORRESPONDING L_S_SELECT TO L_R_RUECK.
APPEND L_R_RUECK.
ENDLOOP.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'ZERDAT'.
MOVE-CORRESPONDING L_S_SELECT TO L_R_ZERDAT.
L_R_ZERDAT-SIGN = 'I'.
L_R_ZERDAT-option = 'GE'.
CLEAR L_R_ZERDAT-high.
APPEND L_R_ZERDAT.
ENDLOOP.
* Determine number of database records to be read per FETCH statement
* from input parameter I_MAXSIZE. If there is a one to one relation
* between DataSource table lines and database entries, this is trivial.
* In other cases, it may be impossible and some estimated value has to
* be determined.(S_S_IF-T_FIELDS)
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT RUECK RMZHL ERSDA LAEDA BUDAT ERZET
FROM AFRU
WHERE
RUECK EQ L_R_RUECK-LOW
AND
(
( LAEDA EQ '00000000' AND BUDAT IN L_R_ZERDAT )
OR
( LAEDA NE '00000000' AND LAEDA IN L_R_ZERDAT )
).
* WHERE RUECK eq '8344861'.
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. "Initialization mode or data extraction ?
ENDFUNCTION.
In the code i have doubt on filling range fields please check and let me know what needs to be done......
Thank you
vijay
Hi Vijay,
A few observations and sugesstions:
1. In your code there is a statement 'WHEN 'ZBW_ORDCNF_DS'.' This should be your datasource name, in your case its 'ZDS_AFRU'. So replace ZBW_ORDCNF_DS with ZDS_AFRU first.
2. Can you try to debug the datasource by putting the debug in RSA3 screen top - Execution Mode as Debug Mode? With this you will reach to the point where your FM will be called and you can then debug the first statement.
3. As you created your datasource in RSO2 - can you send the Generic delta field screenshot? I am interested in the safety limit you have set. Something like below:
4. Next, can you share your RSA7 delta queue screen for your delta after you have initialized it from BW. I am interested in Delta Relevant Field value. Something like below:
5. While testing in FULL mode in RSA3, provide some selection value and then try to debug and see what selection fields are visible in I_T_SELECT.
Please let us know above and then we can proceed further.
Thanks
Amit
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.