Search help for date in ALV grid
I have ALV grid with field type date and search help for this:
ws_field-ref_table = 'ADCP'.
ws_field-ref_field = 'DATE_FROM'.
ws_field-inttype = 'D'
After I have clicked on this key F4 then I see a calendar and I have choosen some date, but in input grid field there aren't
choosen value. Why? Another search helps works perfect except this. Where is the problem?
Edited by: Kosmo on Jul 7, 2009 8:48 AM
Hi,
Find the code below
TYPE-POOLS: slis.
DATA: it_fcat TYPE slis_t_fieldcat_alv,
wa_fcat LIKE LINE OF it_fcat.
DATA: it_data TYPE vbap_t.
SELECT *
FROM VBAP
INTO TABLE it_data
UP TO 20 ROWS.
wa_fcat-fieldname = 'VBELN'.
wa_fcat-tabname = 'IT_DATA'.
wa_fcat-ref_fieldname = 'VBELN'.
wa_fcat-ref_tabname = 'VBAK'.
APPEND wa_fcat TO it_fcat.
clear wa_fcat .
wa_fcat-fieldname = 'POSNR'.
wa_fcat-tabname = 'IT_DATA'.
wa_fcat-seltext_l = 'Date'.
wa_fcat-ref_fieldname = 'ERDAT'.
wa_fcat-ref_tabname = 'VBAK'.
APPEND wa_fcat TO it_fcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_interface_check = sy-repid
it_fieldcat = it_fcat
TABLES
t_outtab = it_data
EXCEPTIONS
program_error = 1.
I have derived the above code from WIKi link
https://wiki.sdn.sap.com/wiki/display/Snippets/f4helpforalvgrid+display
Regards,
Murthy.
Similar Messages
-
Hi,
I have created an iview in Visual Composer for a query. it contains date field on selection variable fomr. i tried entering date in various format, but it gives an error : variable expects interval value ; enter an interval".
can we provide search help for date field in VC?
Regards,
Sonali.Hi,
You have to create search help it avoid inconsistency.
Thanks & Regards,
Venkat. -
HI all,
I want to attach search help for a DATE field created in screen painter.
For PERNR, PREM is attached. Similarly what is the statndard search help name for DATE field?
Thanks,
Shanthi.Hi ,
Declare the date field as sy-datum ,
parameters : date type sy-datum .
This shud bring the standard search help for date .
Thanks ..Get back for any issues.
Anil -
To implement search help for date and time fields details
how can i implement search help for date and time fields in screen painter
Hi
Declare the variables as sy-datum and sy-uzeit or any other pre-defined data typ of date and ime types. Serach help will automatically comes.
Aditya -
Search help for date field in Editable ALV
Hello Friends,
I am using editable alv using 'reuse_* '.
I have used date as input field. While creating fieldcatlog also i have declared dat as a mkpf-budat.
But i am not getting serach help for date in output.
Is it possible with reuse or i have to go by object oriented ?Hi,
Just pass the Edit option of the fieldcatalog for those specific fields...
fcat-edit = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_pf_status_set = 'PF_STATUS_SET'
i_callback_user_command = 'USER_COMMAND' "<---- pass this
i_callback_top_of_page = 'TOP'
is_layout = it_layout
it_fieldcat = it_fcat
i_default = 'X'
i_save = 'A'
it_events = it_event
TABLES
t_outtab = it_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
*& Form USER_COMMAND
* text
* -->R_UCOMM text
* -->RS_SELFIELD text
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&DATA_SAVE'. "<-------check this
PERFORM save_data.
ENDCASE.
ENDFORM. "USER_COMMAND -
How to add search help for field in ALV object
Hello,
In a program, we use ALV object ( container) to create a liste like : field1, field2 .. but when display we do not have search help for this . Could you please help me how to add match code in this case for field 1 and field2, We use set_table_for_first_display
Thanks,Hi,
when you define your field catalogue you can create data elements with search help in se11 and use them for field 1 and field 2.
But maybe it is enough to use data elements belonging to a domain with a value help and to set field F$AVAILABL in the field catalogue or to fill the name of the field CHECKTABLE.
Regards,
Klaus -
Search help for date in module pool
Hi experts
i am developing a module pool prog, in the second screen 6 fields are displayed and one of them is date field. I wanna search help for that date field. Plz note the date field is populated from Work area of iternal table.
Plz help me out in solving the issue.
Thanks and Regards,
AlsonHi
We have a lot of Example programs in SAP, have a look at the demo program
<b>DEMO_DYNPRO_F4_HELP_MODULE</b>..
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaac935c111d1829f0000e829fbfe/content.htm
Regards
Sudheer -
Hi Gurus,
I have a screen containing fields from an internal table. As I cannot use the 'from dictionary' option in the screen painter attributes, (since internal table field is not in ABAP dictionary), I'm not able to display the search help for a field of type DATS. How can i access the stabdard date search help for my type DATS internal table screen fields?
assistance will be rewarded.
thanx in advance.Hi,
Try this:
On your customizing screen flow,
PROCESS ON VALUE-REQUEST.
Field T_ZT-SDATE " your date field
module create_dateselect.
In your main program:
module create_dateselect.
data:p_date like sy-datum.
CALL FUNCTION 'F4_DATE'
EXPORTING
holiday_calendar_id = 'CN'
display = ' '
IMPORTING
select_date = p_date
EXCEPTIONS
OTHERS = 4.
t_zt-sdate = p_date.
endmodule.
Regards,
Pole -
Customize search help for date.
Dear All ,
Any Idea how we going to customize / standard function the search help for the date by refering to the closing period month and year.
Example this month closing period is 'July 2009', so when user click on the screen search help date button, the search help will pop up only 'July 2009' calender. Not like standard one with different years and months.
I only want 1 month calender.
Any idea ??
Thanks.You may need to look into fm
CALL FUNCTION 'F4_DATE'
EXPORTING
date_for_first_month = sy-datum " <your date>
IMPORTING
select_date = l_select_date
select_week = l_select_week.
or use class CL_GUI_CALENDAR
a®s -
Search Help For An Editable ALV List
Hi,
All ABAP Gurus !!
I have made an Editable ALV with the fields of ZTable. In ALV I want the search help in one of the columns.The entry in that should come from the standard table name-TVM5 and the field which should come is MVGR5. MVGR5 does not contain the search help .Following are the description for my ZTable-------
Field Name - MC_NO,
Data Element - ZZMC_NO1,
Domain -ZZMC_NO1.
While creating this ZTable, in the Entry help/check tab I have also mention Input help with fixed values in the column- Origin of the input help and entered the entries also.
About ALV (Only one alv column is shown here for reference in which search help or input help is needed of all the possible entries)---
DATA: INT_FIELDCATALOG2 TYPE LVC_T_FCAT WITH HEADER LINE.
DATA: WA_FIELDCATALOG2 TYPE LVC_S_FCAT ,
WA_LAYOUT2 TYPE SLIS_LAYOUT_ALV ,
GD_LAYOUT2 TYPE LVC_S_LAYO. "slis_layout_alv.
WA_FIELDCATALOG2-FIELDNAME = 'MC_NO'.
WA_FIELDCATALOG2-TABNAME = 'T_ITAB2'. " T_ITAB2 contains all the other fields
WA_FIELDCATALOG2-SCRTEXT_M = 'Machine No.'.
WA_FIELDCATALOG2-EDIT = 'X'.
WA_FIELDCATALOG2-F4AVAILABL = 'X'.
WA_FIELDCATALOG2-REF_FIELD = 'MVGR5'.
WA_FIELDCATALOG2-REF_TABLE = 'TVM5'.
APPEND WA_FIELDCATALOG2 TO INT_FIELDCATALOG2.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
I_CALLBACK_PROGRAM = V_REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS1'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_FIELDCAT_LVC = INT_FIELDCATALOG2[]
IS_LAYOUT_LVC = GD_LAYOUT2
TABLES
T_OUTTAB = T_ITAB2.
Please explain in detail
Thanks to all in advance.Please check the following links :
F4 help -- on editable alv field.
F4 help in editable ALV
ALV Editable Grid Control F4 help problem
And search the forum for f4 help on editable alv
KR
Veeranji Reddy P. -
F4 - Help for field in ALV Grid Output
Hi,
I generated a report which gives output in ALV Grid output.
In the output, 1 of the field is editable.Here, for this field I need to have my own F4-Help.
I think the procedure to be followed is:--
Create a Search Help in SE11.
Link the Search Help to the editable field.
Please let me know if its the correct procedure.
I f yes, how can I link user defined Search Help to the editable field?
Thanks,
Shivaa........Hi siva,
you can also do that way.
while filling the fieldcatalog use the parameter F4AVAILABL
for more info check
F4 help in ALV Grid...
f4 help for a field in alv grid
hope it helps you
Thanks!
Edited by: Prasanth on Mar 6, 2009 3:59 PM -
F4 help for field in ALV grid control (using ABAP objects)
Hi All,
I have created a z table ZTAB which is a master table( with single column X). field X should be a input field in ALV Grid through F4 key. I have created searchelp and assigned it to data element of X feild, and in domain level I have assigned ZTAB as value table.
And in ALV field catalog wrote ls_fcat-ref_tab = 'ZTAB'. But still I'm not getting list of values when I press F4.
Can anyone help me to understand what is missing here? How to call standardard F4 help?
This is very urgent..
Regards
Jaker.u can refer to this standard program :BCALV_EDIT_08
also u wont get the list of values automatically..
declare a class :
CLASS LCL_EVENT_HANDLER DEFINITION.
PUBLIC SECTION.
METHODS :
handle_on_f4 for event onf4 of cl_gui_alv_grid
importing e_fieldname es_row_no er_event_data,
ENDCLASS. "LCL_EVENT_HANDLER
implementation of class
here u pass ur internal table what u want to display as pop up for f4 help.
*& Class (Implementation) LCL_EVENT_HANDLER
Text
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
*Method to handle F4 click.
Method handle_on_f4.
Function to create a popup and passing the values of internal table in it.
CALL FUNCTION 'POPUP_WITH_TABLE'
EXPORTING
ENDPOS_COL = 60
ENDPOS_ROW = 60
STARTPOS_COL = 5
STARTPOS_ROW = 5
TITLETEXT = 'pop up'
IMPORTING
CHOICE = wa_grid-zfield
TABLES
VALUETAB = ITAB
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
RETURN.
ENDIF.
endmethod. "handle_on_f4
ENDCLASS. "LCL_EVENT_HANDLER
hope this gives u some idea. -
F4 ( Search Help ) for date field on the selection screen
Hi Freinds,
i have used WDR_SELECT_OPTIONS In my component, i have one date field on selection screen(BUDAT), for this date field i want seach help
this is my code
create a range table for Posting Date
lt_range_table = wd_this->m_handler->create_range_table(
i_typename = 'BUDAT' ).
add Posting Date to the selection
wd_this->m_handler->add_selection_field( i_id = 'BUDAT'
i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
I_VALUE_HELP_ID = '??????'
I_DESCRIPTION = 'Posting Date'
it_result = lt_range_table ).
can any one help me
Thanks
Srinihi sarbjeet
i created search help in dictionary and i used that search help in my program, but still its now working , any other ideas
Thnx
srini -
F4 help for date in select options..
Hi Gurus,
I want a search help for date field which belongs to select options.
I know if it is a parameter we directly map the attribute value to that data element.
Can some help me with this..
Best Regards,
Navin Fernandes.Hi Gurus,
The select options works for date.. I got the solution.
It directly relates to the default data dcitionary help.
Got it from this example: WDR_TEST_SELECT_OPTIONS
Best Regards,
Navin Fernandes. -
How to add a search help for a field in alv?
HI!Everyone ,
i want to add a search help created by myself for one field in alv,
and i want to use this function "HELP_VALUES_GET_WITH_TABLE".
can anyone help me ?
thanks!HI,Vijay.
My code like this :
PERFORM build_fcat.
PERFORM build_objects.
PERFORM layo_build.
PERFORM set_drdn_table .
CALL METHOD alv_grid->set_table_for_first_display
EXPORTING
i_structure_name = 'STU_S'
is_layout = s_layo
CHANGING
it_outtab = itab_out
it_fieldcatalog = i_fcat
."Period
IF sy-subrc <> 0.
EXIT.
ENDIF.
for example, there is a field 'UNAME' IN Structure 'STU_S',
i want to add a search help for 'UNAME'.
the 'UNAME' is not users in SAP R/3 , i want to add some data by myself or from a table .
Maybe you are looking for
-
The page load progress bar that was on the lower right of the window is no longer there. After updating to the latest version of Firefox on my Mac there is no progress bar for the page load. I really miss this feature and can't seem to find a way to
-
SQL Agent Job Fails To Run A SSIS Package
Hi, I have a SSIS Package which basically truncates the table and re-loads it from an excel file .The job runs fine if i run it manually on visual studio.However, i try to shcedule a SQL Agent job and it fails with the following error Description: T
-
Is impossible to know when you print a PDF document from Workflow? how?
Hi I am creating a workflow that prints a PDF form and send it in a WorkItem to the user's inbox, once you run the WorkItem a PDF is opened the user ... I wonder if you can capture an event if the user prints the document or cancels ... I do not spea
-
I know a lot of people have had trouble with running java with XP. I run it fine on a laptop but just got a new desktop computer that won't run, I have read various things telling me to set the path to this, the classpath to that. after trying everyt
-
Dynamic flat file loading in OWB 11g
Hi, I'm working on owb 11g, i need to load multiple files into tables having the same file name where only the date and file sequence number changes. The files are of format: FileA_2009_1 FileA_2009_2 FileA_2009_3,etc.... How can i dynamically change