Strange behaviour in alv output display for a date column!
hi friends,
my alv output list display contains a column for budat (posting date), if this field has no value, then it displays a blank cell (space) in the output in my user login...but when the same report is run in another user login, even though the value of the column is null, it displays 00000000 (8 zeroes) rather than displaying a blank cell...i have set the field catalog property NO_ZERO = 'X'; is this property has anything to do with authorization to achieve its funcionality? am not sure...this is strange, as it is the same report, same field catalog that is being used..need some inputs on this
thanks in advance
Sathish
There are 2 solutions for an adhoc solution you can change the field to a char10 field, this will solve your immediate problem of the 0 display. For a permanent solution you can check the user profile setting for the date for you as well as the concerned user.
Hope That Helps
Anirban M.
Similar Messages
-
Strange behaviour of Removal of Alpha for Info object in Quality system
Strange behaviour of Removal of Alpha for Info object in Quality system as compared to Development system.
Hi,
The data for an info object Key in the DSO was 00000000000000000000000000123. I removed Alpha for the info object and data was corrected to 123 in the DSO in development system.
Now, when i transported the info object without alpha to quality and loaded data into DSO, the data is still the same with leading zeros.
I dont want to write routine to remove leading zeros, as I have values as 0. If i write routine, all zeros will be removed and this will be blank.
Both development and quality have same patches applied and are on same level.
Why is this strange behaviour in quality system...
Any inputs?? please suggest.
Thanks.
LavanyaHi,
Did you drop and reload the data after changing the conversion?
Regards,
Raghavendra. -
Hello,
I have one query witl regards to ALV output. After entering data in the selection screnn my ALV output gets displayed and there is no issue with it. The ALV is in display mode and if i click on the change button the ALV becomes editable. So fat it is fine.
The area of concern is the initial ALV output even though it is in display mode looks as if it is editable ALV. On click of the change button, then the ALV is shown in display mode and it is easily identifiable.
The user feels the initial ALV output is confusing and that he is not able to recognize whether it is display/editbale ALV. How can we fix it so that client can identify it?
Also, how do we get all the standard ALV buttons that we get in SE38 output in webdynpro? Please help.
Regards,
VaishnaviHi,
init your ALV settings with:
DATA lr_alv_cfg TYPE ref to cl_salv_wd_config_table.
lo_INTERFACECONTROLLER = wd_this->wd_cpifc_alv_table( ).
lr_alv_cfg = lo_interfacecontroller->get_model( ).
lr_alv_cfg->IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY( abap_true ).
If you click change button do this:
is_read_only = lr_alv_cfg->IF_SALV_WD_TABLE_SETTINGS~GET_READ_ONLY( ).
if lv_is_read_only = abap_true.
lr_alv_cfg->IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY( abap_false ).
else.
lr_alv_cfg->IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY( abap_true ).
endif. -
ALV FUNCTION MODLE FOR GETTING DATA IN EXCEL SHEET
HI ,
CAN I HAVE ALV FUNCTION MODLE FOR GETTING DATA IN EXCEL SHEET
Regards,
ArunaStandard ALV grid uses the FM <b>ALV_XXL_CALL</b> for exporting data into Excel. You can put a break-point in the FM and check it for urself.
for ur info - the above FM takes the internal table name, internal table content and the field catalog as input. -
To Display Calender in F4 help in ALV Output Display.
Hello Experts.
I have one requirement. I have an ALV output. In this one date field is editable. Here User wants F4 Help. I have provided the F4 help, F4 help is coming but for F4 help i want the Factory Calendar type display. Currently the F4 help is coming like a normal F4 help.
Thanks.
Swati.hi Swati,
I hope you have checked standard program 'bcalv_edit_08'.
in this program, if the type of field we are taking in that perticuler column is 'DATS' then it should display the calender.
Regards,
Ani -
hi
i'm doing an ALV Report. In the output i'm double clicking on the Document field using user-command
it is taking me to a particular Transaction and my requirement is if i change any field for ex : Description
in that transaction and come back again to the output display the Changed Description should appear
when i refresh the Output.how to get it?
Regards1. create one icon on allication toolbar which is REFRESH icon, and give some function for it.
2. write the code like:
CASE SY_UCOMM.
when 'FCODE'.
refresh itab.
perform get_data.
perform_displaydata.
it is nothing but u need to put the same code which u used earlier to show the data in output gaian after clicking on function code.
Regards,
Rajesh. -
Hi all,
I need to display color for a field(cell) in a record.
is there any events to handle this.
please help me in this.
Regards
Anil Kumar KHi,
in OO ALV check this code../
REPORT ZTEST1234 MESSAGE-ID ZZ .
DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID.
DATA: L_VALID TYPE C,
V_FLAG,
V_DATA_CHANGE,
V_ROW TYPE LVC_S_ROW,
V_COLUMN TYPE LVC_S_COL,
V_ROW_NUM TYPE LVC_S_ROID.
* CLASS lcl_event_handler DEFINITION
CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION .
METHODS:
**Hot spot Handler
HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
**Double Click Handler
HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW E_COLUMN ES_ROW_NO.
ENDCLASS. "lcl_event_handler DEFINITION
* CLASS lcl_event_handler IMPLEMENTATION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
*Handle Hotspot Click
METHOD HANDLE_HOTSPOT_CLICK .
CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
V_ROW = E_ROW_ID.
V_COLUMN = E_COLUMN_ID.
V_ROW_NUM = ES_ROW_NO.
MESSAGE I000 WITH V_ROW 'clicked'.
ENDMETHOD. "lcl_event_handler
*Handle Double Click
METHOD HANDLE_DOUBLE_CLICK.
ENDMETHOD. "handle_double_click
ENDCLASS. "LCL_EVENT_HANDLER IMPLEMENTATION
*& Global Definitions
DATA: G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,"Container1
G_HANDLER TYPE REF TO LCL_EVENT_HANDLER. "handler
DATA: OK_CODE LIKE SY-UCOMM,
SAVE_OK LIKE SY-UCOMM,
G_CONTAINER1 TYPE SCRFNAME VALUE 'TEST',
GS_LAYOUT TYPE LVC_S_LAYO.
*- Fieldcatalog for First and second Report
DATA: IT_FIELDCAT TYPE LVC_T_FCAT,
X_FIELDCAT TYPE LVC_S_FCAT,
LS_VARI TYPE DISVARIANT.
* START-OF_SELECTION
START-OF-SELECTION.
DATA:BEGIN OF ITAB OCCURS 0,
VBELN LIKE LIKP-VBELN,
POSNR LIKE LIPS-POSNR,
CELLCOLOR TYPE LVC_T_SCOL, "required for color
DROP(10),
END OF ITAB.
SELECT VBELN
POSNR
FROM LIPS
UP TO 20 ROWS
INTO CORRESPONDING FIELDS OF TABLE ITAB.
END-OF-SELECTION.
IF NOT ITAB[] IS INITIAL.
CALL SCREEN 100.
ELSE.
MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
ENDIF.
*& Form CREATE_AND_INIT_ALV
* text
FORM CREATE_AND_INIT_ALV .
DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
CREATE OBJECT G_CUSTOM_CONTAINER
EXPORTING CONTAINER_NAME = G_CONTAINER1.
CREATE OBJECT G_GRID
EXPORTING I_PARENT = G_CUSTOM_CONTAINER.
* Set a titlebar for the grid control
CLEAR GS_LAYOUT.
GS_LAYOUT-GRID_TITLE = TEXT-003.
GS_LAYOUT-ZEBRA = SPACE.
GS_LAYOUT-CWIDTH_OPT = 'X'.
GS_LAYOUT-NO_ROWMARK = 'X'.
GS_LAYOUT-CTAB_FNAME = 'CELLCOLOR'.
CALL METHOD G_GRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
CREATE OBJECT G_HANDLER.
SET HANDLER G_HANDLER->HANDLE_DOUBLE_CLICK FOR G_GRID.
SET HANDLER G_HANDLER->HANDLE_HOTSPOT_CLICK FOR G_GRID.
DATA: LS_CELLCOLOR TYPE LVC_S_SCOL. "required for color
DATA: L_INDEX TYPE SY-TABIX.
"Here i am changing the color of line 1,5,10...
"so you can change the color of font conditionally
LOOP AT ITAB.
L_INDEX = SY-TABIX.
IF L_INDEX = 1 OR L_INDEX = 5 OR L_INDEX = 10.
LS_CELLCOLOR-FNAME = 'VBELN'.
LS_CELLCOLOR-COLOR-COL = '6'.
LS_CELLCOLOR-COLOR-INT = '0'.
LS_CELLCOLOR-COLOR-INV = '1'.
APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
LS_CELLCOLOR-FNAME = 'POSNR'.
LS_CELLCOLOR-COLOR-COL = '6'.
LS_CELLCOLOR-COLOR-INT = '0'.
LS_CELLCOLOR-COLOR-INV = '1'.
APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
ENDIF.
ENDLOOP.
* setting focus for created grid control
CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
EXPORTING
CONTROL = G_GRID.
* Build fieldcat and set editable for date and reason code
* edit enabled. Assign a handle for the dropdown listbox.
PERFORM BUILD_FIELDCAT.
PERFORM SET_DRDN_TABLE.
* Optionally restrict generic functions to 'change only'.
* (The user shall not be able to add new lines).
PERFORM EXCLUDE_TB_FUNCTIONS CHANGING LT_EXCLUDE.
**Vaiant to save the layout
LS_VARI-REPORT = SY-REPID.
LS_VARI-HANDLE = SPACE.
LS_VARI-LOG_GROUP = SPACE.
LS_VARI-USERNAME = SPACE.
LS_VARI-VARIANT = SPACE.
LS_VARI-TEXT = SPACE.
LS_VARI-DEPENDVARS = SPACE.
**Calling the Method for ALV output
CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
IS_VARIANT = LS_VARI
IS_LAYOUT = GS_LAYOUT
I_SAVE = 'A'
CHANGING
IT_FIELDCATALOG = IT_FIELDCAT
IT_OUTTAB = ITAB[].
* Set editable cells to ready for input initially
CALL METHOD G_GRID->SET_READY_FOR_INPUT
EXPORTING
I_READY_FOR_INPUT = 1.
ENDFORM. "CREATE_AND_INIT_ALV
*& Form EXCLUDE_TB_FUNCTIONS
* text
* -->PT_EXCLUDE text
FORM EXCLUDE_TB_FUNCTIONS CHANGING PT_EXCLUDE TYPE UI_FUNCTIONS.
* Only allow to change data not to create new entries (exclude
* generic functions).
DATA LS_EXCLUDE TYPE UI_FUNC.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_DELETE_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_APPEND_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_MOVE_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_CUT.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE_NEW_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_UNDO.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
ENDFORM. " EXCLUDE_TB_FUNCTIONS
*& Form build_fieldcat
* Fieldcatalog
FORM BUILD_FIELDCAT .
DATA: L_POS TYPE I.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-TABNAME = 'IT_FINAL'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-NO_ZERO = 'X'.
X_FIELDCAT-OUTPUTLEN = '10'.
X_FIELDCAT-HOTSPOT = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Item'(025).
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-TABNAME = 'IT_FINAL'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '5'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Drop'(025).
X_FIELDCAT-FIELDNAME = 'DROP'.
X_FIELDCAT-TABNAME = 'IT_FINAL'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '5'.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-DRDN_HNDL = '1'.
X_FIELDCAT-DRDN_ALIAS = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
ENDFORM. " build_fieldcat
*& Module STATUS_0100 OUTPUT
* text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'MAIN100'.
SET TITLEBAR 'MAIN100'.
IF G_CUSTOM_CONTAINER IS INITIAL.
**Initializing the grid and calling the fm to Display the O/P
PERFORM CREATE_AND_INIT_ALV.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form SET_DRDN_TABLE
* text
FORM SET_DRDN_TABLE.
DATA:LT_DRAL TYPE LVC_T_DRAL,
LS_DRAL TYPE LVC_S_DRAL.
LOOP AT ITAB .
* First listbox (handle '1').
IF SY-INDEX = 1.
LS_DRAL-HANDLE = '1'.
LS_DRAL-VALUE = ' '.
LS_DRAL-INT_VALUE = ' '.
ELSE.
LS_DRAL-HANDLE = '1'.
LS_DRAL-VALUE = ITAB-POSNR.
LS_DRAL-INT_VALUE = ITAB-POSNR.
ENDIF.
APPEND LS_DRAL TO LT_DRAL.
ENDLOOP.
**Setting the Drop down table for Reason Code
CALL METHOD G_GRID->SET_DROP_DOWN_TABLE
EXPORTING
IT_DROP_DOWN_ALIAS = LT_DRAL.
ENDFORM. " set_drdn_table -
How to give color of particular cell in alv list display for dynamic table
Dear Experts,
i want to give color of a particular cell in alv list display (reuse_alv_list_display). Here i am passing data through dynamic table?Hi,
Se this:
DATA: lt_color TYPE lvc_t_scol WITH HEADER LINE.
DATA: BEGIN OF data_tab OCCURS 0.
tabcolor TYPE lvc_t_scol,
END OF data_tab.
* Befone ALV call
alv_layout-coltab_fieldname = 'TABCOLOR'.
* For each row in data_tab
REFRESH: lt_color.
CLEAR: lt_color.
lt_color-color-col = 6.
lt_color-color-int = 1.
lt_color-fname = FIELD1'.
APPEND lt_color.
lt_color-color-col = 2.
lt_color-color-int = 0.
lt_color-fname = 'FIELD2'.
APPEND lt_color.
data_tab-tabcolor[] = lt_color[].
append data_tab.
Best regards,
Leandro Mengue -
ALV Grid Display for ME2N, ME2L
Hello,
We have a requirement where we want the ALVGrid Display for ME2N, ME2L. When we list these in excel file it comes in very scattered manner.
Client is looking for PO report similar to ME80FN with credit terms, GR Info etc.. I believe ECC 6.0 have ALV Grid in standard, else this can be incorporated thru OLME --- > Reporting ---> Scope of List and does not require query but I am not sure how to achieve it.
Regards,
PuneetPuneet,
In the selection screen of ME2N or ME2L, if you will select ALV in the field SCOPE OF LIST, u will get the report in ALV format.
To default the SCOPE OF LIST in any transaction code from BEST to ALV, please follow the below path in SPRO:
Materials ManagementPurchasing-Reporting-Maintain Purchasing Lists-Scope of List---Define Default Values for Transactions -
Send ALV output as attachment (exceeding 255 columns) to Inbox or email
Hello,
My requirement is to send the ALV output as attachment (csv or xls) to either Office Inbox or external email. The trick is the ALV output is way more than the 255 columns (about 2000).
I have read a number of threads on this matter. It seems that it is either SO_NEW_DOCUMENT_ATT_SEND_API1 or class BCS (cl_document_bcs=>create_document) but both has restriction on the line size (max 255 chars) (please correct me if I am wrong).
Could anyone suggest other approaches? Your input is much appreciated.
Regards
CalvinHi,
Comapare with your code,
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
Packing Info Attachment
att_type = whatatt_type..
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = whatname.
APPEND objpack.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
CONTENTS_HEX = objhex
OBJECT_PARA =
object_parb =
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8
IF sy-subrc 0.
MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF. -
Data Federator XI 3.0 using DB2 VARCHAR FOR BIT DATA Column?
We have a column in a DB2 database that is defined as VARCHAR(16) FOR
BIT DATA.
We are using the suggested IBM JDBC driver, db2jcc.jar, against a DB2
OS/390 8.1.5 version database.
The Datasource column displays a data type of NULL, indicating the DF
does not understand or cannot handle this IBM data type.
We have two issues.
First, target tables are not able to return any columns, regardless if
we exclude columns defined as NULL as mentioned above. We see the
'Wait' animation for a very long time when we use the 'Target table
test tool' option. Selecting to display the count only, returns zero.
We are able to fetch and view non-NULL column data when using the
'Query tool' under the Datasource pane.
I also get the same result when using the 'My Query Tool' in Server
Administrator; a selection agains the sources returns data while
selecting from a target table returns no data. Also, a 'select
count(*)' returns zero.
The second issue is in mapping a relationship between two DB2 tables
where the join is between two columns of the above mentioned type
(NULL).
The error we get back when we use "Show Errors" is "The types
'NULL' (in 'S1.PLANNEDGOALID') and 'NULL' (in 'S2.PLANNDEDGOALID') are
not compatible.". When reviewing the relationship, a dashed red line
appears instead of a solid grey line between the two tables in the
"Table relationships and pre-filers" section of our mapping pane.
The following query returns an error via the Server Administrator
Query Tool; "Types 'NULL' and 'NULL' are not compatible for operator
'=' (Error code : 10248)".
select count(*)
from
(select s1.CASEID, s2.PLANNEDGOALID, s2.NAME, s2.PLANNEDGRPSTTYCD
from "/DF_CMS_ODS/sources/CMFSREPT/CMSPROD.PLANNEDGOAL" AS s1
,"/DF_CMS_ODS/sources/CMFSREPT/CMSPROD.PLANNEDGOAL" s2
where s1.PLANNEDGOALID = s2.PLANNEDGOALID)
Here are the properties settings in the Resource Connector Settings
for jdbc.db2.zSeries we are using.
capabilities: isjdbc=true;orderBy=false
driverLocation: drivers/db2jcc_license_cisuz.jar;drivers/db2jcc.jar
jdbcClass: com.ibm.db2.jcc.DB2Driver
sourceType: db2
supportsCatalog: no
urlTemplate: jdbc:db2://<hostname>[:<port>]/<databasename>
Here are the Connection parameters as defined for the datasource in DF
Designer.
Defined resource: jdbc.db2.zSeries
Jdbc connection URL: jdbc:db2://DB2D03:50000/CMFSREPT
Authentication: Use a specific database logon for all Data Federator
users.
User Name: x
Password: hidden
Login domain: -- Choose a defined login domain --
Supports Schema: checked
Schema: is empty
Prefix table names with schema name: checked
Supports catalog: unchecked
Prefix table names with the database name: unchecked
Table types: TABLE and VIEW
So, the following is the two questions we require answers for...
Is this a limitation of Data Federator?
Is there a work around short of changing the datatype in the database.Hi Darren,
The VARCHAR() FOR BIT DATA is a binary data type and Data Federator does not support binaries. But if in your case, it makes sense to map this column to a VARCHAR data type you can configure the DB2 connector to view this column as a VARCHAR.
Your column can be mapped explicitly to a data type of your choice using a property: castColumnType.
This property can be set updating the resource you selected when you registered you DB2 data source.
If the resource is "jdbc.db2", then:
1. Launch Data Federator Administrator
2. Click on "Administration" tab
3. Click on "Connector Settings"
4. Select the right resource: "jdbc.db2"
5. Click "Add a property"
6. Select "castColumnType"
7. Set its value to: VARCHAR() FOR BIT DATA=VARCHAR
8. Click on Ok
You should see this column as a VARCHAR.
Regards,
Mokrane
PS: For the target table issue, we have forwarded your mail to the Data Federator Designer team. -
Select distinct for a date column in present. service when creating prompt
hi all
I am trying to create some new prompts in my answers and I have the following problem. When I try to create a new prompt on a date column ( for example Modification Date), when I try to run this report on this prompt it is displaying the same date a lot of times ( for example 2/4/11 it is being displayed 4 times).
Is there any way i can change this, so to display distinct dates?
Thank you and best regardsHi Deva
I am trying to use this, but in the system are being saved the date + hour.
When i try select distinct modification date from My_view, i still have the same dates because they have different hours.
When i try select disctinct to_date(modification_date)..... I am having an error in BI.
Please help me to solve this issue.
Regards -
Best choice for a date column in forms
Hello,
I want to know what is the best choice for a date field that the user have to enter manually. I read on a other post that a calender control is not directly implemented in forms 9i. So what is the best choice to be "user friendly" with a date field in a form?
thanks in advance.Hi
Don't know if this would be much use to you, but I wrote this function 'Check_Date' a while back to check whether the user had typed something which could be interpreted as a date. You'd make your date field into a Text Item, and include a call to this function (which could be in your form, or in a library) in the WHEN-VALIDATE-ITEM trigger on the item, ie:
IF NOT check_date(:ITEMS.date_item1, NULL, NULL) THEN
RAISE FORM_TRIGGER_FAILURE;
END IF;This would mean that the user could type 'T' or '*' for today, '+1' for tomorrow, '-7' for one week ago, or the date in a variety of formats. When they leave the field, the function tries to resolve what they've typed into a date, and sets the field to a date in the correct format.
('Display_Alert' is just a function to display a named alert with a message.) It can also be used to check that the date entered doesn't fall outside upper and lower bounds. Code follows:
FUNCTION Check_Date (text_in IN OUT VARCHAR2,
lower_bound_in IN DATE,
upper_bound_in IN DATE)
RETURN BOOLEAN IS
first_letter VARCHAR2(1) := SUBSTR(text_in, 1, 1);
date_ok BOOLEAN;
this_date DATE;
date_diff NUMBER(8);
output_format VARCHAR2(12) := Get_Application_Property(BUILTIN_DATE_FORMAT);
TYPE date_format_table_type IS TABLE OF VARCHAR2(12)
INDEX BY BINARY_INTEGER;
date_format_table date_format_table_type;
BEGIN
--Set up table of date formats in order they'll be tested for
date_format_table(1) := 'DD-MON-RRRR';
date_format_table(2) := 'DD-MM-RRRR';
date_format_table(3) := 'DD-MM';
date_format_table(4) := 'DD-MON';
date_format_table(5) := 'YYYY-MM-DD';
date_format_table(6) := 'YYYY-MON-DD';
--Use of T, or * for today's date...
IF UPPER(text_in) IN ('T', '*') THEN
this_date := SYSDATE;
date_ok := TRUE;
--Look for use of +x/-x for number of days different from today
ELSIF first_letter IN ('+', '-') THEN
BEGIN
date_diff := TO_NUMBER(SUBSTR(text_in, 2));
IF first_letter = '+' THEN
this_date := SYSDATE + date_diff;
ELSE
this_date := SYSDATE - date_diff;
END IF;
date_ok := TRUE;
EXCEPTION
WHEN VALUE_ERROR THEN
--User has entered something like '+X', so not valid
date_ok := FALSE;
END;
ELSE
--Go through all the possible formats for date entry,
--if any give a valid date, then return that.
FOR ix IN date_format_table.FIRST..date_format_table.LAST LOOP
EXIT WHEN date_ok;
BEGIN
--Try creating a date using the format masks in the local
--table. If no good, this will throw an INVALID_DATE exception
this_date := TO_DATE(text_in, date_format_table(ix));
date_ok := TRUE;
EXCEPTION
WHEN OTHERS THEN
date_ok := FALSE;
END;
END LOOP;
END IF;
IF date_ok THEN
--Check for violation of lower/upper bounds on date
IF (lower_bound_in IS NOT NULL AND this_date < lower_bound_in) THEN
Display_Alert('info_alert', 'Date cannot be before '||TO_CHAR(lower_bound_in, output_format));
date_ok := FALSE;
ELSIF (upper_bound_in IS NOT NULL AND this_date > upper_bound_in) THEN
Display_Alert('info_alert', 'Date cannot be after '||TO_CHAR(upper_bound_in, output_format));
date_ok := FALSE;
ELSE
text_in := TO_CHAR(this_date, output_format);
END IF;
ELSE
Display_Alert('INFO_ALERT', text_in||' is not a valid date !!');
END IF;
RETURN date_ok;
END;Hope this is useful.
regards
Andrew
UK -
Help:Using Order by for a date column fetching wrong results
Hi all,
In my table I am having a date column which is having values
13/06/2007 09:24:00
31/05/2007 10:30:00
I am selecting this column with some other columns using order by at the end by giving the date column.
But I am getting rows in reverse order like above. I am using to_char(start_time,'dd/mm/yyyy hh:24mi:ss') in the select.
If I give to_date(start_time) in the order by the values are fetching correclty.But I was not allowed to use to_char in the select statement.
Kindly suggest me where it went wrong.
Thanks in advance.Hi , Thanks for the update. Actually that column was an Oracle DATE type. Earlier I gave simply that column name alone in the order by clause. That is getting falied only if the 2 entries falls in different months. Otherwise that is perfect.
So I gave to_date in the order by. But now I am facing a problem in the selecing that column. -
Predicate value Type for Created Date column
Hi,
What Predicate Type value should be passed on for the worklist column Created Date in IPredicate addClause method? I am passing GregorianCalendar type value but getting an exception. The return type from the WorklistColumns.CREATEDDATE is GregorianCalendar.
Thanks,
Mythilitry java.sql.date
Maybe you are looking for
-
When i click on itunes icon it won't open. it says it has quit unexpectedly?
When I click on itunes it says that its quit unexpectedly! It won't open it!!
-
Can anyone help with these kernel panics?
I work for the NHS. Have spent most of my salary on Adobe Premiere Pro using a Intel Core Mac OS 10.5.8 which is supposed to be enough for the system requirements. Have spent all day shutting down my computer unable to start the software. If it do
-
InDesign PDF presets sync settings multiple computers
Hi, I have 4 collegues, we all have the CC team version. Is it possible to sync for example PDF presets across all computers? So that we maybe can have a "master" and then everybody syncs after that one. We're all on Mac's . Thanks in advance.
-
HELP! How can I get such effect in photoshop elements 11
@
-
Ipw2200 Failed to send CARD_DISABLE
I have a similar problem as discussed in http://bbs.archlinux.org/viewtopic.php?t=25368. My ipw2200 deactivates itself every now and then with the message "ipw2200: Failed to send CARD_DISABLE: Command timed out.". This is like when the kill switch (