on 04-28-2009 8:35 AM
Hi Experts
1. I am in need of code to exclude the records for a particular value of the fields AUART and VBUND
For records with the following criteria should be EXCLUDED
Sales Order Type (AUART): ZCP
Trading partner (VBUND): 1261
I know that we can write the code at start routine of the transformations but what to write in
the start routine of transformations
2. I have an extractor bringing data from ECC to info cube with alternative unit of measure
Now I need to undo these conversions in the current extractor and bring in these values from a
Custom Z table from ECC using generic extractor
And I am doubted in how to undo these conversions from the current extractor to the cube
Please help me
Thank you
Hi
For your first query, please write the below code in the start routine of the transformation :
DELETE SOURCE_PACKAGE WHERE AUART = ZCP OR VBUND = 1261.
Can you please brief about your second query?
Hope it helps.
Regards
Sadeesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All/Sadeesh
Thank you for your quick response
I need to write routine at info package level to exclude the records where
Sales order type (AUART) = u2018ZCPu2019 AND Trading partner (VBUND) = u20181261u2019
My requirement is to write at info package level only
How can I achieve this? Please provide the sample code
Thank you
Hi,
Use the following code.
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = 'AUART'.
l_idx = sy-tabix.
l_t_range-low = 'ZCP'.
l_t_range-high = 'ZCP'.
l_t_range-sign = 'E'.
l_t_range-option = 'EQ'.
modify l_t_range index l_idx.
p_subrc = 0.
And same code will be for the other field.
Just change AUART with VBUND and ZCP with 1261.
Regards,
Mansi
Hi Mansi
Thanks for code given
small clarificatication as i dont know ABAP
will this code for the two fields deletes the records with the criteria
AUART = 'ZCP' AND VBUND = '1261'
and in the data selection tab at which fields selection (AUART or VBUND) I need to include this code or
AUART code at AUART field and
VBUND code at VBUND field
Thank you
Hi Shanti Bhaskar
Thank you for clarification
So this code exclude the records which meets the following criteria
AUART = ZCP AND VBUND = 1261
as my requirement is to exclude the records which meets above criteria
and please give me clarification on at which fields selection to insert this code for both the fields
thank you
Plese help me
This code in infopackage excluding all the records where auart = ZCP
and also the records Vbund = 1261
but not according to the specific selection as auart = ZCP and Vbund = 1261
please help me on this
awaiting response
thank you
Edited by: MSS:-) on May 5, 2009 8:16 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I believe you cannot implement your scenario in infopackage. if you want to exclude records based on the selection as auart = ZCP and Vbund = 1261 then you have to do it at the transformation level.
1. Plz extract all the data to the PSA from source.
2. In the transformation write start routine to delete records where auart = ZCP and Vbund = 1261.
3. Code : DELETE SOURCE_PACKAGE WHERE AUART = ZCP AND VBUND = 1261.
Hope it helps.
Regards
Sadeesh
Hi Sadeesh
Can you please explain where to place this code in the transformations start routine
and give me the exact code to be placed as i dont know ABAP
I have 632 records in source and full load to PSA gave 725 records in to PSA how is it possible
and the no of records that meets Auart = ZCP and vbund = 1261 are 96 in the source
what is happening in the back ground whilw loding
can you plase clarify this to me
thank you
Hi
1. Open the transformation and click on start routine
2. The ABAP editor screen appears and you can find this part in the abap editor of start routine "$$ begin of routine - insert your code only below this line -
... "insert your code here"
3. Please delete the line "insert your code here" completely and paste the code which i gave you.
4. Check for syntax errors and activate the transformation.
5. Also activate the DTP.
Also please dont not put the code below "begin of global or 2nd part of global".
Plz lemme how many records you have in rsa3 without any selection. The infopackage will just fetch the records from the source and it will not do any transformation.
Hope it helps.
Hi Sadeesh
Thank you
sorry for the values mentioned in the previous post
In RSA3 with out any selection i have 725 records in the ztable
through infopackage i got 725 records to the PSA
and 96 records are matching the criteria auart= zcp and vbund= 1261
I placed the code in the start routine of the transformations and activated the transformations
now after the DTP executed i have only 186 records in the cube instead of 629 (725-96)
why it is happening
thank you
Hi
The reason why we are not able to achieve the same in the infopackage is that there is no provision to write the routine for the combination of fields.(In your case Auart and vband)
You can only write routine to exclude records for fields separately not for the combination. But you can achieve it in start routine because the source_package internal table contains the all the records.
Hope it
Hi,
Try the below code
DATA : wa TYPE data_package_structure.
if /bic/AUART = ZCP.
Delete Data package from wa.
endif.
if /bic/VBUND = 1261.
Delete Data package from wa.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.