on 10-23-2014 6:21 PM
Hi friends,
I need to write routine at DTP level to filter records based on field of other Dso2,
for example
DSO1 to CUBE there is transformation between Material, now in target Cube i need to load those materials which are in Dso2 and the materials in Dso2 should be in Dso1.
Thanks in advance,
ramesh.
Hi Ramesh, check this below.
Regards.
DATA : t_materiales TYPE TABLE OF TY_MAT,
w_materiales TYPE TY_MAT,
SELECT material
INTO TABLE t_materiales
FROM /bic/odsmateriales
WHERE matl_type EQ 'FERT'
LOOP AT t_materiales INTO w_materiales.
l_t_range-iobjnm = 'MATERIAL'.
l_t_range-fieldname = 'MATERIAL'.
l_t_range-sign = 'I'.
l_t_range-option = 'EQ'.
l_t_range-low = w_materiales-mat
modify l_t_range index sy-tabix.
ENDLOOP.
*....
p_subrc = 0.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramesh,
If you need valid your data into your cube, need add a start routine. If your material not found in your ods then you can del record. I hope helps.
LOOP SOURCE_PACKAGE ASSIGNING <SOURCE_FIELDS>.
l_tabix = sy-tabix.
READ TABLE t_odsmaterial INTO w_odsmaterial WITH KEY material = <SOURCE_FIELDS>-material.
IF SY-SUBRC NE 0.
DELETE SOURCE_PACKAGE INDEX l_tabix.
ENDIF.
ENDLOOP.
Thanks for your reply,
in my source i have huge amount of materials if i write start routine it may have performance issues,
for the dso2 i have less no of records, Does the routine in DTP Filter level helps in avoiding performancce issues? or both are the same?
Also, could you please explain in details about the routine at DTP level which you written.. i didn't get wht is TY_MAT in declaration,. what is the reference for this!
Hi Ramesh,
DTP routine applies a filter for material, obtains the values of your ods.
As your comments is better apply filter in your dtp routine.
TY_MAT is a structure. Something like this.
TYPES: BEGIN OF TY_MAT
MAT TYPE /BI0/OIMATERIAL,
END OF TY_MAT.
Basically you create a select option for a filter, using Option, Sign, Low.
I hope helps. Regards.
Hi Francisco ,
the sample code for start routine u have given is working fine for me but for performance sake i need to write the routine at dtp level to filter data for material.
Can u tell me how to write the routine to filter data in dtp level, can u give me sample code.
below is the code i have written in start routine, if i want to implement this logic in dtp level how to write the code.
please help me with this issue.
DATA: L_TABIX TYPE SY-TABIX,
ITAB TYPE STANDARD TABLE OF /BI0/A****00,
ISTRUC LIKE LINE OF ITAB.
Select * from /BI0/A*****00 Into Table ITAB
FOR ALL ENTRIES IN SOURCE_PACKAGE
WHERE material = SOURCE_PACKAGE-material.
LOOP AT SOURCE_PACKAGE ASSIGNING <SOURCE_FIELDS>.
L_TABIX = SY-TABIX.
READ TABLE ITAB INTO ISTRUC WITH KEY material =
<SOURCE_FIELDS>-material.
IF SY-SUBRC NE 0.
Delete SOURCE_PACKAGE INDEX L_TABIX .
ENDIF.
ENDLOOP.
Regards,
Ramesh.
Hi Ramesh, no problem check this below.
DATA: L_TABIX TYPE SY-TABIX,
ITAB TYPE STANDARD TABLE OF /BI0/A****00,
ISTRUC LIKE LINE OF ITAB.
Select *
from /BI0/A*****00 Into Table ITAB
LOOP AT ITAB INTO w_ITAB.
l_t_range-iobjnm = 'MATERIAL'.
l_t_range-fieldname = 'MATERIAL'.
l_t_range-sign = 'I'.
l_t_range-option = 'EQ'.
l_t_range-low = w_ITAB-MATERIAL
modify l_t_range index sy-tabix.
ENDLOOP.
*....
p_subrc = 0.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.