How to display Two frames in HTML....
Hi,
Can someone please advice me on how to display two frams on one page without using FrameSet...
Thanks,
Hi,
Thank you for your reply...
I already have something that i did in Applet but i don't want to use Applet....
The problem with frameset is that i will be adding documents Types Dynamically in HTML List and after clicking the Document Type I want to display Image depending on what Document Type is clicked...
Both the DOCUMENT TYPE and IMAGE, I want to create DYnamically. I don't want to create Two HTML Files (one for Image and One for LIST) and then open it from Another HTML Which contains FrameSets...
I hope you get my point....
Is there any other ways i can do this....
Any help will be greatly appreciated...
Similar Messages
-
How to Display Two Months in Sharepoint Calendar
1. I have SharePoint Server. Do I need other software to the make the following change in Calendar?
2. How to hide Saturday and Sunday or move Sunday to the first day. (Sunday is the last day in my current calendar. )
3. How to display two months on one page?
Thanks.Hello,
For those still looking, you should ask on the
SharePoint forums.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}}) -
How to display two waveforms in one waveform chart?
hellow!anyone can tell me how to display two waveform together in one waveform chart? thanks!
Hello,
An easy way to tell how to make multi-plot charts and graphs is to hold your mouse over the chart/graph terminal on the block diagram and make sure Context Help (Help >> Show Context Help) is enabled. This screen will tell you how to connect the indicator for a multiple-plot display.
You might want to take a look at my attached screenshots of a working multi-plot chart.
Hope this helps!
Liz F
National Instruments
Attachments:
Multi-plot_chart.bmp 902 KB -
How to display two grids in same screen using SALV Method
Hi Freinds,
Please let me know how to display two grids in same screen using SALV Method.
Thank you
Regards,
SDVUsing the same concept as described in How to dispaly Three Internal Table Data (One below another) in ALV OOPS .
All you need to add is passing your new containers as r_container parementer of factory method.
"1st one
cl_salv_table=>factory(
EXPORTING
R_CONTAINER = g_top_container
"2nd one
cl_salv_table=>factory(
EXPORTING
R_CONTAINER = g_bottom_container
Regards
Marcin -
How to display two different hierarchical sequential lists in one o/p scree
Hi Gurus,
I have a requirement for displaying two hierarchical lists in one output screen. I have created my hierarchical sequential lists using
function module : - 'REUSE_ALV_HIERSEQ_LIST_DISPLAY', but i dont know how to append my second hierarchical sequential list
into this.
Will it be easily possible through OO ABAP where i will have two containers at the screen and each container will display one hierarchical sequential list at the output screen. But i have no idea how to do this through OO ABAP.
Please help...
Thanks,
Bhupenderi want to display the records corresponding to the user details enterd
in Text Fields in the same Frame by replacintg the previous display..1) Quit multi-posting.
2) You where given an answer in your last posting on the topic.
3) The code isn't formatted so don't expect us to read the code. -
How to display two pages at a time in smartform
Hi folks,
I have requirement that i need to display two pages for each record of the output table . the page 1 is not simillar to page 2 . page1 contains few templates and page2 contains other templates not simillar to first one.
my case, it displays only the first page eventhough i tried using command line.
Is there any exact step to followed to over come this problem.
Please suggest the solution.
Thanks ,
Hemum.hi,
can u please tell me how and where u are looping throuhg the internal table
check that.
regards,
Ravi Valluri -
How to display two lables in alv report
Is there any chance to display two lables in alv report
for example..
AMOUNT
Rs | Ps
|
like that this for an example.
thanks,
JBHai Babu
Go through the following Code
using Classes & Methods
try with the following Code( Just copy the code & try with in SE38 Tcode & Execute it that all)
REPORT ZALV_SALES_HEADER_DETAIL MESSAGE-ID Z50650(MSG) .
TABLES
TABLES: VBAK . "SALES DOCUMENT HEADER
DATA OBJECTS DECLARATION
DATA: IT_VBAK TYPE STANDARD TABLE OF ZVBAK_STRUC,
IT_VBAP TYPE STANDARD TABLE OF ZVBAP_STRUC,
GS_LAYOUT TYPE LVC_S_LAYO,
GS1_LAYOUT TYPE LVC_S_LAYO,
GRID TYPE REF TO CL_GUI_ALV_GRID,
CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
VBAK_CONTAINER TYPE REF TO CL_GUI_CONTAINER,
VBAP_CONTAINER TYPE REF TO CL_GUI_CONTAINER,
WA_VBAK LIKE LINE OF IT_VBAK,
WA_VBAP LIKE LINE OF IT_VBAP,
SPLITTER TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
TOP_OF_PAGE_CONTAINER TYPE REF TO CL_GUI_CONTAINER,
GRID_VBAP TYPE REF TO CL_GUI_ALV_GRID,
TOP_PAGE TYPE REF TO CL_DD_DOCUMENT,
FLAG(1).
*"EVENT RECIEVER CLASS DEFINITION
CLASS LCL_EVENT_RECIEVER DEFINITION DEFERRED.
DATA: OBJ_EVENT TYPE REF TO LCL_EVENT_RECIEVER.
SELECTION-SCREEN
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
PARAMETERS: P_VBTYP LIKE VBAK-VBTYP DEFAULT 'C'.
SELECTION-SCREEN: END OF BLOCK B1.
CLASS DEFINITION AND DECLARATIONS
CLASS LCL_EVENT_RECIEVER DEFINITION.
PUBLIC SECTION.
EVENTS:DOUBLE_CLICK,
TOP_OF_PAGE.
METHODS:HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW .
METHODS: HANDLE_TOP_OF_PAGE FOR EVENT TOP_OF_PAGE OF CL_GUI_ALV_GRID.
ENDCLASS. "LCL_EVENT_RECIEVER DEFINITION
CLASS LCL_EVENT_RECIEVER IMPLEMENTATION
CLASS LCL_EVENT_RECIEVER IMPLEMENTATION.
METHOD: HANDLE_DOUBLE_CLICK.
READ TABLE IT_VBAK INDEX E_ROW-INDEX INTO WA_VBAK.
PERFORM FETCH_ITEM_DETAILS USING WA_VBAK.
PERFORM ALV_GRID.
ENDMETHOD. "HANDLE_DOUBLE_CLICK
METHOD: HANDLE_TOP_OF_PAGE.
CALL METHOD TOP_PAGE->ADD_TEXT
EXPORTING
TEXT = 'SALES HEADER & ITEM DETAILS'.
CALL METHOD TOP_PAGE->DISPLAY_DOCUMENT
EXPORTING
PARENT = TOP_OF_PAGE_CONTAINER.
ENDMETHOD. "HANDLER_TOP_OF_PAGE
ENDCLASS. "LCL_EVENT_RECIEVER IMPLEMENTATION
AT SELECTION-SCREEN
AT SELECTION-SCREEN.
IF S_VBELN IS NOT INITIAL.
SELECT COUNT(*)
FROM VBAK
WHERE VBELN IN S_VBELN.
IF SY-DBCNT = 0.
MESSAGE E000 WITH 'NO TABLE ENTRIES FOUND FOR LOW KEY SPECIFIED'.
ENDIF.
ENDIF.
START-OF-SELECTION.
START-OF-SELECTION.
PERFORM FETCH_SALES_HEADER_RECORD.
PERFORM CREATE_CALL. "CREATION OF OBJECTS & CALLING METHODS
END-OF-SELECTION.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'ZSTATUS'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Form FETCH_SALES_HEADER_RECORD
text
--> p1 text
<-- p2 text
FORM FETCH_SALES_HEADER_RECORD .
SELECT
VBELN
AUDAT
VBTYP
AUART
AUGRU
NETWR
WAERK
FROM VBAK
INTO CORRESPONDING FIELDS OF TABLE IT_VBAK
WHERE VBELN IN S_VBELN
AND VBTYP = P_VBTYP.
ENDFORM. " FETCH_SALES_HEADER_RECORD
*& Form CREATE_CALL
text
--> p1 text
<-- p2 text
FORM CREATE_CALL .
IF CUSTOM_CONTAINER IS INITIAL.
CREATE OBJECT CUSTOM_CONTAINER
EXPORTING
PARENT =
CONTAINER_NAME = 'CUSTOM_CONTAINER'
STYLE =
LIFETIME = lifetime_default
REPID =
DYNNR =
NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
OTHERS = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT SPLITTER
EXPORTING
TOP = 5
PARENT = CUSTOM_CONTAINER
ROWS = 3
COLUMNS = 1
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD SPLITTER->GET_CONTAINER
EXPORTING
ROW = 1
COLUMN = 1
RECEIVING
CONTAINER = TOP_OF_PAGE_CONTAINER.
CALL METHOD SPLITTER->GET_CONTAINER
EXPORTING
ROW = 2
COLUMN = 1
RECEIVING
CONTAINER = VBAK_CONTAINER.
CALL METHOD SPLITTER->GET_CONTAINER
EXPORTING
ROW = 3
COLUMN = 1
RECEIVING
CONTAINER = VBAP_CONTAINER.
CREATE OBJECT GRID
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = VBAK_CONTAINER
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
GS_LAYOUT-GRID_TITLE = 'SALES HEADER DETAILS.'(100).
CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME = 'ZVBAK_STRUC'
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
IS_LAYOUT = GS_LAYOUT
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
IT_OUTTAB = IT_VBAK
IT_FIELDCATALOG =
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
CREATE OBJECT OBJ_EVENT .
SET HANDLER OBJ_EVENT->HANDLE_DOUBLE_CLICK FOR GRID.
SET HANDLER OBJ_EVENT->HANDLE_TOP_OF_PAGE FOR GRID.
CREATE OBJECT TOP_PAGE
EXPORTING
STYLE = 'ALV_GRID'
CALL METHOD TOP_PAGE->INITIALIZE_DOCUMENT.
CALL METHOD GRID->LIST_PROCESSING_EVENTS
EXPORTING
I_EVENT_NAME = 'TOP_OF_PAGE'
I_DYNDOC_ID = TOP_PAGE.
CALL SCREEN 100.
ENDFORM. " CREATE_CALL
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form FETCH_ITEM_DETAILS
text
--> p1 text
<-- p2 text
FORM FETCH_ITEM_DETAILS USING WA_VBAK TYPE ZVBAK_STRUC .
SELECT
VBELN
POSNR
MATNR
MATWA
PMATN
CHARG
FROM VBAP
INTO TABLE IT_VBAP
WHERE VBELN = WA_VBAK-VBELN.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'NO RECORDS FOUND FOR SPECIFIED KEY'.
ENDIF.
ENDFORM. " FETCH_ITEM_DETAILS
*& Module STATUS_0200 OUTPUT
text
MODULE STATUS_0200 OUTPUT.
SET PF-STATUS 'ZSTATUS'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0200 OUTPUT
*& Module USER_COMMAND_0200 INPUT
text
MODULE USER_COMMAND_0200 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0200 INPUT
*& Form alv_grid
text
--> p1 text
<-- p2 text
FORM ALV_GRID .
IF FLAG = ''.
FLAG = 'X'.
CREATE OBJECT GRID_VBAP
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = VBAP_CONTAINER
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
others = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
GS1_LAYOUT-GRID_TITLE = 'SALES ITEM DETAILS.'(100).
CALL METHOD GRID_VBAP->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME = 'ZVBAP_STRUC'
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
IS_LAYOUT = GS1_LAYOUT
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
IT_OUTTAB = IT_VBAP
IT_FIELDCATALOG =
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " alv_grid
Thansk & regards
Sreenivasulu P -
How to display two or more links in a single column
Hi,
Is there a way to display two links in a single column in a sql query report . I am able to specify one but I am not able to add links to the same column . I want to take the same column id and redirect the user to different pages based on the values selected .
ThanksThere is no way to this declaratively that I know of. Some alternatives...
1. Put the conditional branching logic in the report SQL itself. e.g. case when ... then '< a href=..' else '< a href=...' end and make sure the column display type is Standard Report column
2. Have the declarative column link go to a dummy/intermediate page and setup On Load: Before-Header branches on that page to redirect to the desired page based on the item value(s) passed in to the intermediate page. -
How to display a frame at the upper left corner of each screen?
hi,
below are 2 ways to display a frame at the upper left corner of each screen (i have 2 monitors).
both work but the 2nd way is much slower. which, if any, of the 2 approaches is "more" correct?
import java.awt.Canvas;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.DisplayMode;
import java.awt.event.MouseListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseAdapter;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.JPanel;
// the thing that matters in here is setting the frame's location: xCoord
// is incremented in each iteration by the current screen's width and
// is used to set the frame's x-coordinate.
public static void main(String args[])
GraphicsEnvironment gEnviron = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gDevices = gEnviron.getScreenDevices();
Color colors[] = {Color.blue, Color.red};
for(int i = 0, xCoord = 0; i < gDevices.length; i++)
// set panel's size and frame's size to take up the whole screen
DisplayMode didsplayMode = gDevices.getDisplayMode();
int screenWidth = didsplayMode.getWidth();
int screenHeight = didsplayMode.getHeight();
JPanel panel = new JPanel();
panel.setBackground(colors[i % colors.length]);
JFrame frame = new JFrame();
frame.setSize(new Dimension(screenWidth, screenHeight));
frame.setContentPane(panel);
frame.setUndecorated(true);
// set location of frame.
frame.setLocation(xCoord, 0);
xCoord += screenWidth;
frame.addMouseListener
new MouseAdapter()
public void mousePressed(MouseEvent event) {System.exit(1);}
frame.setVisible(true);
// this is a lot slower and may not be correct: it sets the frame's location by calling
// getConfigurations() on each screen device but using only the 1st configuration
// (it returns 6 on my computer) to get the bounds (for the frame's x-coord).
// a screen device has 1 or more configuration objects but do all the objects
// of the device report the same bounds? if the anwser is yes, then the code
// is correct, but i'm not sure.
public static void main1(String args[])
GraphicsEnvironment gEnviron = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gDevices = gEnviron.getScreenDevices();
Color colors[] = {Color.blue, Color.red};
for(int i = 0; i < gDevices.length; i++)
// set panel's size and frame's size to take up the whole screen
DisplayMode didsplayMode = gDevices[i].getDisplayMode();
int screenWidth = didsplayMode.getWidth();
int screenHeight = didsplayMode.getHeight();
JPanel panel = new JPanel();
panel.setBackground(colors[i % colors.length]);
JFrame frame = new JFrame();
frame.setSize(new Dimension(screenWidth, screenHeight));
frame.setContentPane(panel);
frame.setUndecorated(true);
// set location of frame: getConfigurations() is very time consuming
GraphicsConfiguration[] gConfig = gDevices[i].getConfigurations();
// on my computer: gConfig.length == 6. using the 1st from each set of configs
Rectangle gConfigBounds = gConfig[0].getBounds();
frame.setLocation(gConfigBounds.x, gConfigBounds.y);
frame.addMouseListener
new MouseAdapter()
public void mousePressed(MouseEvent event) {System.exit(1);}
frame.setVisible(true);
thank you.Darryl.Burke wrote:
Blocked one abusive post.
@flounder
Please watch your language.
dbDude - I just looked at your profile. WTF are you doing in India?? -
How to display two database field in report
hi,
i have made a report and in that report i am displaying two fields with same data and these fields are database.In the FORM f_display_report i have given the same name in both fields.But when i going to SUM it gave me only one field SUM and other fields gives null.
give me some guidance as i have to display both fields with same data and same amount of SUM.
Thanksif i am using the database field i-e wt_qbshb then it gave me the data but when im going to sum both field it gave me sum of only one field.This the code:
ITAB:
BEGIN OF gi_main OCCURS 1,
belnr LIKE bseg-belnr, " Document No.
buzei LIKE bseg-buzei, " Item
blart LIKE bkpf-blart, " Document Type
lifnr LIKE bseg-lifnr, " Vendor No.
lifntn LIKE lfa1-stcd2, " NTN
lifnic LIKE lfa1-stcd1, " CNIC
name1 LIKE lfa1-name1, " Vendor Name
stras LIKE lfa1-stras, " Address
ort01 LIKE lfa1-ort01, " City
qekar LIKE v_t059e-qekar, " Source of income Description
qscod LIKE v_t059z-qscod, " Section Code
budat LIKE bkpf-budat, " Date of Payment(DD/MM/YYYY).
dmbtr LIKE bseg-dmbtr, " WHT Base Amount
qsatz LIKE v_t059z-qsatz, " Rate of WHT
dmbtr LIKE bseg-dmbtr, " WHT Base Amount
wt_qbshb LIKE with_item-wt_qbshb, " Amt of tax collected & deducted
AMT_TAX TYPE with_item-wt_qbshb, "Amt tax Deposited.
p_tax type sy-datum, " Date of Tax Deposited
witht LIKE t059z-witht, " WHT Type
wt_withcd LIKE t059z-wt_withcd, " WHT Code
hkont LIKE with_item-hkont, " Gl Code
text40 LIKE t059ot-text40, " Section Description
eatxt LIKE v_t059e-eatxt, " Source of Income Code
END OF gi_main,
and this is the BEGIN OF gi_main OCCURS 1,
belnr LIKE bseg-belnr, " Document No.
buzei LIKE bseg-buzei, " Item
blart LIKE bkpf-blart, " Document Type
lifnr LIKE bseg-lifnr, " Vendor No.
lifntn LIKE lfa1-stcd2, " NTN
lifnic LIKE lfa1-stcd1, " CNIC
name1 LIKE lfa1-name1, " Vendor Name
stras LIKE lfa1-stras, " Address
ort01 LIKE lfa1-ort01, " City
qekar LIKE v_t059e-qekar, " Source of income Description
qscod LIKE v_t059z-qscod, " Section Code
budat LIKE bkpf-budat, " Date of Payment(DD/MM/YYYY).
dmbtr LIKE bseg-dmbtr, " WHT Base Amount
qsatz LIKE v_t059z-qsatz, " Rate of WHT
dmbtr LIKE bseg-dmbtr, " WHT Base Amount
wt_qbshb LIKE with_item-wt_qbshb, " Amt of tax collected & deducted
AMT_TAX TYPE with_item-wt_qbshb, "Amt tax Deposited.
p_tax type sy-datum, " Date of Tax Deposited
witht LIKE t059z-witht, " WHT Type
wt_withcd LIKE t059z-wt_withcd, " WHT Code
hkont LIKE with_item-hkont, " Gl Code
text40 LIKE t059ot-text40, " Section Description
eatxt LIKE v_t059e-eatxt, " Source of Income Code
END OF gi_main,
and this is the BEGIN OF gi_main OCCURS 1,
belnr LIKE bseg-belnr, " Document No.
buzei LIKE bseg-buzei, " Item
blart LIKE bkpf-blart, " Document Type
lifnr LIKE bseg-lifnr, " Vendor No.
lifntn LIKE lfa1-stcd2, " NTN
lifnic LIKE lfa1-stcd1, " CNIC
name1 LIKE lfa1-name1, " Vendor Name
stras LIKE lfa1-stras, " Address
ort01 LIKE lfa1-ort01, " City
qekar LIKE v_t059e-qekar, " Source of income Description
qscod LIKE v_t059z-qscod, " Section Code
budat LIKE bkpf-budat, " Date of Payment(DD/MM/YYYY).
dmbtr LIKE bseg-dmbtr, " WHT Base Amount
qsatz LIKE v_t059z-qsatz, " Rate of WHT
dmbtr LIKE bseg-dmbtr, " WHT Base Amount
wt_qbshb LIKE with_item-wt_qbshb, " Amt of tax collected & deducted
AMT_TAX TYPE with_item-wt_qbshb, "Amt tax Deposited.
p_tax type sy-datum, " Date of Tax Deposited
witht LIKE t059z-witht, " WHT Type
wt_withcd LIKE t059z-wt_withcd, " WHT Code
hkont LIKE with_item-hkont, " Gl Code
text40 LIKE t059ot-text40, " Section Description
eatxt LIKE v_t059e-eatxt, " Source of Income Code
END OF gi_main,
and this is the PERFROM DISPLAY REPORT:
PERFORM fill_fieldcat USING 'LIFNTN' 11 'NTN' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'LIFNIC' 16 'NIC' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'LIFNR' 10 'Vendor' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'NAME1' 35 'Name' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'STRAS' 35 'Address' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'ORT01' 35 'City' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'QEKAR' 40 'Nature of Payment etc' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'QSCOD' 10 'Payment Section Code' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'BUDAT' 10 'Date of Payment(dd/mm/yyyy)' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'DMBTR' 20 'Value/Amount on which Tax Collected or Deducted' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'QSATZ' 10 'Rate of tax (%)' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'WT_QBSHB' 16 'Tax Amount Collected/Deducted' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'WT_QBSHB' 16 'Amount of Deposited' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'P_TAX'(001) 15 'Date of Tax Deposited(DD/MM/YYYY)' 'GI_MAIN'.
Thanks. -
How to display two "columns" in combobox?
Hi,
I need to display two strings for each row of a combobox. Say string array str1 = {"abc", "aw", "axz12"}, str2 = {"12.1", "33.123", "5.06612"}. Now I want to display them in a combo box as a "table with 2 columns", i.e. when the drop down menu is clicked, it will show something like a table (with or w/o borders)
abc 12.1
aw 33.123
axz12 5.06612
if the first one is selected, it will show "abc 12.1". I could use jcomboboxA.addItem(str1[i] + " " + str2), but it does not show nicely -- not as a table. Is there any way to do it?
Thanks!
HarveyThanks for the answer to the first question. Though if I include the list.setFont() method in the getListCellRendererComponent or in the custom UI i've created, I still get monospaced data.
As for the second one about getting long data to display correctly
I already changed the tabstop location from right to left and all data appears fine for most of the elements in the list, but if the text is very long for the second column, the long text values in the 2nd column smash up against the values in the first column. (I wish I could provide a screen print here... a thousand words and all that). Here's what the data looks like in the list:
aa's really really really really really long description
x x's description
y y's description
zz's really really really really long description
I've already resized the popup list so there's plenty of room to show the long text. I'll paste the code here so you can see exactly what I've got. I give the combobox 2 string arrays, one for codes & one for descriptions. combo.getText() needs to give JUST the code. The popup window stuff is mostly cut & paste (probably from camikr's other posting), so I'm not sure if the difficulty is there... I cannot profess to understand each line.
Thanks all, for any input...
public class CustomComboBox extends JComboBox {
public int _maxdatawidth = 0;
private int size;
public CustomComboBox(Object[] codes, Object[] names) {
size = codes.length;
int textlength = 0;
String data [][] = new String[size][2];
for (int i = 0; i < size; i++) {
data[0] = (String) codes[i];
data[i][1] = (String) names[i];
if (data[i][1].length() > textlength)
textlength = data[i][1].length();
// create a customized model for getting selected item.
DefaultComboBoxModel model = new DefaultComboBoxModel(data);
this.setModel(model);
setRenderer(new TabListRenderer());
// set the maxwidth for popup size
FontMetrics fm = this.getFontMetrics(this.getFont());
// give 20% buffer to make sure the popup is big enough
_maxdatawidth = Math.round((textlength) * fm.charWidth('W') * 1.20F);
// select the first item by default
// must select the item before setting the UI to show the default.
// ttcp 7/1 trying to select item. >>> NOT working.
this.getModel().setSelectedItem(data[1]);
this.getModel().setSelectedItem(data[0]);
// this.setSelectedItem(data[0]);
// set the UI
setUI(new CustomComboBoxUI(this));
// select the first item by default
// this.setSelectedItem(data[0]);
// this.setSelectedIndex(0);
// this.setSelectedIndex(0);
public Object getSelectedData() {
Object loReturn = null;
loReturn = super.getSelectedItem();
if (loReturn instanceof Object[]) {
Object[] selecteddata = (Object[]) loReturn;
if (selecteddata.length > 0)
loReturn = selecteddata[0];
else {
loReturn = null;
return loReturn;
class TabListRenderer extends JTextPane implements ListCellRenderer {
private static final int TAB_COLUMN = 12;
private Color background = UIManager.getColor("ComboBox.selectionBackground");
private Color foreground = UIManager.getColor("ComboBox.selectionForeground");
// private Font font = UIManager.getFont("List.font");
TabListRenderer() {
setMargin(new Insets(0, 0, 0, 0));
// can't seem to get the font NOT monospaced.
setFont(new Font("Dialog", Font.PLAIN, 11));
FontMetrics fm = getFontMetrics(getFont());
int tabWidth = fm.charWidth('w') * TAB_COLUMN;
TabStop tab = new TabStop(tabWidth, TabStop.ALIGN_RIGHT, TabStop.LEAD_NONE);
TabStop[] tabs = new TabStop[1];
tabs[0] = tab;
TabSet tabSet = new TabSet(tabs);
SimpleAttributeSet attributes = new SimpleAttributeSet();
StyleConstants.setTabSet(attributes, tabSet);
getStyledDocument().setParagraphAttributes(0, 0, attributes, true);
setPreferredSize(new Dimension(tabWidth, fm.getHeight()));
public Component getListCellRendererComponent(
JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
String leftData = ((String[]) value)[0];
String rightData = ((String[]) value)[1];
setText(leftData + "\t" + rightData);
setBackground(isSelected ? background : null);
setForeground(isSelected ? foreground : null);
return this;
class CustomComboBoxUI extends MetalComboBoxUI {
final CustomComboBox _box;
public CustomComboBoxUI(final CustomComboBox pobox) {
super();
_box = pobox;
protected ComboPopup createPopup() {
BasicComboPopup popup = new BasicComboPopup(comboBox) {
public void show() {
Dimension popupSize = _box.getSize();
popupSize.setSize(_box._maxdatawidth, getPopupHeightForRowCount(_box.getMaximumRowCount()));
Rectangle popupBounds = computePopupBounds(_box.getX(), comboBox.getBounds().height, popupSize.width, popupSize.height);
scroller.setMaximumSize(popupBounds.getSize());
scroller.setPreferredSize(popupBounds.getSize());
scroller.setMinimumSize(popupBounds.getSize());
list.invalidate();
int selectedIndex = comboBox.getSelectedIndex();
if (selectedIndex == -1) {
list.clearSelection();
} else {
list.setSelectedIndex(selectedIndex);
list.ensureIndexIsVisible(list.getSelectedIndex());
setLightWeightPopupEnabled(comboBox.isLightWeightPopupEnabled());
show(comboBox, popupBounds.x, popupBounds.y);
popup.getAccessibleContext().setAccessibleParent(comboBox);
return popup; -
How to display two different parts of one image in two windows?
hi everyone:) i need to display two different parts of one image in two windows. i have problem with displaying :/ because after creating windows there aren't any images :( i supose my initialization code of creating windows is incomplete, maybe i miss something or maybe there is some inconistency. graphics in java is not my strong position. complete code is below. can anybody help me?
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;
import javax.swing.*;
import java.util.*;
class ImgFrame extends JFrame
private BufferedImage img;
ImgFrame(BufferedImage B_Img, int x, int y, int w, int h)
super("d");
img=new BufferedImage(w,h,BufferedImage.TYPE_INT_RGB);
img=B_Img.getSubimage(x, y, w, h);
}//end ImgFrame construction
public void paint(Graphics g)
Graphics2D g2D = (Graphics2D)g;
g.drawImage(img, 8, 8, null);
}//end paint method
public Dimension getPrefferedSize()
if(img==null)
return(new Dimension(100,100));
else
return(new Dimension(img.getWidth(null),img.getHeight(null)));
}//end of GetPrefferedSize method
}//end ImgFrame class
public class TestGraph2D_03 extends Component
static BufferedImage IMG;
public static void Load()
try
IMG=ImageIO.read(new File("c:/test.bmp"));
catch(IOException ioe)
System.out.println("an exception: "+ioe);
}//end try catch
}//end TestGraph2D_03 construction
public static void main(String[] args)
Load();
ImgFrame F1 = new ImgFrame(IMG, 0, 0, 8, 8);
ImgFrame F2 = new ImgFrame(IMG, 8, 8, 8, 8);
F1.addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);
F1.pack();
F1.setVisible(true);
F2.addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);
F2.pack();
F2.setVisible(true);
}//end of main method in TestGraph2D_01 class
}//end of TestGraph2D_03 classNever override the paint(...) method of a Swing component.
If you have a sub image then add the image to a JLabel and add the label to the GUI. No need for custom painting. -
How to display internal frame on click event from another internal frame
hi me developing desktop application in netbean. i have some problem. plz reply me as soon as possible. feedback me on [email protected]
1. I want to invoke an Internal Frame by click event that is in another internal frame. how i do it. I tried my best
2. how can i call reports (ireports) from swing applicationRead the JInternalFrame API. You will find a link to the Swing tutorial on "How to Use Internal Frames" which contains a working example.
-
How to display two-lines strings item
Hi,
How can I display list of two-line string items? Each Item in the list should have a phone number and a time. It should look similar to the "dialled numbers" display where each item has an image, and two-line string.
Is it possible doing it with the high-level API or should I go low-level?
Thanks in advance
Imzadiuse: list.setFitPolicy(Choice.TEXT_WRAP_ON)
-
How to display two calendars in a page
Hi,
I use Calendar wizard to display calendar in HTML DB. I am not able to display more than one calendar. Any help is highly appreciated.
Thanks,
Sathya.i) goto WIZARD tab after choosing your application.
ii) In the WIZARD tab, click on calendar and give the inputs required. Try to create one more calendar on the same page once you have created your first one.
iii) My HTML DB version is 1.5
In addition, It would be great if you can tell me how to fill up colors in the cells, once you are able to create the calendar.
Thanks.
Maybe you are looking for
-
Archive Link Authorization problem for Business Partner.
Hi Experts, Currently we are attaching documents to respective objects through Tr. OAWD & these documents are available in service for object as attachment, until this it is working fine. But we are facing problem of authorization for archive link of
-
hi I'm having a tidy up og my hard drive, and I just found a huge (10g) file in my user/library/mirrors that appears as my user name and a .dmg tag Any ideas on what this might be, when i try and open it Omnioutliner opens but no info given regards S
-
I cannot open finder preferences
Hi There, I am trying to empty my trash and I noticed that it was taking a very long time (hours and it still has not removed the files). I did a search for some suggestions and the one that kept coming up was to look at the "Empty Trash Securely" op
-
Hi Since propagation tool doesnt propagate some of the security data (like global roles etc for more details http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/prodOps/propToolAdvanced.html#wp1054464 ). We would like to use the import/export op
-
Cannot paste password into prompt when importing a certificate
I wanted to import an email signing certificate into my Keychain Access application, but when I import and am prompted for the password to open the certificate, the Keychain Access application won't let me paste anything in the password prompt. Has