ALV  display for  row  s   and columns in this format.have ur full points..

Hi ALL
  I have to dispalay data in the ALV format as :
Basic
DA
HRA
PF
VPF
20000
500
5000
| 1500     | 600  |          |
Details :  Basic   HRA in one Row and   PF , VPF in  second Row.
The Amount  regarding htese fields are also displayed in the next rows for all  emp. numbers.
its urgent for me and need helpful answers...
Regards
Lakhan

see the attached code it will display the hierarchial display as per your need
change the internal tables with dat of your own orgn structure and pass it to the fun module.
Description : Pick Status Report
This is an ALV report using the heirarchical ALV list display. The
report selects all deliveries that fulfil the selection criteria
and displays a summary of all items in that delivery with reference
to certain statuses: overall status, goods issue status, transfer
order status, load to pallet status, pallet count status, loaded to
van status, van manifest printed status and end of day manifest
printed status. These statuses have been defined by the business.
There is extra functionality required to trigger printing of the van
and end of day manifests from this report, and to set the loading
end status of a shipment if the last handling unit of a particular
shipment has been loaded onto a van for which the van manifest has
been triggered.
REPORT zwmr_pick_status_report NO STANDARD PAGE HEADING
MESSAGE-ID zw.
Type Pools
TYPE-POOLS: icon, slis.
Tables
TABLES: tvst,
likp,
t30b,
vekp,
*{ INSERT UKMK900355 4
zhu_to_link, "AS03
*} INSERT
zpallettr,
vttk, "MB01
zvantr.
Types
TYPES:
BEGIN OF ty_data,
lgtor LIKE likp-lgtor, " door
vbeln LIKE likp-vbeln, " delivery
wbstk LIKE vbuk-wbstk, " Goods movement status
kostk LIKE vbuk-kostk, " Picking status
posnr LIKE lips-posnr, " item
route LIKE likp-route, " route
wadat LIKE likp-wadat, " goods issue date
lvsta LIKE vbup-lvsta, " warehouse status
packvorschr LIKE vekp-packvorschr, " pack mnemonic
exidv LIKE vekp-exidv, " handling unit
zpallet_no(10), "like zpallettr-zpallet_no, " pallet no
zdep_point LIKE zpallettr-zdep_point, "Departur Point "Jvdm01
zcount_check LIKE zpallettr-zcount_check," count check flag
zvan_no(10), "like zvantr-zvan_no, " van no
zvan_print LIKE zvantr-zvan_print, " van manifest print
tknum LIKE vttk-tknum, " Shipment No "ANV 11523
zeod_print LIKE zvantr-zeod_print, " eod manifest print
zzpackclass LIKE vekp-zzpackclass, " package class
zzti LIKE vekp-zzti, " T.I. value
vstel LIKE likp-vstel, "Shipping point RM050906
anzpk TYPE znopack, "No of packages in dlv MB01+
END OF ty_data.
TYPES:BEGIN OF x_likp ,
vbeln LIKE likp-vbeln,
vstel LIKE likp-vstel, "RM050906
lgtor LIKE likp-lgtor,
zzroute2lgtor LIKE likp-zzroute2lgtor, "MB01
route LIKE likp-route,
wadat LIKE likp-wadat,
zz2route LIKE likp-zz2route, "MB01+
zzexproute LIKE likp-zzexproute, "MB01+
zzroute2 LIKE likp-zzroute2, "MB01+
anzpk LIKE likp-anzpk,
END OF x_likp.
TYPES: BEGIN OF x_vbuk,
vbeln TYPE vbuk-vbeln,
wbstk TYPE vbuk-wbstk, " Goods movement status
kostk TYPE vbuk-kostk, " Picking status
END OF x_vbuk.
TYPES: BEGIN OF x_lips,
vbeln TYPE lips-vbeln, " delivery
posnr TYPE lips-posnr, " item
pstyv TYPE lips-pstyv,
matnr TYPE lips-matnr,
charg TYPE lips-charg,
END OF x_lips.
TYPES: BEGIN OF x_vbup,
vbeln TYPE vbup-vbeln, " delivery
posnr TYPE vbup-posnr, " item
lvsta TYPE vbup-lvsta, " warehouse status
END OF x_vbup.
TYPES: BEGIN OF x_vepo,
venum TYPE vepo-venum, "Internal Handling Unit
Number
vepos TYPE vepo-vepos, "Handling Unit Item
vbeln TYPE vepo-vbeln, " delivery
posnr TYPE vepo-posnr, " item
exidv TYPE vekp-exidv,
END OF x_vepo.
TYPES: BEGIN OF x_vepo1,
venum TYPE vekp-venum, "Internal Handling Unit
Number
exidv TYPE vekp-exidv,
END OF x_vepo1.
Start of changes by ANV SR#11523
TYPES: BEGIN OF x_vttp,
tknum TYPE tknum, " Shipment No
tpnum TYPE tpnum, " Item No
vbeln TYPE vbup-vbeln, " delivery
laufk LIKE vttk-laufk, " leg indicator MB01+
END OF x_vttp.
End of changes by ANV SR#11523
Data
RANGES: r_del FOR likp-vbeln,
r_lgtor FOR likp-lgtor.
RANGES: r_vanno FOR zvantr-zvan_no,
r_palno FOR zpallettr-zpallet_no.
DATA: BEGIN OF number_range OCCURS 0,
mark(1),
id(3),
num(10) TYPE n,
desc LIKE zpalletmd-zdesc,
END OF number_range.
DATA: t_disp_tab TYPE STANDARD TABLE OF zpickdisp,
t_data_tab TYPE ty_data OCCURS 0 WITH HEADER LINE,
it_likp TYPE x_likp OCCURS 0 WITH HEADER LINE, "SUM
it_vbuk TYPE x_vbuk OCCURS 0 WITH HEADER LINE, "SUM
it_lips TYPE x_lips OCCURS 0 WITH HEADER LINE, "SUM
it_vbup TYPE x_vbup OCCURS 0 WITH HEADER LINE, "SUM
it_vepo TYPE x_vepo OCCURS 0 WITH HEADER LINE, "SUM
it_vepo2 TYPE x_vepo OCCURS 0 WITH HEADER LINE, "SUM
*{ INSERT UKMK900355 3
t_vepo_low TYPE x_vepo OCCURS 0 WITH HEADER LINE, " AS01
*} INSERT
it_vepo1 TYPE x_vepo1 OCCURS 0 WITH HEADER LINE, "SUM
it_vttp TYPE x_vttp OCCURS 0 WITH HEADER LINE, "ANV SR#11523
t_disp_head TYPE STANDARD TABLE OF zpickhead.
DATA wa_item_tab TYPE zpickdisp OCCURS 0 WITH HEADER LINE.
"ANV SR#11113
DATA: w_numrnge LIKE number_range,
w_number(10) TYPE n.
DATA: t_likp LIKE likp OCCURS 0 WITH HEADER LINE,
t_lips LIKE lips OCCURS 0 WITH HEADER LINE,
t_vbuk LIKE vbuk OCCURS 0 WITH HEADER LINE,
t_vbup LIKE vbup OCCURS 0 WITH HEADER LINE,
t_vepo LIKE vepo OCCURS 0 WITH HEADER LINE,
t_vekp LIKE vekp OCCURS 0 WITH HEADER LINE,
t_vantr LIKE zvantr OCCURS 0 WITH HEADER LINE,
t_pallettr LIKE zpallettr OCCURS 0 WITH HEADER LINE,
w_likp like likp,
w_lips LIKE lips,
w_vbuk LIKE vbuk,
w_vbup LIKE vbup,
w_vepo LIKE vepo,
w_vekp LIKE vekp,
w_vepo TYPE x_vepo1,
w_vbup TYPE x_vbup,
w_vttp TYPE x_vttp, " ANV SR#11523
w_lips TYPE x_lips,
w_vbuk TYPE x_vbuk,
w_likp TYPE x_likp, "MB01-+
w_tplst LIKE vttk-tplst. "MB01+
DATA: s_variant LIKE disvariant, "MB01+
def_variant LIKE disvariant.
ALV DATA *****
DATA:
g_grid TYPE REF TO cl_gui_alv_grid,
g_sort TYPE slis_t_sortinfo_alv,
g_custom_container TYPE REF TO cl_gui_custom_container,
g_layout TYPE slis_layout_alv,
gt_fieldcat TYPE slis_t_fieldcat_alv,
t_fldcat LIKE LINE OF gt_fieldcat,
g_keyinfo TYPE slis_keyinfo_alv,
gt_events TYPE slis_t_event,
gs_event TYPE slis_alv_event,
w_sy_repid LIKE sy-repid.
DATA: BEGIN OF seltab OCCURS 0.
INCLUDE STRUCTURE rsparams.
DATA: END OF seltab.
SYSTEM GENERATED TABLE CONTROL DATA ********
DECLARATION OF TABLECONTROL 'TC_TABCON' ITSELF
CONTROLS: tc_tabcon TYPE TABLEVIEW USING SCREEN 0100.
LINES OF TABLECONTROL 'TC_TABCON'
DATA: g_tc_tabcon_lines LIKE sy-loopc.
DATA: ok_code LIKE sy-ucomm.
Constants
CONSTANTS: c_data_class LIKE klah-class VALUE 'DG_DATA',
c_mat_class LIKE rmclf-klart VALUE '001',
c_pack LIKE lips-mtart VALUE 'VERP',
c_a(1) VALUE 'A',
c_b(1) VALUE 'B',
c_c(1) VALUE 'C',
c_yes(1) VALUE 'X',
c_no(1) VALUE ' '.
Selection screen
standard report select options block
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-002.
SELECT-OPTIONS:
s_wadat FOR likp-wadat NO-EXTENSION OBLIGATORY. " Goods Issue Date
*parameters: "TR01-
p_vstel like tvst-vstel obligatory. " Shipping Point "TR01-
SELECT-OPTIONS: "TR01+
p_vstel FOR tvst-vstel. " Shipping Point "TR01+
SELECT-OPTIONS:
s_lfart FOR likp-lfart, " Delivery type
s_lgtor FOR t30b-lgtor, " Door selection
s_exidv FOR vekp-exidv, " Handling Unit
s_vbeln FOR likp-vbeln, " Delivery "MB01-+
s_lfdat FOR likp-lfdat. " Delivery date
PARAMETERS:
p_exdata AS CHECKBOX. " Show extra columns flag
SELECTION-SCREEN END OF BLOCK a.
van/pallet specific select options block
SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-001.
SELECT-OPTIONS:
s_palno FOR zpallettr-zpallet_no, " no-extension,
s_vanno FOR zvantr-zvan_no. " no-extension.
SELECT-OPTIONS:
s_deppnt FOR zpallettr-zdep_point, "Jvdm01
s_tplst FOR vttk-tplst. "MB01
SELECTION-SCREEN END OF BLOCK b.
MB01 - START - Display variant
SELECTION-SCREEN BEGIN OF BLOCK c WITH FRAME TITLE text-019.
PARAMETERS: p_vari LIKE disvariant-variant.
SELECTION-SCREEN END OF BLOCK c.
MB01 - END
Value Request Events
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_palno-low.
CLEAR: number_range, w_number .
REFRESH number_range.
select numbers and display pop up screen for selection
PERFORM select_pal_nos.
s_palno-low = w_number.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_palno-high.
CLEAR: number_range, w_number .
REFRESH number_range.
select numbers and display pop up screen for selection
PERFORM select_pal_nos.
s_palno-high = w_number.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_vanno-low.
CLEAR: number_range, w_number .
REFRESH number_range.
select numbers and display pop up screen for selection
PERFORM select_van_nos.
s_vanno-low = w_number.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_vanno-high.
CLEAR: number_range, w_number .
REFRESH number_range.
select numbers and display pop up screen for selection
PERFORM select_van_nos.
s_vanno-high = w_number.
MB01 - START - display variant
F4-Help for variant
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_for_variant.
MB01 - END
At Selection Screen
AT SELECTION-SCREEN.
PERFORM validate_selections.
Initialization
INITIALIZATION.
MB01 - START INSERT
1. Transportation planning point
Import transportation planning point from user parameters and
populate
select option.
GET PARAMETER ID 'TDP' FIELD w_tplst.
MOVE: 'I' TO s_tplst-sign,
'EQ' TO s_tplst-option,
w_tplst TO s_tplst-low.
APPEND s_tplst.
2. Display variant
CLEAR s_variant.
s_variant-report = sy-repid.
Get default variant
s_def_variante = s_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = s_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_vari = s_variant-variant.
ENDIF.
MB01 - END INSERT
Start of selection
START-OF-SELECTION.
clear all data tables
CLEAR: t_likp,
it_likp,
t_lips,
t_vbuk,
t_vbup,
t_vepo,
t_vantr,
t_pallettr,
w_likp,
w_lips,
w_vbuk,
w_vbup,
w_vepo,
w_vekp.
REFRESH: t_likp,
it_likp,
t_lips,
t_vbuk,
t_vbup,
t_vepo,
t_vantr,
t_pallettr.
select data for ALV
due to different input parameters being used, to streamline the data
selection process, different selection methods are required
IF NOT s_vanno IS INITIAL
OR NOT s_palno IS INITIAL
OR NOT s_deppnt IS INITIAL. "Jvdm01
if selecting by van/pallet number, need to select the data from the
handling unit upwards to delivery
PERFORM select_data_up.
ELSE.
otherwise the data can be selected from the delivery downwards
PERFORM select_data_down.
ENDIF.
End of selection
END-OF-SELECTION.
call hierarchical ALV display function module
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
i_callback_program = 'ZWMR_PICK_STATUS_REPORT'
i_callback_pf_status_set = 'SET_STATUS'
i_callback_user_command =
'USER_COMMAND' "custom gui status form
is_layout = g_layout "user command form
it_fieldcat = gt_fieldcat
it_sort = g_sort
i_save = 'X' "MB01+
is_variant = s_variant
it_events = gt_events
i_tabname_header = 't_disp_head'
i_tabname_item = 't_disp_tab'
i_structure_name_header = 'ZPICKHEAD'
i_structure_name_item = 'ZPICKDISP'
is_keyinfo = g_keyinfo
TABLES
t_outtab_header = t_disp_head
t_outtab_item = t_disp_tab.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
FORMS
Includes inserted by Screen Painter Wizard. DO NOT CHANGE THIS LINE!
INCLUDE zwmr_pick_o01.
INCLUDE zwmr_pick_status_reporto01 .
INCLUDE zwmr_pick_i01.
INCLUDE zwmr_pick_status_reporti01 .
INCLUDE zwmr_pick_f01.
INCLUDE zwmr_pick_status_reportf01 .
*& Form select_pal_nos
select pallet numbers for search help
FORM select_pal_nos.
DATA: BEGIN OF t_palno OCCURS 0,
zpallet_no LIKE zpallettr-zpallet_no,
END OF t_palno.
select all available pallet numbers
SELECT DISTINCT zpallet_no FROM zpallettr
INTO CORRESPONDING FIELDS OF TABLE t_palno.
LOOP AT t_palno.
get pallet id
SELECT SINGLE zpallet_id FROM zpallettr
INTO number_range-id
WHERE zpallet_no = t_palno-zpallet_no.
get pallet description
SELECT SINGLE zdesc FROM zpalletmd
INTO number_range-desc
WHERE zpallet_id = number_range-id.
number_range-num = t_palno-zpallet_no.
append to search help table
APPEND number_range.
ENDLOOP.
call pop up dialog box
CALL SCREEN 0100 STARTING AT 5 5.
ENDFORM. " select_pal_nos
*& Form select_van_nos
select van numbers for search help
FORM select_van_nos.
DATA: BEGIN OF t_vanno OCCURS 0,
zvan_no LIKE zvantr-zvan_no,
END OF t_vanno.
select available van numbers
SELECT DISTINCT zvan_no FROM zvantr
INTO CORRESPONDING FIELDS OF TABLE t_vanno.
LOOP AT t_vanno.
select van id
SELECT SINGLE zvan_id FROM zvantr
INTO number_range-id
WHERE zvan_no = t_vanno-zvan_no.
select van description (maintained in pallet tables)
SELECT SINGLE zdesc FROM zpalletmd
INTO number_range-desc
WHERE zpallet_id = number_range-id.
number_range-num = t_vanno-zvan_no.
append to search help table
APPEND number_range.
ENDLOOP.
call pop up dialog box
CALL SCREEN 0100 STARTING AT 5 5.
ENDFORM. " select_van_nos
*& Form select_data_down
select data if selecting from delivery down
FORM select_data_down.
select all deliveries from LIKP that fulfill selection criteria
Start SU01 optmization changes
SELECT vbeln vstel lgtor route wadat "RM050906
SELECT vbeln vstel lgtor route wadat
zzroute2lgtor zz2route zzexproute zzroute2 anzpk "MB01-+
FROM likp INTO CORRESPONDING FIELDS OF TABLE it_likp"MB01-+
WHERE vbeln IN s_vbeln
AND vstel IN p_vstel
AND lfart IN s_lfart
AND wadat IN s_wadat
AND lfdat IN s_lfdat "MB01+
AND
( lgtor IN s_lgtor OR zzroute2lgtor IN s_lgtor ) ."MB01+
IF sy-subrc NE 0.
no data found
MESSAGE i007.
EXIT.
ENDIF.
IF NOT t_likp[] IS INITIAL. "SUM
IF NOT it_likp[] IS INITIAL.
SORT it_likp BY vbeln. "SUM
select sales document headers from VBUK
SELECT vbeln wbstk kostk
FROM vbuk INTO TABLE it_vbuk
FOR ALL ENTRIES IN it_likp "SUM
WHERE vbeln EQ it_likp-vbeln. "SUM
SORT it_vbuk BY vbeln.
select all relevant delivery items from LIPS
SELECT vbeln posnr pstyv matnr charg
FROM lips INTO TABLE it_lips
FOR ALL ENTRIES IN it_likp
WHERE vbeln EQ it_likp-vbeln
AND pckpf NE 'B' "cannot be packed "AS05
AND pstyv NE 'ZPAC' "AS05
AND pstyv NE 'ZGDP' "TR02+ "AS05
AND lfimg GT 0. "TR01+
ENDIF.
IF NOT it_lips[] IS INITIAL.
select all sales document line items from VBUP
SORT it_lips BY vbeln posnr. "SUM
SELECT vbeln posnr lvsta
FROM vbup INTO TABLE it_vbup
FOR ALL ENTRIES IN it_lips
WHERE vbeln EQ it_lips-vbeln
AND posnr = it_lips-posnr.
SORT it_vbup BY vbeln posnr.
select corresponding handling unit ID's (venum)
TR03 Replace
start
select * from vepo appending corresponding fields of table t_vepo
for all entries in t_lips
where vbeln = t_lips-vbeln
and posnr = t_lips-posnr
and matnr = t_lips-matnr
and charg = t_lips-charg.
SELECT vepoVENUM vepoVEPOS vepovbeln vepoposnr
FROM vepo as vepo
INNER JOIN vekp as vekp ON vepovenum = vekpvenum
APPENDING corresponding fields of table it_vepo
FOR ALL ENTRIES IN it_lips
WHERE vepo~vbeln = it_lips-vbeln
AND vepo~posnr = it_lips-posnr
AND vepo~matnr = it_lips-matnr
AND vepo~charg = it_lips-charg
AND vekp~exidv IN s_exidv.
SELECT venum vepos vbeln posnr
FROM vepo INTO TABLE it_vepo2
FOR ALL ENTRIES IN it_lips
WHERE vbeln = it_lips-vbeln
AND posnr = it_lips-posnr
AND matnr = it_lips-matnr
AND charg = it_lips-charg.
SORT it_vepo2 BY venum vepos.
*{ INSERT UKMK900355 1
Ice-multis: replace lower-level HUs with highest level " AS01
PERFORM replace_highest_hu. " AS01
*} INSERT
Start of changes by ANV SR#11523
MB01 - extract shipment header as well to populate leg indicator
Therefore, join vttp with vttk
Limit as well by transportation planning point
SELECT vttptknum vttptpnum vttpvbeln vttklaufk
FROM vttp INNER JOIN vttk
ON vttptknum = vttktknum
INTO TABLE it_vttp
FOR ALL ENTRIES IN it_lips
WHERE vttp~vbeln = it_lips-vbeln
AND vttk~tplst IN s_tplst.
MB01 - END
End of changes by ANV SR#11523
IF NOT it_vepo2[] IS INITIAL.
SELECT venum exidv
FROM vekp INTO TABLE it_vepo1
FOR ALL ENTRIES IN it_vepo2
WHERE venum = it_vepo2-venum
AND exidv IN s_exidv.
ENDIF.
SORT it_vepo1 BY venum.
CLEAR: w_vepo, it_vepo.
LOOP AT it_vepo1.
READ TABLE it_vepo2 WITH KEY venum = it_vepo1-venum.
IF sy-subrc = 0.
it_vepo2-exidv = it_vepo1-exidv.
MODIFY it_vepo2 TRANSPORTING exidv
WHERE venum = it_vepo1-venum .
ENDIF.
ENDLOOP.
DELETE it_vepo2 WHERE exidv IS initial.
it_vepo[] = it_vepo2[].
TR03 Replace end
ENDIF.
build process table
PERFORM move_to_table.
ENDFORM. "select_data_down
*& Form select_data_up
select data if selecting from van/pallet up
FORM select_data_up.
IF NOT s_vanno IS INITIAL.
if van then select van numbers and hence pallet numbers
SELECT * FROM zvantr INTO TABLE t_vantr
WHERE zvan_no IN s_vanno.
and vstel eq p_vstel."TR01-
IF NOT t_vantr[] IS INITIAL.
SORT t_vantr BY zvan_id zvan_no vstel zpallet_no. "SUM
SELECT * FROM zpallettr INTO TABLE t_pallettr
FOR ALL ENTRIES IN t_vantr
WHERE zpallet_no EQ t_vantr-zpallet_no
AND zdep_point IN s_deppnt. "Jvdm01
and vstel eq p_vstel."TR01-
ENDIF.
ELSE.
otherwise can get pallet numbers directly
SELECT * FROM zpallettr INTO TABLE t_pallettr
WHERE zpallet_no IN s_palno
AND zdep_point IN s_deppnt. "Jvdm01
and vstel eq p_vstel."TR01-
ENDIF.
IF NOT t_pallettr[] IS INITIAL.
from the pallet nos. we can select the handling units
SORT t_pallettr BY zpallet_id zpallet_no vstel exidv. "SUM
SELECT * FROM vekp INTO TABLE t_vekp
FOR ALL ENTRIES IN t_pallettr
WHERE exidv EQ t_pallettr-exidv
AND exidv NE space
AND exidv IN s_exidv "TR03+
AND ( exida = 'E' "TR01+
OR exida = 'F' ). "TR01+
ENDIF.
SORT t_vekp BY venum. "SUM
IF NOT t_vekp[] IS INITIAL.
build vbeln range from t_vekp.
LOOP AT t_vekp.
r_del-sign = 'I'.
r_del-option = 'EQ'.
r_del-low = t_vekp-vpobjkey.
APPEND r_del.
ENDLOOP.
select all deliveries from LIKP that correspond to HU's
SELECT * FROM likp INTO TABLE t_likp
WHERE vbeln IN r_del
AND wadat IN s_wadat
AND lfart IN s_lfart.
ENDIF.
MB01- START
SELECT vbeln lgtor route wadat
FROM likp INTO TABLE it_likp
WHERE vbeln IN r_del
AND wadat IN s_wadat
AND lfart IN s_lfart.
SELECT vbeln vstel lgtor route wadat
zzroute2lgtor zz2route zzexproute zzroute2 anzpk "MB01-+
FROM likp INTO CORRESPONDING FIELDS OF TABLE it_likp
WHERE vbeln IN r_del
AND lfart IN s_lfart
AND wadat IN s_wadat "MB01-+
AND lfdat IN s_lfdat. "MB01+
MB01- END
ENDIF.
IF NOT it_likp[] IS INITIAL.
SORT it_likp BY vbeln . "SUM
select sales document headers from VBUK
SELECT * FROM vbuk INTO TABLE t_vbuk
FOR ALL ENTRIES IN t_likp
WHERE vbeln EQ t_likp-vbeln.
SELECT vbeln wbstk kostk
FROM vbuk INTO TABLE it_vbuk
FOR ALL ENTRIES IN it_likp
WHERE vbeln EQ it_likp-vbeln.
SORT it_vbuk BY vbeln. "SUM
select all relevant delivery items from LIPS
SELECT * FROM lips INTO TABLE t_lips
FOR ALL ENTRIES IN t_likp
WHERE vbeln EQ t_likp-vbeln
AND pstyv NE 'ZPAC'
AND pstyv NE 'ZGDP' "TR02+
AND lfimg GT 0. "TR01+
SELECT vbeln posnr pstyv matnr charg
FROM lips INTO TABLE it_lips
FOR ALL ENTRIES IN it_likp
WHERE vbeln EQ it_likp-vbeln
AND pckpf NE 'B' "cannot be packed "AS05
AND pstyv NE 'ZPAC' "AS05
AND pstyv NE 'ZGDP' "TR02+ "AS05
AND lfimg GT 0. "TR01+
ENDIF.
IF NOT it_lips[] IS INITIAL.
SORT it_lips BY vbeln posnr. "SUM
select all sales document line items from VBUP
SELECT * FROM vbup INTO TABLE t_vbup
FOR ALL ENTRIES IN t_lips
WHERE vbeln EQ t_lips-vbeln
AND posnr = t_lips-posnr.
Start of changes by ANV SR#11523
MB01 - START
join vttp with vttk to obtain leg indicator
SELECT tknum tpnum vbeln
FROM vttp INTO TABLE it_vttp
FOR ALL ENTRIES IN it_lips
WHERE vbeln = it_lips-vbeln.
SELECT vttptknum vttptpnum vttpvbeln vttklaufk
FROM vttp INNER JOIN vttk
ON vttptknum = vttktknum
INTO TABLE it_vttp
FOR ALL ENTRIES IN it_lips
WHERE vttp~vbeln = it_lips-vbeln
AND vttk~tplst IN s_tplst.
MB01 - END
End of changes by ANV SR#11523
SELECT vbeln posnr lvsta
FROM vbup INTO TABLE it_vbup
FOR ALL ENTRIES IN it_lips
WHERE vbeln EQ it_lips-vbeln
AND posnr = it_lips-posnr.
SORT t_vbup BY vbeln posnr. "SUM
select corresponding handling unit ID's (venum)
SELECT * FROM vepo APPENDING CORRESPONDING FIELDS OF TABLE t_vepo
FOR ALL ENTRIES IN t_lips
WHERE vbeln = t_lips-vbeln
AND posnr = t_lips-posnr
AND matnr = t_lips-matnr
AND charg = t_lips-charg.
SELECT venum vepos vbeln posnr
FROM vepo APPENDING CORRESPONDING FIELDS OF TABLE it_vepo
FOR ALL ENTRIES IN it_lips
WHERE vbeln = it_lips-vbeln
AND posnr = it_lips-posnr
AND matnr = it_lips-matnr
AND charg = it_lips-charg.
*{ INSERT UKMK900355 1
it_vepo2[] = it_vepo[]. " DS01
PERFORM replace_highest_hu. " DS01
it_vepo[] = it_vepo2[]. " DS01
*} INSERT
ENDIF.
build process table
PERFORM move_to_table.
ENDFORM. "select_data_up
*& Form move_to_table
move data to processing table
FORM move_to_table.
LOOP AT it_vepo.
CLEAR t_data_tab.
delivery lines.
CLEAR w_lips.
READ TABLE it_lips WITH KEY vbeln = it_vepo-vbeln
posnr = it_vepo-posnr
INTO w_lips BINARY SEARCH. "SUM
MOVE-CORRESPONDING w_lips TO t_data_tab.
sales document line items
CLEAR w_vbup.
READ TABLE it_vbup WITH KEY vbeln = it_vepo-vbeln
posnr = it_vepo-posnr
INTO w_vbup BINARY SEARCH. "SUM
if w_vbup-kosta = space. "TR01-
not relevant for picking
delete t_vepo. "TR01-
continue. "TR01-
else. "TR01-
MOVE-CORRESPONDING w_vbup TO t_data_tab.
endif. "TR01-
sales doc header
CLEAR w_vbuk.
READ TABLE it_vbuk WITH KEY vbeln = it_vepo-vbeln
INTO w_vbuk BINARY SEARCH. "SUM
MOVE-CORRESPONDING w_vbuk TO t_data_tab.
delivery header
CLEAR w_likp.
READ TABLE it_likp WITH KEY vbeln = it_vepo-vbeln
INTO w_likp BINARY SEARCH. "SUM
MOVE-CORRESPONDING w_likp TO t_data_tab.
MB01 - START
DATA: w_routetype TYPE i. "0=non-global,1=1st route,2=2nd
route,3=both
At this point move DOOR2 if it falls within the global route scenario
and the door2 is satisfies the selection criteria for door
1. Does delivery fall within global route scenario
CLEAR w_routetype.
IF w_likp-zz2route = 'Y' .
1.a. First route - does door1 satisfy the selection criteria
IF w_likp-lgtor IN s_lgtor.
w_routetype = 1.
MOVE w_likp-zzexproute TO t_data_tab-route.
1.b. Second route - does door2 satisfy the selection criteria
ELSEIF w_likp-zzroute2lgtor IN s_lgtor.
here we need to move door2 to lgtor
w_routetype = 2.
MOVE w_likp-zzroute2lgtor TO t_data_tab-lgtor.
MOVE w_likp-zzroute2 TO t_data_tab-route.
ENDIF.
If both routes satsify the criteria, append for 2nd leg ***REVISIT!
IF w_likp-lgtor IN s_lgtor AND w_likp-zzroute2lgtor IN s_lgtor.
w_routetype = 3.
ENDIF.
ENDIF.
MB01 - END
Start of changes by ANV SR#11523
MB01 - If the delivery falls within the global route scenario... need
to select either preliminary shipment leg OR subsequent leg
when laufk= 1 (prelim) and linked to route1, if laufk = 2 (subseq) &
linked to route2
Shipment Number
SORT it_vttp BY vbeln laufk.
CLEAR w_vttp.
CASE w_routetype.
WHEN 0.
READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
INTO w_vttp BINARY SEARCH.
WHEN 1.
READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
laufk = '1'
INTO w_vttp BINARY SEARCH.
WHEN 2.
READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
laufk = '3'
INTO w_vttp BINARY SEARCH.
WHEN 3. "REVISIT
ENDCASE.
MOVE w_vttp-tknum TO t_data_tab-tknum.
MB01 - END
End of changes by ANV SR#11523
select handling unit info using vepo entry
CLEAR w_vekp.
IF t_vekp[] IS INITIAL.
SELECT SINGLE * FROM vekp INTO w_vekp
WHERE venum = it_vepo-venum.
ELSE.
READ TABLE t_vekp WITH KEY venum = it_vepo-venum
INTO w_vekp BINARY SEARCH. "SUM
IF sy-subrc NE 0.
SELECT SINGLE * FROM vekp INTO w_vekp
WHERE venum = t_vepo-venum.
ENDIF.
ENDIF.
MOVE-CORRESPONDING w_vekp TO t_data_tab.
*{ INSERT UKMK900355 2
WM status for HU "AS03
SELECT SINGLE * FROM zhu_to_link WHERE lgnum EQ w_vekp-lgnum"AS03
AND exidv EQ w_vekp-exidv."AS03
IF sy-subrc EQ 0. "AS03
IF zhu_to_link-zpick_comp EQ space. "AS03
t_data_tab-lvsta = 'B'. "AS03
ELSE. "AS03
t_data_tab-lvsta = 'C'. "AS03
ENDIF. "AS03
ENDIF. "AS03
*} INSERT
select pallet / van load information "Jvdm01-
SELECT SINGLE zpallet_no zcount_check FROM zpallettr "Jvdm01-
INTO (t_data_tab-zpallet_no, "Jvdm01-
t_data_tab-zcount_check) "Jvdm01-
WHERE exidv EQ w_vekp-exidv. "Jvdm01-
PERFORM read_pallet. "MB01+
SELECT SINGLE zpallet_no zcount_check zdep_point "Jvdm01+
FROM zpallettr "Jvdm01+
INTO (t_data_tab-zpallet_no, "Jvdm01+
t_data_tab-zcount_check, "Jvdm01+
t_data_tab-zdep_point) "Jvdm01+
WHERE exidv EQ w_vekp-exidv. "Jvdm01+
WHERE exidv EQ w_vekp-exidv "MB01-+
AND zpallet_id = t_data_tab-lgtor."MB01+
MB01 - INSERT START
If pallet number specified and
we are in the global route scenario & both doors fall within the
selection criteria, we need to copy the one that is currently in a
specified pallet
IF NOT s_palno IS INITIAL AND not t_data_tab-zpallet_no in s_palno
AND w_routetype = '3' .
Switch doors & get 2nd shipment
MOVE w_likp-zzroute2lgtor TO t_data_tab-lgtor.
MOVE w_likp-zzroute2 TO t_data_tab-route.
Read subsequent leg shipment
READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
laufk = '3'
INTO w_vttp BINARY SEARCH.
IF sy-subrc = 0.
MOVE w_vttp-tknum TO t_data_tab-tknum.
ENDIF.
PERFORM read_pallet. "MB01+
ENDIF.
MB01 - INSERT END
IF NOT t_data_tab-zpallet_no IN s_palno. "TR01+
CONTINUE. "TR01+
ENDIF. "TR01+
IF sy-subrc = 0. "mb01+
perform read_van. "MB01+
SELECT SINGLE zvan_no zvan_print zeod_print FROM zvantr
INTO (t_data_tab-zvan_no,
t_data_tab-zvan_print,
t_data_tab-zeod_print)
WHERE zpallet_no EQ t_data_tab-zpallet_no.
MB01 - INSERT START
If van number specified and
we are in the global route scenario & both doors fall within the
selection criteria, we need to copy the one that is currently on a
specified van
IF NOT s_vanno IS INITIAL AND not t_data_tab-zvan_no in s_vanno AND
w_routetype = '3' .
Switch doors & get 2nd shipment
MOVE w_likp-zzroute2lgtor TO t_data_tab-lgtor.
MOVE w_likp-zzroute2 TO t_data_tab-route.
Read subsequent leg shipment
READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
laufk = '3'
INTO w_vttp BINARY SEARCH.
IF sy-subrc = 0.
MOVE w_vttp-tknum TO t_data_tab-tknum.
ENDIF.
PERFORM read_pallet. "MB01+
perform read_van.
ENDIF. "mb01-
MB01 - INSERT END
IF NOT t_data_tab-zvan_no IN s_vanno. "TR01+
CONTINUE. "TR01+
ENDIF. "TR01+
ENDIF.
APPEND t_data_tab.
ENDLOOP.
*-----> TR01+ start
If the delivery has yet to be packed, then need to include in report
Thus delete t_lips here and if any entries left after looping through
t_vepo, these will also need to be added to t_data_tab
if the selection is by handling unit though we do not want
these"TR03+
IF s_exidv IS INITIAL. "TR03+
*{ REPLACE UKMK900355 1
*\ LOOP AT it_vepo.
*\ READ TABLE it_lips WITH KEY vbeln = it_vepo-vbeln
*\ posnr = it_vepo-posnr
*\ BINARY SEARCH. "SUM
*\ IF sy-subrc = 0.
*\ DELETE it_lips INDEX sy-tabix.
*\ ENDIF.
*\ ENDLOOP.
Higher-level HUs can contain more than one delivery item " AS01
LOOP AT it_lips. " AS01
READ TABLE t_vepo_low WITH KEY vbeln = it_lips-vbeln " AS01
posnr = it_lips-posnr. " AS01
CHECK sy-subrc EQ 0. " AS01
DELETE it_lips. " AS01
ENDLOOP. " AS01
*} REPLACE
IF NOT it_lips[] IS INITIAL.
move any unpacked items to the data table
PERFORM move_lips_to_table.
ENDIF.
ENDIF. "TR03+
*<---- TR01+ End
get relevant status icons
PERFORM select_icons.
prepare ALV data
PERFORM prepare_alv.
ENDFORM. " select_data
*& Form select_icons
select icons for display and move data to display table
FORM select_icons.
DATA: w_disp_tab LIKE zpickdisp,
w_disp_head LIKE zpickhead,
w_color LIKE zpickdisp-color,
ov_icon LIKE zpickdisp-ov_icon,
gi_icon LIKE zpickdisp-gi_icon,
to_icon LIKE zpickdisp-to_icon,
lp_icon LIKE zpickdisp-lp_icon,
pc_icon LIKE zpickdisp-pc_icon,
lv_icon LIKE zpickdisp-lv_icon,
vm_icon LIKE zpickdisp-vm_icon,
em_icon LIKE zpickdisp-em_icon,
sp_icon LIKE zpickdisp-sp_icon, " ANV SR#11523
t_ovst_tab LIKE t_disp_tab WITH HEADER LINE.
CONSTANTS: c_col1(3) VALUE 'C10',
c_col2(3) VALUE 'C20'.
SORT t_data_tab BY lgtor vbeln.
w_color = c_col2.
LOOP AT t_data_tab.
AT NEW lgtor.
fill ALV header table
CLEAR w_disp_head.
w_disp_head-lgtor = t_data_tab-lgtor.
APPEND w_disp_head TO t_disp_head.
ENDAT.
goods issue status & overall amber/green only
CASE t_data_tab-wbstk.
WHEN c_c.
MOVE icon_green_light TO gi_icon.
MOVE icon_green_light TO ov_icon.
WHEN OTHERS.
MOVE icon_red_light TO gi_icon.
MOVE icon_yellow_light TO ov_icon.
ENDCASE.
transfer order status
CASE t_data_tab-lvsta.
WHEN c_a.
MOVE icon_red_light TO to_icon.
WHEN c_b.
MOVE icon_yellow_light TO to_icon.
WHEN c_c.
MOVE icon_green_light TO to_icon.
WHEN space.
write N/A
to_icon = 'N/A'.
ENDCASE.
loaded to pallet status
IF NOT t_data_tab-zpallet_no IS INITIAL.
MOVE icon_green_light TO lp_icon.
ELSE.
MOVE icon_red_light TO lp_icon.
ENDIF.
pallet count status
IF NOT t_data_tab-zcount_check IS INITIAL.
MOVE icon_green_light TO pc_icon.
ELSE.
MOVE icon_red_light TO pc_icon.
ENDIF.
loaded to van status
IF NOT t_data_tab-zvan_no IS INITIAL.
MOVE icon_green_light TO lv_icon.
ELSE.
MOVE icon_red_light TO lv_icon.
ENDIF.
van manifest status
IF NOT t_data_tab-zvan_print IS INITIAL.
MOVE icon_green_light TO vm_icon.
ELSE.
MOVE icon_red_light TO vm_icon.
ENDIF.
Start of changes by ANV SR#11523
Shipment status
IF NOT t_data_tab-tknum IS INITIAL.
MOVE icon_green_light TO sp_icon.
ELSE.
MOVE icon_red_light TO sp_icon.
ENDIF.
End of changes by ANV SR#11523
end of day manifest status
IF NOT t_data_tab-zeod_print IS INITIAL.
MOVE icon_green_light TO em_icon.
ELSE.
MOVE icon_red_light TO em_icon.
ENDIF.
move working data table to display table
MOVE-CORRESPONDING t_data_tab TO w_disp_tab.
w_disp_tab-ov_icon = ov_icon.
w_disp_tab-gi_icon = gi_icon.
w_disp_tab-to_icon = to_icon.
w_disp_tab-lp_icon = lp_icon.
w_disp_tab-pc_icon = pc_icon.
w_disp_tab-lv_icon = lv_icon.
w_disp_tab-vm_icon = vm_icon.
w_disp_tab-em_icon = em_icon.
w_disp_tab-sp_icon = sp_icon. "ANV SR#11523
w_disp_tab-color = w_color.
fill N/A values for initial fields for display
IF w_disp_tab-packvorschr IS INITIAL.
w_disp_tab-packvorschr = 'N/A'.
ENDIF.
IF w_disp_tab-exidv IS INITIAL.
w_disp_tab-exidv = 'N/A'.
ENDIF.
IF w_disp_tab-zpallet_no IS INITIAL.
WRITE 'N/A' TO w_disp_tab-zpallet_no.
ENDIF.
IF w_disp_tab-zvan_no IS INITIAL.
WRITE 'N/A' TO w_disp_tab-zvan_no.
ENDIF.
display different color for new doc number
AT END OF vbeln.
IF w_color = c_col1.
w_color = c_col2.
ELSEIF w_color = c_col2.
w_color = c_col1.
ENDIF.
ENDAT.
APPEND w_disp_tab TO t_disp_tab.
CLEAR w_disp_tab.
ENDLOOP.
we have all the icons in display but need to check the overall status
as this refers to the line items
green and amber statuses already set and use the same criteria as the
goods issue status unless detected as red here
DATA: ov_stat_red(1).
CLEAR w_disp_tab.
SORT t_disp_tab BY vbeln.
LOOP AT t_disp_tab INTO w_disp_tab.
AT NEW vbeln.
check all line items for delivery
LOOP AT t_data_tab WHERE vbeln = w_disp_tab-vbeln.
IF t_data_tab-lvsta = c_a.
set overall status to red
ov_stat_red = c_yes.
EXIT.
ELSE.
leave green/amber status icon as previosly determined
ENDIF.
ENDLOOP.
IF ov_stat_red = c_yes.
set overall status to red for all items in that delivery
CLEAR ov_stat_red.
MOVE icon_red_light TO w_disp_tab-ov_icon.
MODIFY t_disp_tab FROM w_disp_tab TRANSPORTING ov_icon
WHERE vbeln = w_disp_tab-vbeln.
ENDIF.
ENDAT.
ENDLOOP.
ENDFORM. " select_icons
*& Form fill_layout
fill ALV layout parameters
FORM fill_layout.
CLEAR g_layout.
g_layout-colwidth_optimize = c_yes. " column width optimisation
g_layout-zebra = space. " alternate line colors
g_layout-box_fieldname = 'MARK'. " checkbox fieldname
g_layout-info_fieldname = 'COLOR'. " highlight row indicator
g_layout-no_vline = space. " vertical line
g_layout-key_hotspot = space. " hotspot field
g_layout-f2code = 'PICK'. " F2 ok_code
g_layout-numc_sum = c_yes. " sum numc fields
g_layout-box_tabname = 't_disp_head'. " checkbox table name
g_layout-expand_fieldname = 'EXPAND'. " expand field name
ENDFORM. " fill_layout
*& Form fill_sort
fill ALV sort table
FORM fill_sort.
DATA: w_g_sort TYPE slis_sortinfo_alv.
w_g_sort-spos = 1.
w_g_sort-fieldname = 'LGTOR'.
w_g_sort-tabname = 't_disp_tab'.
w_g_sort-up = c_yes.
APPEND w_g_sort TO g_sort.
w_g_sort-spos = 2.
w_g_sort-fieldname = 'VBELN'.
w_g_sort-tabname = 't_disp_tab'.
w_g_sort-up = c_yes.
APPEND w_g_sort TO g_sort.
w_g_sort-spos = 3.
w_g_sort-fieldname = 'POSNR'.
w_g_sort-tabname = 't_disp_tab'.
w_g_sort-up = c_yes.
APPEND w_g_sort TO g_sort.

Similar Messages

  • Print Row Numbers and Column Letters

    How do you tell Numbers to print the Row numbers and Column letters? This was very simple in Appleworks (print dialog box had that option). Can't find it in Numbers though.

    Here is a script doing all the job for us.
    Just select one or several cells in a table and run the script.
    It duplicates it, add an header row, an header column, insert the needed labels and fill the other cells with a formula grabbing the contents of the original table.
    --[SCRIPT build a table with headers]
    Enregistrer len tant que Script: build a table with headers.scpt
    déplacer le fichier créé dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
    Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
    Selectionner une cellule dans la table à dupliquer
    menu Scripts > Numbers > build a table with headers
    Le script duplique la table et crée des en-têtes de lignes et colonnes.
    --=====
    L'aide du Finder explique:
    L'Utilitaire AppleScript permet d'activer le Menu des scripts :
    Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case "Afficher le menu des scripts dans la barre de menus".
    +++++++
    Save the script as Script: build a table with headers.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    Select a range of cells in the table to 'duplicate'
    menu Scripts > Numbers > build a table with headers
    The script duplicate the table and inserts columns/rows headers.
    --=====
    The Finder's Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the "Show Script Menu in menu bar" checkbox.
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2009/09/19
    --=====
    property theApp : "Numbers"
    --=====
    my activateGUIscripting() (* to be sure than GUI scripting will be active *)
    set {d_Name, s_Name, t_Name, r_Name} to my getSelection()
    if r_Name is missing value then
    if my parleAnglais() then
    error "No selected cells"
    else
    error "Il n'y a pas de cellule sélectionnée !"
    end if
    end if
    set new_Table to t_Name & "_#"
    my duplicateTable(s_Name, t_Name, new_Table)
    set delim to my getLocalizedDelimiter()
    (* grab localized function names and add an open parenthesis at end *)
    set IF_loc to my getLocalizedFunctionName("Numbers", "IF") & "("
    set CHAR_loc to my getLocalizedFunctionName("Numbers", "CHAR") & "("
    set INT_loc to my getLocalizedFunctionName("Numbers", "INT") & "("
    set MOD_loc to my getLocalizedFunctionName("Numbers", "MOD") & "("
    set INDIRECT_loc to my getLocalizedFunctionName("Numbers", "INDIRECT") & "("
    set ADDRESS_loc to my getLocalizedFunctionName("Numbers", "ADDRESS") & "("
    (* grab localized function names and add a couple of parenthesis at end *)
    set ROW_loc to my getLocalizedFunctionName("Numbers", "ROW") & "()"
    set COLUMN_loc to my getLocalizedFunctionName("Numbers", "COLUMN") & "()"
    tell application "Numbers" to tell document d_Name to tell sheet s_Name to tell table new_Table
    if column count = 256 then
    if my parleAnglais() then
    error "Oops, already 256 columns !"
    else
    error "Désolé, il y a déjà 256 colonnes !"
    end if
    end if
    if row count = 65536 then
    if my parleAnglais() then
    error "Oops, already 65536 rows !"
    else
    error "Désolé, il y a déjà 65536 lignes !"
    end if
    end if
    try
    add row above row 1
    on error
    if my parleAnglais() then
    error "Oops, already five header row !"
    else
    error "Désolé, il y a déjà cinq rangs d’en tête !"
    end if
    end try
    try
    add column before column 1
    on error
    if my parleAnglais() then
    error "Oops, already five header columns !"
    else
    error "Désolé, il y a déjà cinq rangs d’en tête !"
    end if
    end try
    set nbr to row count
    set nbc to column count
    (* =IF(COLUMN()<28,CHAR(COLUMN()63),CHAR(INT((COLUMN()-2)/26)+64)&CHAR(MOD(COLUMN()-2,26)65)) *)
    set theFormula to "=" & IF_loc & COLUMN_loc & "<28" & delim & CHAR_loc & COLUMN_loc & "+63)" & delim & CHAR_loc & INT_loc & "(" & COLUMN_loc & "-2)/26)+64)&" & CHAR_loc & MOD_loc & COLUMN_loc & "-2" & delim & "26)+65))"
    tell row 1
    repeat with c from 2 to nbc
    set value of cell c to theFormula
    end repeat
    end tell -- row 1
    (* =ROW()-1 *)
    set theFormula to "=" & ROW_loc & "-1"
    tell column 1
    repeat with r from 2 to nbr
    set value of cell r to theFormula
    end repeat
    end tell -- column 1
    (* =INDIRECT(ADDRESS(ROW()-1,COLUMN()-1,,,"Tableau 2")) *)
    set theFormula to "=" & INDIRECT_loc & ADDRESS_loc & ROW_loc & "-1" & delim & COLUMN_loc & "-1" & delim & delim & delim & quote & t_Name & quote & "))"
    repeat with r from 2 to nbr
    repeat with c from 2 to nbc
    set value of cell r of column c to theFormula
    end repeat -- with c
    end repeat -- with r
    end tell -- Numbers
    --=====
    Set the parameter delimiter which must be used in Numbers formulas
    on getLocalizedDelimiter()
    if character 2 of (0.5 as text) is "." then
    return ","
    else
    return ";"
    end if
    end getLocalizedDelimiter
    --=====
    on getLocalizedFunctionName(theApp, x)
    local p2bndl
    set p2bndl to (path to application support as text) & "iWork '09:Frameworks:SFTabular.framework:Versions:A:Resources:"
    return my getLocalizedName(theApp, x, p2bndl)
    end getLocalizedFunctionName
    --=====
    on getLocalizedName(a, x, f)
    tell application a to return localized string x from table "Localizable" in bundle file f
    end getLocalizedName
    --=====
    on getSelection()
    local _, theRange, theTable, theSheet, theDoc, errMsg, errNum
    tell application "Numbers" to tell document 1
    repeat with i from 1 to the count of sheets
    tell sheet i
    set x to the count of tables
    if x > 0 then
    repeat with y from 1 to x
    try
    (selection range of table y) as text
    on error errMsg number errNum
    set {_, theRange, _, theTable, _, theSheet, _, theDoc} to my decoupe(errMsg, quote)
    return {theDoc, theSheet, theTable, theRange}
    end try
    end repeat -- y
    end if -- x>0
    end tell -- sheet
    end repeat -- i
    end tell -- document
    return {missing value, missing value, missing value, missing value}
    end getSelection
    --=====
    on decoupe(t, d)
    local l
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to ""
    return l
    end decoupe
    --=====
    on isItAsheet(s)
    try
    tell application "Numbers" to tell document 1
    count of tables of sheet s (*
    Post an error if s is not a sheet *)
    end tell
    return true
    on error
    return false
    end try
    end isItAsheet
    --=====
    on activateGUIscripting()
    tell application "System Events"
    if not (UI elements enabled) then set (UI elements enabled) to true (* to be sure than GUI scripting will be active *)
    end tell
    end activateGUIscripting
    --=====
    on duplicateTable(sourceSheet, sourceTable, newName)
    local lesFeuilles, lesTables1, found, listOfRows, cor, i, isSourceSheet, nameI, j, lesTables2
    tell application "Numbers"
    activate
    tell document 1
    set lesFeuilles to name of sheets
    if sourceSheet is in lesFeuilles then
    tell sheet sourceSheet to set lesTables1 to name of tables
    if sourceTable is not in lesTables1 then
    if my parleAnglais() then
    error "The sheet “" & sourceTable & "” of sheet “" & sourceSheet & "” is unavailable ! "
    else
    error "La table “" & sourceTable & "” de la feuille “" & sourceSheet & "” n'existe pas ! "
    end if
    end if -- sourceTable is not
    else
    if my parleAnglais() then
    error "The sheet “" & sourceSheet & "” is unavailable ! "
    else
    error "La feuille “" & sourceSheet & "” n'existe pas ! "
    end if
    end if -- sourceSheet is in
    end tell -- document
    end tell -- application
    if newName is not in lesTables1 then (*
    Now, an ugly workaround to duplicate the sheet *)
    set isOS4 to (system attribute "sys2") < 5
    tell application "System Events" to tell application process "Numbers"
    set docWindow to false (* CAUTION, an inspector ("AXFloatingWindow") or a Find/Search ("AXDialog") window may be open *)
    repeat with i from 1 to (count of windows)
    if subrole of window i is "AXStandardWindow" then
    set docWindow to i (* got the document's window *)
    exit repeat
    end if
    end repeat
    if docWindow is not false then
    tell outline 1 of scroll area 1 of splitter group 1 of splitter group 1 of window docWindow
    select row 1
    set value of attribute "AXFocused" to true
    set found to false
    set listOfRows to name of static text of every row
    set cor to count of rows (* equal count of listOfRows *)
    if isOS4 then (*
    for mac Os X 10.4.11
    CAUTION, listOfRows it's a list of lists !
    {{"Feuille 2"}, {"Tableau 1"}, {"theSheet"}, {"Feuille 1"}, {"Tableau 2"}, {"Clément"}, {"Feuille 4"}} *)
    repeat with i from 1 to cor (*
    Scan the thumbnails *)
    set nameI to item 1 of item i of listOfRows
    set isSourceSheet to (sourceSheet = nameI) and my isItAsheet(nameI)
    if isSourceSheet then
    select row i
    if (i < cor) and not my isItAsheet(item 1 of item (i + 1) of listOfRows) then (*
    Here we may scan the thumbnails of tables of sourceSheet *)
    repeat with j from i + 1 to i + (count of lesTables1)
    if sourceTable = item 1 of item j of listOfRows then
    select row j
    set found to true
    exit repeat
    end if -- sourceTable
    end repeat
    else
    if my parleAnglais() then
    error "The sheet “" & sourceTable & "” of sheet “" & sourceSheet & "”" & return & " is not revealed in thumbnails ! "
    else
    error "La table “" & sourceTable & "” de la feuille “" & sourceSheet & "”" & return & " n'est pas affichée dans les vignettes ! "
    end if -- my parleFrancais
    end if -- (i < cor)
    end if -- isSourceSheet
    if found then exit repeat
    end repeat -- i
    else (*
    for mac Os X 10.5.x
    CAUTION, listOfRows is a list of lists !
    {{}, {"Tableau 1"}, {"theSheet"}, {}, {"Tableau 2"}, {"Clément"}, {}}
    With 10.5.x, the names of sheets are empty *)
    repeat with i from 1 to cor
    set isSourceSheet to (class of UI element 1 of row i is group) and (get value of static text 1 of group 1 of row i) is sourceSheet
    if isSourceSheet then (*
    Here we may scan the thumbnails of tables of sourceSheet *)
    if value of UI element 1 of group 1 of row i is 0 then (*
    reveal the tables's thumbnails and adjust the list accordingly *)
    click UI element 1 of group 1 of row i (* click the black triangle to reveal tables *)
    delay 0.1
    set listOfRows to name of static text of every row (* update the list accordingly *)
    end if -- value of UI…
    repeat with j from i + 1 to i + (count of lesTables1)
    if sourceTable = item 1 of item j of listOfRows then
    select row j
    set found to true
    exit repeat
    end if -- sourcetable
    end repeat -- with j
    end if -- isSourceSheet
    if found then exit repeat
    end repeat -- with i
    end if -- check OS
    end tell -- outline …
    keystroke "d" using command down
    end if -- docWindow
    end tell -- System Events…
    if docWindow is not false then (*
    Rename the new table according to the passed name: newTable *)
    tell application "Numbers" to tell document 1 to tell sheet sourceSheet
    set lesTables2 to name of tables
    repeat with i in lesTables2
    if i is not in lesTables1 then (*
    Here i is the name of the newly created table *)
    set name of table i to newName
    exit repeat
    end if
    end repeat
    end tell
    end if -- docWindow
    end if -- newName is not…
    end duplicateTable
    --=====
    on parleAnglais()
    local z
    try
    tell application theApp to set z to localized string "Cancel"
    on error
    set z to "Cancel"
    end try
    return (z is not "Annuler")
    end parleAnglais
    --=====
    --[/SCRIPT]
    Yvan KOENIG (VALLAURIS, France) samedi 19 septembre 2009 17:33:59

  • Ever since the last update, My iTunes continues to quit unexpectedly. It will open for one second and then close. Anyone have a solution for this. Please help.

    Ever since the last update, My iTunes continues to quit unexpectedly. It will open for one second and then close. Anyone have a solution for this. Please help.
    I've tried my best to troubleshoot. . . opening in safe mode nothing seems to work.
    In the problem report, this is the error that stood out:
    Crashed Thread:  8  Dispatch queue: com.apple.iad.iadidmanager
    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000090

    Hi there navicin79,
    You may find the troubleshooting steps in the articles below helpful. The first thing I would try is reinstalling iTunes as outlined in the first article.
    Troubleshooting iTunes installation on Mac OS X
    http://support.apple.com/kb/ht2311
    OS X Mavericks: If an app freezes or quits unexpectedly
    http://support.apple.com/kb/PH13975
    -Griff W. 

  • I performed a software update and the system is installing an update but it has been running for over 24hrs and keeps saying "This may take a few minutes, don't shut down your computer" Can anyone help?

    I performed a software update and the system is installing an update but it has been running for over 24hrs and keeps saying "This may take a few minutes, don't shut down your computer" Can anyone help?

    Hello cor-el, thanks for your reply. I changed my settings for downloads to desktop and it has appeared on there. When I double click I am asked which program I want to open file. I click firefox and another box "opening install" says I have chosen to open the file which is an application and do I want to save it. This is the only real option so I press save file. I get a box saying this is an executable file which may contain viruses - do you want to run. I press ok and the final box showing C drive file name and desktop appears stating application not found.
    This happens the same whenever I try to install.
    To my untrained eye the application is not being recognised as an application and I cannot work out how to get it to do that.
    My plugin is still showing as out of date.
    Is there anything you could suggest. Thanks for your time.

  • My Ipod 5th gen. has been detected by itunes, but could not identified properly, and its been charging for a week and still hasn't come to a full charged. What should I do?

    My Ipod 5th gen. has been detected by itunes, but could not identified properly, and its been charging for a week and still hasn't come to a full charged. What should I do?

    but could not identified properly
    Please clairify.
    charging for a week and still hasn't come to a full charged
    Sounds like you need a new battery.  Take the iPod Nano to an Apple store or an AASP.  Whichever is more convenient for you.
    iPod Repair Pricing

  • Shuffle no longer syncs the playlists correctly and I cannot "see" the shuffle at all.  There is no "device" folder in the left column.  This may have occured after an Apple I-Tunes software update, but I am not sure. Software or hardware??

    Shuffle no longer syncs the playlists correctly and I cannot "see" the shuffle at all.  There is no "device" folder in the left column.  This may have occured after an I-Tunes software update, but I am not sure.  Is this likely a software issue or is the shuffle not working correctly?

    Shuffle no longer syncs the playlists correctly and I cannot "see" the shuffle at all.  There is no "device" folder in the left column.  This may have occured after an I-Tunes software update, but I am not sure.  Is this likely a software issue or is the shuffle not working correctly?

  • I am having strange issue with my apple tv...i set up pictures to scroll through to the tv using home sharing.  Now album covers are interspersed with my pictures.  I have been using apple tv for a while and never had this happen before

    I am having strange issue with my apple tv...i set up pictures to scroll through to the tv using home sharing.  Now album covers are interspersed with my pictures.  I have been using apple tv for a while and never had this happen before

    Are you watching this content though iCloud or though from iTunes on your local computer?  If it is from iCloud have you tried downloading the content to iTunes and watching it on ATV from that source to see if it still happens?  This is geerally a much more reliable way to view the content.  Easer to fast forward and rewind too.
    - I have a stable internet connection
    Clearlly you don't
    >(Ive tested on other devices)
    Which does not tell you anything about the specific connnection from ATV to iCloud.
    >I am able to stream Netflix problem free from my AppleTV without so much as a hicup
    Again which does not tell you anything about the specific connnection from ATV to iCloud.
    >- I am able to download the episodes to my phone, ipad, and computer without any issues
    Again which does not tell you anything about the specific connnection from ATV to iCloud.  It does remove your ISP throattly traffice as a possible cause though.  So that is good.
    Have you checked your wireless rounter?  Tried doing the factory restor on it?  Upgrading it's firmware?  Is it and or ATV getting extreamly hot when this problme happens?

  • On Instagram you offer a free iPhone for 20K tagers and followers, is this true or a scam.

    On Instagram you offer a free iPhone for 20K tagers and followers, is this true or a scam.

    It is definitely not an Apple promotion. Whether it's a genuine offer from someone else we don't know but it sounds rather unlikely.

  • I cannot retrieve my emails on my Mac Book Pro operating on 10.7.3 Icloud was already workingit keeps asking for password and when i put correct password in it keeps asking for it again and again. This has just started today

    I cannot retrieve my emails on my Mac Book Pro operating on 10.7.3 Icloud was already workingit keeps asking for password and when i put correct password in it keeps asking for it again and again. This has just started today

    Though it's unlikely to be wrong if things were set up properly in the first place, as a check go to Mail Preferences>Accounts and check that the server setting for IMAP (incoming) is imap.mail.me.com (not just mail.me.com).
    Your next step either way would be to go to System Preferences>iCloud and sign out, then sign back in again. (You can ignore warnings about data disappearing - your calendars etc. will disappear when you sign out but reappear when you sign back in).

  • I have been using Itunes on my HP laptop for 12 months and over the past month have not been able to access the Itunes store or any of the Itunes Help type menu's. When in Itunes I click on the Store icon and the top middle box gets to Half way. Pls help

    I  have been using Itunes on my HP laptop for 12 months and over the past month have not been able to access the Itunes store or any of the Itunes Help type menu's. When in Itunes I click on the Store icon and the top middle box gets to Half way. Pls help

    I had the same tried loads of fixes
    saw this on the community from whatheck
    In windows 7 click on your start menu, go to the accessories, right click on the command icon and choose "run as administrator"
    Once it opens type the following command...
    netsh winsock reset
    Hit enter and it should say something like winsock reset successful now reboot your computer
    IT WORKED....... cleared all the "action2 on the CPU and loads IStore perfectly

  • TO Display the row data as column in ALV

    Hi experts ,
    Need to display the row data in ALV as column.
    The column of an ALV has the fieldnames of a table , this needs to be displayed as row data , that is as single row.
    How can this can be achieved?

    Hi,
    Actually it is not possible to disaply in multiple lines.
    https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FforumID%3D50%26threadID%3D49517%26messageID%3D506378%23506378
    https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FforumID%3D50%26threadID%3D41133%26messageID%3D403371%23403371
    This problem was discussed many times in this forum, u can search for more results.

  • How to display the rows in to columns and columns into rows?

    DES:- I know by using pivot and unpivot you can convert rows into columns and columns into rows but i don't know how to write the syntax?

    Hi,
    Besides the places Martin mentioned above, there are many examples in the forum FAQ:
    https://community.oracle.com/message/9362005#9362005
    For an example of both PIVOT and UNPIVOT in the same query, see
    http://forums.oracle.com/forums/thread.jspa?threadID=920854&tstart=0

  • Count the displayed date rows on a column.

    Hi,
    I am trying to have a table with the following information and try to give a total count (of the dates visible) at the bottom of the table for the date columns. (not counting the rows)
    (E.g.- Under the Sent column there are 5 dates displayed and there are 6 numbers associated. On the received column there are 3 dates displayed for 6 numbers)
    Could you please advice me how to accomplish this. Thank you in advance.
    Rob.
    Name SENum SentReceived
    John      1234     12/22/06     
         5678     12/13/06     
         6565     12/19/06     1/6/07
         5656 - -
    Jane     9866 12/18/06     1/5/07
    Jim     5657 12/18/06 12/14/06           
    Total:           5      3

    I ma not sue what you want but
    here is some idea at sql plus
    SQL> compute count of ename on deptno
    SQL> compute count of sal on deptno
    SQL> select deptno,ename,sal from emp order by deptno
      2  ;
        DEPTNO ENAME                                                     SAL
            10 CLARK                                                    2450
               KING                                                     5000
               MILLER                                                   1300
    count                                                       3          3
            20 SMITH                                                     880
               ADAMS                                                    1100
               FORD                                                     3000
               SCOTT                                                    3000
               JONES                                                    2975
    count                                                       5          5
            30 ALLEN                                                    1600
               BLAKE                                                    2850
               MARTIN                                                   1250
               JAMES                                                    1045
               TURNER                                                   1500
               WARD                                                     1250
    count                                                       6          6
               DEV                                                      5000
    count                                                       1          1

  • My final version of a table with row headers and column footers

    This version is superior to the one I posted yesterday
    as it is better designed and responds to changes in
    size correctly. You can also have a header/footer with
    multiple columns/rows.
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.JTableHeader;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.table.TableColumnModel;
    import java.awt.*;
    import java.awt.event.AdjustmentListener;
    import java.awt.event.AdjustmentEvent;
    import java.awt.event.ComponentListener;
    import java.awt.event.ComponentEvent;
    public class HeaderFooterTablePanel extends JPanel {
        static abstract class AbstractHeaderFooterTableModel extends AbstractTableModel {
            public abstract int getRowHeaderColumnCount();
            public abstract Object getRowHeaderValueAt(int rowIndex,
                                                       int columnIndex);
            public abstract int getFooterRowCount();
            public abstract Object getFooterValueAt(int rowIndex,
                                                    int columnIndex);
        static class RowHeaderTableModel extends AbstractTableModel {
            private AbstractHeaderFooterTableModel abstractHeaderFooterTableModel;
            public RowHeaderTableModel(AbstractHeaderFooterTableModel abstractHeaderFooterTableModel) {
                super();
                this.abstractHeaderFooterTableModel = abstractHeaderFooterTableModel;
            public String getColumnName(int column) {
                return "";
            public int getColumnCount() {
                return abstractHeaderFooterTableModel.getRowHeaderColumnCount();
            public int getRowCount() {
                return abstractHeaderFooterTableModel.getRowCount();
            public Object getValueAt(int rowIndex, int columnIndex) {
                return abstractHeaderFooterTableModel.getRowHeaderValueAt(rowIndex, columnIndex);
        static class ColumnFooterTableModel extends AbstractTableModel {
            private AbstractHeaderFooterTableModel abstractHeaderFooterTableModel;
            public ColumnFooterTableModel(AbstractHeaderFooterTableModel abstractHeaderFooterTableModel) {
                super();
                this.abstractHeaderFooterTableModel = abstractHeaderFooterTableModel;
            public String getColumnName(int column) {
                return "";
            public int getColumnCount() {
                return abstractHeaderFooterTableModel.getColumnCount();
            public int getRowCount() {
                return abstractHeaderFooterTableModel.getFooterRowCount();
            public Object getValueAt(int rowIndex, int columnIndex) {
                return abstractHeaderFooterTableModel.getFooterValueAt(rowIndex, columnIndex);
        static class SyncColumnWidths implements TableColumnModelListener {
            private final JTable centerTable;
            private final JTable footerTable;
            public SyncColumnWidths(JTable centerTable,
                                    JTable footerTable) {
                this.centerTable = centerTable;
                this.footerTable = footerTable;
            // Change the column widths of the footer table when the column widths
            // of the center table change.
            public void columnMarginChanged(ChangeEvent e) {
                TableColumnModel centerTableColumnModel = centerTable.getColumnModel();
                TableColumnModel footerTableColumnModel = footerTable.getColumnModel();
                for (int i = 0; i < centerTableColumnModel.getColumnCount(); i++) {
                    int width = centerTableColumnModel.getColumn(i).getPreferredWidth();
                    footerTableColumnModel.getColumn(i).setPreferredWidth(width);
            public void columnSelectionChanged(ListSelectionEvent e) {
            public void columnAdded(TableColumnModelEvent e) {
            public void columnMoved(TableColumnModelEvent e) {
            public void columnRemoved(TableColumnModelEvent e) {
        private JTable centerTable;
        private JTable rowHeaderTable;
        private JTable columnFooterTable;
        public HeaderFooterTablePanel(AbstractHeaderFooterTableModel abstractHeaderFooterTableModel) {
            super();
            // Create the center, rowHeader and columnFooter tables
            centerTable = new JTable(abstractHeaderFooterTableModel);
            rowHeaderTable = new JTable(new RowHeaderTableModel(abstractHeaderFooterTableModel));
            columnFooterTable = new JTable(new ColumnFooterTableModel(abstractHeaderFooterTableModel));
            // Disabled column re-ordering
            centerTable.getTableHeader().setReorderingAllowed(false);
            columnFooterTable.getTableHeader().setReorderingAllowed(false);
            // We are using scroll panes, so no auto resizing of table.
            centerTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            columnFooterTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            // Only allow the user to change the column widths from the center table, not the
            // columnFooter.
            columnFooterTable.getTableHeader().setResizingAllowed(false);
            // When the center table column widths change, change those in the columnFooter table.
            SyncColumnWidths syncColumnWidths = new SyncColumnWidths(centerTable, columnFooterTable);
            centerTable.getColumnModel().addColumnModelListener(syncColumnWidths);
            // Set the width of the row header before adding it to the center scroll pane
            // as the row header.
            Dimension rowHeaderSize = rowHeaderTable.getPreferredScrollableViewportSize();
            rowHeaderSize.width = rowHeaderTable.getPreferredSize().width;
            rowHeaderTable.setPreferredScrollableViewportSize(rowHeaderSize);
            rowHeaderTable.setRowHeight(centerTable.getRowHeight());
            // Create the center scroll pane and set the row header table as the row header.
            final JScrollPane centerScrollPane = new JScrollPane(centerTable);
            centerScrollPane.setRowHeaderView(rowHeaderTable);
            // We will handle horizontal scrolling with our own scrollbar.
            centerScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
            // Now we create the panel to hold the columnFooter table and the horizontal
            // scrollbar.
            final JPanel columnFooterPanel = new JPanel(new BorderLayout());
            // Keep the space below the row header empty.
            Component westGlue = Box.createHorizontalStrut(rowHeaderSize.width);
            // Set height of the columnFooterTable before adding it to the columnFooter scroll pane
            // as the view.
            Dimension columnFooterSize = columnFooterTable.getPreferredScrollableViewportSize();
            columnFooterSize.height = columnFooterTable.getPreferredSize().height;
            columnFooterTable.setPreferredScrollableViewportSize(columnFooterSize);
            columnFooterTable.setRowHeight(centerTable.getRowHeight());
            // The scroll pane which holds the columnFooterTable.
            final JScrollPane columnFooterScrollPane = new JScrollPane(columnFooterTable);
            // We do our own horizontal scrolling and the columnFooterScrollPane never scrolls vertically.
            columnFooterScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
            columnFooterScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);
            // The scrollbar we use to scroll horizontally.
            final JScrollBar horizontalScrollBar = new JScrollBar(JScrollBar.HORIZONTAL);
            // Sync up all the scrolling. See the method for details.
            syncScrolling(centerScrollPane, horizontalScrollBar, columnFooterScrollPane);
            // Keep the space below the vertical scrollbar empty.
            final JScrollBar verticalScrollBar = centerScrollPane.getVerticalScrollBar();
            int verticalScrollBarWidth = verticalScrollBar.getPreferredSize().width;
            final Component eastGlue = Box.createHorizontalStrut(verticalScrollBarWidth);
            // Set the center viewport size to match to table size
            Dimension centerTablePreferredsize = centerTable.getPreferredSize();
            centerTable.setPreferredScrollableViewportSize(centerTablePreferredsize);
            centerScrollPane.getViewport().setSize(centerTablePreferredsize);
            // The panel that holds the columnFooterTable and the horizontal scrollbar below it.
            final JPanel footerPanel = new JPanel(new BorderLayout());
            footerPanel.add("North", columnFooterScrollPane);
            footerPanel.add("South", horizontalScrollBar);
            footerPanel.setMinimumSize(footerPanel.getPreferredSize());
            // Assemble our columnFooterPanel.
            columnFooterPanel.add("West", westGlue);
            columnFooterPanel.add("Center", footerPanel);
            columnFooterPanel.add("East", eastGlue);
            // This keeps the columnFooterPanel at its minimum height
            JPanel northPanel = new JPanel(new BorderLayout());
            northPanel.add("North", columnFooterPanel);
            // Assemble the center scroll pane, below it the panel containing the column
            // footer panel, and then vertical glue to eat up any available vertical space.
            Box box = Box.createVerticalBox();
            box.add(centerScrollPane);
            box.add(northPanel);
            box.add(Box.createVerticalGlue());
            // Hide/show the eastGlue and the horizontalScrollBar, and recalculate the
            // minimum size of the footerPanel in response to size and visibility changes.
            syncScrollBarVisibility(centerScrollPane, eastGlue, horizontalScrollBar, footerPanel);
            setLayout(new BorderLayout());
            add("Center", box);
        private void syncScrollBarVisibility(final JScrollPane centerScrollPane,
                                             final Component eastGlue,
                                             final JScrollBar horizontalScrollBar,
                                             final JPanel footerPanel) {
            // Hide/show the eastGlue accoring to whether or not the vertical scrollbar
            // is visible.
            centerScrollPane.getVerticalScrollBar().addComponentListener(new ComponentListener() {
                private void checkVisibleStatus(boolean b) {
                    if (eastGlue.isVisible() != b) {
                        eastGlue.setVisible(b);
                public void componentHidden(ComponentEvent e) {
                    checkVisibleStatus(false);
                public void componentMoved(ComponentEvent e) {
                public void componentResized(ComponentEvent e) {
                public void componentShown(ComponentEvent e) {
                    checkVisibleStatus(true);
            // Hide/show the horizontal scrollbar according to whether or not it's needed.
            centerScrollPane.getViewport().addComponentListener(new ComponentListener() {
                public void componentHidden(ComponentEvent e) {
                public void componentMoved(ComponentEvent e) {
                public void componentResized(ComponentEvent e) {
                    int centerScrollPaneWidth = centerScrollPane.getViewport().getSize().width;
                    int centerTablePreferredWidth = centerTable.getPreferredSize().width;
                    if (centerScrollPaneWidth >= centerTablePreferredWidth) {
                        horizontalScrollBar.setVisible(false);
                    } else {
                        horizontalScrollBar.setVisible(true);
                public void componentShown(ComponentEvent e) {
            // Set the minimum size of the footerPanel according to whether or not the
            // horizontalScrollBar is visible.
            horizontalScrollBar.addComponentListener(new ComponentListener() {
                public void componentHidden(ComponentEvent e) {
                    footerPanel.setMinimumSize(footerPanel.getPreferredSize());
                public void componentMoved(ComponentEvent e) {
                public void componentResized(ComponentEvent e) {
                public void componentShown(ComponentEvent e) {
                    footerPanel.setMinimumSize(footerPanel.getPreferredSize());
        private void syncScrolling(final JScrollPane centerScrollPane,
                                   final JScrollBar columnFooterScrollBar,
                                   final JScrollPane columnFooterScrollPane) {
            // When the view of the center scroll pane changes position,
            // change the value of the columnFooterScrollBar to match.
            centerScrollPane.getViewport().addChangeListener(new ChangeListener() {
                public void stateChanged(ChangeEvent e) {
                    int x = ((Component) e.getSource()).getLocation().x * -1;
                    JViewport viewport = (JViewport) e.getSource();
                    int extentWidth = viewport.getExtentSize().width;
                    int viewWidth = viewport.getViewSize().width;
                    int value = Math.max(0, Math.min(viewport.getViewPosition().x, viewWidth - extentWidth));
                    columnFooterScrollBar.setValues(value, extentWidth, 0, viewWidth);
            // When the columnFooterScrollBar (horizontal scroll bar) value changes,
            // change the position of the view in the center scroll pane to match.
            columnFooterScrollBar.addAdjustmentListener(new AdjustmentListener() {
                public void adjustmentValueChanged(AdjustmentEvent e) {
                    JViewport viewport = centerScrollPane.getViewport();
                    viewport.setViewPosition(new Point(e.getValue(), viewport.getViewPosition().y));
                    viewport = columnFooterScrollPane.getViewport();
                    viewport.setViewPosition(new Point(e.getValue(), viewport.getViewPosition().y));
            // When the view of the row header changes position,
            // change the value of the vertical scrollbar of the center
            // scroll pane to match.
            centerScrollPane.getRowHeader().addChangeListener(new ChangeListener() {
                public void stateChanged(ChangeEvent e) {
                    JViewport viewport = (JViewport) e.getSource();
                    int extentHeight = viewport.getExtentSize().height;
                    int viewHeight = viewport.getViewSize().height;
                    int value = Math.max(0, Math.min(viewport.getViewPosition().y, viewHeight - extentHeight));
                    centerScrollPane.getVerticalScrollBar().setValues(value, extentHeight, 0, viewHeight);
        public JTable getCenterTable() {
            return centerTable;
        public JTable getRowHeaderTable() {
            return rowHeaderTable;
        private JTable getColumnFooterTable() {
            return columnFooterTable;
        public static void main(String[] args) {
            AbstractHeaderFooterTableModel tableModel = new AbstractHeaderFooterTableModel() {
                public int getRowCount() {
                    return 25;
                public int getColumnCount() {
                    return 10;
                public Object getValueAt(int rowIndex, int columnIndex) {
                    return "Cell " + rowIndex + ":" + columnIndex;
                public String getColumnName(int column) {
                    return "Column #" + column;
                public Object getRowHeaderValueAt(int rowIndex, int columnIndex) {
                    return "Header " + rowIndex + ":" + columnIndex;
                public int getRowHeaderColumnCount() {
                    return 2;
                public Object getFooterValueAt(int rowIndex, int columnIndex) {
                    return "Footer " + rowIndex + ":" + columnIndex;
                public int getFooterRowCount() {
                    return 3;
            JFrame frame = new JFrame();
            HeaderFooterTablePanel tablePanel = new HeaderFooterTablePanel(tableModel);
            // Render the cells in the row header and footer like the center table column headers.
            TableCellRenderer columnRenderer = tablePanel.getCenterTable().getTableHeader().getDefaultRenderer();
            tablePanel.getRowHeaderTable().setDefaultRenderer(Object.class, columnRenderer);
            tablePanel.getColumnFooterTable().setDefaultRenderer(Object.class, columnRenderer);
            frame.getContentPane().add("Center", tablePanel);
            frame.setSize(300, 300);
            frame.setLocation(300, 200);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setVisible(true);
    }

    i was wondering why this topic has NO replies! and then i realized that there is NO question??? so do you have a question, or are you just starting a new thread cuz you feel like it???
    just trying to work out why you didnt post this is the old thread???
    http://forum.java.sun.com/thread.jspa?threadID=5130131&messageID=9466400#9466400

  • How can I apply row numbers and column litteral to identify the cells?, How can I apply row numbers and column litteral to identify the cells?

    I news identici row and column in numbers over and left as in Excel. How can I do?

    Hi Roanto,
    Welcome to Apple Support Communities.
    We're all feeling out way around in this newly designed environment, but I think I've discovered that the iWork applications for iPad are still in a community separate from those for the Mac versions of the iWork appplications.
    Seeing as you question is about Numbers for iPad, you might find it better served in the https://discussions.apple.com/community/ipad/iwork_for_ipad>Numbers for iPad Community area. The link will take you to the front page of that community.
    Regards,
    Barry
    PS: You might also consider rewriting your question. I'm having some difficulty deternmining exactly what you want to accomplish.
    B

Maybe you are looking for

  • Javascript Detection of Adobe reader plugin for Adobe version 9.0

    Hi, I'm working on a javascript utility that finds out the version of the adobe reader plugin that is installed in firefox and IE. The firefox code works fine but I can't detect Adobe version 9.0 for IE using the following code.      var LATEST_ADOBE

  • Customer fields on own screen - Shirley Pereira

    Hi Everybody,    I saw lot of threads on the same issue but i couldnt get a solution for this issue. I saw all oss notes which all are mentioned for this issue but its not working for me. Requirement is, i have to add my own fields for contact(GOA) a

  • P20-102 Satellite - Remote Receiver not working after running recovery CD

    Hi, I'm running Windows Media Center Edition and on my P20-102 Satellite notebook. I recently needed to run the recovery CD, the process went fine except that my external remote receiver box supplied with my notebook no longer works. The box was work

  • An unknown error occurred (-39)

    I'm running iTunes 7.1.1.5 on my Windows XP OS with an iPod 60 (software 1.2.1 Windows). It has been working fine with about 20 GB music and 20 GB photos. However, the most recent sync stopped with the following error: The iPod "iPod60" cannot be syn

  • Formating of the message in this forum

    Hello!!! I need to post a topic on this forum and I need to post table with the sample data too. I have done proper alignment of the table in text editor , but when I see preview of message in the forum, I found that alignment is not as what I have d