Filter logic in ALV
Hi all,
I am using the Function module "LT_DBDATA_READ_FROM_LTDX" . by using this I am creating the dynamic sort.
any body help me in this.
regards,
Aj
Sorry, I didnt get your issue clearly.
Do you mean that you would like to download the ALV report to Excel and Filter should be applied in EXCEL sheets? If so could you please let me know what Function module you are using to download to Excel?
Regards,
Lijo Joseph
Similar Messages
-
FILTER logic getting jumbled when GENERATED...
Environment:
OWB10g Client on Windows XP Professional
Repository - 9.2.0.4 on UNIX (AIX 5.2)
Target - 9.2.0.4 on UNIX (AIX 5.2)
I have a FILTER operator with the following in it:
( INOUTGRP1.ORDER_TYPE_PDDCTO = 'RX' And trunc ( INOUTGRP1.TRANSACTION_DT_PDTRDJ ) = trunc ( sysdate ) And trunc ( INOUTGRP1.FP_NEED_DT ) <= trunc ( INOUTGRP1.REQUEST_DT_PDDRQJ ) ) Or ( INOUTGRP1.LINE_TYPE_PDLNTY IN ( 'S','DM' ) And INOUTGRP1.STOCKING_TYPE_IBSTKT = 'P' And INOUTGRP1.UNITS_OPEN_PDUOPN > 0 And INOUTGRP1.ORDER_TYPE_PDDCTO = 'O3' And trunc ( INOUTGRP1.SCHED_PICK_DT_PDPDDJ ) < trunc ( sysdate ) )
It is an 'OR' between two separate sets of logic.
When the mapping is Generated the above code comes out like this:
WHERE -- ( = )
AND
-- ( = )
AND
-- -- -- -- -- -- -- -- -- ( ( = 'RX' And trunc ( ) = trunc ( sysdate ) And trunc ( ) <= trunc ( ) ) Or ( IN ( 'S' , 'DM' ) And = 'P' And > 0 And = 'O3' And trunc ( ) < trunc ( sysdate ) ) )
Can someone please tell me where in the %#^#* OWB is getting the above logic to translate my FILTER into the above gibberish?
This produces a 'PL/SQL: ORA-00936: missing expression' error on that line when I try to deploy it.
Also, on a related note that I saw a thread on earlier but can't find now, how do I get the FILTER operator to retain my CR/LF in the expanded expression of the filter?
The tag at the bottom of the expression window, where it shows the Line and Column numbers, shows WINDOWS:CR/LF which I thought I had read would retain the CR/LF's I put in the expression to make it easier to read rather than having to scroll to the right 27 miles.
Deep breath.
Deep breath.
Deep breath.
Ommmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm.
Ommmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm.
I'm OK now.
Any help is greatly appreciated. ;-)>
GaryGood morning Gary,
I remember we had the CR/LF discussion earlier, maybe it's 10g that wrecks it, got 9.2.0.4 here which works flawlessly in that sense.
Got 10g on my laptop (of course not with me right now) but basically the only thing that bugs me there is some nasty behaviour of not showing the entire 'picture' of a mapping any more after there have been some popups (like context or property menu) in the front.
Tip: if you want to show code in a thread use [ code] and /code] to mark it (in lowercase, without the space after the [, otherwise it would not show), e.g.:[code]
( INOUTGRP1.ORDER_TYPE_PDDCTO = 'RX' And trunc ( INOUTGRP1.TRANSACTION_DT_PDTRDJ ) = trunc ( sysdate ) And trunc ( INOUTGRP1.FP_NEED_DT ) <= trunc ( INOUTGRP1.REQUEST_DT_PDDRQJ ) ) Or ( INOUTGRP1.LINE_TYPE_PDLNTY IN ( 'S','DM' ) And INOUTGRP1.STOCKING_TYPE_IBSTKT = 'P' And INOUTGRP1.UNITS_OPEN_PDUOPN > 0 And INOUTGRP1.ORDER_TYPE_PDDCTO = 'O3' And trunc ( INOUTGRP1.SCHED_PICK_DT_PDPDDJ ) < trunc ( sysdate ) )
I was about to ask you what happens if you apply this code without any CR/LF in it, but I guess you've tried that?
Could be the OR is the culprit here. As a workaround maybe you want to try out some Boolean algebra to get rid of the OR. If memory serves me well:
(A.B)+(C.D) equals
NOT(NOT((A.B)+(C.D))) equals
NOT(NOT(A.B).NOT(C.D))
hence NOT(
NOT( INOUTGRP1.ORDER_TYPE_PDDCTO = 'RX'
AND TRUNC ( INOUTGRP1.TRANSACTION_DT_PDTRDJ ) = TRUNC ( SYSDATE )
AND TRUNC ( INOUTGRP1.FP_NEED_DT ) <= TRUNC ( INOUTGRP1.REQUEST_DT_PDDRQJ )
AND
NOT( INOUTGRP1.LINE_TYPE_PDLNTY IN ( 'S','DM' )
AND INOUTGRP1.STOCKING_TYPE_IBSTKT = 'P'
AND INOUTGRP1.UNITS_OPEN_PDUOPN > 0
AND INOUTGRP1.ORDER_TYPE_PDDCTO = 'O3'
AND TRUNC ( INOUTGRP1.SCHED_PICK_DT_PDPDDJ ) < TRUNC ( SYSDATE )
)An other option would be to use an expression operator to build a status 'column', and in this expression you build the filter logic with a case statement. Next, in the filter you use the status input to filter records.
Hopefully one of Oracle's own OWB-guys will be looking at this forum soon (if I use JP Dijcks as benchmark, they haven't since 28th of January) and give an answer on whether your noticed behaviour is a bug.
Good luck, Patrick -
PQ Salesforce objects filter logic
Hi everyone!
Is it possible to create filter logic in power query, similar to filter logic in salesforce reporting, when using the salesforce object connector?
My organization has over 60k accounts and I would only like to pull a subset of those projects. I typically do this in the salesforce report but the salesreport connector has a limit of 2,000 rows.
Thanks in advance for your help!Hi Curt, I think the custom filtering on salesforce table/reports are important. We are using the PQ to extract the data from salesforce on the daily bases and it is painful to load large account / tasks tables. What we need is to filter on the SystemModstamp
(or any other time-stamp) field to bring only last 3 days changed data. -
Filter criteria in ALV report not working
Hi,
In ALV report , when i click on filter button , it does not filter the report according to the filtered criteria. this happens in the cases where the selection criteria is a lengthy field. when i debug after the filter criteria it goes into standard function.
i am using REUSE_ALV_GRID_DISPLAY
is there any way in which i can correct this?
thanks,
Amit
nullchk this useful thread
Re: ALV problem (with filter use) -
I am displaying the table in ALV Grid format. I have 4 fields in the table. The filter works for the first 3 fields, but doesnot work for the last field.
Please let me know what might be the issue.
Find the table declaration and the table population as in the below code
TYPES : BEGIN OF ty_message,
avm_nr TYPE avm_nr,
motiv TYPE motiv_nr,
text TYPE t100-text,
msg TYPE merep_orderstat,
END OF ty_message.
DATA: gt_message TYPE STANDARD TABLE OF ty_message,
gs_message TYPE ty_message.
gs_message-avm_nr = gs_upload-avm_nr.
gs_message-motiv = gs_upload-motiv.
gs_message-text = 'Order Successfully Changed'.
gs_message-msg = 'Success'.
APPEND gs_message TO gt_message.
CLEAR gs_message.
Regards,
SalilSince the field MSG refer to MEREP_ORDERSTAT which is CHAR10, it will convert the content to UpperCase.
So, try like:
gs_message-avm_nr = gs_upload-avm_nr.
gs_message-motiv = gs_upload-motiv.
gs_message-text = 'Order Successfully Changed'.
gs_message-msg = 'SUCCESS'.
APPEND gs_message TO gt_message.
CLEAR gs_message.
Regards,
Naimesh Patel -
Hi
I Generate a ALV report . Now I am Selecting one column of the report and setting filter condition , the report is getting filtered . but the problem is when i select another column along with previous selected column , Filter Condition is getting correct .
My CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
CALLBACK_PROGRAM 'ZPP_RAK_WORKCENTER' IT_FIELDCAT = I_FIELDCAT[]
IS_LAYOUT = A_LAYOUT
I_SAVE = 'A'
I_DEFAULT = 'X'
TABLES
T_OUTTAB = ITAB_DISPLAY.
X_FIELDCAT-COL_POS = 1.
X_FIELDCAT-FIELDNAME = 'BUDAT'.
X_FIELDCAT-OUTPUTLEN = 8.
X_FIELDCAT-SELTEXT_M = 'Posting Date'.
X_FIELDCAT-TABNAME = ITAB_DISPLAY.
APPEND X_FIELDCAT TO I_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-COL_POS = 2.
X_FIELDCAT-FIELDNAME = 'SHFT_NUM'.
X_FIELDCAT-OUTPUTLEN = 1.
X_FIELDCAT-SELTEXT_M = 'Shift'.
X_FIELDCAT-TABNAME = ITAB_DISPLAY.
APPEND X_FIELDCAT TO I_FIELDCAT.
CLEAR X_FIELDCAT.
Edited by: anand kumar on Nov 3, 2008 8:19 AMHi,
Your fields catalogues are ok. Check your function module. Call it again and assign parameters. It has to work with more than one field filter also.
Regards,
Dhanunjaya Reddy -
Hi All,
Hope you all are doing fine!!
Am displaying an alv output list for about 15fields among which VBELN ( sales document ) is one of the fields...,am able to filter all the fields in the output except for VBELN field ,,,, i really dont understand wats happening the filter is working for all the fields except sales document field(VBELN)..?
Wud be greatful for any kind of fix for this problem!
Thanks
JohnHi Raymond,
Im pasting the code wherever am using VBELN in the program...ok
TYPES: BEGIN OF ty_data,
rufnm TYPE char30, "sales resp
aubel TYPE vbeln_va, "sales doc
vbeln TYPE char10, "doc doc bstkd TYPE bstkd, "po
bstdk TYPE bstdk, "po item
erdat TYPE erdat, "created on
name1 TYPE name1_gp, "customer
posnr_r TYPE posnr_vf, "billing item
prctr TYPE prctr, "profit center
netwr TYPE netwr, "net value
augdt TYPE datum, "payment date
terdt TYPE dzfbdt, "base line date
net_val TYPE netwr_fp, "net val
profit TYPE netwr_fp, "profit
END OF ty_data.
PERFORM build_fieldcat USING:
'KUNRG' 'IT_DATA' 30 text-019 CHANGING it_fieldcat,
'VKORG' 'IT_DATA' 30 text-001 CHANGING it_fieldcat,
'VKBUR' 'IT_DATA' 30 text-020 CHANGING it_fieldcat,
'SPART' 'IT_DATA' 30 text-021 CHANGING it_fieldcat,
'VTWEG' 'IT_DATA' 30 text-022 CHANGING it_fieldcat,
'AUBEL' 'IT_DATA' 30 text-023 CHANGING it_fieldcat,
'POSNR_A' 'IT_DATA' 30 text-024 CHANGING it_fieldcat,
'VBELN' 'IT_DATA' 30 text-003 CHANGING it_fieldcat,
'BSTKD' 'IT_DATA' 30 text-025 CHANGING it_fieldcat,
'BSTDK' 'IT_DATA' 30 text-026 CHANGING it_fieldcat,
'ERDAT' 'IT_DATA' 30 text-011 CHANGING it_fieldcat,
'NAME1' 'IT_DATA' 30 text-004 CHANGING it_fieldcat,
'AUGDT' 'IT_DATA' 30 text-012 CHANGING it_fieldcat.
FORM build_fieldcat USING
lw_fieldname TYPE slis_fieldcat_alv-fieldname
lw_tabname TYPE slis_fieldcat_alv-tabname
lw_outputlen TYPE slis_fieldcat_alv-outputlen
lw_seltext_l TYPE slis_fieldcat_alv-seltext_l
CHANGING lit_fieldcat TYPE slis_t_fieldcat_alv.
DATA: lwa_fieldcat TYPE slis_fieldcat_alv. "Field string
lwa_fieldcat-fieldname = lw_fieldname.
lwa_fieldcat-tabname = lw_tabname.
lwa_fieldcat-outputlen = lw_outputlen.
lwa_fieldcat-seltext_l = lw_seltext_l.
APPEND lwa_fieldcat TO lit_fieldcat.
CLEAR: lwa_fieldcat.
ENDFORM. " build_fieldcat
Thanks
John -
WDA: Hide filter - function on ALV
Hi @ all,
does anybody know how to hide filter in ALV - Grid in WebDynpro for Abap?
The Class where you can set alv-settings doesn`t have Method to hide filter on ALV.
Have anybody an idea?
[ Class: IF_SALV_WD_TABLE_SETTINGS ]
Best regards,
DennisHi ,
when u get the model of the alv
in that there is a method
IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_FILTERLINE_ALLOWED .....of the class CL_SALV_WD_CONFIG_TABLE
Regards,
Yash -
HI all,
I am saving the layout with filter. My requirement is when we run the report , the excel should come as per filter in the layout. Before comeing to 'reuse_alv_grid_disaply', my excel sheet is coming to my inbox. . Filter is woking in report output, but it is not happening in excel sheet because ALV filter technique was not before we downlaod the excel sheet . if you undersatnd the requiremt please help me in this.
regards,
AjHi gurus,
I am using the function module LT_DBDATA_READ_FROM_LTDX for filedcat and filter .
This FM is captuing the filter fileds and data in filter_table. depending on this i need to delete data from <b>it_final_data</b>. But i want to do this dynamic , Every time the filter fiedls are chaging depending on the layout. Before this I am saving the layout with filter. please help me in this.
regards,
Aj -
"Control + F5" standard filter functionality for ALV Grids
Hi all,
After an ALV Grid is displayed on screen there is a standard functionality to filter a selected column.
You can select a column (click on the head) of the ALV, then "Control + F5" and a pop-up appears to insert a value or a range by which the filtration is going to be done.
But a I have problem with a concrete field. It doesn`t seem different on comparison with other fields (CHAR30), but I don`t know why it doesn`t work correctly as others.
Have you had any situation like this ??
Thanks & sorry for my bad english,
RubèHi Frank,
When you are entering 89012 and pressing enter the additional zeros are adding up because of the data type of VBELN We have standard conversion routine attached with this .So when ever u wrtie any text that routine will works.
Can you please check what data type are you using in the internal table that you are binding to the node?
Thanks and Regards,
NSingh
Edited by: Nsingh on Feb 17, 2012 4:52 AM -
Sun idm LDAP Search Filter, logical operations.
Hi
Can any body please give me the solution on LDAP Search Filter
I need to get all the users from a LDAP
Whose attribute1 contains any of the values like (abc, bbc)
OR
Whose attribute2 contains any of the values like (xyz, yxz)we got the solution
(|(|(attr1=abc)(attr1=bbc))(|(attr2=xyz)(attr2=yxz)))
finally this worked. -
How to use AT END OF logic in ALV reports?
Hi Experts!!
I have a requirement which is given below and the same should be the output of an alv report. I have all the data in one itab which has ields as matnr, sl.no, name and place. And I have the itab values as
MATNR SL.NO NAME PLACE
134 1 ABCD INDIA
134 2 XYZ US
134 3 QWERT GERMANY
256 4 FDGHS CNTRY1
256 5 GVHB CNTRY2
256 6 GHI CNTRY3
256 7 YGJN CNTRY4
256 8 ESEGVU CNTRY5
Now I need the alv output as the below:
Sl.No. Name Place
MATNR: 134
1 ABCD INDIA
2 XYZ US
3 QWERT GERMANY
MATNR: 256
5 FDGHS CNTRY1
6 GVHB CNTRY2
7 GHI CNTRY3
8 YGJN CNTRY4
9 ESEGVU CNTRY5
In normal classic report, I can achieve this by using AT END OF MATNR, and then printing. But how can i achieve the same in ALV report?
Kindly suggest me the normal ALV method, istead of OOPS concepts. I don't ant to consider OOPS, if this is possible by normal ALVs.
Thanks a lot in advance.
Regards,
SeenuHi,
Try this:
data: h_alv_sorttab type slis_t_sortinfo_alv.
h_alv_sorttab-fieldname = 'matnr'.
h_alv_sorttab-tabname = 'it_data'.
h_alv_sorttab-up = 'x'.
h_alv_sorttab-subtot = 'x'.
append h_alv_sorttab.
call function 'reuse_alv_grid_display'
exporting
i_background_id = 'alv_background'
i_callback_program = g_repid
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
it_sort = h_alv_sorttab
i_save = g_save
is_variant = g_variant
it_events = gt_events[]
i_default = 'x'
tables
t_outtab = it_data.
Hope this information is help to you.
Regards,
José -
Regarding Filter Option in ALV LIST
Hi,
I am using LIst to display the report output.
The filter is not allowing me to perform the function.
The filter Criteria is giving out dump saying An ASSIGN statement in the program "SAPLSDH4" contained a field symbol with
length 0. This is not possible.
Please help me to resolve this.
Thanks & Regards,
Priyanka.Hi,
Don't pass total property to fieldcatalog..
Regards,
Kumar -
Smart Album & search filter logic
Has anybody found a way to do more sophisticated Smart Album creation or search filters within Aperture other than the very simplistic methodology we appear to be limited to of for example keyword search with only two choices of "containing one or more", or "contains all"? I have tried hard to find a better way and am concluding it is a limitation in the current release.
I'm thinking hear of some of the multiple criteria smart folder/album/search options that even an relatively modest product like iPhoto offers, for example keyword "contains xxx", "does not contain yyy", "begins with aaa" etc.
Thanks
Dave
G5 Dual 2.3Ghz, 6Mb RAM, NV6800 Ultra Mac OS X (10.4.4)Has anybody found a way to do more sophisticated
Smart Album creation or search filters within
Aperture other than the very simplistic methodology
we appear to be limited to of for example keyword
search with only two choices of "containing one or
more", or "contains all"? I have tried hard to find
a better way and am concluding it is a limitation in
the current release.
Yes - what you do is add a new "CUstom Metadata" criteria (I forget the exact name but it's something like that). You then change the dropdown for the metadata type to "IPTC"...
You can then use keywords in searches with much more complex logic around them, like the "contains" and "begins with" you are looking for. It does not fill in keywords for you but it offers a lot more options for criteria. -
Filter logic for delivery output.
Hi,
When we try to display the delivery outputs generated for a delivery header from VA02 Tcode, sometimes the list of outputs displayed there is not the same as that found in table NAST. The number of records displayed in the Tcode is sometimes less than that in the NAST table.
I debugged the Tcode VA02 to find out the logic which is used to do the filtering of these entries. However, i couldn't get the required logic.
Kindly help.Hi,
I guess the problem might be due to the Date and Time on which status record was created i.e. NAST-ERDAT & NAST-ERUHR.
Regards,
Danish.
Maybe you are looking for
-
Adding Interior Bounds to a Slider
I am attempting to create a version of JSlider which has interior bounds that its value must respect. Included in the default Bounded Range model, employed by JSlider, is a value called extent, whose function is similar to the end product I am workin
-
How to change the size of youtube play/pause and progress bar?
I have windows 8 and on internet explorer (hah), youtube videos play fine there. However, when I use Firefox, the display below videos showing the progress bar and play/pause decreases in size immensely. Is there a solution to this? This also applies
-
Still can't get VPN running on Lion Server
Hi Guys. I'm runinng 10.7.2. I had VPN running on SL, but have never had it working on Lion. I'll start off by saying I have NO airport or any other router. My box is hooked up straight to the net. I have 5 vlan interfaces. One if for the internet
-
Switched from openbox to Awesome, now i get no sound! [SOLVED]
Hi all, I have just switched from openbox to awesome and within awesome i get no sound, but if i swith back to openbox i get sound. Within awesome i get this output whenever i run any command that requires sound! ALSA lib confmisc.c:768:(parse_card)
-
Should OS be in its own partition on a 40G drive?
After fighting with constant kernel panics in strange places (i.e., quitting Safari, booting Finder) I've decided to do an erase and install from the original panther disc and do the upgrades back 10.4.11 to see if that solves the problems. I've neve