on 07-20-2011 7:18 AM
Dear Experts
i have written a field route but values are not Transferring to The ODS. please check below code and let me know where the mistake is.
if SOURCE_FIELDS-KNART eq 'ZVAO' and SOURCE_FIELDS-KNVAL ne 0.
RESULT = SOURCE_FIELDS-KNVAL.
endif.
regards
B.Virupasan
Edited by: Lankem-IT on Jul 20, 2011 8:22 AM
hi Gandewar,rookie,Ashish
thanks
i changed the Code as you Suggested and did the "Rules test" also but still values are not updating.
Rules Details Aggregation is "Overwrite" is it correct? b'cos i have loading two datasource (2LIS_13_VDITM and 2LIS_13_VDKON) into one DSO.
regards
viru
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is nothing wrong in selecting "overwrite" but as per your routine, your field will contain value only for those records where KNART is 'ZVAO' and KNVAL ne 0. for other records it would be zero, so there is a possibility that the value record is being overwritten by zero records....
I guess biling doc no and item no is the key in your DSO.
say for ex if you have two records coming from source
BILL_DOCNO ITEMNO KNART KNVAL
1001 10 ZVAO 5
1001 10 ZZZZ 0
After transformation you will have values populated for the zfield in New table...
BILL_DOCNO ITEMNO KNART KNVAL ZFIELD
1001 10 ZVAO 5 5
1001 10 ZZZZ 0 0
And when you activate the request, the second record will overwrite the first record and you will get only zero....
Just check in the New table before activating the request in DSO and see if you have values populated for this routine field...
And if you dont want this to be overwritten, then set the Aggregation type to "summation".
--- Thanks...
Hi Guys
Thanks for your
As you all suggested I have cleared the DSO and tried to load only the Condition Data source to the DSO first still VAT field is blank in DSO so problem is not due to Overwriting.
And also I checked the DSO tableu2019s before activation there also VAT in Blank.
Is there any other things I need to check?
Regards
B.Virupasan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Durgesh.
as you Suggested i debug the Transformation but in that Result fild is getting populated with the correct value but it is not Updating the DSO.
is there any other setting i need to check.
Regards
B.virupasan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Virupasan,
Code looks fine except for the change suggested in above posts.
Do the following and you shall easily solve it.
1. Check the source for KNART eq 'ZVAO' and KNVAL ne 0.
Take sample data.
2. Try loading only the sample data thru' DTP restrictions. Debug and see how the code performs.
Hope this helps.
Regards,
Guru
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It looks like there is no error in the code, I guess there is no proper data which will fulfill your condition, just debug your code and make sure.
And just one modification in code suggested by Ashish,
you can write,
if SOURCE_FIELDS-KNART eq 'ZVAO' and SOURCE_FIELDS-KNVAL is not initial.
Just to increase the readability.
Regards,
Durgesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The code looks fine... check the values coming from the source.... check if you have 'ZVAO' value for KNART field and non zero values for KNVAL field....
To test the code, goto the transformation and then rule details of the particular infoobject and then at the bottom of the screen you can see Test Rule button.
Select it and you will be prompted to enter values for KNART and KNVAL, give ZVAO and 5.... if the result is 5, then there is nothing wrong with the code.... may be you dont have these combination of records coming from source...
--- Thanks...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Routine looks almost fine,
but can you please modify it to
if SOURCE_FIELDS-KNART eq 'ZVAO' and not SOURCE_FIELDS-KNVAL is initial.
RESULT = SOURCE_FIELDS-KNVAL.
endif.
and then pls let me know.
regards,
Ashish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.