on 02-19-2015 5:32 AM
Hi Experts,
I am stuck in an issue. The issue goes like this;
In a cube there are two fields notification number which is unique and function location.
In a start routine we are fetching some fields from two DSOs dso1 and dso2 . functional location is present in both and we are fetching from both DSOs against notification numbers.
In characteristic routine of info-object functional location
the code is like this;
if count =1
result = wa1-functional_loc
elseif count =2
result =wa2_functional location
else
result= ' '.
where wa1 and wa2 are defined work area of dso1 and dso2 respectively.
In one DSO 1 the data is like this:
Notification number Functional location
1 ABC
2 DEF
DSO 2
Notification number Functional location
3 #
4 #
The problem which comes oftenly is:
In infocube:
Notification Number Functional location
1 ABC
1 #
I am not able to under stand it. Why is this issue occuring for some of the notification numbers???
Hope I am clear.
Regards,
Smriti
Hi Akanksha,
yes, you are right.
But This code is already written in production. This is a support issue.
They are using Count type Int to fill functional location.
they have used Count to check from two different DSOs.
As both DSOs contains different notification numbers.
One more thing to add up:
DSO1 has notification numbers and their corresponding functional location values.
but DSO2 has notification numbers and #(null) function location values.
Both DSOs have different notification numbers.
Regards,
Smriti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then this error might only occur if by chance we have same notification numbers in both the DSOs at any given time or different times.
On the safer side we can have logic like this:
if count = 2 (i.e. DSO2)
fill functional location as constant.(= '#')
This will simplify the code as well as improve performance as you don't have to look up in DSO2 for # values
You can suggest this as a CR.
If this solution is not accepted, then you can add a check in end routine to remove duplicate entries from result package for notification numbers where count = 1 such that functional loc= '#'
Regards,
Akanksha
Hi all,
Thanks for your response.
I debugged the code using notification number and data is coming correctly i.e for count= 1 it is fetching
right value from DSO1. This problem occurs some times.Now the data is correct.
In the start routine code there are two Select statements.
One select statement- fetching data from DSO1 for all entries in Source-package.
and the same with other select statement from DSO2.
Workarea wa1 and wa2 are defined globally but not getting cleared anywwhere.
Actually work area is used in characteristic routine to fill Result.
like if count=1.
result=wa_functional_loc as mentioned above.
In the charactersitic routine of functional location.
the "count" logic is written as mentioned above in the post.
Count is defined as Integer type.
Regards,
Smriti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Smriti,
1 doubt: why you have defined count if you can fill functional location by notification number.
Here instead of count the field routine should be-
if /bic/pnotification_number = 1 &2
functional location= wa1-functional location
else if /bic/pnotification_number=3&4,
functional location=wa2-functional location
else
functional location=' '
how are you filling "count"?
how are you filling/clearing your work areas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Smriti,
Please give more details of the start routine and field routine. Seems like it is a code issue.
Thanks,
Akanksha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Smriti,
Seems to be start routine not handling delta data properly or may be adding additional record with blank value. Debug the start routine code withsome example data, you can easily trace what is happeing inside the code.
Thanks,
Vengal.
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.