Use UTF-16? How to correctly implement localisation.
Reading the on-line documentation, I was under the impression the default format for Java when reading properties files was UTF-16 ( http://java.sun.com/docs/books/tutorial/i18n/text/convertintro.html )
However when saving a file (using gedit in GNOME) to UTF-16 I get an error. (Java can't read the file apparently). I'm coding an GPL application where 3th parties provide localisation files. currently for German I've had to turn to replacing the special characters with /u00xx codes. But that's not how it should be. especially since a Russian translation is ion the making.
How is this supposed to go?
http://globalizer.wordpress.com/2007/02/08/property-resource-bundle-encoding/
Similar Messages
-
We have a requirement to print the w2 forms for employees using java application, how can i implement this. Please give some suggestion.
Anyone any ideas to help please?
-
How to manually implement the correction instructions 846826?
Hi Experts:
I happened DDIC_ACTIVATION error when used spam to implement support package SAPKB70007 ... SAPKW70012, The correction instruction no is 846826, the content as follows:
TADIR Entries
Object Description TADIR Entry
Program ID Object Type Object Name Program ID Object Type Object Name
LIMU REPS RADTBCHK R3TR PROG RADTBCHK
$$----
$$
$ Correction Inst. 0120061532 0000846826 $
$----$
$ Valid for : $
$ Software Component SAP_BASIS SAP Basis component $
$ Release 700 To SAPKB70011 $
$$----
$$
*& Object REPS RADTBCHK
*& Object Header PROG RADTBCHK
*& FORM CHK_TABLENAME
clear rclist. clear rc.
Check name-space for tablename
if tablenamec-existsname <> ' '.
*>>>> START OF DELETION <<<<<
call function 'DD_CHECK_NAME_SPACE'
exporting
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
"<KH> 20070108 active_only set to 'X' so that only
"active objects prevent activation (necessary for type
"change with still existing version of old type in N/L )
call function 'DD_CHECK_NAME_SPACE'
exporting
active_only = 'X'
*>>>> END OF INSERTION <<<<<<
How do I implement it? Thanks a lot.Hi!
You don´t need to apply this change manually. You can do it directly in transaction SNOTE with the Note Assistant. You will need to download the Note from this transaction and then apply it.
Remember you will also need to apply some manual changes, apart from the source code correction.Follow the steps mentioned on the Note:
Call Transaction SE51. Enter the following parameters on the initial screen:
Program: SAPVF040
Screen number: 1002
Subobject: Layout Editor
Press the "Change" button.
Double-click the field BSEG-SGTXT. On the screen "Screen Painter: Attributes", change the defined length field attribute to 50. Save and activate the change.
Regards
Antonio -
How to use Adobe Edge Web Fonts correctly
I am a Dreamweaver newbie and am trying to learn how to use it through the tutorials. I am stuck at part 3 trying to use Adobe Edge Web Fonts correctly in my web site. As far as I can tell I have followed the instructions in the tutorial correctly, but the font style effect does not show up on my site. I am working on a Windows 7 machine and using Dreamweaver 5.5. I have copied and pasted the javascript into the correct spot in the head of the index.html page as well as included the font-family name in the CSS file and saved the whole smash. The source code for my index page looks exactly like the sample in the tutorial, and I have tried to view my site in my browser, but no dice. Doesn't display the Edge Web Font style in the web page. I believe I've done everything according to the directions, but I suppose I've missed some small detail. Any suggestions greatly appreciated
You need to add a <script> to the head of your documents like the example below. In my example, I'm using all of the aguafina-script and league-gothic fonts.
<!--Edge Font-->
<script src="//use.edgefonts.net/aguafina-script:n4:all;league-gothic:n4:all.js"></script>
CSS:
h1 {
font-family: league-gothic, sans-serif;
font-weight:bold;
color: #639;
font-size: 250%;
A simple way to get the correct codes is to go to Adobe Edge Web Fonts and select the font you wish to use.
https://edgewebfonts.adobe.com/fonts
NOTE: You won't see the custom web fonts displayed in Design View, Live View or when previewed locally unless you use a local testing server. An easier way to test is by uploading the page to your remote server.
Hope this helps,
Nancy O. -
How can I implement a Digital I/O counter with a maximum source frequency of 80 MHz (like 6602 board) using CompactRIO? It appears as if the Digital I/O modules for CompactRIO are much slower than this.
Thank you,
--RayHi Ray,
The highest frequency input we offer for C Series modules is 20 MHz if you are doing LVTTL and 10 MHz for 5 V TTL. These modules are the 9402 and 9401, respectively. Unfortunately, there is no 80 MHz input on this form-factor.
Regards,
Chris E.
Applications Engineer
National Instruments
http://www.ni.com/support -
all web pages appear with a blinking cursor like in a "word document". i can't scroll down or up using the buttons of my key board. i have to pull down the scroll bar. something in settings has changed. how to correct it??
== This happened ==
Just once or twice
== 2 days ago.See also this article about caret browsing: http://kb.mozillazine.org/Scrolling_with_arrow_keys_no_longer_works
In Firefox 3.6 and later versions you can disable the F7 shortcut that toggles caret browsing by setting the pref accessibility.browsewithcaret_shortcut.enabled to false.
To open the ''about:config'' page, type '''about:config''' in the location (address) bar and press the Enter key, just like you type the url of a website to open a website.
If you see a warning then you can confirm that you want to access that page. -
Based from my code, how do I implement an ALV grid using OO concept...
Hello experts,
I am currently practicing ABAP Objects and I would like to use alv in my report. Now, How can I implement ALV in my report in the simplest way possible. Sample codes will be highly appreciated. Thanks guys and take care!
REPORT z_aris_oo_practice_9
NO STANDARD PAGE HEADING
LINE-SIZE 0
LINE-COUNT 0.
TABLES: spfli.
Selection screen
SELECTION-SCREEN BEGIN OF BLOCK box1 WITH FRAME.
SELECTION-SCREEN BEGIN OF BLOCK box2 WITH FRAME.
PARAMETERS: p_carrid TYPE spfli-carrid,
p_connid TYPE spfli-connid.
SELECTION-SCREEN END OF BLOCK box2.
SELECTION-SCREEN BEGIN OF BLOCK box3 WITH FRAME.
PARAMETERS: p_sumdis AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK box3.
SELECTION-SCREEN END OF BLOCK box1.
INTERFACE status
INTERFACE status.
METHODS write.
ENDINTERFACE. "status
CLASS main DEFINITION
CLASS main DEFINITION.
PUBLIC SECTION.
INTERFACES status.
METHODS: get_data,
combine_data.
CLASS-DATA: counter TYPE i.
PRIVATE SECTION.
TYPES: BEGIN OF t_spfli,
carrid TYPE spfli-carrid,
connid TYPE spfli-connid,
countryfr TYPE spfli-countryfr,
cityfrom TYPE spfli-cityfrom,
airpfrom TYPE spfli-airpfrom,
countryto TYPE spfli-countryto,
cityto TYPE spfli-cityto,
airpto TYPE spfli-airpto,
fltime TYPE spfli-fltime,
deptime TYPE spfli-deptime,
arrtime TYPE spfli-arrtime,
END OF t_spfli.
DATA: it_spfli TYPE STANDARD TABLE OF t_spfli.
ENDCLASS. "main DEFINITION
CLASS main IMPLEMENTATION
CLASS main IMPLEMENTATION.
METHOD status~write.
WRITE: / 'The number of records is:', counter.
ENDMETHOD. "status~write
METHOD get_data.
SELECT carrid connid countryfr
cityfrom airpfrom countryto
cityto airpto fltime
deptime arrtime
FROM spfli
INTO TABLE it_spfli
WHERE carrid = p_carrid.
ENDMETHOD. "get_data
METHOD combine_data.
FIELD-SYMBOLS: <fs_spfli> LIKE LINE OF it_spfli.
LOOP AT it_spfli ASSIGNING <fs_spfli>.
ADD 1 TO counter.
WRITE: / <fs_spfli>-carrid,
<fs_spfli>-connid,
<fs_spfli>-countryfr,
<fs_spfli>-cityfrom,
<fs_spfli>-airpfrom,
<fs_spfli>-countryto,
<fs_spfli>-cityto,
<fs_spfli>-airpto,
<fs_spfli>-fltime,
<fs_spfli>-deptime,
<fs_spfli>-arrtime.
ENDLOOP.
ENDMETHOD. "show_data
ENDCLASS. "main IMPLEMENTATION
START-OF-SELECTION.
DATA: main TYPE REF TO main,
status TYPE REF TO status.
CREATE OBJECT main.
CALL METHOD main->get_data.
CALL METHOD main->combine_data.
CALL METHOD main->status~write.Hi,
Check this example..., In this i implemented so many functionalities like top_of_page, drop_down at cell level etc.., also Check the programs BCALVEDIT also
Just check it.
REPORT ZTEST_ALV_OO 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.
DATA: IT_ROW_NO TYPE LVC_T_ROID,
X_ROW_NO TYPE LVC_S_ROID.
DATA:BEGIN OF ITAB OCCURS 0,
VBELN LIKE LIKP-VBELN,
POSNR LIKE LIPS-POSNR,
CELLCOLOR TYPE LVC_T_SCOL, "required for color
DROP(10),
check,
END OF ITAB.
"The Below Definitions Must.....
DATA:
* Reference to document
DG_DYNDOC_ID TYPE REF TO CL_DD_DOCUMENT,
* Reference to split container
DG_SPLITTER TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
* Reference to grid container
DG_PARENT_GRID TYPE REF TO CL_GUI_CONTAINER,
* Reference to html container
DG_HTML_CNTRL TYPE REF TO CL_GUI_HTML_VIEWER,
* Reference to html container
DG_PARENT_HTML TYPE REF TO CL_GUI_CONTAINER.
"up to here
* 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,
TOP_OF_PAGE FOR EVENT TOP_OF_PAGE "event handler
OF CL_GUI_ALV_GRID
IMPORTING E_DYNDOC_ID.
* END_OF_LIST FOR EVENT end_of_list "event handler
* OF CL_GUI_ALV_GRID
* IMPORTING E_DYNDOC_ID.
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'.
CLEAR IT_ROW_NO[].
X_ROW_NO-ROW_ID = V_ROW.
APPEND X_ROW_NO TO IT_ROW_NO .
CALL METHOD G_GRID->SET_SELECTED_ROWS
EXPORTING
IT_ROW_NO = IT_ROW_NO.
ENDMETHOD. "lcl_event_handler
*Handle Double Click
METHOD HANDLE_DOUBLE_CLICK.
CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
V_ROW = E_ROW.
V_COLUMN = E_COLUMN.
V_ROW_NUM = ES_ROW_NO.
IF E_COLUMN = 'VBELN'.
SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
ENDIF.
IF E_COLUMN = 'POSNR'.
SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN."
ENDIF.
ENDMETHOD. "handle_double_click
* METHOD END_OF_LIST. "implementation
** Top-of-page event
* PERFORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID.
* ENDMETHOD. "top_of_page
METHOD TOP_OF_PAGE. "implementation
* Top-of-page event
PERFORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID.
ENDMETHOD. "top_of_page
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.
data: v_lines type i.
data: v_line(3) type c.
*- 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.
SELECT VBELN
POSNR
FROM LIPS
UP TO 20 ROWS
INTO CORRESPONDING FIELDS OF TABLE ITAB.
describe table itab lines v_lines.
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.
"attention.....from here
"split your container here...into two parts
"create the container
CREATE OBJECT G_CUSTOM_CONTAINER
EXPORTING CONTAINER_NAME = G_CONTAINER1.
"this is for top of page
* Create TOP-Document
CREATE OBJECT DG_DYNDOC_ID
EXPORTING STYLE = 'ALV_GRID'.
* Create Splitter for custom_container
CREATE OBJECT DG_SPLITTER
EXPORTING PARENT = G_CUSTOM_CONTAINER
ROWS = 2
COLUMNS = 1.
* Split the custom_container to two containers and move the reference
* to receiving containers g_parent_html and g_parent_grid
"i am allocating the space for grid and top of page
CALL METHOD DG_SPLITTER->GET_CONTAINER
EXPORTING
ROW = 1
COLUMN = 1
RECEIVING
CONTAINER = DG_PARENT_HTML.
CALL METHOD DG_SPLITTER->GET_CONTAINER
EXPORTING
ROW = 2
COLUMN = 1
RECEIVING
CONTAINER = DG_PARENT_GRID.
* CALL METHOD DG_SPLITTER->GET_CONTAINER
* EXPORTING
* ROW = 2
* COLUMN = 1
* RECEIVING
* CONTAINER = DG_PARENT_HTML.
* CALL METHOD DG_SPLITTER->GET_CONTAINER
* EXPORTING
* ROW = 1
* COLUMN = 1
* RECEIVING
* CONTAINER = DG_PARENT_GRID.
"you can set the height of it
* Set height for g_parent_html
CALL METHOD DG_SPLITTER->SET_ROW_HEIGHT
EXPORTING
ID = 1
HEIGHT = 5.
"from here as usual..you need to specify parent as splitter part
"which we alloted for grid
CREATE OBJECT G_GRID
EXPORTING I_PARENT = DG_PARENT_GRID.
* 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.
* SET HANDLER G_HANDLER->END_OF_LIST FOR G_GRID.
SET HANDLER G_HANDLER->TOP_OF_PAGE 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[].
"do these..{
* Initializing document
CALL METHOD DG_DYNDOC_ID->INITIALIZE_DOCUMENT.
* Processing events
CALL METHOD G_GRID->LIST_PROCESSING_EVENTS
EXPORTING
I_EVENT_NAME = 'TOP_OF_PAGE'
I_DYNDOC_ID = DG_DYNDOC_ID.
"end }
* 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 = 'Check'.
X_FIELDCAT-FIELDNAME = 'CHECK'.
X_FIELDCAT-TABNAME = 'IT_FINAL'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-CHECKbox = 'X'.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-OUTPUTLEN = '1'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
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
*& Form EVENT_TOP_OF_PAGE
* text
* -->DG_DYNDOC_ID text
FORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID TYPE REF TO CL_DD_DOCUMENT.
"this is more clear.....check it
"first add text, then pass it to comentry write fm
DATA : DL_TEXT(255) TYPE C. "Text
* Populating header to top-of-page
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = 'Test Report'
SAP_STYLE = CL_DD_AREA=>HEADING.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
CLEAR : DL_TEXT.
* Move program ID
CONCATENATE 'Program Name :' SY-REPID
INTO DL_TEXT SEPARATED BY SPACE.
* Add Program Name to Document
PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
CLEAR : DL_TEXT.
* Move User ID
CONCATENATE 'User ID :' SY-UNAME INTO DL_TEXT SEPARATED BY SPACE
* Add User ID to Document
PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
CLEAR : DL_TEXT.
* Move count (no of records).
move v_lines to v_line.
CONCATENATE 'No of records :' v_line INTO DL_TEXT SEPARATED BY SPACE.
* Add Client to Document
PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
CLEAR : DL_TEXT.
* Move date
WRITE SY-DATUM TO DL_TEXT.
CONCATENATE 'Date :' DL_TEXT INTO DL_TEXT SEPARATED BY SPACE.
* Add Date to Document
PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
CLEAR : DL_TEXT.
* Move time
WRITE SY-UZEIT TO DL_TEXT.
CONCATENATE 'Time :' DL_TEXT INTO DL_TEXT SEPARATED BY SPACE.
* Add Time to Document
PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
* Populating data to html control
PERFORM HTML.
ENDFORM. " EVENT_TOP_OF_PAGE
*& Form ADD_TEXT
* To add Text
FORM ADD_TEXT USING P_TEXT TYPE SDYDO_TEXT_ELEMENT.
* Adding text
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = P_TEXT
SAP_EMPHASIS = CL_DD_AREA=>HEADING.
ENDFORM. " ADD_TEXT
*& Form HTML
* text
FORM HTML.
DATA : DL_LENGTH TYPE I, " Length
DL_BACKGROUND_ID TYPE SDYDO_KEY VALUE SPACE. " Background_id
* Creating html control
IF DG_HTML_CNTRL IS INITIAL.
CREATE OBJECT DG_HTML_CNTRL
EXPORTING
PARENT = DG_PARENT_HTML.
ENDIF.
* Reuse_alv_grid_commentary_set
CALL FUNCTION 'REUSE_ALV_GRID_COMMENTARY_SET'
EXPORTING
DOCUMENT = DG_DYNDOC_ID
BOTTOM = SPACE
IMPORTING
LENGTH = DL_LENGTH.
* Get TOP->HTML_TABLE ready
CALL METHOD DG_DYNDOC_ID->MERGE_DOCUMENT.
* Set wallpaper
CALL METHOD DG_DYNDOC_ID->SET_DOCUMENT_BACKGROUND
EXPORTING
PICTURE_ID = DL_BACKGROUND_ID.
* Connect TOP document to HTML-Control
DG_DYNDOC_ID->HTML_CONTROL = DG_HTML_CNTRL.
* Display TOP document
CALL METHOD DG_DYNDOC_ID->DISPLAY_DOCUMENT
EXPORTING
REUSE_CONTROL = 'X'
PARENT = DG_PARENT_HTML
EXCEPTIONS
HTML_DISPLAY_ERROR = 1.
IF SY-SUBRC NE 0.
MESSAGE I999 WITH 'Error in displaying top-of-page'(036).
ENDIF.
ENDFORM. " HTML
Regards
vijay -
Using 10.6.8, internet pdf documents not opening using Adobe Reader; how is this corrected? I've tried changing "sharing and permissions" to "read and write" as suggested on other help sites, but this did not correct the problem.
I had the same problem---contacted Adobe and their service rep helped me by
A. Deleting Adobe Reader from my iMac's Applications in Finder
B. Downloading Google Chrome browser and then
C. Downloading the latest Adobe Reader for Mac 10.6.8 in Google Chrome--it works
Adobe acknowledges problem with the latest Snow Leopard update 10.6.8 and with this work around, I can open PDF's using the Google Chrome Browser.
Is this the ideal solution---NO. Safari is my main browser. I now have to use a separate browser for PDF's.
Am I happy to be able to open PDF's---YES
You can't believe the time I spent to solve this problem before calling Adobe for help. My Apple Care policy expired a month ago . As I use Photoshop Elements, I was not charged by Adobe for their help on the telephone. -
I am a landlord and I organazied my contacts by the address of my tenants. I just joined to Icloud and I am not able to find my tenants in the directory in the computer at all. I could search when I am using my phone but they do not show at first.how can correct this? as an example 37 31 1 and when i type this nothing is showing.
I am a landlord and I organazied my contacts by the address of my tenants. I just joined to Icloud and I am not able to find my tenants in the directory in the computer at all. I could search when I am using my phone but they do not show at first.how can correct this? as an example 37 31 1 and when i type this nothing is showing.
-
How to correctly use a fixed size thread pool?
I am quite new to using concurrency in Java, so please forgive if this is a trivial question.
I would like to make use of something like pool=Executors.newFixedThreadPool(n) to automatically use a fixed number of threads to process pieces of work. I understand that I can asynchronously run some Runnable by one of the threads in the threadpool using pool.execute(someRunnable).
My problem is this: I have some fixed amount of N datastructures myDS (which are not reentrant or sharable) that get initialized at program start and which are needed by the runnables to do the work. So, what I really would like to do is that I not only reuse N threads but also N of these datastructures to do the work.
So, lets say I want to have 10 threads, then I would want to create 10 myDS objects once and for all. Each time some work comes in, I want that work to get processed by the next free thread, using the next free datastructure. What I was wondering is if there is something in the library that lets me do the resusing of threads AND datastructures as simply as just reusing a pool of threads. Ideally, each thread would get associated with one datastructure somehow.
Currently I use an approach where I create 10 Runnable worker objects, each with its own copy of myDS. Those worker objects get stored in an ArrayBlockingQueue of size 10. Each time some work comes in, I get the next Runner from the queue, pass it the piece of work and submit it to the thread pool.
The tricky part is how to get the worker object back into the Queue: currently I essentially do queue.put(this) at the very end of each Runnable's run method but I am not sure if that is safe or how to do it safely.
What are the standard patterns and library classes to use for solving this problem correctly?Thank you for that feedback!
There is one issue that worries me though and I obviously do not understand it enough: as I said I hand back the Runnable to the blocking queue at the end of the Runnable.run method using queue.put(this). This is done via a static method from the main class that creates the threads and runnable objects in a main method. Originally I tried to make that method for putting back the Runnable objects serialized but that inevitably always led to a deadlock or hang condition: the method for putting back the runnable was never actually run. So I ended up doing this without serializing the put action in any way and so far it seems to work ... but is this safe?
To reiterate: I have a static class that creates a thread pool object and a ArrayBlockingQueue queue object of runnable objects. In a loop I use queue.take() to get the next free runnable object, and pass this runnable to pool.execute. Inside the runnable, in method run, i use staticclass.putBack(this) which in turn does queue.put(therunnableigot). Can I trust that this queue.put operation, which can happen from several threads at the same time works without problem without serializing it explicitly? And why would making the staticclass.putBack method serialized cause a hang? I also tried to serialize using the queue object itself instead of the static class, by doing serialize(queue) { queue.put(therunnable) } but that also caused a hang. I have to admit that I do not understand at all why that hang occurred and if I need the serialization here or not. -
Since installing the newest version of Firefox 4.0, I am unable to access my work e-mail which uses Lotus Domino Web Access. Can anyone please tell me how to correct this problem?
Sheesh. That looks hard. I think it will fall over at this point:
"Connect to my Exchange mailbox using HTTP" 'cos Thunderbird uses only the regular email protocols: POP, IMAP and SMTP.
Here (at work) we have in the past have had IMAP and SMTP enabled on our Exchange server so Thunderbird could then connect just like to any other regular internet-based service.
With the change here to outlook365/outlook 2010 I've had to switch to using DavMail which lets Thunderbird talk to the mail server using OWA.
I haven't (seriously) tried Exquilla. Whilst I have great respect for its author and some of his other add-ons, I saw no reason to use an add-on that required payment when DavMail works for free. -
I am trying to upgrade from Tiger to Snow Leopard. When I insert the disk and install starts, it states "This disk is used for Time Machine backups" and Mac OSX can't be installed. Does anyone know how to correct this (since Tiger doesn't have Time Machine)?
http://support.apple.com/kb/TS2986
-
I am using system 10.7.3 and my I photo 9.2.3 keeps crashing upon start up. Does anyone know how to correct this without losing my photos?
Launch the Console application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ If you’re running Mac OS X 10.7 or later, open LaunchPad. Click Utilities, then Console in the page that opens.
Step 1
Enter the name of the crashed application or process in the Filter text field. Post the messages from the time of the last crash, if any — the text, please, not a screenshot.
Important: Some private information, such as your name, may appear in the log. Edit it out by search-and-replace in a text editor before posting.
Step 2
Still in the Console window, look under User Diagnostic Reports for crash reports related to the process. The report name starts with the name of the crashed process, and ends with ".crash". Select the most recent report and post the contents — again, the text, not a screenshot. For privacy’s sake, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.) Please don’t post shutdownStall or hang logs — they're very long and not helpful. -
How to correctly use ThinkVantage System Update?
Hello,
I have ThinkPad E520 for two months and I still don't know how to correctly use System Update. From the beginning I've downloaded and installed all updates, but now I want to do it right. How do you do it? Do you install only updates that you need? Or all updates of program that you use? Or just all updates that System Update offers?
Here is interesting sentence: "If it's not broken, don't fix it!". So how?
I don't want to risk and do unnecessary things... But there is a problem with me, that I don't know, which update do I need... So I really need know, how to do it correctly...
Thank you.Do only use System Update if you have problems with a driver or Thinkvantage Tool - feature.
In my company we never used System update and the laptops are running without any changes (except Windows update) since 5 to 6 years. So i have removed TVSU from all computers.
System Update is a very excellent tool after a clean install from a Windows CD/DVD to install all Lenovo drivers and tools you want to use. A disadvantage of cyclic updates via System Update is, that parts of old drivers in most cases will be kept because the newer driver will be installed over the old one in most cases, which leads after several updates to an instability of the system.
Just my private opinion...
My home-forum: http://www.thinkpad-forum.de
Wiki: Deutsches ThinkPad-Wiki English ThinkWiki
My ThinkPad-Collection -
How to output a CLOB to file using UTF-8
I am working on an 9.2.04 database. I'm generating xml using SQLX functions and inserting the result into a table with a column of XMLTYPE datatype.
The database characterset is WE8ISO8859P15. I need to write the contents of my XMLTYPE column to a file on the server using UTF-8 encoding. I've tried The following :
declare
temp_xml xmltype;
cl clob;
begin
select myxml into temp_xml from xml_table;
cl := temp_xml.getClobVal;
clob_to_xmlfile('XMLDIR','myfilename.xml',cl);
end;
The code for clob_to_xmlfile is :
PROCEDURE clob_to_xmlfile( p_dir IN VARCHAR2,
p_file IN VARCHAR2,
p_clob IN CLOB )
AS
l_output utl_file.file_type;
l_amt number default 32000;
l_offset number default 1;
l_length number default nvl(dbms_lob.getlength(p_clob),0);
BEGIN
-- notice use of fopen_nchar and put_nchar to use unicode
l_output := utl_file.fopen_nchar(p_dir, p_file, 'w', 32760);
while ( l_offset < l_length )
loop
utl_file.put_nchar(l_output,
dbms_lob.substr(p_clob,l_amt,l_offset) );
utl_file.fflush(l_output);
l_offset := l_offset + l_amt;
end loop;
utl_file.new_line(l_output);
utl_file.fclose(l_output);
END clob_to_xmlfile;
However, the resultant file has somehow 'lost' characters, thereby making the xml malformed. I know by inspection that the XMLTYPE column in my table contains valid xml, so the 'corruption' is occuring when I try writing it to file.
Is this something to do with characterset s ?? Can anyone help me with this ??In 10g, DBMS_XMLDOM has writeToFile() writing XML into files without the temporary lobs. It lets you specify a character set parameter. However, 9.2.0.4 doesn't not support character set conversion so this may not work. The options would be upgrading to 10g or building the function like what you have.
The presented code seems to have the followings issues:
(1) the length expansion is not taken into accout; utf-8 encoding needs equal or grater number of bytes to represent the same string in iso-8859-15,
potentially up to 3x. If your buffer was 32k, you should not read more than 10k at a time in order to make sure all characters read from CLOB can fit into the buffer. This problem apparently can cause unexpected behavior: a
symptom may be lost characters.
(2) while ( offset < length ) has a off-by-one problem, as we start counting LOB offset with 1, not zero.
(3) I think utl_file.fflush needs the new line character at the end of buffer so it can tell how much to write. It would be difficult to write a bufferful of data because you have no idea where a line begins and ends
while reading a CLOB.
Probably a more practical approach to make this work would be using the PUT_RAW function with autoflush turned on, where data can be written blindly regardless of when the buffer should be flushed. That is:
-read 10k from the clob (DBMS_LOB.READ)
-manually convert it into UTF-8 to a 30k buffer (UTL_RAW.CONVERT)
-then write it with UTL_FILE.PUT_RAW (UTL_RAW.CAST_TO_RAW)
Maybe you are looking for
-
I created Services.mxml in the tutorial, set it as the default application file, and dragged the first component onto the design view screen, a label, when Flex Builder seems to get sluggish. Jumping out to the task manager revealed javaw.exe rapidly
-
AS3 - External CSS and External text
I'm going nuts here. I have successfully loaded text from an external file. I have successfully loaded styles from external CSS. Trace appear to confirm that both have loaded. My Problem is that I cannot get the styles to apply to the text. I thought
-
Hi I'm sure there is an answer to this already but here we go. I'm new to creating PDF form. All I want to do is create a form that i send to our contacts they complete it and send it back as a completed form. At the moment I'm getting an XML file ba
-
(THE MASK CHALLENGE)How do I mask a moving image?
I see this a lot in OLD NAVY commercials or any TV commercial. CHALLENGE 1.)for example, say I import a mpeg of a man walking, how do I cut only him out and place him in front of another background? CHALLENGE 2.)I am only able to cut a still image(jp
-
Time capsule not seeing old backups, now its backing up my computer again
Hi: I moved my TC today to a new apartment. Same computer and everything. I can mount the drive and see the macbook pro backup file but i cant connect to it with time machine. Now when I back up my computer again, it is starting a new backup of the e