Urgent: Add a custom line in Hierarchical ALV.
Hi
I am using the FM 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' to display the header and item table details. However I would like to add a custom line below the item details of each section so that I can calculate the total (total of a particular field in the item table) and print it in this line....How do I do this....
Thanks..
Vijay
Hi,
See the attached report which is used to display Hierarchial display for header and item;
REPORT zwmr_pick_status_report NO STANDARD PAGE HEADING
MESSAGE-ID zw.
Type Pools
TYPE-POOLS: icon, slis.
Tables
TABLES: tvst,
likp,
t30b,
vekp,
zhu_to_link,
zpallettr,
vttk,
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,
lgtor LIKE likp-lgtor,
zzroute2lgtor LIKE likp-zzroute2lgtor,
route LIKE likp-route,
wadat LIKE likp-wadat,
zz2route LIKE likp-zz2route,
zzexproute LIKE likp-zzexproute,
zzroute2 LIKE likp-zzroute2,
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,
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 "MB
Similar Messages
-
Custom buttons in hierarchical alv through OO prog
Hi, i have created an hierarchical alv through factory method. I display the gr_table of type cl_salv_hierseq_table.
I wish to add custom buttons at the top.
I searched a lot and mostly found solutions for adding custom buttons in grid of type cl_gui_alv_grid.
There the event 'toolbar' of class cl_gui_alv_grid is used.
In cl_salv_hierseq_table , i could not find any events,
Could anyone please help me in adding custom buttons in the hieerarchical alv.Looking at the details in cl_salv_functions - enable_functions, it looks like adding your own function is only supported in a grid and tree view.
method enable_function .
data: l_name type string.
data: l_msgtext type string.
data: ls_message type scx_t100key.
data: lr_controller type ref to if_salv_controller_model.
data: text type string.
lr_controller ?= me->r_controller.
if lr_controller->r_model->get_display_object( )
ne IF_SALV_C_TABLE_OBJECTS=>GRID
and lr_controller->r_model->get_display_object( )
ne IF_SALV_C_TABLE_OBJECTS=>TREE.
text = text-001.
l_name = name.
raise exception type CX_SALV_METHOD_NOT_SUPPORTED
exporting class = 'CL_SALV_FUNCTIONS'
method = 'ENABLE_FUNCTION'
object = l_name
key = text.
endif. -
How can I add a custom title to multiple ALV reports selected by layout?
Greetings and good day, everyone!
Within the past week or so, I posted a question asking the best way to create a program that would generate multiple ALV reports. I got some great ideas, and I've actually coded up a few simple demos based on your feedback -- thank you!
Here's the issue I'm running into: Many of you suggested that I put all report records into one table, and create a field that I could use to filter on later to determine which fields I want to display for the report. For example, if I have 3 different reports, I put all the fields for all 3 reports into a table. I then add a "report key" field. As I put records into the report table for report 1, I code "01" into the "report key" field. I do the same for reports 2 and 3, assigning each a "report key" of "02" and "03", respectively.
I then set up layouts in the ALV for each of the three reports, using the filter option to only pull records with the "report key" value for that particular report. This all works wonderfully! However, I seem to have lost the ability to show a custom title for each layout. I can create a generic TITLEBAR (like "Reporting Center") but I don't know how to reset the grid's title when a layout is selected. I was hoping that SAP might use the layout description as the title on each page, but it doesn't -- it uses the TITLEBAR text.
Any ideas? I think this might be the best way to program multiple ALV reports, but if I can't display the right report title for a particular layout, I'll probably have to go back to my other alternative of putting each report in its own container/screen, and having a button to access each report from the application toolbar.
Thanks,Srikanth,
I don't have any Selection Screen radio buttons for the user to select a particular report; in my case, they specify some needed criteria by the program in the Selection Screen, the program goes off and does a fair bit of processing/updating, and then displays the ALV reports when finished. They don't want to choose one particular report to view ahead of time; they want to have all 3 (in my case) there to see what processed correctly, what was eligible to process but kicked out with errors, and what failed some matching checks done up front (this layout includes additional fields from the input file so they can see what didn't match up against R/3).
So, while I do like the code example you presented, I don't think it's going to help me in my case. -
MR51 : add custom field in the alv list
Dear.
I need to add a custom field in the alv layout of MR51.
Do you know any exit in order to obtain this ?
Thanks.Hi,
try this
I think there is no exits for same
copy program of MR51 and make z one and add filed what filed you want to add
Regards
kailas Ugale -
Timesheet Error with custom Line Classifications in Project Server 2013
We implemented Project Server 2013 last year and began using timesheets. We are a billable consulting group. In order manage our billing, we have created three custom line classifications, "Billable Onsite", "Billable Offsite",
and "Non-billable". We do not use "Standard" as a line where time is entered. We are using SEM. We have chosen no prepopulation on timesheets. Our system is updated through the March 2013 update.
The error we get is presented as "__error Loading" with the title bar of the pop-up reading "Message from webpage". This occurs when you attempt to add a new line to a timesheet and choose one of the custom line classifications.
A confusing aspect to this, while we have prepopulation turned off, the timesheet is populated with "Standard" lines for the tasks that are currently assigned to the user. We have come up with a workaround that works sometimes but not all the
time. When the user receives this error, they move away from the timesheet screen and then return. They add all of the applicable lines to the timesheet with "Standard" even if they already exist on the timesheet and save. Then
they add the lines with the appropriate line classification and the time. If they receive the "__error loading" error again, then the timesheet can not be corrected. You must delete the timesheet and recreate. We have been able
to recreate the problem in a vanilla install with a custom line classification added.
Just yesterday, I was able to find a error log entry that may help some of you identify the source:
General Unhandled Exception in _TimeSheet.GetTimesheetForGridJsonFromViewUid_ Attributes: System.ArgumentException: Assignment line already exists for assignment uid: d9afeb60-d589-e311-bd64-08edb9dd8afb at Microsoft.Office.Project.Server.BusinessLayer.Timesheet.VerifyLineIsUnique(Guid
assignmentUid, Guid taskUid, Guid projectUid, Guid lineClassUid)
at Microsoft.Office.Project.Server.BusinessLayer.Timesheet.CreateAssignmentLine(Guid assignmentUid, Guid taskUid, Guid projectUid, Guid lineClassUid, String taskName, String projectName) at Microsoft.Office.Project.Server.BusinessLayer.TimesheetSEM.CreateAssignmentLine(Guid
assignmentUid, Guid taskUid, Guid projectUid, Guid lineClassUid, String taskName, String projectName) at Microsoft.Office.Project.Server.BusinessLayer.Timesheet.AddTimesheetLine(Guid assignmentUid, Guid taskUid, Guid projectUid, Guid
classUid, ValidationType validationType, Guid lineUid, String taskName, String projectName, String comment) at Microsoft.Office.Project.Server.BusinessLayer.Timesheet.ImportTimesheetLine(NewTask importedLine)
at Microsoft.Office.Project.Server.BusinessLayer.Timesheet.<>c__DisplayClass4c.<AddNewLines>b__49(NewTask line) at Microsoft.Office.Project.Server.Library.PSUtility.Apply[T](IEnumerable`1 enumerable, Action`1 fn)
at Microsoft.Office.Project.Server.BusinessLayer.Timesheet.AddNewLines(IEnumerable`1 newLines) at Microsoft.Office.Project.Server.BusinessLayer.TimesheetSEM.AddNewLines(IEnumerable`1 newLines) at Microsoft.Office.Project.Server.BusinessLayer.TimesheetLoaderForGrid.Load()
at Microsoft.Office.Project.Server.BusinessLayer.TimeSheet.GetTimesheetForGridJsonFromViewUid(JsGridSerializerArguments gridSerializerArgs, Guid tsUid, Guid viewUid, String changesJson, String viewOptionsJson) at Microsoft.Office.Project.Server.Wcf.Implementation.PWAImpl.<>c__DisplayClass2f5.<TimeSheetGetTimesheetForGridJsonFromViewUid>b__2f4()
at Microsoft.Office.Project.Server.Wcf.Implementation.WcfMethodInvocation.InvokeBusinessObjectMethod(String businessObjectName, String methodName, IEnumerable`1 actions) . Standard Information: PSI Entry Point: Project User: i:0#.w|mayberry\nunderwood
Correlation Id: 91c4ca27-6492-e311-93ff-00155d149902 PWA Site URL: XXX SA Name: Project Services Application PSError: GeneralUnhandledException (42), LogLevelManager Warning-ulsID:0x00101622 has no entities explicitly specified.
We have not been able to find any similar timesheet issues here or on other boards. Our users, as you can imagine, are getting increasingly frustrated. A ny advice?
Thanks,
NateMore scenario testing today. Tested with both "No Prepopulation" and populate assigned task options! no difference in our instance. We are only updated through March 2013, waiting for IT support. We have previously tried the deactivation/reactivation
of custom classifications. Tried with and without template, no difference. So the new scenario and findings:
1. Create a project with 2 tasks, one assigned and one not. Save and publish.
2. Create a timesheet, do not use an existing timesheet. Here we found, in spite of population option chosen, the timesheet was populated with a Standard line for the assigned task. With no action taken other than creating timesheet, the reporting assignment
table showed the new entry.
3. Add an assignment to the other task in the project, publish.
4. Open the same timesheet period. Now I saw the other task appear on the screen. It did not show in the database. I could not save to make it appear in the database unless I did something else to the screen to make it "dirty". Once I did that,
I could save and the second Standard line appeared In the database.
If I tried to add a custom line class line to the TS when the Standard line was not in the database, I get the error. It doesn't matter if it shows on the screen.
If it shows on the screen but not in the db, and I attempt to add a non-standard line, it will error, unless I manually add the standard line first. The user would not know to do this.
You will not be able to reproduce if you make the assignments and then create the TS. You need to try in reverse order.
It appears as though there are issues with both the timesheet population options and the code that runs when the TS loads after it's initial creation. I'm wondering why on creation the standard line is created and committed to the db, but on reload with
new tasks it doesn't' do the same. Also when No Prepopulation is turned on, why my time sheets are always prepopulated.
Sorry for any typos, working from my ipad keyboard. Thanks for your help! -
Add on custom button to ALV toolbar in std tcode ME51N, ME52N and ME53N.
Hi All,
I have the requirement to add on the custom button to ALV toolbar in ITEM OVERVIEW for standard transaction ME51N, ME52N and ME53N. Does anyone know what enhancement point or user exit i should apply and how i can add on the custom button?
Thanks.There are no user exits or badi's for COOIS. You may have to make copy of the PPIO_ENTRY to ZPPIO_ENTRY including all the varians without changing their names like copy SAP&COOIS to SAP&COOIS. Create a T-Code ZCOOIS and replace COOIS in variant SAP&COOIS to ZCOOIS not in the name of the variant but in the field "Check Authorization for".
The PF-Status is found in the include LCOISOUTPUTF16 which is located in the function group COISOUTPUT you may have to copy that too. Finally you need to copy SAPLCOISOUTPUT with its GUI status GENERAL and add your custom button there. -
How to add a custom multimedia playback control to add a time line of what is being played?
How to add a custom skin in multimedia playback control to add a time line of what is being played? As it is being played...
I need a time line so any part of the what is being played can be found by time, ie at 1 minute and 30 seconds in and continues for 45 seconds out of a 50 minute audo.If you're talking about a playback controller within the rich media annotation (RMA) then you need to write your own widget in Flash or Flex, and then place the video and widget files using the multimedia "Add Flash" tool in Acrobat instead of the "Add Video" tool. Aside from a bunch of proprietary code to handle events, commenting and the API (which you can live without for basic play-pause-scrub applications), video RMAs are just an embedded SWF file containing an FLVPlayback component. The skin and the video file itself are added to the RMA as resource entries. You can build your own version and have it display whatever controls you want, provided you know how to write ActionScript!
If you're talking about a controller that's external to the RMA (e.g. a series of links or buttons elsewhere on the page) then in the past you would use FLV video files and the 'cue points' feature that's built into Acrobat - however Adobe removed the ability to create FLV files in the latest version of CC, so unless you have CS6 or earlier it's a non-starter. Instead you can manually set playback start points using the special "multimedia operations" link action in your PDF - though stopping playback at a defined point is very difficult without FLV cues. For that you're back to writing your own widget. -
Cant use Export to Excel functionality for ALV if I add a custom button
Hi,
I have added a custom button the the ALV toolbar by creating a GUI status and using the USER_COMMAND event. However. Now I dont the get the standard ALV toolbar with all the options for sorting, exporting to excel etc.
Can someone show me how I can do both, add my own button to the toolbar as well as use ALV Grid toolbar. Currently the ALV grid standard toolbar has disappeared
Thanks for readingHello,
I am not sure how you are creating your ALV report. If you are using FM REUSE_ALV_GRID_DISPLAY there is a parameter callled I_CALLBACK_PF_STATUS . Read the documentation for this field from the doc for the FM. It tells you to copy a standard PF status from fucn group SLVC_FULLSCREEN and then add your new button to that staus.
If you are using class CL_SALV_MODEL_BASE there is a method called set_screen_status that lets you do a similar thing - copy an existing PF status and add your button.
Hope that helps
Regards
Greg Kern -
Hi Experts, oo hierarchical alv, how to add checkbox on every header?
Hi Experts,
I am working on oo hierarchical alv, how can I add checkbox on every header? thanks in advance!
Kind regards
DawsonHi Dawson,
Just refer the below program & pass the check box functionality (mentioned in bold) in REUSE_ALV_HIERSEQ_LIST_DISPLAY in your program.
TYPE-POOLS : slis.
Data
DATA : BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE t001.
DATA : flag tyPE c,
END OF itab.
DATA : alvfc TYPE slis_t_fieldcat_alv.
DATA : alvly TYPE slis_layout_alv.
Select Data
SELECT * FROM t001 INTO TABLE itab.
*------- Field Catalogue
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
Display
alvly-box_fieldname = 'FLAG'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = alvfc
i_callback_program = sy-repid "<-------Important
i_callback_user_command = 'ITAB_USER_COMMAND' "<------ Important
is_layout = alvly
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
CALL BACK FORM
FORM itab_user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
slis_selfield.
LOOP AT itab.
itab-flag = 'X'.
MODIFY itab.
ENDLOOP.
IMPORTANT.
WHATROW-REFRESH = 'X'.
ENDFORM. "ITAB_user_command
Regards
Abhii... -
Add a New line to ALV Grid control
Hi experts,
My requirement is after filling ALV grid, user will select a + button from the menu, I need to add a new line next to the selected ALV line (Like in a table control). Does it posible to do this? If can any body tell me how I can do this.
Regards,
Venkat.Hi Venkat...
I have tried this and it worked...
Just copy paste this program...
Note : U will have to create a new PF status for this... and give the Function code as given in my program... then only it will work...
*& Report Z_ALV_TRAINING_LIST_EVENTS
REPORT Z_ALV_TRAINING_LIST_EVENTS.
Tables *************
TABLES : T001.
Type Pools Used **********
TYPE-POOLS : SLIS.
Types Declared **********
Internal Tables Declare ************
DATA : IT_company TYPE STANDARD TABLE OF T001 INITIAL SIZE 0 WITH HEADER LINE,
IT_FIELD_CAT TYPE SLIS_T_FIELDCAT_ALV,
it_alv_event type SLIS_T_EVENT.
Select Data ***********
start-of-selection.
SELECT * FROM T001 INTO TABLE IT_company.
Make Field Catalog ******
PERFORM MAKE_FIELD_CATALOG.
get evente *****
perform get_alv_events.
Display ALV *********
end-of-selection.
PERFORM DISPLAY_ALV_LIST.
*& Form make_field_catalog
text
--> p1 text
<-- p2 text
FORM MAKE_FIELD_CATALOG .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME =
I_INTERNAL_TABNAME =
I_STRUCTURE_NAME = 'T001'
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME =
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = it_field_cat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " make_field_catalog
*& Form display_alv_list
text
--> p1 text
<-- p2 text
FORM DISPLAY_ALV_LIST .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = sy-repid
I_CALLBACK_PF_STATUS_SET = 'SET_MY_PF_STATUS'
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
IS_LAYOUT = fl_layout
IT_FIELDCAT = it_field_cat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'X'
IS_VARIANT = '/TEST_VV'
IT_EVENTS = it_alv_event
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IR_SALV_LIST_ADAPTER =
IT_EXCEPT_QINFO =
I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = it_company
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.
ENDFORM. " display_alv_list
*& Form get_alv_events
text
--> p1 text
<-- p2 text
FORM get_alv_events .
data : wa type slis_alv_event.
wa-name = 'USER_COMMAND'.
wa-form = 'SUB_MY_PF_EVENT'.
append wa to it_alv_event.
ENDFORM. " get_alv_events
*& Form sub_my_pf_event
text
--> p1 text
<-- p2 text
FORM sub_my_pf_event using p_comm type sy-ucomm p_sEL_FIELD TYPE SLIS_SELFIELD.
data : wa type t001.
case p_comm.
when 'BACK'.
leave program.
when 'EXIT'.
leave program.
when 'NEW'.
clear wa.
insert wa into it_company[] index p_sel_field-tabindex.
PERFORM DISPLAY_ALV_LIST.
endcase.
ENDFORM. " sub_my_pf_event
*& Form SET_MY_PF_STATUS
text
--> p1 text
<-- p2 text
FORM SET_MY_PF_STATUS USING p_rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZALV_STATUS'.
ENDFORM. " SET_MY_PF_STATUS
Plz award points if this was helpful.... -
How to add custom line for today's date
Hi,
I want to add one vertical line for today's date on my line chart.
Is it possible to draw custom line dynamically in line chart.
Thanks in advance
MadhuriI think you will probably need CRChart by ThreeD Graphics (www.threedgraphics.com). AFAIK, it's written by the guys who supply the charting module to Crystal, so integrates 100%, even if it's a bit fiddly.
It's a bit pricey (more than CR!), but if you need that functionality, it's about your only option. I've bought it do add a 'your average' linesymbol and 'everyone's average' linesymbol to a chart.
Essentially, it uses macros to plot user defined lines, box fills, shapes etc onto your chart.
You put something like this into the text fields of the chart:
@user_line 0,0,3,100 = draw a line from the 0,0 point to the 3rd group, 50th y-value.
You can use variable to define these points, so if you have a chart in a group, it'll display a different line position for each group. -
How do I add the customer's name to Workflow Notification email subject line?
How do I add the customer's name to Workflow Notification email subject line?
I'm expecting that I need to add a tag, but I'm not sure what the correct tag would be, I have tried a few but it just writes the tag I inserted and not the customer's name.
ThanksThis is something you can not add at the moment. You can change the layout a bit of workflow notifications from the system but you can not change the subjects at this time to render a system tag like that.
-
Urgent:Grand total in hierarchical alv
I am printing a hierarchical alv with subtotals. I want to print the grand total for the whole numeric columns ...
Can anyone explain me how i can do this.
Thanks and regards,
SubhakarHi,
In this case you not only require the totals but the subtotals also.
For achieving this output you will have to sort the alv on the first column and also give subtotals there.
use
data: SORTF TYPE SLIS_SORTINFO_ALV,
TSORT TYPE SLIS_T_SORTINFO_ALV.
in the function module reuse_alv_grid_display give
it_sort = tsort.
eg:
FORM ALV_SHOW.
LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
LAYOUT-BOX_TABNAME = 'IT_DISPLAY'.
LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
LAYOUT-ZEBRA = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = LAYOUT
IT_FIELDCAT = TCATALOG
IS_VARIANT = VAR1
I_SAVE = 'A'
IT_SORT = TSORT
IT_EVENTS = TEVENT[]
TABLES
T_OUTTAB = IT_DISPLAY.
ENDFORM . "ALV_SHOW
and write a subroutine for sort...
form sort.
CLEAR SORTF.
SORTF-spos = 1.
SORTF-fieldname = 'column_1'.
SORTF-tabname = 'IT_table used for display in alv'.
SORTF-up = 'X'.
SORTF-subtot = 'X'.
APPEND SORTF TO TSORT.
endform.
If this doesn't help I will send you the whole source of a sample program..
Abdullah -
Hi friends,
I need to add one horizontal line for the detail section at the end of the page.
I tried to put that line in page footer and i tried with Box also. Both are not properly working. Some space problem is coming.
Is there any feature to find end of the Page.
I want report format like this.
set id | set name | date Name
1 x dddd vijay
dddd sarathi
dddd reddy
(End of the page)
Thanks in advance...
vijay.Do you know how many detail records are showing up per page?
If you do - you could create a Details B section that is suppressed except for on Record N (where N is a counter, and N is the last Detail record that will show up on a page).
The Page footer is indeed built so that it will be rendered at the bottom of your physical page of paper. -
Change line color in alv.(urgent)
Hello , i want the line color to change when my cursor change lines in an ALV.Thx
Hi,
Check this website
http://www.geocities.com/mpioud/Abap_programs.html
reward points if useful,
Regards,
Niyaz
Maybe you are looking for
-
Error while running SDK application in XIR2 server machine
Hi all, Thanks for your support provided so far. I have developed a .NET sdk application to extract the metadata from the XI-R2 universe and report files. I'm able to run the application in my machine. But when I run my tool in the server machine whi
-
I am having problems updating my Windows Vista Home Premium (SP2) with KB3033889 I am always getting the Update error Code 80071AA7 I have tried a clean boot, to install Microsoft Update Standalone Package (KB3033889), but does not worked. I tried Sf
-
Can 23" cinema HD Display support Game systems connectivity
I currently have my display connected to my MacBook but space is a factor at my dorm. Can I use my Apple 23" Cinema HD Display to connect my xbox 360? I bought a DVI to HDMI adapter but i get no picture. i also have a xbox VGA cable if i need to go t
-
FlashBuilder: Android/Flex Components+Full Screen Graphic possible?
I'm new to flash and interested in multi-platform graphical game development. I've installed the Flash Builder Burrito test version and want to develop a full screen Android graphical game with Android-Flex components (like buttons etc.). a) Is it po
-
My ipod is synced, artist info if filled in, and compilations is checked off.