Data Selection for Interactive Application

Sachinkl

Member
Hi,

I have written the following code in the find button of a find browse form.

Set Selection Append Flag(FC Grid, <Yes>)
Set Selection(FC Grid, F4211, LNTY, <Equal To>, PO szLineType1_LNTY, <And>)
Set Selection(FC Grid, F4211, LNTY, <Equal To>, PO szLineType2_LNTY, <Or>)

There is a Form Control for Order Number. When I give a specific Order Number and hit find, this order number is getting appended to just the first line type. When I looked at the debuglog it's behaving the following way

(Order Number and PO Line Type1) or (PO Line Type2) but it should behave (Order Number) and (PO Line Type1 or PO Line Type2).

Is there anything that I am missing here.

I know a work around for this, to include all the FC values in the select statement, but there are 10 Line types coming from the PO and 10 FC values which will make 500 lines of code in find button.

I can do this way too but I just want to make sure why the FC values are not getting appended properly to the Selection that is given in the find button.

Filter option's for the Order Number are also checked properly.

Thanks,
Sachin.
 
Please try with the following Code ,


Set Selection Append Flag(FC Grid, <Yes>)
Set Selection(FC Grid, F4211, LNTY, <Equal To>, PO szLineType1_LNTY, <And>)
Set Selection(FC Grid, F4211, LNTY, <Equal To>, PO szLineType2_LNTY, <And>)

* Second "And" Gives the relation between first condition and second Condition

* First "And" Gives the Relation between external dataselection and internal dataselection
 
What if you were to do the following:

Remove the filter for Order Number.....

Set Selection Append Flag(FC Grid, <Yes>)
If PO szLineType1_LNTY is greater than <Blank> then
Set Selection(FC Grid, F4211, DOCO, <Equal To>, FC OrderNumber, <Or>)
Set Selection(FC Grid, F4211, LNTY, <Equal To>, PO szLineType1_LNTY, <And>)
End If
If PO szLineType2_LNTY is greater than <Blank> then
Set Selection(FC Grid, F4211, DOCO, <Equal To>, FC OrderNumber, <Or>)
Set Selection(FC Grid, F4211, LNTY, <Equal To>, PO szLineType2_LNTY, <And>)
End If
etc....


Might work.....

Ben Again,
 
Hi Sachin,

I hope the code wriiten by Britain will work.We have to include all FC values(Which is having filter) in the set user selection coz if we write set user selection in find button it will override the standard filter functionality(Filter of FC).

Regards,
Azad.
 
Ben,

I can use the above logic also but as I stated earlier there 10 line types , one status code and another billing code coming from PO along with 10 FC values simillar to order number and the code becomes so huge.

The same logic works in Batch Application and it doesn't work in Interactive app. Before writing the above code I just want to make sure that I am doing it the right way.

Thanks,
Sachin
 
Hi,
Use Set Selection Group instead of set selection. It should work.

Set Selection Append Flag(FC Grid, <Yes>)
Set Selection Group(FC Grid, F4211, LNTY, <Equal To>, PO szLineType1_LNTY, <And>)
Set Selection Group(FC Grid, F4211, LNTY, <Equal To>, PO szLineType2_LNTY, <Or>)
 
Back
Top