ALV using chekbox and icon
1) Needs to create two icons for a row in ALV.
With One Icon, she should be able to Edit a ROW. Other icon should support save option and should save the changes in the database table.
How can we do this????
2) Needs to create a checkbox by creating a Field in the database table.
Each row in the table will have a checkbox in ALV.
If a checkbox is selected , that particular row should be selected in the ALV
Regards,
Rajkumar
Rajkumar,
Check the following code
Types: begin of lt_io.
include structure mara. " Your Structure
Types: style_table type lvc_t_style.
Types: end of lt_io.
data: lt_io type table of lt_io,
ls_layout type lvc_s_layo,
lt_fcat type lvc_t_fcat,
lo_grid type ref to cl_gui_alv_grid.
field-symbols: <io> type lt_io,
<fcat> type lvc_s_fcat.
... fill your output table ....
ls_layout-stylefname = 'STYLE_TABLE'.
loop at lt_io assigning <io>.
PERFORM set_style USING 'CHECKBOX' "Your Filename
CHANGING <io>.
endloop.
... Fill Your Field Catalog lt_fcat
read table lt_fcat assigning <fcat>
where fieldname = 'CHECKBOX'.
<fcat>-checkbox = 'X'.
create grid control lo_grid.
CALL METHOD lo_grid->set_table_for_first_display
EXPORTING
is_layout = ls_layout
CHANGING
it_fieldcatalog = lt_fcat
it_outtab = lt_io[].
FORM set_button_to_line
USING iv_fieldname TYPE lvc_fname
CHANGING cs_io TYPE io.
DATA: ls_style TYPE lvc_s_styl,
lt_style TYPE lvc_t_styl.
ls_style-fieldname = iv_fieldname.
if cs_io-checkbox = ' '.
ls_style-style = cl_gui_alv_grid=>mc_style_enabled.
else.
ls_style-style = cl_gui_alv_grid=>mc_style_disabled.
endif.
ls_style-maxlen = 2.
INSERT ls_style INTO TABLE io-style_table.
ENDFORM. "set_icon_to_status_line
[/code].
Vinodh
Similar Messages
-
List display for ALV using class and methods
Hi friends
I want the list display for the ALV using Class and methods
which class and methods i can use.
Here we can't use the REUSE_ALV_LIST_DISPLAY and also GRID
I was done GRID display using class and methods but i want only list display for using class.
plz Give me sample code of list display not for grid.
Thanks
Nani.hi
please check with this code...
declare grid and container.
DATA : o_alvgrid TYPE REF TO cl_gui_alv_grid,
o_dockingcontainer TYPE REF TO cl_gui_docking_container,
i_fieldcat TYPE lvc_t_fcat,"fieldcatalogue
w_layout TYPE lvc_s_layo."layout
If any events like double click,etc., are needed we have to add additional functionality.
call the screen in program.
Then , create the container as follows
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
CREATE OBJECT o_dockingcontainer
EXPORTING
ratio = '95'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
ENDIF.
CREATE OBJECT o_alvgrid
EXPORTING
i_parent = o_dockingcontainer.
Build the fieldcatalog
create a output structure in SEll for the ALV output
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = <alv output>
CHANGING
ct_fieldcat = i_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE i030."Error in building the field catalogue
LEAVE LIST-PROCESSING.
ENDIF.
*If you need to modify the field catalog,modify it using field sysmbols
*setting the layout
w_layout-grid_title = title.
w_layout-zebra = 'X'.
then displaying the output
CALL METHOD o_alvgrid->set_table_for_first_display
EXPORTING
i_save = 'A'
is_layout = w_layout
CHANGING
it_outtab = i_output[]
it_fieldcatalog = i_fieldcat[]
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE i032 ."Error in Displaying
LEAVE LIST-PROCESSING.
ENDIF.
*After that in PAI of the screen, you need to free the *object while going back from the screen(according to *your requirement)
MODULE user_command_9001 INPUT.
CASE sy-ucomm.
WHEN 'EXIT' OR 'CANC'.
PERFORM f9600_free_objects:
USING o_alvgrid 'ALV' text-e02,
USING o_dockingcontainer 'DOCKING'
text-e01.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_9001 INPUT
*in the program, write the follwoing code
FORM f9600_free_objects USING pobject
value(ptype)
value(ptext).
DATA: l_objectalv TYPE REF TO cl_gui_alv_grid.
CASE ptype.
WHEN 'ALV'.
l_objectalv = pobject.
IF NOT ( l_objectalv IS INITIAL ).
CALL METHOD l_objectalv->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, l_objectalv.
PERFORM f9700_error_handle USING ptext.
ENDIF.
WHEN 'DOCKING'.
DATA: lobjectdock TYPE REF TO cl_gui_docking_container.
lobjectdock = pobject.
IF NOT ( lobjectdock IS INITIAL ).
CALL METHOD lobjectdock->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, lobjectdock.
PERFORM f9700_error_handle USING ptext.
ENDIF.
WHEN 'CONTAINER'.
DATA: lobjectcontainer TYPE REF TO cl_gui_container.
lobjectcontainer = pobject.
IF NOT ( lobjectcontainer IS INITIAL ).
CALL METHOD lobjectcontainer->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, lobjectcontainer.
PERFORM f9700_error_handle USING ptext.
ENDIF.
WHEN OTHERS.
sy-subrc = 1.
PERFORM f9700_error_handle USING
text-e04.
ENDCASE.
ENDFORM. " f9600_free_objects
FORM f9700_error_handle USING value(ptext).
IF sy-subrc NE 0.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = text-e03
txt2 = sy-subrc
txt1 = ptext.
ENDIF.
endform.
also check with this
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
Hope this helps
if it helped, you can acknowledge the same by rewarding
regards
dinesh -
ALV-Freeze colums and Icon on Selection Screen
Dear All,
suppose i have 10 columns in an ALV Report and i want to freeze from my 3rd column onwards so that if I scroll to right my these 3three columns can still be seen.How to do this.
also how to display icon on selection screen.I remeber doing some copy pasting from icon table to my selection texts.
How to acheive these two.
Regards,
Rahul Bhat.Hi,
I hope the following links will help you,
how to freeze columns in table
how to freeze the selection column in the table control of the module pool.
Freeze Column
Regards,
Harish -
Hi all
how can i use alv 's for reading data from table mara and dispyaing 10 records on out put screen as a grid using classes or methods
thanks in advanceHi,
look into the sample code:
TYPE-POOLS *
TYPE-POOLS: slis.
TRANSPARENT TABLES *
TABLES: rbkp,rbco,sscrfields,t009b.
CLASS cl_event_receiver DEFINITION
CLASS cl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS: handle_double_click
FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row e_column,
handle_top_of_page
FOR EVENT print_top_of_page OF cl_gui_alv_grid.
PRIVATE SECTION.
ENDCLASS.
CLASS CL_EVENT_RECEIVER IMPLEMENTATION
CLASS cl_event_receiver IMPLEMENTATION.
*--Method double click
METHOD :handle_double_click.
PERFORM drill_down USING e_column-fieldname
e_row-index .
ENDMETHOD.
*--Method top of page
METHOD handle_top_of_page.
PERFORM event_top_of_page.
ENDMETHOD. "top_of_page
ENDCLASS.
DATA: event_receiver TYPE REF TO cl_event_receiver.
Global Variables *
DATA:
v_xblnr LIKE rbkp-xblnr, " Refernce Doc No
v_lifnr LIKE lfa1-lifnr, " Vendor
v_bukrs LIKE t001-bukrs, " Company Code
v_zzmprd LIKE mara-matnr, " MPM
v_monat LIKE t009b-poper. " Fiscal Period
GLOBAL TYPES *
*-Structure for Invoice details
TYPES:BEGIN OF y_invoice,
belnr LIKE rbkp-belnr, " Invoice Doc No
gjahr LIKE rbkp-gjahr, " Fiscal Year
blart LIKE rbkp-blart, " Document type
bldat LIKE rbkp-bldat, " Document date
budat LIKE rbkp-budat, " Posting date
xblnr LIKE rbkp-xblnr, " Refernce Doc no
bukrs LIKE rbkp-bukrs, " Company Code
lifnr LIKE rbkp-lifnr, " Vendor
waers LIKE rbkp-waers, " Local Currency
bktxt LIKE rbkp-bktxt, " Doc header text
zlspr LIKE rbkp-zlspr, " payment block
buzei LIKE rseg-buzei, " Invoice Item No
ebeln LIKE rseg-ebeln, " PO
ebelp LIKE rseg-ebelp, " PO line item
matnr LIKE rseg-matnr, " SAP Material
bwtar LIKE rseg-bwtar, " Valuation type
wrbtr LIKE rseg-wrbtr, " Inv Value
menge LIKE rseg-menge, " Inv Qty
END OF y_invoice,
*-Structure for Material details
BEGIN OF y_material,
matnr LIKE mara-matnr, " Material No
normt LIKE mara-normt, " Article Number
ismconttype LIKE mara-ismconttype, " Window
ismdesign LIKE mara-ismdesign, " No of disc in MPM
werks LIKE marc-werks, " Plant
mfrgr LIKE marc-mfrgr, " Product Line
END OF y_material,
Structure for Costtype data
BEGIN OF y_costtype,
bukrs LIKE zsn0325_costtype-bukrs, " Company Code
land1 LIKE zsn0325_costtype-land1, " Country key
window LIKE zsn0325_costtype-window, " Window
ewlnr LIKE zsn0325_costtype-ewlnr, " Cost type
distmeth LIKE zsn0325_costtype-distmeth, " Distribution type
zvalfrom LIKE zsn0325_costtype-zvalfrom, " Posting date from
zvalto LIKE zsn0325_costtype-zvalto, " Posting Date TO
disc1pr LIKE zsn0325_costtype-disc1pr, " Disc price
disc2pr LIKE zsn0325_costtype-disc2pr, " Disc price
END OF y_costtype,
Structure for Distmeth data
BEGIN OF y_distmeth,
distmeth LIKE zsn0325_distmeth-distmeth, " Distribution Methods
distext LIKE zsn0325_distmeth-distext, " Description
END OF y_distmeth,
*-structure for rbco
BEGIN OF y_rbco,
belnr LIKE rbco-belnr, " Account Doc#
gjahr LIKE rbco-gjahr, " Fiscal year
buzei LIKE rbco-buzei, " Doc item in inv doc
cobl_nr LIKE rbco-cobl_nr, " 4 Character
" Seq No for Coding
wrbtr LIKE rbco-wrbtr, " Amt in doc currency
saknr LIKE rbco-saknr, " G/L Account Number
sgtxt LIKE rbco-sgtxt, " Item text
zzcou LIKE rbco-zzcou, " Country
zzmprd LIKE rbco-zzmprd, " MPM Product
menge LIKE rbco-menge, " Quantity
bukrs LIKE rbco-bukrs, " Company Code
xnegp LIKE rbco-xnegp, " Variance Flag
matnr LIKE mara-matnr, " MPM Product
land1 LIKE zsop_fame-sop_cnt, " SOP country code
END OF y_rbco,
*-structure for rbco_tmp
BEGIN OF y_rbco_tmp,
bukrs LIKE rbco-bukrs, " Company Code
sgtxt LIKE rbco-sgtxt, " Item text
ewlnr LIKE zsn0325_costtype-ewlnr, " Cost type
distmeth LIKE zsn0325_costtype-distmeth, " Distribution type
land1 LIKE zsop_fame-sop_cnt, " SOP country code
END OF y_rbco_tmp,
*-Structure for setleaf
BEGIN OF y_setleaf,
setname LIKE setleaf-setname,
valsign LIKE setleaf-valsign,
valoption LIKE setleaf-valoption,
valfrom LIKE setleaf-valfrom,
valto LIKE setleaf-valto,
END OF y_setleaf,
*-Structure for Output data
BEGIN OF y_output,
bukrs LIKE rbkp-bukrs, " Company Code
gjahr LIKE rbkp-gjahr, " Fiscal year
lifnr LIKE rbkp-lifnr, " Vendor
zlspr LIKE rbkp-zlspr, " Payment block
xblnr LIKE rbkp-xblnr, " Refernece Doc no
bldat LIKE rbkp-bldat, " Document date
budat LIKE rbkp-budat, " Posting date
belnr LIKE rbkp-belnr, " Invoice Doc No
bktxt LIKE rbkp-bktxt, " Invoice Type
normt LIKE mara-normt, " Article Number
ismconttype LIKE mara-ismconttype, " Window
zzcou LIKE rbco-zzcou, " Country
zzmprd LIKE rbco-zzmprd, " MPM Product
xnegp LIKE rbco-xnegp, " Cost type variance
cobl_nr LIKE rbco-cobl_nr, " 4 Character
" Seq No for Coding
invfqty LIKE rbco-menge, " Inventory Fee Qty
discqty LIKE rbco-menge, " Dist Cost Qty
disrqty LIKE rbco-menge, " Dist Return Qty
sseqty LIKE rbco-menge, " Special Services Qty
sgtxt LIKE rbco-sgtxt, " Item Text
ismdesign LIKE mara-ismdesign, " No of disc on MPM
mfrgr LIKE marc-mfrgr, " Product Line
ddeal(3), " Distribution DEAL
distmeth LIKE zsn0325_costtype-distmeth, " Distribution type
distext LIKE zsn0325_distmeth-distext, " Description
ndisc(2) TYPE c, " NO of disc on INV
rifval LIKE rbco-wrbtr, " Inv fee value
stdrif LIKE zsn0325_costtype-disc1pr, " STD Inv fee
rfvar LIKE zsn0325_costtype-disc1pr, " Inv Fee Variance
dicval LIKE rbco-wrbtr, " Dist cost Value
stddico LIKE zsn0325_costtype-disc1pr, " STD Dis cost
dicvar LIKE zsn0325_costtype-disc1pr, " Dist Cost Variance
disrev LIKE rbco-wrbtr, " Dist Return Value
stdirco LIKE zsn0325_costtype-disc1pr, " STD Dis Return cost
drevar LIKE zsn0325_costtype-disc1pr, " Dist Ret Variance
adj_qty_ct LIKE rbco-menge, " Adjustments Qty
adj_pr_ct LIKE rbco-wrbtr, " Adjustments Value
ssval LIKE rbco-wrbtr, " Special Value
color_cell TYPE lvc_t_scol, " Cell Color
END OF y_output,
*-Structure for Temporary Output data
BEGIN OF y_output_tmp,
bukrs LIKE rbkp-bukrs, " Company Code
gjahr LIKE rbkp-gjahr, " Fiscal year
lifnr LIKE rbkp-lifnr, " Vendor
zlspr LIKE rbkp-zlspr, " Payment block
xblnr LIKE rbkp-xblnr, " Refernece Doc no
bldat(10) TYPE c, " Document Date
budat(10) TYPE c, " Posting date
belnr LIKE rbkp-belnr, " Invoice Doc No
bktxt LIKE rbkp-bktxt, " Invoice Type
normt(18) TYPE c, " Article Number
ismconttype LIKE mara-ismconttype, " Window
zzcou LIKE rbco-zzcou, " Country
zzmprd LIKE rbco-zzmprd, " MPM Product
xnegp LIKE rbco-xnegp, " Cost type variance
cobl_nr LIKE rbco-cobl_nr, " 4 Character
" Seq No for Coding
invfqty LIKE rbco-menge, " Inventory Fee Qty
discqty LIKE rbco-menge, " Dist Cost Qty
disrqty LIKE rbco-menge, " Dist Return Qty
sseqty LIKE rbco-menge, " Special Services Qty
sgtxt LIKE rbco-sgtxt, " Item Text
ismdesign(2) TYPE c, " No of disc on MPM
mfrgr LIKE marc-mfrgr, " Product Line
ddeal(3), " Distribution DEAL
distmeth LIKE zsn0325_costtype-distmeth, " Distribution type
distext LIKE zsn0325_distmeth-distext, " Description
ndisc(2) TYPE c, " NO of disc on INV
rifval LIKE rbco-wrbtr, " Inv fee value
stdrif LIKE zsn0325_costtype-disc1pr, " STD Inv fee
rfvar LIKE zsn0325_costtype-disc1pr, " Inv Fee Variance
dicval LIKE rbco-wrbtr, " Dist cost Value
stddico LIKE zsn0325_costtype-disc1pr, " STD Dis cost
dicvar LIKE zsn0325_costtype-disc1pr, " Dist Cost Variance
disrev LIKE rbco-wrbtr, " Dist Return Value
stdirco LIKE zsn0325_costtype-disc1pr, " STD Dis Return cost
drevar LIKE zsn0325_costtype-disc1pr, " Dist Ret Variance
adj_qty_ct LIKE rbco-menge, " Adjustments Qty
adj_pr_ct LIKE rbco-wrbtr, " Adjustments Value
ssval LIKE rbco-wrbtr, " Special Value
color_cell TYPE lvc_t_scol, " Cell Color
END OF y_output_tmp.
GLOBAL DATA -INTERNAL TABLES *
DATA: i_invoice TYPE STANDARD TABLE OF y_invoice,
i_output TYPE STANDARD TABLE OF y_output,
i_output_tmp TYPE STANDARD TABLE OF y_output_tmp,
i_rbco TYPE STANDARD TABLE OF y_rbco,
i_rbco_tmp TYPE STANDARD TABLE OF y_rbco_tmp,
i_setleaf TYPE STANDARD TABLE OF y_setleaf,
i_material TYPE STANDARD TABLE OF y_material,
i_costtype TYPE STANDARD TABLE OF y_costtype,
i_distmeth TYPE STANDARD TABLE OF y_distmeth,
i_toolbar_excluding TYPE ui_functions,
i_fieldcatalog TYPE lvc_t_fcat.
WORK AREAS *
DATA: w_invoice TYPE y_invoice,
w_material TYPE y_material,
w_output TYPE y_output,
w_output_tmp TYPE y_output_tmp,
w_costtype TYPE y_costtype,
w_distmeth TYPE y_distmeth,
w_rbco TYPE y_rbco,
w_rbco_tmp TYPE y_rbco_tmp,
w_setleaf TYPE y_setleaf,
w_toolbar_excluding TYPE ui_func,
w_fieldcatalog TYPE lvc_s_fcat.
*--Ranges
RANGES: r_setinv FOR setleaf-valfrom,
r_matnr FOR mara-matnr.
DATA DECLARATION FOR ALV *
*--Data declaration for ALV Grid
DATA :w_alvgrid TYPE REF TO cl_gui_alv_grid,
w_ccontainer TYPE REF TO cl_gui_custom_container,
w_okcode LIKE sy-ucomm.
*--Color cell
DATA: i_color TYPE lvc_t_scol,
w_color TYPE lvc_s_scol.
*--- Layout structure
DATA w_layout TYPE lvc_s_layo .
SELECTION SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-055.
SELECT-OPTIONS:
s_bukrs FOR rbkp-bukrs, " Company Code
s_lifnr FOR rbkp-lifnr, " Vendor
s_xblnr FOR rbkp-xblnr, " Reference Doc No
s_gjahr FOR rbkp-gjahr OBLIGATORY, " Fiscal Year
s_monat FOR t009b-poper, " Period
s_budat FOR rbkp-budat, " Posting date
s_bldat FOR rbkp-bldat, " Document date
s_zzmprd FOR rbco-zzmprd. " MPM
SELECTION-SCREEN END OF BLOCK blk1.
AT SELECTION SCREEN *
Validating Company Code
AT SELECTION-SCREEN ON s_bukrs.
IF NOT s_bukrs[] IS INITIAL.
SELECT bukrs " Company Code
UP TO 1 ROWS
INTO v_bukrs
FROM t001
WHERE bukrs IN s_bukrs.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e000 WITH 'Invalid Company Code'(e06).
ENDIF.
ENDIF.
Validating ODS Invoice Document No.
AT SELECTION-SCREEN ON s_xblnr.
IF NOT s_xblnr[] IS INITIAL.
SELECT xblnr " Reference Document number
UP TO 1 ROWS
INTO v_xblnr
FROM rbkp
WHERE xblnr IN s_xblnr.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e000 WITH 'Invalid ODS Invoice No.'(e05).
ENDIF.
ENDIF.
Validating Vendor Number
AT SELECTION-SCREEN ON s_lifnr.
IF NOT s_lifnr[] IS INITIAL.
SELECT lifnr " Vendor Number
UP TO 1 ROWS
INTO v_lifnr
FROM lfa1
WHERE lifnr IN s_lifnr.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e000 WITH 'Invalid Vendor Number'(e04).
ENDIF.
ENDIF.
Validating MPM
AT SELECTION-SCREEN ON s_zzmprd.
REFRESH r_matnr.
LOOP AT s_zzmprd.
MOVE-CORRESPONDING s_zzmprd TO r_matnr.
IF NOT s_zzmprd IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = s_zzmprd-low
IMPORTING
output = r_matnr-low
EXCEPTIONS
length_error = 1
OTHERS = 2.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = s_zzmprd-high
IMPORTING
output = r_matnr-high
EXCEPTIONS
length_error = 1
OTHERS = 2.
APPEND r_matnr.
ENDIF.
ENDLOOP.
SELECT matnr " MPM
UP TO 1 ROWS
INTO v_zzmprd
FROM mara
WHERE matnr IN r_matnr.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e000 WITH 'Invalid MPM'(e09).
ENDIF.
Validating Fiscal Period
IF NOT s_monat[] IS INITIAL.
SELECT poper " Fiscal Period
UP TO 1 ROWS
INTO v_monat
FROM t009b
WHERE periv = 'K4'
AND poper IN s_monat
AND bdatj IN s_gjahr.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e000 WITH 'Invalid Fiscal Period'(e02).
ENDIF.
ENDIF.
*For Company Code & Vendor
AT SELECTION-SCREEN.
MOVE sy-ucomm TO sscrfields-ucomm.
IF sy-ucomm EQ 'ONLI'
AND s_bukrs[] IS INITIAL
AND s_lifnr[] IS INITIAL.
MESSAGE i000 WITH
'Either Company code or Vendor must be selected'(e03).
STOP.
ENDIF.
IF ( NOT s_budat[] IS INITIAL OR NOT s_bldat IS INITIAL )
AND NOT s_monat[] IS INITIAL.
MESSAGE i000 WITH
'Select either Period or Posting date,Document date'(e01).
STOP.
ENDIF.
START OF SELECTION *
START-OF-SELECTION.
*-Retrieve Invoice Details from RBKP & RSEG
PERFORM get_invoice.
IF NOT i_invoice[] IS INITIAL.
*-Retrieve Invoice Details from RBCO
PERFORM get_rbco.
ENDIF.
IF NOT i_rbco[] IS INITIAL.
*-Retrieve Material Document details from MARA & MARC
PERFORM get_material.
ENDIF.
IF NOT i_invoice[] IS INITIAL.
*-Retrieve costtype details from zsn0325_costtype & zsn0325_distmeth
PERFORM get_costtype.
PERFORM get_distmeth.
ENDIF.
*-Populate internal table for output
PERFORM populate_output.
END OF SELECTION *
END-OF-SELECTION.
*-TO Display Output
IF NOT i_invoice[] IS INITIAL
AND NOT i_output[] IS INITIAL.
PERFORM display_report.
CALL SCREEN 100.
ENDIF.
*& Form get_Invoice
Retrieve Invoice Details from RBKP & RSEG
FORM get_invoice.
DATA : lv_monat LIKE bkpf-monat.
*-Get Value form set zsn_doc_types_inv
SELECT setname
valsign
valoption
valfrom
valto
FROM setleaf
INTO TABLE i_setleaf
WHERE setclass = '0000'
AND setname = 'ZSN_DOC_TYPES_INV'.
IF sy-subrc = 0.
LOOP AT i_setleaf INTO w_setleaf.
r_setinv-sign = w_setleaf-valsign.
r_setinv-option = w_setleaf-valoption.
r_setinv-low = w_setleaf-valfrom.
r_setinv-high = w_setleaf-valto.
APPEND r_setinv.
ENDLOOP.
ENDIF.
Get Invoice Doc details
SELECT a~belnr " Document number of an invoice
a~gjahr " Fiscal Year
a~blart " Document type
a~bldat " Document Date in Document
a~budat " Posting Date in the Document
a~xblnr " Reference Document Number
a~bukrs " Company Code
a~lifnr " Different invoicing party
a~waers " Currency Key
a~bktxt " Document header text
a~zlspr " Payment Block Key
b~buzei " Document item in invoice
b~ebeln " Purchasing Document Number
b~ebelp " Item Number of PO Document
b~matnr " Material Number
b~bwtar " Valuation type
b~wrbtr " Amount in document currency
b~menge " Quantity
INTO TABLE i_invoice
FROM rbkp AS a
LEFT OUTER JOIN rseg AS b
ON abelnr EQ bbelnr
WHERE a~bukrs IN s_bukrs
AND a~gjahr IN s_gjahr
AND a~bldat IN s_bldat
AND a~blart IN r_setinv
AND a~budat IN s_budat
AND a~xblnr IN s_xblnr
AND a~lifnr IN s_lifnr.
IF sy-subrc NE 0.
MESSAGE i000 WITH 'No Invoice exists for this selection'(e07)
'criteria'(e08).
STOP.
ELSE.
SORT i_invoice BY belnr gjahr.
LOOP AT i_invoice INTO w_invoice.
CALL FUNCTION 'FI_PERIOD_DETERMINE'
EXPORTING
i_budat = w_invoice-budat
i_bukrs = w_invoice-bukrs
i_periv = 'K4'
i_gjahr = w_invoice-gjahr
I_MONAT = 00
X_XMO16 = ' '
IMPORTING
E_GJAHR =
e_monat = lv_monat
E_POPER =
EXCEPTIONS
fiscal_year = 1
period = 2
period_version = 3
posting_period = 4
special_period = 5
version = 6
posting_date = 7
OTHERS = 8.
IF sy-subrc <> 0.
DELETE i_invoice.
ELSE.
IF lv_monat IN s_monat.
ELSE.
DELETE i_invoice.
ENDIF.
ENDIF.
ENDLOOP.
IF i_invoice[] IS INITIAL.
MESSAGE i000 WITH 'No Invoice exists for this selection'(e07)
'criteria'(e08).
STOP.
ENDIF.
ENDIF.
ENDFORM. " get_Invoice
*& Form get_rbco
Retrieve Invoice Details from RBCO
FORM get_rbco.
SELECT belnr
gjahr
buzei
cobl_nr
wrbtr
saknr
sgtxt
zzcou
zzmprd
menge
bukrs
xnegp
FROM rbco
INTO TABLE i_rbco
FOR ALL ENTRIES IN i_invoice
WHERE belnr = i_invoice-belnr
AND gjahr = i_invoice-gjahr
AND wrbtr <> 0
AND zzmprd IN s_zzmprd.
IF sy-subrc NE 0.
MESSAGE i000 WITH 'No Distribution Data Exists'(e10).
STOP.
ELSE.
SORT i_rbco BY belnr gjahr.
ENDIF.
ENDFORM. " get_rbco
*& Form get_material
Retrieve Material Document details from MARA & MARC
FORM get_material.
LOOP AT i_rbco INTO w_rbco.
SELECT SINGLE sop_cnt
INTO w_rbco_tmp-land1
FROM zsop_fame
WHERE fame_cnt = w_rbco-zzcou.
IF sy-subrc = 0.
w_rbco_tmp-bukrs = w_rbco-bukrs.
w_rbco_tmp-ewlnr = w_rbco-sgtxt+7(2).
w_rbco_tmp-distmeth = w_rbco-sgtxt+0(3).
ENDIF.
w_rbco-land1 = w_rbco_tmp-land1.
APPEND w_rbco_tmp TO i_rbco_tmp.
CLEAR w_rbco_tmp.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = w_rbco-zzmprd
IMPORTING
output = w_rbco-matnr
EXCEPTIONS
length_error = 1
OTHERS = 2.
MODIFY i_rbco FROM w_rbco.
CLEAR w_rbco.
ENDLOOP.
SELECT a~matnr " Material Number
a~normt " Article Number
a~ismconttype " Window
a~ismdesign " No of discs in MPM
b~werks " Plant
b~mfrgr " Product Line
INTO TABLE i_material
FROM mara AS a
INNER JOIN
marc AS b
ON amatnr = bmatnr
FOR ALL ENTRIES IN i_rbco
WHERE a~matnr = i_rbco-matnr.
IF sy-subrc = 0.
SORT i_material BY matnr.
ENDIF.
ENDFORM. " get_material
*& Form get_costtype
Retrieve costtype details from zsn0325_costtype
FORM get_costtype.
SELECT bukrs " Company code
land1 " Country key
window " Window
ewlnr " Cost type
distmeth " Distribution type
zvalfrom " Invoice date
zvalto " Invoice date
disc1pr " Disc Price
disc2pr " Additional DiscPrice
FROM zsn0325_costtype
INTO TABLE i_costtype
FOR ALL ENTRIES IN i_rbco_tmp
WHERE bukrs = i_rbco_tmp-bukrs
AND ewlnr = i_rbco_tmp-ewlnr
AND distmeth = i_rbco_tmp-distmeth
AND land1 = i_rbco_tmp-land1.
IF sy-subrc = 0.
SORT i_costtype BY bukrs land1 window ewlnr distmeth.
ENDIF.
ENDFORM. " get_costtype
*& Form get_distmeth
Retrieve costtype details from zsn0325_distmeth
FORM get_distmeth.
SELECT distmeth
distext
FROM zsn0325_distmeth
INTO TABLE i_distmeth
FOR ALL ENTRIES IN i_costtype
WHERE distmeth = i_costtype-distmeth.
IF sy-subrc = 0.
SORT i_distmeth BY distmeth.
ENDIF.
ENDFORM. " get_distmeth
*& Form display_report
TO Display Output
FORM display_report.
IF NOT i_output[] IS INITIAL.
SORT i_output BY xblnr.
PERFORM build_fieldcat.
ENDIF.
ENDFORM. " display_report
*& Form build_fieldcat
Build Field Catalog
FORM build_fieldcat.
PERFORM fill_fieldcat USING 'BUKRS' 'I_OUTPUT'
'Company Code'(001) 12.
PERFORM fill_fieldcat USING 'LIFNR' 'I_OUTPUT'
'Vendor'(002) 6.
PERFORM fill_fieldcat USING 'ZLSPR' 'I_OUTPUT'
'Payment Block'(003) 13.
PERFORM fill_fieldcat USING 'XBLNR' 'I_OUTPUT'
'Vendor Invoice No'(004) 17.
PERFORM fill_fieldcat USING 'BLDAT' 'I_OUTPUT'
'Invoice Date'(005) 12.
PERFORM fill_fieldcat USING 'BUDAT' 'I_OUTPUT'
'Posting Date'(006) 12.
PERFORM fill_fieldcat USING 'BKTXT' 'I_OUTPUT'
'Invoice Type'(007) 12.
PERFORM fill_fieldcat USING 'BELNR' 'I_OUTPUT'
'R/3 Invoice No'(008) 14.
PERFORM fill_fieldcat USING 'COBL_NR' 'I_OUTPUT'
'Line Item'(009) 9.
PERFORM fill_fieldcat USING 'NORMT' 'I_OUTPUT'
'Article No'(010) 10.
PERFORM fill_fieldcat USING 'ZZMPRD' 'I_OUTPUT'
'MPM Product'(034) 11.
PERFORM fill_fieldcat USING 'ISMCONTTYPE' 'I_OUTPUT'
'Window'(011) 6.
PERFORM fill_fieldcat USING 'NDISC' 'I_OUTPUT'
'No of Discs on invoice'(012) 22.
PERFORM fill_fieldcat USING 'ISMDESIGN' 'I_OUTPUT'
'No of discs on MPM'(013) 10.
PERFORM fill_fieldcat USING 'DISTMETH' 'I_OUTPUT'
'Distribution type'(014) 17.
PERFORM fill_fieldcat USING 'DISTEXT' 'I_OUTPUT'
'Description'(015) 11.
PERFORM fill_fieldcat USING 'DDEAL' 'I_OUTPUT'
'Distribution Deal'(016) 17.
PERFORM fill_fieldcat USING 'MFRGR' 'I_OUTPUT'
'MPM Product Line'(017) 16.
PERFORM fill_fieldcat USING 'ZZCOU' 'I_OUTPUT'
'Country'(018) 7.
PERFORM fill_fieldcat USING 'XNEGP' 'I_OUTPUT'
'Qty Var flag'(019) 12.
PERFORM fill_fieldcat USING 'INVFQTY' 'I_OUTPUT'
'Inv fee Qty'(020) 11.
PERFORM fill_fieldcat USING 'RIFVAL' 'I_OUTPUT'
'Inv fee Value'(021) 13.
PERFORM fill_fieldcat USING 'STDRIF' 'I_OUTPUT'
'Std Inv fee'(022) 11.
PERFORM fill_fieldcat USING 'RFVAR' 'I_OUTPUT'
'Inv fee Var'(023) 11.
PERFORM fill_fieldcat USING 'DISCQTY' 'I_OUTPUT'
'Dis cost Qty'(024) 11.
PERFORM fill_fieldcat USING 'DICVAL' 'I_OUTPUT'
'Dist Cost Value'(025) 15.
PERFORM fill_fieldcat USING 'STDDICO' 'I_OUTPUT'
'Std Dist Cost'(026) 11.
PERFORM fill_fieldcat USING 'DICVAR' 'I_OUTPUT'
'Dist Cost Var'(027) 13.
PERFORM fill_fieldcat USING 'DISRQTY' 'I_OUTPUT'
'Dis Ret Qty'(028) 11.
PERFORM fill_fieldcat USING 'DISREV' 'I_OUTPUT'
'Dis Ret Value'(029) 11.
PERFORM fill_fieldcat USING 'STDIRCO' 'I_OUTPUT'
'Std Dis Ret cost'(030) 11.
PERFORM fill_fieldcat USING 'DREVAR' 'I_OUTPUT'
'Dis Ret Var'(031) 11.
PERFORM fill_fieldcat USING 'ADJ_QTY_CT' 'I_OUTPUT'
'Adjustments Qty'(035) 15.
PERFORM fill_fieldcat USING 'ADJ_PR_CT' 'I_OUTPUT'
'Adjustments Value'(036) 17.
PERFORM fill_fieldcat USING 'SSEQTY' 'I_OUTPUT'
'Special Ser Qty'(032) 15.
PERFORM fill_fieldcat USING 'SSVAL' 'I_OUTPUT'
'Special Ser Value'(033) 17.
ENDFORM. " build_fieldcat
*& Form fill_fieldcat
Fill fieldcatalog for ALV *
FORM fill_fieldcat USING value(p_fieldname)
value(p_tabname)
value(p_seltext_m)
value(p_outputlen).
w_fieldcatalog-fieldname = p_fieldname.
w_fieldcatalog-ref_table = p_tabname.
w_fieldcatalog-coltext = p_seltext_m.
w_fieldcatalog-outputlen = p_outputlen.
APPEND w_fieldcatalog TO i_fieldcatalog.
CLEAR w_fieldcatalog.
ENDFORM. " fill_fieldcat
*& Module STATUS_0100 OUTPUT
Process Before output
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN1'.
SET TITLEBAR 'TITLE'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module alV_display OUTPUT
ALv Display in PBO *
MODULE alv_display OUTPUT.
IF w_ccontainer IS INITIAL.
PERFORM create_objects.
Excluding unnecessary function codes from the grid
PERFORM exclude_fcodes.
PERFORM display_alv_grid.
ENDIF.
ENDMODULE. " alV_display OUTPUT
*& Form create_objects
Create ALV Objects
FORM create_objects.
IF w_alvgrid IS INITIAL .
*----Creating custom container instance
CREATE OBJECT w_ccontainer
EXPORTING
container_name = 'CONTAINER'
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.
*--Exception handling
ENDIF.
*----Creating ALV Grid instance
CREATE OBJECT w_alvgrid
EXPORTING
i_parent = w_ccontainer
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5 .
IF sy-subrc <> 0.
*--Exception handling
ENDIF.
*--Create Event Receiver
CREATE OBJECT event_receiver.
SET HANDLER event_receiver->handle_top_of_page FOR w_alvgrid.
ENDIF.
ENDFORM. " create_objects
*& Form display_alv_grid
Display ALV Grid
FORM display_alv_grid.
w_layout-grid_title = 'Distribution Report'(042).
IF NOT w_alvgrid IS INITIAL .
MOVE 'COLOR_CELL' TO w_layout-ctab_fname.
CALL METHOD w_alvgrid->set_table_for_first_display
EXPORTING
is_layout = w_layout
it_toolbar_excluding = i_toolbar_excluding[]
I_DEFAULT = 'X'
CHANGING
it_outtab = i_output_tmp[]
it_fieldcatalog = i_fieldcatalog[]
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4 .
IF sy-subrc <> 0.
*--Exception handling
ENDIF.
ELSE .
CALL METHOD w_alvgrid->refresh_table_display
EXCEPTIONS
finished = 1
OTHERS = 2 .
IF sy-subrc <> 0.
ENDIF.
ENDIF .
*--handler for ALV grid
SET HANDLER event_receiver->handle_double_click FOR w_alvgrid.
ENDFORM. " display_alv_grid
*& Module USER_COMMAND_0100 INPUT
At User Command
MODULE user_command_0100 INPUT.
MOVE sy-ucomm TO w_okcode.
CASE w_okcode.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form populate_output
Populate internal table for output
FORM populate_output.
DATA: lv_invval TYPE rbco-wrbtr.
LOOP AT i_rbco INTO w_rbco.
*-Check whether ndisc is numeric value.
IF w_rbco-sgtxt+4(2) CO '0123456789'.
MOVE: w_rbco-sgtxt+4(2) TO w_output-ndisc.
ENDIF.
MOVE:w_rbco-cobl_nr TO w_output-cobl_nr,
w_rbco-zzcou TO w_output-zzcou,
w_rbco-zzmprd TO w_output-zzmprd,
w_rbco-xnegp TO w_output-xnegp.
For Invoice
READ TABLE i_invoice INTO w_invoice WITH KEY belnr = w_rbco-belnr
gjahr = w_rbco-gjahr
BINARY SEARCH.
IF sy-subrc = 0.
MOVE: w_invoice-bukrs TO w_output-bukrs,
w_invoice-lifnr TO w_output-lifnr,
w_invoice-zlspr TO w_output-zlspr, -
JButton: Using Strings and Icons
I am trying to make a JButton so that when it is ...
1. enabled, an Icon appears without any text
2. selected, a String appears without any Icon
3. disabled, a Icon appears without any text
My Code is as follows...
equation[i] = new JButton(mathSigns);
equation.setDisabledIcon(winImage);
equation[i].setDisabledSelectedIcon(winImage);
equation[5].setSelected(true);
if(equation[5].isSelected() == true)
equation[5].setText("TEXT");
Everything works except that When the button is selected, the Icon and the Text shows up instead of just the text showing up. I want the Icon to dissappear and only the text to show up. How can i do this? Thanks!Here is a piece of code that might help. I had to use JToogleButtons because I don't really know what a selected regular JButton is.import javax.swing.*;
import java.io.IOException;
import java.net.URL;
import java.awt.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
* User: weebib
* Date: 12 janv. 2005
* Time: 03:06:30
public class MultiStateButton extends JToggleButton {
private static ImageIcon ICON_ENABLED = null;
private static ImageIcon ICON_DISABLED = null;
static {
try {
ICON_ENABLED = new ImageIcon(new URL("http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/images/tumble/T1.gif"));
ICON_DISABLED = new ImageIcon(new URL("http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/images/tumble/T2.gif"));
} catch (IOException e) {
e.printStackTrace();
public MultiStateButton() {
super(ICON_ENABLED);
setModel(new ToggleButtonModel() {
public void setSelected(boolean b) {
super.setSelected(b);
if (b) {
setText("tutu");
setIcon(null);
} else {
setIcon(ICON_ENABLED);
setText(null);
setDisabledIcon(ICON_DISABLED);
public static void main(String[] args) {
final JFrame frame = new JFrame(MultiStateButton.class.getName());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel panel = new JPanel(new GridLayout(1, 2));
final JToggleButton firstButton = new MultiStateButton();
final JToggleButton secondButton = new MultiStateButton();
firstButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
secondButton.setEnabled(!secondButton.isEnabled());
secondButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
firstButton.setEnabled(!firstButton.isEnabled());
panel.add(firstButton);
panel.add(secondButton);
frame.setContentPane(panel);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
frame.pack();
frame.show();
} -
UNLOCKING single row in ALV using Funtions
hai,
Actually i am displaying a table in ALV USING FUNCTIONS and i am locking key values.
Now my reqment is , if i press (NEW, COPY )button then i have to add one new row and that row should be Unlocked to insert values.
Is it possible USING FUNCTIONS(I have a solution using CLASSES)Hi ramesh,
it is possible with the LVC FM.i gave the sample yesterday did you check that..
if not check it to day..
REPORT ZTESTALV.
TYPE-POOLS: SLIS.
*- Fieldcatalog
DATA: IT_FIELDCAT TYPE LVC_T_FCAT,
IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV..
*- For Events
DATA:IT_EVENTS TYPE SLIS_T_EVENT.
DATA: X_FIELDCAT TYPE LVC_S_FCAT,
X_FIELDCAT1 TYPE SLIS_FIELDCAT_ALV.
DATA:X_LAYOUT TYPE LVC_S_LAYO.
"{ FOR DISABLE
DATA: LS_EDIT TYPE LVC_S_STYL,
LT_EDIT TYPE LVC_T_STYL.
"} FOR DISABLE
DATA: BEGIN OF IT_VBAP OCCURS 0,
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
HANDLE_STYLE TYPE LVC_T_STYL, "FOR DISABLE
END OF IT_VBAP.
DATA: LS_OUTTAB LIKE LINE OF IT_VBAP.
SELECT VBELN
POSNR
UP TO 10 ROWS
INTO CORRESPONDING FIELDS OF TABLE IT_VBAP
FROM VBAP.
DATA:L_POS TYPE I VALUE 1.
CLEAR: L_POS.
L_POS = L_POS + 1.
X_FIELDCAT-SELTEXT = 'VBELN'.
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-OUTPUTLEN = '10'.
x_fieldcat-ref_field = 'VBELN'.
x_fieldcat-ref_table = 'VBAK'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-SELTEXT = 'POSNR'.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-OUTPUTLEN = '5'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
"{FOR DISABLE HERE 6ROW IS DISABLED
SY-TABIX = 6.
LS_EDIT-FIELDNAME = 'VBELN'.
LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
LS_EDIT-STYLE2 = SPACE.
LS_EDIT-STYLE3 = SPACE.
LS_EDIT-STYLE4 = SPACE.
LS_EDIT-MAXLEN = 10.
INSERT LS_EDIT INTO TABLE LT_EDIT.
LS_EDIT-FIELDNAME = 'POSNR'.
LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
LS_EDIT-STYLE2 = SPACE.
LS_EDIT-STYLE3 = SPACE.
LS_EDIT-STYLE4 = SPACE.
LS_EDIT-MAXLEN = 6.
INSERT LS_EDIT INTO TABLE LT_EDIT.
INSERT LINES OF LT_EDIT INTO TABLE LS_OUTTAB-HANDLE_STYLE.
MODIFY IT_VBAP INDEX SY-TABIX FROM LS_OUTTAB TRANSPORTING
HANDLE_STYLE .
X_LAYOUT-STYLEFNAME = 'HANDLE_STYLE'.
"} UP TO HERE
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT_LVC = X_LAYOUT
IT_FIELDCAT_LVC = IT_FIELDCAT
TABLES
T_OUTTAB = IT_VBAP[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
vijay -
Sort Icon/option in ALV tree repot using classes and methods
Hi all,
I have done an alv tree report using the class cl_gui_alv_tree
and i need to let users re-sort the report by using a sort icon(as visible in a normal alv report).Is there any possibility to create an icon and set the functionality such that the entire tree structure gets resorted depending upon the sort criteria?Please give me an example of doing so if there is an option.if u want without classes then i can give an example of Sort Icon/option.
example:-
DATA: wa_sortinfo TYPE slis_sortinfo_alv.
i_sortcat TYPE slis_t_sortinfo_alv.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = report_id
i_grid_title = ws_title
i_callback_top_of_page = 'TOP-OF-PAGE'
is_layout = wa_layout
it_fieldcat = i_fieldcat[]
it_sort = i_sortcat
i_save = 'A'
it_events = i_events
TABLES
t_outtab = i_reportdata1
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
PERFORM sortcat_init CHANGING i_sortcat.
FORM sortcat_init CHANGING i_sortcat TYPE slis_t_sortinfo_alv.
CLEAR wa_sortinfo.
wa_sortinfo-fieldname = 'EBELN'. (sales order)
wa_sortinfo-tabname = 'I_REPORTDATA1'.
wa_sortinfo-spos = 1. " First sort by this field.
wa_sortinfo-up = 'X'. " Ascending
wa_sortinfo-subtot = 'X'. " Subtotal at Name1
APPEND wa_sortinfo TO i_sortcat.
CLEAR wa_sortinfo.
wa_sortinfo-fieldname = 'EBELP'.
wa_sortinfo-tabname = 'I_REPORTDATA1'.
wa_sortinfo-spos = 2. " Sec sort by this field.
wa_sortinfo-up = 'X'. " Ascending
wa_sortinfo-subtot = 'X'. " Subtotal at Name1
APPEND wa_sortinfo TO i_sortcat.
ENDFORM. " sortcat_init -
ALV Grid and Icon : Printing Problem
Hi, i develop some reports using ALV Grid and Icon and i'm facing printing problem, all report that using ALV grid with the option icon = 'X' cannot print properly, all the character field showing improper icon instead of the text. While all the ALV grid report with the option icon = ' ' can print normally.
Thanks.Hi,
Check the Demo Program <b>BCALV_DEMO_TOOLTIP</b>, Here i am able to see the Output Properly, and also able to Print them.
Regards
vijay -
ALV report for 5 Grids using Objects and Method
I have few questions in ALV 5Grids ,could you please correct me in the following program logic...
Using this program logic i am able to generate the five Grids and able to populate Header details from VBAK into Grid1,If you click in the Grid 1 and it is populating item details in Grid2 from VBAP,parallally populating the customer data in Grid5 from KNA1.
Now the pending issue is ,
if you click in the Grid2 then we should populate the shipping details in Grid3 and
if you click in the Grid3 then we should populate the billing details in Grid4.
Program Logic;
REPORT ZAREPAS20.
Tables : vbak,vbap,likp,lips,vbrk,vbrp,kna1.
DATA : OK_CODE LIKE SY-UCOMM,
G_CONTAINER TYPE SCRFNAME VALUE 'BCALV7_GRID_DEMO_0100_VASU',
DOCKING TYPE REF TO CL_GUI_DOCKING_CONTAINER,
SPLITTER_1 TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
SPLITTER_2 TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
splitter_3 TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
CELL_TOP1 TYPE REF TO CL_GUI_CONTAINER,
CELL_BOTTOM1 TYPE REF TO CL_GUI_CONTAINER,
CELL_TOP2 TYPE REF TO CL_GUI_CONTAINER,
CELL_BOTTOM2 TYPE REF TO CL_GUI_CONTAINER,
CELL_LEFT TYPE REF TO CL_GUI_CONTAINER,
CELL_middle TYPE REF TO CL_GUI_CONTAINER,
CELL_RIGHT TYPE REF TO CL_GUI_CONTAINER,
GRID1 TYPE REF TO CL_GUI_ALV_GRID,
GRID2 TYPE REF TO CL_GUI_ALV_GRID,
GRID3 TYPE REF TO CL_GUI_ALV_GRID,
GRID4 TYPE REF TO CL_GUI_ALV_GRID,
GRID5 TYPE REF TO CL_GUI_ALV_GRID.
DATA : GT_VBAK TYPE STANDARD TABLE OF VBAK,
GT_VBAP TYPE STANDARD TABLE OF VBAP,
GT_LIKP TYPE STANDARD TABLE OF likp,
GT_LIPS TYPE STANDARD TABLE OF lips,
GT_VBRK TYPE STANDARD TABLE OF vbrk,
GT_VBRP TYPE STANDARD TABLE OF vbrp,
GT_KNA1 TYPE STANDARD TABLE OF kna1.
DATA:begin of itab1 occurs 0,
vbeln type likp-VBELN,
erzet type likp-ERZET,
lfart type likp-LFART,
posnr type lips-POSNR,
END OF ITAB1.
DATA:begin of itab2 occurs 0,
vbeln like vbrk-vbeln,
posnr like vbrk-fktyp,
fkart like vbrk-fkart,
fklmg like vbrp-fklmg,
end of itab2.
*selection screen for selecting range of values
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
select-options: S_vbeln for VBAK-vbeln.
selection-screen end of block b1.
CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING
e_row
e_column
es_row_no
sender. " sending control, i.e. ALV grid that raised event
ENDCLASS. "lcl_eventhandler DEFINITION
CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD HANDLE_DOUBLE_CLICK.
*DEFINE LOCAL DATA.
DATA : itab_vbak type VBAK,
itab_vbap type VBAP,
itab_likp type likp,
itab_lips type lips,
itab_vbrk type vbrk,
itab_vbrp type vbrp,
itab_kna1 type kna1.
*DISTINGUISH ACCORDING TO SENDING GRID INSTANCE
CASE SENDER.
WHEN GRID1.
READ TABLE gt_VBAK INTO itab_vbak INDEX e_row-index.
CHECK ( itab_vbak-vbeln IS NOT INITIAL ).
CALL METHOD GRID1->set_current_cell_via_id
EXPORTING
is_ROW_ID =
is_COLUMN_ID =
is_row_no = es_row_no.
Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'ORDER_DETAILS' ).
WHEN GRID2.
READ TABLE gt_VBAP INTO itab_vbap INDEX e_row-index.
CHECK ( itab_vbap-vbeln IS NOT INITIAL ).
CALL METHOD GRID2->set_current_cell_via_id
EXPORTING
is_ROW_ID =
is_COLUMN_ID =
is_row_no = es_row_no.
Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'ORDER_DETAILS' ).
WHEN GRID3.
READ TABLE gt_LIPS INTO itab_LIPS INDEX e_row-index.
CHECK ( itab_lips-vgbel IS NOT INITIAL ).
CALL METHOD GRID3->set_current_cell_via_id
EXPORTING
is_ROW_ID =
is_COLUMN_ID =
is_row_no = es_row_no.
Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'DELIVERY_DETAILS' ).
WHEN GRID4.
READ TABLE gt_VBRP INTO itab_VBRP INDEX e_row-index.
CHECK ( itab_vbrp-vgbel IS NOT INITIAL ).
CALL METHOD GRID4->set_current_cell_via_id
EXPORTING
is_ROW_ID =
is_COLUMN_ID =
is_row_no = es_row_no.
Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'BILLING_DETAILS' ).
WHEN GRID5.
READ TABLE gt_KNA1 INTO itab_KNA1 INDEX e_row-index.
CHECK ( itab_kna1-kunnr IS NOT INITIAL ).
SET PARAMETER ID 'KUN' FIELD itab_KNA1-KUNNR.
CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
WHEN OTHERS.
RETURN.
ENDCASE.
endmethod.
endclass. "lcl_eventhandler IMPLEMENTATION
start-of-selection.
*write :/ 'FEDEX INT''''L' .
SELECT * FROM vbak INTO TABLE gt_VBAK
where vbeln IN S_VBELN.
creating docking container
create object docking
exporting
parent = cl_gui_container=>screen0
ratio = 90
exceptions
others = 6.
if sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Create splitter container
CREATE OBJECT splitter_1
EXPORTING
parent = docking
rows = 1
columns = 3
NO_AUTODEF_PROGID_DYNNR =
NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Get cell container
CALL METHOD splitter_1->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = cell_left.
CALL METHOD splitter_1->get_container
EXPORTING
row = 1
column = 2
RECEIVING
container = cell_middle.
CALL METHOD splitter_1->get_container
EXPORTING
row = 1
column = 3
RECEIVING
container = cell_right.
Create 2nd splitter container
CREATE OBJECT splitter_2
EXPORTING
parent = cell_left
rows = 2
columns = 1
NO_AUTODEF_PROGID_DYNNR =
NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Get cell container
CALL METHOD splitter_2->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = cell_top1.
CALL METHOD splitter_2->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = cell_bottom1.
Create 3rd splitter container
CREATE OBJECT splitter_3
EXPORTING
parent = cell_middle
rows = 2
columns = 1
NO_AUTODEF_PROGID_DYNNR =
NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Get cell container
CALL METHOD splitter_3->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = cell_top2.
CALL METHOD splitter_3->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = cell_bottom2.
Create ALV grids
CREATE OBJECT grid1
EXPORTING
i_parent = cell_top1
EXCEPTIONS
OTHERS = 5.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT grid2
EXPORTING
i_parent = cell_bottom1
EXCEPTIONS
OTHERS = 5.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT grid3
EXPORTING
i_parent = cell_top2
EXCEPTIONS
OTHERS = 5.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT grid4
EXPORTING
i_parent = cell_bottom2
EXCEPTIONS
OTHERS = 5.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT grid5
EXPORTING
i_parent = cell_right
EXCEPTIONS
OTHERS = 5.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Set event handler
SET HANDLER: lcl_eventhandler=>handle_double_click FOR grid1.
SET HANDLER: lcl_eventhandler=>handle_double_click FOR grid2.
SET HANDLER: lcl_eventhandler=>handle_double_click FOR grid3.
SET HANDLER: lcl_eventhandler=>handle_double_click FOR grid4.
SET HANDLER: lcl_eventhandler=>handle_double_click FOR grid5.
Display data
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'VBAK'
CHANGING
it_outtab = gt_VBAK
EXCEPTIONS
OTHERS = 4.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH: gt_vbap.
CALL METHOD grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'VBAP'
CHANGING
it_outtab = gt_VBAP " empty !!!
EXCEPTIONS
OTHERS = 4.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH: gt_LIPS.
CALL METHOD grid3->set_table_for_first_display
EXPORTING
i_structure_name = 'LIPS'
CHANGING
it_outtab = gt_LIPS " empty !!!
EXCEPTIONS
OTHERS = 4.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH: gt_VBRP.
CALL METHOD grid4->set_table_for_first_display
EXPORTING
i_structure_name = 'VBRP'
CHANGING
it_outtab = gt_VBRP " empty !!!
EXCEPTIONS
OTHERS = 4.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH: gt_KNA1.
CALL METHOD grid5->set_table_for_first_display
EXPORTING
i_structure_name = 'KNA1'
CHANGING
it_outtab = gt_KNA1 " empty !!!
EXCEPTIONS
OTHERS = 4.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Link the docking container to the target dynpro
CALL METHOD docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
NOTE: dynpro does not contain any elements (ok_code -> GD_OKCODE)
CALL SCREEN '0100'.
Flow logic of dynpro:
*PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
*PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
end-of-selection.
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'.
SET TITLEBAR 'xxx'.
Refresh display of detail ALV list
CALL METHOD grid2->refresh_table_display
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
EXCEPTIONS
OTHERS = 2.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Refresh display of detail ALV list
CALL METHOD grid3->refresh_table_display
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
EXCEPTIONS
OTHERS = 2.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Refresh display of detail ALV list
CALL METHOD grid4->refresh_table_display
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
EXCEPTIONS
OTHERS = 2.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Refresh display of detail ALV list
CALL METHOD grid5->refresh_table_display
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
EXCEPTIONS
OTHERS = 2.
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK' OR
'EXIT' OR
'CANCEL'.
SET SCREEN 0.LEAVE SCREEN.
USER HAS PUSHED BUTTON "DISPLAY OREDERS"
WHEN 'ORDER_DETAILS'.
PERFORM ORDER_SHOW_DETAILS.
when 'DELIVERY_DETAILS'.
PERFORM DELIVERY_SHOW_DETAILS.
WHEN 'BILLING_DETAILS'.
PERFORM BILLING_SHOW_DETAILS.
WHEN OTHERS.
ENDCASE.
CLEAR : OK_CODE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form ORDER_SHOW_DETAILS
text
--> p1 text
<-- p2 text
FORM order_show_details .
define local data
DATA:
ld_row TYPE i,
itab_VBAK TYPE VBAK.
CALL METHOD grid1->get_current_cell
IMPORTING
e_row = ld_row.
READ TABLE gt_VBAK INTO itab_VBAK INDEX ld_row.
CHECK ( syst-subrc = 0 ).
SELECT * FROM KNA1 INTO TABLE gt_KNA1
WHERE KUNNR = itab_VBAK-KUNNR.
SELECT * FROM VBAP INTO TABLE gt_VBAP
WHERE VBELN = ITAB_VBAK-VBELN.
*REFRESH: gt_LIPS.
ENDFORM. " ORDER_SHOW_DETAILS
*& Form DELIVERY_SHOW_DETAILS
text
--> p1 text
<-- p2 text
FORM DELIVERY_SHOW_DETAILS .
define local data
DATA:
ld_row TYPE i,
itab_VBAP TYPE VBAP.
CALL METHOD grid1->get_current_cell
IMPORTING
e_row = ld_row.
READ TABLE gt_VBAP INTO itab_VBAP INDEX ld_row.
CHECK ( syst-subrc = 0 ).
SELECT LIKPVBELN LIKPERZET LIKPLFART LIPSVBELN
INTO CORRESPONDING FIELDS OF TABLE ITAB1
FROM ( LIKP INNER JOIN LIPS ON LIKPVBELN = LIPSVBELN )
WHERE LIKP~VBELN IN S_VBELN.
*REFRESH: gt_LIPS.
ENDFORM. " DELIVERY_SHOW_DETAILS
*& Form BILLING_SHOW_DETAILS
text
--> p1 text
<-- p2 text
FORM BILLING_SHOW_DETAILS .
define local data
DATA:
ld_row TYPE i,
itab_LIPS TYPE LIPS.
CALL METHOD grid1->get_current_cell
IMPORTING
e_row = ld_row.
READ TABLE gt_LIPS INTO itab_LIPS INDEX ld_row.
CHECK ( syst-subrc = 0 ).
SELECT VBRKVBELN VBRKFKTYP VBRKFKART VBRPFKLMG
INTO CORRESPONDING FIELDS OF TABLE ITAB2
FROM ( VBRK INNER JOIN VBRP ON VBRKVBELN = VBRPVBELN )
WHERE VBRK~VBELN IN S_VBELN.
ENDFORM. " BILLING_SHOW_DETAILSHi,
ALV means ABAP List Viewer. Most convenient way to use it is through reuse library (cf.
transaction se83) available from release 4.6 of SAP R/3.
ALV is available in two modes: list and grid. List mode is good old list processing with
standard functionnalities, and grid mode is using a new OCX object displaying grids.
Classical reports needs more coding to set the horizontal and vertical lines.we need to adjust
the lines manually.Even interactive also takes lot of code.
ALV reports reduces the code when compared to classical reports.we use function modules to
generate the output.
that r REUSE_ALV_LIST_DISPLAY,REUSE_ALV_GRID_DISPLAY,REUSE_ALV_HIERSEQ_LIST_DISPLAY etc..
the following threads will give some examples of the functions which you are expecting
Header
regarding function module
hide ALV field
Simply Display selection parameter values in the ALV OUTPUT
Drag and drop in a report
https://www.sdn.sap
Reprots
http://www.sapgenie.com/abap/reports.htm
http://www.allsaplinks.com/material.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you
use - ABAP Objects calls or simple function modules. -
since i have updated my iphone everytime i open an app it comes up with a message 'connect to itunes to use push notifications, may include alerts, sounds and icon badges, i have backed up my phone on itunes and restored phone but its still doing it can anyone help?
EmReturn the iPhone and get your money back. It has been
hacked/modified/jailbroken and likely cannot be made
operative. -
The Message "Connect to iTunes to Use Push Notifications "BBC History Magazine" notifications may include alerts, sounds and icon badges" keeps coming up in Newstand, also happens with National Geographic Magazine. HELP!
I have now followed multiple instructions from this and other forums. have turned push notifications off. Turned them on. Have updated to IOS 6. Have signed out and signed back in, have uninstalled all magazines and reinstalled. Have synced, and updated everything in iTunes.
Nothing works,. Also cannot use youtube.Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new). Try each of these in order until the issue is resolved.
It might also be a good idea to contact Square for assistance. -
I cannot shut dow my MacBook Pro using the apple icon (as it was suppose to be), actually I have to press and hold the on/off buttom. I have taken twice for Mac dealer and they did not solve the problem. What must I do? I would to remark that I have installed 2 antivirus and uninstalled one of them. Since then I have facing this troublesome issue. Thanks
Uninstall the other AV software. They are not needed. All they do is cause trouble like you are having now.
If you have been forcing the Mac to shut down with the power switch you may nave corrupted your disk. You should repair it with disk Utilty to remove any corruption the shutdwons may have cased.
Allan -
After years of owning all things Mac, I am finally trying to use iChat, and can't get it to work. I am using gmail, and I see my buddy (no camera icon next to her name), but all I can do is send a message--the video and audio chat icons are gray, as is inviting to a video chat under Buddies. My buddy has the same problem as I. We are able to do video chat through gmail, but I had hoped to use iChat. I am using OS 10.6.8, iChat v. 5.0.3. What am I missing?
HI,
iChat will Video chat to another iChat in a Jabber Buddy List (Google run a Jabber server for GoogleTalk)
However it will not Video to the Web Page login to iGoogle or the Web Mail Page login. (where people can Google Chat as it were in a Web Browser).
Nor does it video to the Google Talk Stand alone app for PCs or any other Jabber apps on any platform.
iChat uses a connection Process called SIP (Session Initiation Protocol) which is also used by other VoIP devices.
Jabber/XMPP invited the Jingle Protocol for Jabber Applications.
Google have included this in their Standalone app and the Plug-in for Web Browsers on both PCs and Mac (you can get this as a Standalone Plug-in or as part of Chrome)
More on this here This article has been changed several time in the recent months. It now claims a greater involvement by Google in writing the Jingle Library (Although now Google's version does not work with the others)
This tends to mean that using the web Login to Google to Chat also cannot video chat to other Jabber apps that are using Jingle.
If your Buddy is using iChat then check the Video Menu has two items to Enable Camera/Video chat and Microphone/Audio chats are ticked.
In the View Menu the Show Status Items should be ticked (Selecting them toggles the tick and the function On or Off)
It could be Internet speed but at this stage I would doubt this at this stage.
10:27 PM Saturday; January 21, 2012
Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
iMac 2.5Ghz 5i 2011 (Lion 10.7.2)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
"Limit the Logs to the Bits above Binary Images." No, Seriously -
Dragging Icons stops working after organizing using drag and drop. Why?
On the newest MBA (2013)
While organizing my music I was creating new folders within the artists' folder in order to seperate things into albums. sometimes when im dragging the songs into this newly created folder ( I drag them in like groups of 10 , really depends on the length of the album) the ability to drag any icon is completely gone. I can still highlight folders and icons but I can no longer move them at all ( using the three finger move on the mouse pad or by holding the click and dragging )
It only happens when I select and drag a few songs over to the folder and drop them in without waiting for that folder to open up.
This forces me to restart in order to be able to use OSX normally again.
Does anyone have any insight? Do I need to just wait for a new update ?I found this by EvB on https://discussions.apple.com/thread/4830916
"Try this.
Open a Terminal and type the following commands:
cd /
sudo rmdir tmp
sudo ln -s tmp /private/tmp
If your tmp directory is not already there then the second command will give an error - just proceed to the third command in this case.
Once you have done this sequence, reboot the machine and see if your drag and drop is restored."
Not sure if this fixed the problem or if rebooting temerally fixed it again.
Nope did not fix it -
After making a call on my iPhone4 all the script and icons suddenly became enlarged and it´s now almost impossible to use the phone. Everything is slowed up and only partial amounts of the screen can be seen. Any idea´s on how to restore to normal?
Thank you. All in order now!
Maybe you are looking for
-
Final cut pro crashing with slide show photos
I am working with a large slide show - a few movie clips, but mostly still images from Aperture. The photos were shot wtih a Nikon D300 in Raw, not that I think that matters much at all. Becasue this is a slide show I am working wth short durations
-
I arranged my photos in order and in folders on my PC. When I synced them to my IPad they were in the correct folders but completely out of order. How can I get them to sync in the order they appear on my PC?.
-
Sigma RAW files not supported in ACR
Hi, I am trying to get support for the RAW files from my Sigma DP2 Merrill in Photoshop but this does not seem to possible. Can anyone help? ACR will not recognize them although the list of cameras supported does refer to the DP2
-
Restrict the system , not to delivery in the weekend
We would like the system to warn not to ship over a weekend. Is there a flag in SAP that would not allow a delivery over the weekend?
-
Converged 10gig server adapters and Cisco switches
I have little network with 4 vsphere servers connected to clustered 3750x with 4*1Gig NICs per server. Servers are connected to central storage with two 8Gbps FC links per server. I don't have FO switches cause central storage is equipped with 4 FO p