Problem with Data selection on UDC field

kalpeshp

Member
Hi friends,

I have problem in my UBE with Data Selection / User Data selection on UDC field.

I want to find records from F4211 where STOP field is having BLANK values.
I have set the User Data selection in my section to fetch the BLANK value record in STOP field.
Some how my UBE is unable to select all the BLANK value record from F4211. It selects very few record with BLANK value in STOP
and so many records are not selcting by UBE.

STOP field is UDC field. I believe that i am not doing any mistake in writing User Data selection. I think this is the problem with UDC field.

It will very helpful for me if any one can help me out to solve this problem.

Thanks,
Kalpesh
 
Kalpesh,

1. Are there any other data selection conditions along with the STOP condition in that section ?

If that is the case, then for the records which are having STOP = blank but not getting selected, some other condition amongst those data selection conditions are not being satisfied.

2. Does your section have a Business View attached ?

If the BSVW is a join between two or more tables, check to see if the records not getting selected are satisfying the join conditions between the tables.

Regards,

Shailesh
 
The User Defined Code field (KY) is a bit of a strange bird. The KY field in the User Defined Codes table (F0005) is a ten-character string. However, if you define your code length as anything less than ten characters, the code will be stored right-justified to the defined length. If you define your code length as ten characters, the code will be stored left-justified. If you define your code length as ten characters and numeric, the code will be stored left-padded with zeroes. Take a look in the Universal Table Brower (UTB) to see what I mean.

Consequently, you need to take this "strange" behavior into account when writing reports and applications.

CAVEAT: This appears to be "standard" behavior. I have never found an exception. Since there are always exceptions, I'm sure someone out there has found one.
 
Hi Kalpesh,

Shailesh and Ray are right.

Make also sure, that there is no "programed" selection in the Init Section event of your main section.

If there isn't programed selecteion and neither of Shailesh's scenario meet with your report, then I have 2 cents for you:

#1:
try the selection the following way
Where BC Stop is equal to <Blank>
OR BC Stop is equal to <Null>
OR BC Stop is equal to " "

maybe the third line is not required, where there are 3 spaces between the qutation marks.

#2:
This depends on your platform, closely on your Database engine.

Suppose, space precede all non-space charcter in the ABC order:

Where BC Stop is less than "lowest non-blank"

"lowest non-blank" value is a legal lowest value in the UDC table or any non-blank, which is lower in ABC order.

Please, let us know your result. Thanks.

Regards,

Zoltán
 
Hi,

Thanks Shailesh, Ray and Zoltan for your response.

I am not using any other Data Selection condition along with STOP in the Init Section.

Report section has attached business view of only table F4211. There is no other table joined in the Business view.

Also I have tried to find STOP record with <NULL> Or <BLANK> Or " " conditions. But it is not working.

I had taken one "STOP" Report variable with Right alignment/ Center alignment / Middle alignment. I had assigned " " value to it and used in User Data selection but it is not working.

Here, if I am modifying STOP code with BLANK value through some other "Interactive application" and running the report with same data selection, then report is selecting only modified row, but it can not select other BLANK STOP records in the same Document No.

Example: Document "507456" has three records in F4211 with Line No 1.000, 2.000 and 3.000. If I am modifying Line No 2.000 with BLANK value through "Interactive Application" and running the report with same user data selection (STOP equal to "BLANK"), then report can select only Line No 2.000, but unable to select Line no. 1.000 and 3.000 in same Document No.

Hope this will make you clear for understanding the situation.

your help would be Appreciated,
Kalpesh.
 
Re: Problem with Data selection on UDC.

Hi,

Thanks Shailesh, Ray and Zoltan for your response.

I am not using any other Data Selection condition along with STOP in the Init Section.

Report section has attached business view of only table F4211. There is no other table joined in the Business view.

Also I have tried to find STOP record with <NULL> Or <BLANK> Or " " conditions. But it is not working.

I had taken one "STOP" Report variable with Right alignment/ Center alignment / Middle alignment. I had assigned " " value to it and used in User Data selection but it is not working.

Here, if I am modifying STOP code with BLANK value through some other "Interactive application" and running the report with same data selection, then report is selecting only modified row, but it can not select other BLANK STOP records in the same Document No.

Example: Document "507456" has three records in F4211 with Line No 1.000, 2.000 and 3.000. If I am modifying Line No 2.000 with BLANK value through "Interactive Application" and running the report with same user data selection (STOP equal to "BLANK"), then report can select only Line No 2.000, but unable to select Line no. 1.000 and 3.000 in same Document No.

Hope this will make you clear for understanding the situation.

Your help would be Appreciated,
Kalpesh.
 
Re: Problem with Data selection on UDC.

Kalpesh,

Copy and paste your ER into a post. I cannot understand your explanation.
 
Re: Problem with Data selection on UDC.

Hi Kalpesh,

Ray is right.
Please, copy / paste or attach something about STOP field values in the effected records. Thanks.

Regards,

Zoltán
 
Re: Problem with Data selection on UDC.

Kalpesh,

Firstly, this has nothing to do with the UDC lookup, as this is only done at scrub and edit time, not on data selection. The interesting thing here is that you say that when you amend a record using an interactive application and set SDSTOP = ' ' then your data selection picks up the record. This says to me that on the other records, although they look like they have a blank in them, they do not. Were these orders created via P4210?

You don't specify what database you are using but there are two things you could try to see what's in this field: -

1) Use your database tools to look at what's in SDSTOP for order 507456 line 1.00

2) Use table IO in your UBE to retrieve line 1 and retrive the SDSTOP value and check it there. (using the debug tool)


Hope this helps

Pete Clark
CNC/Developer
Various releases and platforms
 
Re: Problem with Data selection on UDC.

Kalpesh,

I believe that Pete Clark is on the right track. Some records/rows could actually have a blank - the ones you are retrieving, but the others could be null and therefore would not be returned. Try changing your data selection to retrieve records/rows that are equal to BLANK *OR* equal to NULL.
 
Back
Top