About ALV's
Plz tell me ,what is ALV?workflow of ALV?
ALVGRID with refresh
http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.html
ALV Group Heading
http://www.sap-img.com/fu037.htm
http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm
http://www.sap-img.com/abap/sample-alv-heading-in-alv.htm
ALV all Imp
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sap-img.com/fu002.htm
http://www.sapdevelopment.co.uk/reporting/alvhome.htm
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_events.htm
ALV Documentation for Field
http://www.mpls.k12.mn.us/sites/f7071225-9844-4da6-96c0-996b9c74b221/uploads/SAP_Navigation_Training2.ppt
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.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Similar Messages
-
Can somebody give me a sample about alv oo?
hi experts ,can you give me a sample about alv using oo method,
i have tried
data GS_LAYOUT TYPE SLIS_LAYOUT_ALV.
data lt_fieldcat TYPE slis_t_fieldcat_alv.
call method alv_grid->set_table_for_first_display
exporting is_layout = gs_layout
changing it_outtab = itab_data
it_fieldcatalog = lt_fieldcat.
but the code cann't be compiled, and says "lt_fieldcat is not type-compatible with formal parameter it_fieldcatalog.",and so is the gs_layout.
can you give me a sample for using alv oo ,and use the fieldcat to set table for first display, not to use i_structure_name.
Message was edited by:
liu shaochangHi,
Please take a look at my code below. Just create a custom control in screen painter and PF-status and title as well. Hope it helps...
P.S. Please award points if it helps...
[code]
*& Report ZFI_CASH_PROOF_SHEET
*& PROGRAM TYPE : Report
*& RICEF ID : R-149
*& TITLE : ZFI_CASH_PROOF_SHEET
*& SAP Module : FI
*& CREATION DATE : 11/06/2007
*& AUTHOR : Aris Hidalgo
*& DESIGNER : Aris Hidalgo
*& DESCRIPTION :
$*********************************************************************
*$ CHANGE HISTORY
*$----
*$ DATE | T-Num | Description | Reference
| | |
$*********************************************************************
REPORT zfi_cash_proof_sheet
NO STANDARD PAGE HEADING
MESSAGE-ID zfi.
Data Dictionary Table/s *
TABLES: t012k.
CLASS lcl_event_receiver DEFINITION DEFERRED.
Global Data/s *
DATA: gt_fieldcat TYPE lvc_t_fcat,
wa_fieldcat LIKE LINE OF gt_fieldcat,
ok_code TYPE syst-ucomm,
save_ok TYPE syst-ucomm,
g_repid TYPE syst-repid,
gs_layout TYPE lvc_s_layo,
gv_container TYPE scrfname VALUE 'CUSTOM_CONTROL',
lcl_grid1 TYPE REF TO cl_gui_alv_grid,
lcl_custom_container TYPE REF TO cl_gui_custom_container,
gs_disvariant TYPE disvariant,
lcl_event_receiver TYPE REF TO lcl_event_receiver,
gt_sort TYPE lvc_t_sort,
gs_sort TYPE lvc_s_sort.
Global Structure/s *
TYPES: BEGIN OF t_output,
bukrs TYPE bsis-bukrs,
hbkid TYPE t012k-hbkid,
hktid TYPE t012k-hktid,
cash_in_bank TYPE bsis-dmbtr,
one_day TYPE bsis-dmbtr,
two_days TYPE bsis-dmbtr,
more_than_two_days TYPE bsis-dmbtr,
misc_collection TYPE bsis-dmbtr,
outs_rel_checks TYPE bsis-dmbtr,
treas_transactions TYPE bsis-dmbtr,
tot_cash_bal TYPE bsis-dmbtr,
outs_unrel_checks TYPE bsis-dmbtr,
imp_docs_due TYPE bsis-dmbtr,
est_cash_balance TYPE bsis-dmbtr,
END OF t_output.
DATA: gt_output TYPE STANDARD TABLE OF t_output,
wa_output LIKE LINE OF gt_output.
SELECTION-SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_bukrs FOR t012k-bukrs OBLIGATORY,
s_hbkid FOR t012k-hbkid,
s_hktid FOR t012k-hktid.
PARAMETERS: p_budat TYPE bsak-budat OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
*/ CLASS DEFINITION/S */
CLASS lcl_data_def DEFINITION
CLASS lcl_data_def DEFINITION ABSTRACT.
PUBLIC SECTION.
TYPES: BEGIN OF t_t012k,
bukrs TYPE t012k-bukrs,
hbkid TYPE t012k-hbkid,
hktid TYPE t012k-hktid,
hkont TYPE t012k-hkont,
END OF t_t012k.
TYPES: BEGIN OF t_bsis_bsas,
bukrs TYPE bsis-bukrs,
hkont TYPE bsis-hkont,
belnr TYPE bsis-belnr,
buzei TYPE bsis-buzei,
gjahr TYPE bsis-gjahr,
budat TYPE bsis-budat,
blart TYPE bsis-blart,
dmbtr TYPE bsis-dmbtr,
shkzg TYPE bsis-shkzg,
END OF t_bsis_bsas.
TYPES: BEGIN OF t_bsid_bsad,
bukrs TYPE bsid-bukrs,
belnr TYPE bsid-belnr,
gjahr TYPE bsid-gjahr,
blart TYPE bsid-blart,
buzei TYPE bsid-buzei,
budat TYPE bsid-budat,
dmbtr TYPE bsid-dmbtr,
shkzg TYPE bsid-shkzg,
bschl TYPE bsid-bschl,
END OF t_bsid_bsad.
TYPES: BEGIN OF t_cash_in_bank,
bukrs TYPE bsis-bukrs,
hkont TYPE bsis-hkont,
dmbtr TYPE bsis-dmbtr,
END OF t_cash_in_bank.
TYPES: BEGIN OF t_outs_trade_coll,
bukrs TYPE bsis-bukrs,
hkont TYPE bsis-hkont,
one_day TYPE bsis-dmbtr,
two_days TYPE bsis-dmbtr,
more_than_two_days TYPE bsis-dmbtr,
END OF t_outs_trade_coll.
TYPES: BEGIN OF t_zcheck_monitor,
zzbukr TYPE zcheck_monitor-zzbukr,
zhbkid TYPE zcheck_monitor-zhbkid,
zhktid TYPE zcheck_monitor-zhktid,
zubhkt TYPE zcheck_monitor-zubhkt,
zrwbtr TYPE zcheck_monitor-zrwbtr,
zrlsvd TYPE zcheck_monitor-zrlsvd,
zrlsdt TYPE zcheck_monitor-zrlsdt,
END OF t_zcheck_monitor.
TYPES: BEGIN OF t_zcheck_monitor_collect,
zzbukr TYPE zcheck_monitor-zzbukr,
zubhkt TYPE zcheck_monitor-zubhkt,
zrwbtr TYPE zcheck_monitor-zrwbtr,
END OF t_zcheck_monitor_collect.
TYPES: BEGIN OF t_company,
bukrs TYPE t001-bukrs,
butxt TYPE t001-butxt,
END OF t_company.
TYPES: BEGIN OF t_header,
bukrs TYPE t001-bukrs,
butxt TYPE t001-butxt,
hbkid TYPE t012k-hbkid,
hktid TYPE t012k-hktid,
expand(1) TYPE c,
END OF t_header.
DATA: gt_t012k TYPE HASHED TABLE OF t_t012k
WITH UNIQUE KEY bukrs hbkid hktid,
gt_bsis TYPE STANDARD TABLE OF t_bsis_bsas,
wa_bsis LIKE LINE OF gt_bsis,
gt_bsas LIKE gt_bsis,
gt_bsis_bsas LIKE gt_bsas,
gt_bsid_bsad TYPE STANDARD TABLE OF t_bsid_bsad
WITH NON-UNIQUE KEY bukrs belnr gjahr blart,
gt_bsid LIKE gt_bsid_bsad,
gt_bsad LIKE gt_bsid_bsad,
gt_bsik LIKE gt_bsid_bsad,
gt_bsak LIKE gt_bsid_bsad,
gt_cash_in_bank TYPE HASHED TABLE OF t_cash_in_bank
WITH UNIQUE KEY bukrs hkont,
gt_misc_collection LIKE gt_cash_in_bank,
wa_misc_collection LIKE LINE OF gt_misc_collection,
gt_importation_docs_due LIKE gt_cash_in_bank,
wa_importation_docs_due LIKE LINE OF gt_importation_docs_due,
wa_cash_in_bank LIKE LINE OF gt_cash_in_bank,
gt_outs_trade_coll TYPE HASHED TABLE OF t_outs_trade_coll
WITH UNIQUE KEY bukrs hkont,
wa_outs_trade_coll LIKE LINE OF gt_outs_trade_coll,
gt_zcheck_monitor TYPE STANDARD TABLE OF t_zcheck_monitor,
gt_zcheck_monitor_collect TYPE HASHED TABLE OF t_zcheck_monitor_collect
WITH UNIQUE KEY zzbukr zubhkt,
wa_zcheck_monitor_collect LIKE LINE OF gt_zcheck_monitor_collect,
gt_outs_rel_checks LIKE gt_cash_in_bank,
wa_outs_rel_checks LIKE LINE OF gt_outs_rel_checks,
gt_outs_unrel_checks LIKE gt_cash_in_bank,
wa_outs_unrel_checks LIKE LINE OF gt_outs_unrel_checks,
gt_company TYPE HASHED TABLE OF t_company
WITH UNIQUE KEY bukrs,
wa_company LIKE LINE OF gt_company,
gt_header TYPE STANDARD TABLE OF t_header,
wa_header LIKE LINE OF gt_header.
ENDCLASS. "lcl_data_def DEFINITION
CLASS lcl_get_data DEFINITION
CLASS lcl_get_data DEFINITION INHERITING FROM lcl_data_def.
PUBLIC SECTION.
METHODS: get_bank_details,
get_gl_balances,
get_cust_items,
get_vend_items,
sum_gl_accounts,
monday_routines
IMPORTING
im_date TYPE bsis-budat
im_bukrs TYPE bsis-bukrs
im_hkont TYPE bsis-hkont
im_budat TYPE bsis-budat
im_dmbtr TYPE bsis-dmbtr,
sunday_routines
IMPORTING
im_date TYPE bsis-budat
im_bukrs TYPE bsis-bukrs
im_hkont TYPE bsis-hkont
im_budat TYPE bsis-budat
im_dmbtr TYPE bsis-dmbtr,
tuesday_routines
IMPORTING
im_date TYPE bsis-budat
im_bukrs TYPE bsis-bukrs
im_hkont TYPE bsis-hkont
im_budat TYPE bsis-budat
im_dmbtr TYPE bsis-dmbtr,
other_days_routines
IMPORTING
im_date TYPE bsis-budat
im_bukrs TYPE bsis-bukrs
im_hkont TYPE bsis-hkont
im_budat TYPE bsis-budat
im_dmbtr TYPE bsis-dmbtr,
difference_in_days
IMPORTING
im_date TYPE bsis-budat
im_budat TYPE bsis-budat
EXPORTING
ex_diff TYPE vtbbewe-atage,
outs_check_released,
process_data.
PRIVATE SECTION.
CONSTANTS: lc_credit TYPE bsis-shkzg VALUE 'H',
lc_debit TYPE bsis-shkzg VALUE 'S',
lc_nt TYPE bsis-blart VALUE 'NT',
lc_nc TYPE bsis-blart VALUE 'NC',
lc_gl_zero TYPE bsis-hkont VALUE '+++++++++0',
lc_gl_one TYPE bsis-hkont VALUE '+++++++++1',
lc_gl_three TYPE bsis-hkont VALUE '+++++++++3',
lc_monday TYPE dtresr-weekday VALUE 'Monday',"#EC NOTEXT
lc_tuesday TYPE dtresr-weekday VALUE 'Tuesday',"#EC NOTEXT
lc_sunday TYPE dtresr-weekday VALUE 'Sunday'."#EC NOTEXT
CONSTANTS: lc_k3 TYPE bsik-blart VALUE 'K3',
lc_k4 TYPE bsik-blart VALUE 'K4',
lc_k5 TYPE bsik-blart VALUE 'K5',
lc_k6 TYPE bsik-blart VALUE 'K6',
lc_k7 TYPE bsik-blart VALUE 'K7',
lc_kb TYPE bsik-blart VALUE 'KB',
lc_kd TYPE bsik-blart VALUE 'KD',
lc_31 TYPE bsid-blart VALUE '31',
lc_001 TYPE bsid-buzei VALUE '001'.
DATA: lv_hkont TYPE bsis-hkont,
lr_hkont TYPE RANGE OF bsis-hkont,
wa_hkont LIKE LINE OF lr_hkont,
lr_blart TYPE RANGE OF bsik-blart,
wa_blart LIKE LINE OF lr_blart,
lv_hkont_new TYPE bsis-hkont,
lv_hkont_old TYPE bsis-hkont,
lv_date TYPE vtbbewe-atage,
lv_budat TYPE bsis-budat,
lv_day TYPE dtresr-weekday.
ENDCLASS. "lcl_get_data DEFINITION
CLASS lcl_alv_routines DEFINITION
CLASS lcl_alv_routines DEFINITION INHERITING FROM lcl_data_def.
PUBLIC SECTION.
METHODS: build_fieldcat FINAL,
sort_alv_display FINAL.
ENDCLASS. "lcl_alv_routines DEFINITION
CLASS lcl_event_receiver DEFINITION
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING
er_data_changed,
handle_top_of_page FOR EVENT print_top_of_page OF cl_gui_alv_grid,
handle_top_of_list FOR EVENT print_top_of_list OF cl_gui_alv_grid.
PRIVATE SECTION.
DATA: ls_good TYPE lvc_s_modi,
lv_treas_transactions TYPE t_output-tot_cash_bal,
lv_tot_cash_bal TYPE t_output-tot_cash_bal,
lv_outs_unrel_checks TYPE t_output-outs_unrel_checks,
lv_imp_docs_due TYPE t_output-imp_docs_due,
lv_est_cash_balance TYPE t_output-est_cash_balance.
ENDCLASS. "lcl_event_receiver DEFINITION
*/ CLASS IMPLEMENTATION/S */
CLASS lcl_get_data IMPLEMENTATION
CLASS lcl_get_data IMPLEMENTATION.
METHOD get_bank_details
METHOD get_bank_details.
FIELD-SYMBOLS: <fs_t012k> LIKE LINE OF gt_t012k.
Get bank account/s and their corresponding G/L account/s
SELECT bukrs hbkid
hktid hkont
FROM t012k
INTO TABLE gt_t012k
WHERE bukrs IN s_bukrs
AND hbkid IN s_hbkid
AND hktid IN s_hktid.
IF NOT gt_t012k[] IS INITIAL.
SORT gt_t012k BY bukrs hbkid hktid hkont.
Get company name
SELECT bukrs butxt
FROM t001
INTO TABLE gt_company
FOR ALL ENTRIES IN gt_t012k
WHERE bukrs = gt_t012k-bukrs.
LOOP AT gt_t012k ASSIGNING <fs_t012k>.
wa_hkont-sign = 'I'.
wa_hkont-option = 'EQ'.
wa_hkont-low = <fs_t012k>-hkont.
SHIFT wa_hkont-low LEFT DELETING LEADING space.
APPEND wa_hkont TO lr_hkont.
CLEAR wa_hkont.
lv_hkont_new = <fs_t012k>-hkont.
IF lv_hkont_new <> lv_hkont_old.
CLEAR lv_hkont.
lv_hkont = <fs_t012k>-hkont.
DO 4 TIMES.
ADD 1 TO lv_hkont.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_hkont
IMPORTING
output = lv_hkont.
wa_hkont-sign = 'I'.
wa_hkont-option = 'EQ'.
wa_hkont-low = lv_hkont.
SHIFT wa_hkont-low LEFT DELETING LEADING space.
APPEND wa_hkont TO lr_hkont.
CLEAR wa_hkont.
ENDDO.
ENDIF.
lv_hkont_old = lv_hkont_new.
ENDLOOP.
CALL METHOD me->get_gl_balances.
ENDIF.
ENDMETHOD. "get_bank_details
METHOD get_gl_balances
METHOD get_gl_balances.
Get G/L line items(Open items)
SELECT bukrs hkont belnr
buzei gjahr budat
blart dmbtr shkzg
FROM bsis
INTO TABLE gt_bsis
FOR ALL ENTRIES IN gt_t012k
WHERE bukrs = gt_t012k-bukrs
AND hkont IN lr_hkont
AND budat <= p_budat.
Get G/L line items(Cleared items)
SELECT bukrs hkont belnr
buzei gjahr budat
blart dmbtr shkzg
FROM bsas
INTO TABLE gt_bsas
FOR ALL ENTRIES IN gt_t012k
WHERE bukrs = gt_t012k-bukrs
AND hkont IN lr_hkont
AND budat <= p_budat.
APPEND LINES OF gt_bsis TO gt_bsis_bsas.
APPEND LINES OF gt_bsas TO gt_bsis_bsas.
IF NOT gt_bsis_bsas[] IS INITIAL.
CALL METHOD me->get_cust_items.
CALL METHOD me->get_vend_items.
CALL METHOD me->sum_gl_accounts.
ENDIF.
ENDMETHOD. "get_gl_balances
METHOD get_cust_items
METHOD get_cust_items.
Get customer line items(Open items)
SELECT bukrs belnr gjahr blart
buzei budat dmbtr shkzg
bschl
FROM bsid
INTO TABLE gt_bsid
FOR ALL ENTRIES IN gt_bsis_bsas
WHERE bukrs = gt_bsis_bsas-bukrs
AND gjahr = gt_bsis_bsas-gjahr
AND belnr = gt_bsis_bsas-belnr.
Get customer line items(Cleared items)
SELECT bukrs belnr gjahr blart
buzei budat dmbtr shkzg
bschl
FROM bsad
INTO TABLE gt_bsad
FOR ALL ENTRIES IN gt_bsis_bsas
WHERE bukrs = gt_bsis_bsas-bukrs
AND gjahr = gt_bsis_bsas-gjahr
AND belnr = gt_bsis_bsas-belnr.
APPEND LINES OF gt_bsid TO gt_bsid_bsad.
APPEND LINES OF gt_bsad TO gt_bsid_bsad.
ENDMETHOD. "get_cust_items
METHOD get_vend_items
METHOD get_vend_items.
Get vendor line items(Open items)
SELECT bukrs belnr gjahr blart
buzei budat dmbtr shkzg
bschl
FROM bsik
INTO TABLE gt_bsik
FOR ALL ENTRIES IN gt_bsis_bsas
WHERE bukrs = gt_bsis_bsas-bukrs
AND gjahr = gt_bsis_bsas-gjahr
AND belnr = gt_bsis_bsas-belnr.
DEFINE m_blart.
wa_blart-sign = 'I'.
wa_blart-option = 'EQ'.
wa_blart-low = &1.
append wa_blart to lr_blart.
clear wa_blart.
END-OF-DEFINITION.
m_blart lc_k3.
m_blart lc_k4.
m_blart lc_k5.
m_blart lc_k6.
m_blart lc_k7.
m_blart lc_kb.
m_blart lc_kd.
IF NOT gt_bsik[] IS INITIAL AND NOT lr_blart[] IS INITIAL.
DELETE gt_bsik WHERE blart NOT IN lr_blart[].
DELETE gt_bsik WHERE bschl <> lc_31.
ENDIF.
ENDMETHOD. "get_vend_items
METHOD sum_gl_accounts
METHOD sum_gl_accounts.
FIELD-SYMBOLS: <fs_bsis_bsas> LIKE LINE OF gt_bsis_bsas,
<fs_bsis> LIKE LINE OF gt_bsis,
<fs_bsid_bsad> LIKE LINE OF gt_bsid_bsad,
<fs_bsik> LIKE LINE OF gt_bsik,
<fs_outs_rel_checks> LIKE LINE OF gt_outs_rel_checks,
<fs_outs_unrel_checks> LIKE LINE OF gt_outs_unrel_checks.
SORT gt_bsis_bsas BY bukrs hkont belnr.
LOOP AT gt_bsis_bsas ASSIGNING <fs_bsis_bsas>.
IF <fs_bsis_bsas>-shkzg = lc_credit. "H
MULTIPLY <fs_bsis_bsas>-dmbtr BY -1.
ENDIF.
*/Routine for cash in bank
IF <fs_bsis_bsas>-hkont CP lc_gl_zero.
MOVE-CORRESPONDING <fs_bsis_bsas> TO wa_cash_in_bank.
COLLECT wa_cash_in_bank INTO gt_cash_in_bank.
CLEAR wa_cash_in_bank.
ENDIF.
*/Routine for miscellaneous collection
IF <fs_bsis_bsas>-blart = lc_nt OR
<fs_bsis_bsas>-blart = lc_nc AND
<fs_bsis_bsas>-shkzg = lc_debit AND
<fs_bsis_bsas>-hkont CP lc_gl_one.
READ TABLE gt_bsid_bsad ASSIGNING <fs_bsid_bsad> WITH TABLE KEY bukrs = <fs_bsis_bsas>-bukrs
belnr = <fs_bsis_bsas>-belnr
gjahr = <fs_bsis_bsas>-gjahr
blart = <fs_bsis_bsas>-blart.
IF sy-subrc = 0.
MOVE-CORRESPONDING <fs_bsis_bsas> TO wa_misc_collection.
COLLECT wa_misc_collection INTO gt_misc_collection.
CLEAR wa_misc_collection.
ENDIF.
ENDIF.
*/Routine for importation docs.due
IF <fs_bsis_bsas>-shkzg = lc_credit.
READ TABLE gt_bsik ASSIGNING <fs_bsik> WITH TABLE KEY bukrs = <fs_bsis_bsas>-bukrs
belnr = <fs_bsis_bsas>-belnr
gjahr = <fs_bsis_bsas>-gjahr
blart = <fs_bsis_bsas>-blart.
IF sy-subrc = 0.
MOVE-CORRESPONDING <fs_bsis_bsas> TO wa_importation_docs_due.
COLLECT wa_importation_docs_due INTO gt_importation_docs_due.
CLEAR gt_importation_docs_due.
ENDIF.
ENDIF.
ENDLOOP.
IF NOT gt_bsis[] IS INITIAL.
IF NOT gt_bsis[] IS INITIAL.
lv_budat = p_budat.
CALL FUNCTION 'DATE_TO_DAY'
EXPORTING
date = lv_budat
IMPORTING
weekday = lv_day.
LOOP AT gt_bsis ASSIGNING <fs_bsis>.
*/Routine for outstanding trade collection
IF <fs_bsis>-shkzg = lc_debit AND <fs_bsis>-blart <> lc_nt.
IF lv_day = lc_monday.
CALL METHOD me->monday_routines
EXPORTING
im_date = p_budat
im_bukrs = <fs_bsis>-bukrs
im_hkont = <fs_bsis>-hkont
im_budat = <fs_bsis>-budat
im_dmbtr = <fs_bsis>-dmbtr.
ELSEIF lv_day = lc_sunday.
CALL METHOD me->sunday_routines
EXPORTING
im_date = p_budat
im_bukrs = <fs_bsis>-bukrs
im_hkont = <fs_bsis>-hkont
im_budat = <fs_bsis>-budat
im_dmbtr = <fs_bsis>-dmbtr.
ELSEIF lv_day = lc_tuesday.
CALL METHOD me->tuesday_routines
EXPORTING
im_date = p_budat
im_bukrs = <fs_bsis>-bukrs
im_hkont = <fs_bsis>-hkont
im_budat = <fs_bsis>-budat
im_dmbtr = <fs_bsis>-dmbtr.
ELSE.
CALL METHOD me->other_days_routines
EXPORTING
im_date = p_budat
im_bukrs = <fs_bsis>-bukrs
im_hkont = <fs_bsis>-hkont
im_budat = <fs_bsis>-budat
im_dmbtr = <fs_bsis>-dmbtr.
ENDIF.
ENDIF.
*/Routine for outstanding released checks
IF <fs_bsis>-hkont CP lc_gl_three AND <fs_bsis>-shkzg = lc_debit.
MOVE-CORRESPONDING <fs_bsis> TO wa_outs_rel_checks.
COLLECT wa_outs_rel_checks INTO gt_outs_rel_checks.
CLEAR wa_outs_rel_checks.
*/Routine for outstanding unreleased checks
ELSEIF <fs_bsis>-hkont CP lc_gl_three AND <fs_bsis>-shkzg = lc_credit.
MOVE-CORRESPONDING <fs_bsis> TO wa_outs_unrel_checks.
COLLECT wa_outs_unrel_checks INTO gt_outs_unrel_checks.
CLEAR wa_outs_unrel_checks.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
*/Routine for outstanding released check/s
*/this routine will get all records from custom table zcheck_monitor
*/where status is released to vendor
CALL METHOD me->outs_check_released.
IF NOT gt_outs_rel_checks[] IS INITIAL.
Subtract debit line items from ZFE002
LOOP AT gt_outs_rel_checks ASSIGNING <fs_outs_rel_checks>.
CLEAR wa_zcheck_monitor_collect.
READ TABLE gt_zcheck_monitor_collect INTO wa_zcheck_monitor_collect
WITH TABLE KEY zzbukr = <fs_outs_rel_checks>-bukrs
zubhkt = <fs_outs_rel_checks>-hkont.
IF sy-subrc = 0.
<fs_outs_rel_checks>-dmbtr = wa_zcheck_monitor_collect-zrwbtr -
<fs_outs_rel_checks>-dmbtr.
ELSE.
<fs_outs_rel_checks>-dmbtr = 0 - <fs_outs_rel_checks>-dmbtr.
ENDIF.
ENDLOOP.
ENDIF.
IF NOT gt_outs_unrel_checks[] IS INITIAL.
Subtract ZFE002 records from credit line items
LOOP AT gt_outs_unrel_checks ASSIGNING <fs_outs_unrel_checks>.
CLEAR wa_zcheck_monitor_collect.
READ TABLE gt_zcheck_monitor_collect INTO wa_zcheck_monitor_collect
WITH TABLE KEY zzbukr = <fs_outs_unrel_checks>-bukrs
zubhkt = <fs_outs_unrel_checks>-hkont.
IF sy-subrc = 0.
<fs_outs_unrel_checks>-dmbtr = ABS( <fs_outs_unrel_checks>-dmbtr ) -
ABS( wa_zcheck_monitor_collect-zrwbtr ).
ENDIF.
ENDLOOP.
ENDIF.
Move records to output table
CALL METHOD me->process_data.
ENDMETHOD. "sum_gl_accounts
METHOD monday_routines
METHOD monday_routines.
wa_outs_trade_coll-bukrs = im_bukrs.
wa_outs_trade_coll-hkont = im_hkont.
CLEAR lv_date.
CALL METHOD me->difference_in_days
EXPORTING
im_date = im_date
im_budat = im_budat
IMPORTING
ex_diff = lv_date.
One day
IF lv_date = 3.
wa_outs_trade_coll-one_day = im_dmbtr.
Two days
ELSEIF lv_date = 4.
wa_outs_trade_coll-two_days = im_dmbtr.
More than two days
ELSEIF lv_date > 4.
wa_outs_trade_coll-more_than_two_days = im_dmbtr.
ENDIF.
COLLECT wa_outs_trade_coll INTO gt_outs_trade_coll.
CLEAR wa_outs_trade_coll.
ENDMETHOD. "monday_routines
METHOD sunday_routines
METHOD sunday_routines.
wa_outs_trade_coll-bukrs = im_bukrs.
wa_outs_trade_coll-hkont = im_hkont.
CLEAR lv_date.
CALL METHOD me->difference_in_days
EXPORTING
im_date = im_date
im_budat = im_budat
IMPORTING
ex_diff = lv_date.
One day
IF lv_date = 2.
wa_outs_trade_coll-one_day = im_dmbtr.
Two days
ELSEIF lv_date = 3.
wa_outs_trade_coll-two_days = im_dmbtr.
More than two days
ELSEIF lv_date > 3.
wa_outs_trade_coll-more_than_two_days = im_dmbtr.
ENDIF.
COLLECT wa_outs_trade_coll INTO gt_outs_trade_coll.
CLEAR wa_outs_trade_coll.
ENDMETHOD. "sunday_routines
METHOD tuesday_routines
METHOD tuesday_routines.
wa_outs_trade_coll-bukrs = im_bukrs.
wa_outs_trade_coll-hkont = im_hkont.
CLEAR lv_date.
CALL METHOD me->difference_in_days
EXPORTING
im_date = im_date
im_budat = im_budat
IMPORTING
ex_diff = lv_date.
One day
IF lv_date = 1.
wa_outs_trade_coll-one_day = im_dmbtr.
Two days
ELSEIF lv_date = 4.
wa_outs_trade_coll-two_days = im_dmbtr.
More than two days
ELSEIF lv_date > 4.
wa_outs_trade_coll-more_than_two_days = im_dmbtr.
ENDIF.
COLLECT wa_outs_trade_coll INTO gt_outs_trade_coll.
CLEAR wa_outs_trade_coll.
ENDMETHOD. "tuesday_routines
METHOD other_days_routines
METHOD other_days_routines.
wa_outs_trade_coll-bukrs = im_bukrs.
wa_outs_trade_coll-hkont = im_hkont.
CLEAR lv_date.
CALL METHOD me->difference_in_days
EXPORTING
im_date = im_date
im_budat = im_budat
IMPORTING
ex_diff = lv_date.
One day
IF lv_date = 1.
wa_outs_trade_coll-one_day = im_dmbtr.
Two days
ELSEIF lv_date = 2.
wa_outs_trade_coll-two_days = im_dmbtr.
More than two days
ELSEIF lv_date > 3.
wa_outs_trade_coll-more_than_two_days = im_dmbtr.
ENDIF.
COLLECT wa_outs_trade_coll INTO gt_outs_trade_coll.
CLEAR wa_outs_trade_coll.
ENDMETHOD. "other_days_routines
METHOD difference_in_days
METHOD difference_in_days.
CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
EXPORTING
i_date_from = im_budat
I_KEY_DAY_FROM =
i_date_to = im_date
I_KEY_DAY_TO =
I_FLG_SEPARATE = ' '
IMPORTING
e_days = ex_diff.
E_MONTHS =
E_YEARS =
ENDMETHOD. "difference_in_days
METHOD outs_check_released
METHOD outs_check_released.
FIELD-SYMBOLS: <fs_zcheck_monitor> LIKE LINE OF gt_zcheck_monitor.
SELECT zzbukr zhbkid zhktid
zubhkt zrwbtr zrlsvd
zrlsdt
FROM zcheck_monitor
INTO TABLE gt_zcheck_monitor
WHERE zrlsvd <> space.
IF NOT gt_zcheck_monitor[] IS INITIAL.
LOOP AT gt_zcheck_monitor ASSIGNING <fs_zcheck_monitor>.
MOVE-CORRESPONDING <fs_zcheck_monitor> TO wa_zcheck_monitor_collect.
COLLECT wa_zcheck_monitor_collect INTO gt_zcheck_monitor_collect.
CLEAR wa_zcheck_monitor_collect.
ENDLOOP.
ENDIF.
ENDMETHOD. "outs_check_released
METHOD process_data
METHOD process_data.
FIELD-SYMBOLS: <fs_t012k> LIKE LINE OF gt_t012k,
<fs_company> LIKE LINE OF gt_company,
<fs_cash_in_bank> LIKE LINE OF gt_cash_in_bank,
<fs_outs_trade_coll> LIKE LINE OF gt_outs_trade_coll,
<fs_misc_collection> LIKE LINE OF gt_misc_collection,
<fs_outs_rel_checks> LIKE LINE OF gt_outs_rel_checks,
<fs_outs_unrel_checks> LIKE LINE OF gt_outs_unrel_checks.
SORT gt_t012k BY bukrs hbkid.
LOOP AT gt_t012k ASSIGNING <fs_t012k>.
AT NEW hbkid.
READ TABLE gt_company ASSIGNING <fs_company>
WITH TABLE KEY bukrs = <fs_t012k>-bukrs.
IF sy-subrc = 0.
wa_header-bukrs = <fs_company>-bukrs.
wa_header-butxt = <fs_company>-butxt.
wa_header-hbkid = <fs_t012k>-hbkid.
wa_header-hktid = <fs_t012k>-hktid.
APPEND wa_header TO gt_header.
CLEAR wa_header.
ENDIF.
ENDAT.
wa_output-bukrs = <fs_t012k>-bukrs.
wa_output-hbkid = <fs_t012k>-hbkid.
wa_output-hktid = <fs_t012k>-hktid.
Move cash in bank
READ TABLE gt_cash_in_bank ASSIGNING <fs_cash_in_bank>
WITH TABLE KEY bukrs = <fs_t012k>-bukrs
hkont = <fs_t012k>-hkont.
IF sy-subrc = 0.
wa_output-cash_in_bank = <fs_cash_in_bank>-dmbtr.
ADD wa_output-cash_in_bank TO wa_output-tot_cash_bal.
ENDIF.
CLEAR lv_hkont.
lv_hkont = <fs_t012k>-hkont.
ADD 1 TO lv_hkont.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_hkont
IMPORTING
output = lv_hkont.
Move outstanding trade collection(Deposit in transit)
READ TABLE gt_outs_trade_coll ASSIGNING <fs_outs_trade_coll>
WITH TABLE KEY bukrs = <fs_t012k>-bukrs
hkont = lv_hkont.
IF sy-subrc = 0.
wa_output-one_day = <fs_outs_trade_coll>-one_day.
ADD wa_output-one_day TO wa_output-tot_cash_bal.
wa_output-two_days = <fs_outs_trade_coll>-two_days.
ADD wa_output-two_days TO wa_output-tot_cash_bal.
wa_output-more_than_two_days = <fs_outs_trade_coll>-more_than_two_days.
ADD wa_output-more_than_two_days TO wa_output-tot_cash_bal.
ENDIF.
Move miscellaneous collection
READ TABLE gt_misc_collection ASSIGNING <fs_misc_collection>
WITH TABLE KEY bukrs = <fs_t012k>-bukrs
hkont = lv_hkont.
IF sy-subrc = 0.
wa_output-misc_collection = <fs_misc_collection>-dmbtr.
ADD wa_output-misc_collection TO wa_output-tot_cash_bal.
ENDIF.
Move outstanding released checks
CLEAR lv_hkont.
lv_hkont = <fs_t012k>-hkont.
ADD 3 TO lv_hkont.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_hkont
IMPORTING
output = lv_hkont.
READ TABLE gt_outs_rel_checks ASSIGNING <fs_outs_rel_checks>
WITH TABLE KEY bukrs = <fs_t012k>-bukrs
hkont = lv_hkont.
IF sy-subrc = 0.
wa_output-outs_rel_checks = <fs_outs_rel_checks>-dmbtr.
IF wa_output-outs_rel_checks < 0.
ADD wa_output-outs_rel_checks TO wa_output-tot_cash_bal.
ELSE.
SUBTRACT wa_output-outs_rel_checks FROM wa_output-tot_cash_bal.
ENDIF.
ELSE.
CLEAR wa_zcheck_monitor_collect.
READ TABLE gt_zcheck_monitor_collect INTO wa_zcheck_monitor_collect
WITH TABLE KEY zzbukr = <fs_t012k>-bukrs
zubhkt = lv_hkont.
IF sy-subrc = 0.
wa_output-outs_rel_checks = wa_zcheck_monitor_collect-zrwbtr.
IF wa_output-outs_rel_checks < 0.
ADD wa_output-outs_rel_checks TO wa_output-tot_cash_bal.
ELSE.
SUBTRACT wa_output-outs_rel_checks FROM wa_output-tot_cash_bal.
ENDIF.
ENDIF.
ENDIF.
Move outstanding unreleased checks
CLEAR lv_hkont.
lv_hkont = <fs_t012k>-hkont.
ADD 3 TO lv_hkont.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_hkont
IMPORTING
output = lv_hkont.
READ TABLE gt_outs_unrel_checks ASSIGNING <fs_outs_unrel_checks>
WITH TABLE KEY bukrs = <fs_t012k>-bukrs
hkont = lv_hkont.
IF sy-subrc = 0.
wa_output-outs_unrel_checks = <fs_outs_unrel_checks>-dmbtr.
ENDIF.
Move importation docs. due
CLEAR wa_importation_docs_due.
READ TABLE gt_importation_docs_due INTO wa_importation_docs_due
WITH TABLE KEY bukrs = <fs_t012k>-bukrs
hkont = lv_hkont
TRANSPORTING dmbtr.
IF sy-subrc = 0.
wa_output-imp_docs_due = wa_importation_docs_due-dmbtr.
ENDIF.
wa_output-est_cash_balance = wa_output-tot_cash_bal - ( wa_output-outs_unrel_checks +
wa_output-imp_docs_due ).
APPEND wa_output TO gt_output.
CLEAR wa_output.
ENDLOOP.
ENDMETHOD. "process_data
ENDCLASS. "lcl_get_data IMPLEMENTATION
CLASS lcl_alv_routines IMPLEMENTATION
CLASS lcl_alv_routines IMPLEMENTATION.
METHOD build_fieldcat.
DEFINE m_fieldcat.
add 1 to wa_fieldcat-col_pos.
wa_fieldcat-fieldname = &1.
wa_fieldcat-tabname = &2.
wa_fieldcat-coltext = &3.
wa_fieldcat-outputlen = &4.
wa_fieldcat-key = &5.
wa_fieldcat-just = &6.
wa_fieldcat-do_sum = &7.
wa_fieldcat-emphasize = &8.
wa_fieldcat-edit = &9.
append wa_fieldcat to gt_fieldcat.
clear wa_fieldcat.
END-OF-DEFINITION.
m_fieldcat 'BUKRS' 'GT_OUTPUT' text-a01 '12' 'X' '' '' '' ''.
m_fieldcat 'HBKID' 'GT_OUTPUT' text-a14 '10' 'X' '' '' '' ''.
m_fieldcat 'HKTID' 'GT_OUTPUT' text-a02 '10' 'X' '' '' '' ''.
m_fieldcat 'CASH_IN_BANK' 'GT_OUTPUT' text-a03 '12' '' 'R' 'X' '' ''.
m_fieldcat 'ONE_DAY' 'GT_OUTPUT' text-a04 '05' '' 'R' 'X' '' ''.
m_fieldcat 'TWO_DAYS' 'GT_OUTPUT' text-a05 '06' '' 'R' 'X' '' ''.
m_fieldcat 'MORE_THAN_TWO_DAYS' 'GT_OUTPUT' text-a06 '08' '' 'R' 'X' '' ''.
m_fieldcat 'MISC_COLLECTION' 'GT_OUTPUT' text-a07 '16' '' 'R' 'X' '' ''.
m_fieldcat 'OUTS_REL_CHECKS' 'GT_OUTPUT' text-a08 '21' '' 'R' 'X' '' ''.
m_fieldcat 'TREAS_TRANSACTIONS' 'GT_OUTPUT' text-a09 '19' '' 'R' 'X' '' 'X'.
m_fieldcat 'TOT_CASH_BAL' 'GT_OUTPUT' text-a10 '15' '' 'R' 'X' 'C300' ''.
m_fieldcat 'OUTS_UNREL_CHECKS' 'GT_OUTPUT' text-a11 '19' '' 'R' 'X' '' ''.
m_fieldcat 'IMP_DOCS_DUE' 'GT_OUTPUT' text-a12 '14' '' 'R' 'X' '' ''.
m_fieldcat 'EST_CASH_BALANCE' 'GT_OUTPUT' text-a13 '17' '' 'R' 'X' 'C300' ''.
ENDMETHOD. "build_fieldcat
METHOD sort_alv_display.
DEFINE m_sort.
clear gs_sort.
gs_sort-fieldname = &1.
gs_sort-spos = &2.
gs_sort-up = &3.
gs_sort-down = &4.
gs_sort-subtot = &5.
append gs_sort to gt_sort.
END-OF-DEFINITION.
m_sort 'BUKRS' '1' 'X' '' ''.
m_sort 'HBKID' '2' 'X' '' 'X'.
ENDMETHOD. "sort_alv_display
ENDCLASS. "lcl_alv_routines IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_data_changed.
LOOP AT er_data_changed->mt_mod_cells INTO ls_good.
CASE ls_good-fieldname.
WHEN 'TREAS_TRANSACTIONS'.
CLEAR lv_tot_cash_bal.
CALL METHOD er_data_changed->get_cell_value
EXPORTING
i_row_id = ls_good-row_id
i_fieldname = 'TOT_CASH_BAL'
IMPORTING
e_value = lv_tot_cash_bal.
IF ls_good-value CA 'ABCDEFGHIJKLMNOPQRSTUVWXYZ/'.
CALL METHOD er_data_changed->add_protocol_entry
EXPORTING
i_msgid = '0K'
i_msgno = '000'
i_msgty = 'E'
i_msgv1 = text-e01
i_msgv2 = ls_good-value
i_msgv3 = text-e02
i_fieldname = ls_good-fieldname
i_row_id = ls_good-row_id.
EXIT.
ELSE.
CLEAR lv_treas_transactions.
lv_treas_transactions = ls_good-value.
ADD lv_tot_cash_bal TO lv_treas_transactions.
CALL METHOD er_data_changed->modify_cell
EXPORTING
i_row_id = ls_good-row_id
i_fieldname = 'TOT_CASH_BAL'
i_value = lv_treas_transactions.
CLEAR lv_outs_unrel_checks.
CALL METHOD er_data_changed->get_cell_value
EXPORTING
i_row_id = ls_good-row_id
i_fieldname = 'OUTS_UNREL_CHECKS'
IMPORTING
e_value = lv_outs_unrel_checks.
CLEAR lv_imp_docs_due.
CALL METHOD er_data_changed->get_cell_value
EXPORTING
i_row_id = ls_good-row_id
i_fieldname = 'IMP_DOCS_DUE'
IMPORTING
e_value = lv_imp_docs_due.
lv_est_cash_balance = ls_good-value - ( lv_outs_unrel_checks +
lv_imp_docs_due ).
CALL METHOD er_data_changed->modify_cell
EXPORTING
i_row_id = ls_good-row_id
i_fieldname = 'EST_CASH_BALANCE'
i_value = lv_est_cash_balance.
CLEAR lv_est_cash_balance.
ENDIF.
ENDCASE.
ENDLOOP.
ENDMETHOD. "handle_data_changed
METHOD handle_top_of_page.
WRITE: sy-repid.
ENDMETHOD. "handle_top_of_page
METHOD handle_top_of_list.
WRITE: sy-repid.
ENDMETHOD. "handle_top_of_list
ENDCLASS. "lcl_event_receiver IMPLEMENTATION
START-OF- -
hi everyone:
I have a problem about ALV. The question is I want to show two headers in the gt_item .(Hierachy)
I want to use these in the event "change_fieldcatlog"
LOOP AT I_FIELDCAT.
CASE I_FIELDCAT-FIELDNAME
WHEN 'MESSWERT'.
I_FIELDCAT-ROW_POS = 1.
I_FIELDCAT-SEL_L = '1111'.
I_FIELDCAT-SEL_M = '1111'.
I_FIELDCAT-SEL_S = '1111'.
APPEND I_FIELDCAT.
so I want to add another label in the next row. but I write like this below , it doesn't work .
I_FIELDCAT-ROW_POS = 2
I_FIELDCAT-SEL_L = text-004.
I_FIELDCAT-SEL_M = text-004.
I_FIELDCAT-SEL_S = text-004.
APPEND I_FIELDCAT
ENDCASE.
ENDLOOP.
So who can help me ?
thank you in advacne .
Regards
NickHii Nick, in your program I found that you have created only one fieldcat structure, actually we need 2 structures one is for workarea and one for body.
like this
It_Fieldcat type SLIS_T_FIELDCAT_ALV
Is_Fieldcat type SLIS_FIELDCAT_ALV
now you can write the code
LOOP AT It_FIELDCAT into Is_Fieldcat.
CASE Is_FIELDCAT-FIELDNAME
WHEN 'MESSWERT'.
Is_FIELDCAT-ROW_POS = 1.
Is_FIELDCAT-SEL_L = '1111'.
Is_FIELDCAT-SEL_M = '1111'.
Is_FIELDCAT-SEL_S = '1111'.
APPEND Is_FIELDCAT to It_Fieldcat.
clear Is_Fieldcat.
Is_FIELDCAT-ROW_POS = 2
Is_FIELDCAT-SEL_L = text-004.
Is_FIELDCAT-SEL_M = text-004.
Is_FIELDCAT-SEL_S = text-004.
APPEND Is_FIELDCAT to It_Fieldcat.
Clear Is_Fieldcat.
Hope it will works.
Reward points if helpful. -
Hello Expert,
I have a question about ALV subtotal
In my ALV output, there are three columns: SalesOrder, Item, Sales Volumn. Suppose there are following data in the ALV output
SalesOrder Item Volumn
123 10 100.00
123 20 300.00
456 10 200.00
456 20 500.00
What I want in the ALV outpu is as below:
SalesOrder Item Volumn
123 10 100.00
123 20 300.00
subtotal 400.00
456 10 200.00
456 20 500.00
Subtotal 700.00
Total 1100.00
Is this possible, and how can I achieve that result?
Thanks & Regards, JohnnyYou can use sortinfo structure of ALV.
Data:GT_SORT TYPE slis_t_sortinfo_alv.
GTT_SORT-FIELDNAME = 'VBELN'.
GTT_SORT-UP = 'X'.
GTT_SORT-SUBTOT = 'X'.
APPEND GTT_SORT TO GT_SORT. -
How to learn about ALV Grid?
Hi Experts,
I dont about ALV grid and how to implement it.So can anyone let me know how to implement the simple basic ALV grid with example?
Please explain me with set by step procedure.
Thanks a lot in Advance,
Regards,
Raghuhi,
Process to create ALV with OOPs:
Step 1:
Create a container. There are 2 type of containers: docking and custom.
Go to SE38.Create a program. Use Pattern button to create object for docking container. Click ABAP Object Pattern radio button. Click Create object radio button. Give Instance as o_docking and class as cl_gui_docking_contianer.
Step 2:
Create a grid inside the container.
Use Pattern button to create the same. Make the parent of grid as container.
Click ABAP Object Pattern radio button. Click Create object radio button. Give Instance as o_grid and class as cl_gui_alv_grid. Create object o_grid.
Step 3:
Call the function lvc_fieldcatalog_merge to get the field catalog.
Pass the structure name.
Step 4:
Call the method of grid set_table_for_first_display to display the output.
Click ABAP Object Pattern radio button. Click Call Method radio button. Give Instance as o_grid and Class/Interface as cl_gui_alv_grid and Method as set_table_for_first_display.
w_variant-report = sy-repid.
Call method o_grid->set_table_for_first_display
Step 5:
Fill the internal table itab with values by using logic.
select * from mara into table itab up to 100 rows.
call screen 9000.
Create a screen by double clicking 9000 in the above line. Fill the description for the screen. In the flow logic, uncomment the PBO and PAI module and create those in main program (for simplicity).
Step 6:
Create GUI status. Create GUI Title if required. That can be done by using display object List (CtrlShiftF5).Then in left side, right click the program and create GUI Status and Title.
Step 7:
Free the memory occupied once the BACK, EXIT or CANCEL button is clicked. Use Pattern button to call the method FREE of cl_gui_alv_grid and cl_gui_docking_container.
Click ABAP Object Pattern radio button. Click Call Method radio button. Give Instance as o_grid and Class/Interface as cl_gui_alv_grid and Method as Free.
Similarly Click Call Method radio button. Give Instance as o_docking and Class/Interface as cl_gui_docking_container and Method as Free.
Also follow these links.
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.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Hope this helps, Do reward. -
What's it all about ALV?
Dear All
This fine day I have had a fair few questions about the ALV land on my
doorstep, asking what articles were around. I have never found any good
ones. The online help ranges from patchy and confusing to non-existant, and
keeps bursting into German. I started off with the example in the "reporting
made easy" book which scratches the surface, and then have progressed by
trial and error.
The chances of there being any meaningful documentation for an SAP function
module tend to be inversely proportional to how useful it is. One trick I
have found is that when it tells you "Documentation not available in
language EN", log off and log back on in German. Go back to the function
module and look again. Sometimes the documentation appears - in English. But
more often than not it's not there at all.
Anyway, back to the ALV:-
The things I have discovered were how to
change the name of fields
add extra buttons to the toolbar at the top
get a box with the users selections to appear when the report is
printed
have traffic lights say if a record is OK or not
allow the user to enter the initial display variant on the front
screen
have the user name and date appear at the top of the report
Here is a "Frankenstien's Monster" containing extracts of code from several
reports, and re-arranged into a logical order. this doesn't do anything, but
contains examples of how to do all sorts.
report z-alv_a_sixpence.
include z_alv_include.
Internal Tables
Selection Screen
Parameter for the user to choose how the initial screen will be (vital
for running big reports in background)
SELECTION-SCREEN BEGIN OF BLOCK blk3 WITH FRAME TITLE text-003.
PARAMETERS: p_vari LIKE disvariant-variant.
SELECTION-SCREEN END OF BLOCK blk3.
At Selection-Screen have a word with the display variant
AT SELECTION-SCREEN.
PERFORM check_variant.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_for_variant.
START-OF-SELECTION.
END-OF-SELECTION.
Build Field Catalogs (Begin)**************************
PERFORM resetvalues.
fieldcat_ln-key = 'X'.
fieldcat_ln-hotspot = 'X'.
PERFORM addfield USING '2' 'LIKP' 'WERKS'. "Plant
PERFORM build_sortcat.
******Build Field Catalogs (End)*****************************
******Build Event Catalog (Begin)****************************
PERFORM build_eventcat.
PERFORM build_layout.
********Add a header at the top of the report *******
PERFORM set_report_header USING w_list_top_of_page[].
********Start List Viewer
PERFORM start_list_viewer.
******Start List Viewer (End)********************************
*******Process Call Back Events (Begin)**************************
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
CASE ucomm.
WHEN '&IC1'.
READ TABLE irepo INDEX selfield-tabindex.
CHECK sy-subrc = 0.1. your listed programm below has an include (z_alv_include) which you
didn't supply.
2. have a look at the developement class 'SLIS' which contains manyexamples
for ALV-programs.
3. In BC405 one chapter is about reports with ALV. -
Re : about ALV Reporting
hi all,
what are the events in alv reporting?
Thanks in advance.Hi there
If you read my post in the OO ABAP thread you should find an EASY way of generating your reports with all the functionality you need EDIT, Data entry, double click, create EXCEL spread sheet etc etc.
I can't seem to get the thread ID for a LINK but look for post entitled
<b>For all users having probs with OO ALV Grid</b> it's in the ABAP OBJECTS forum.
If you follow the steps outlined there you'll be able to generate complex reports very quickly with minimal code and you won't have to do all the tedious FCAT building etc etc.
The example there uses dynamic tables, and FCATS and the new RTTI (RunTime Information) functionality so your structure can be built FROM ANY ITAB --DDIC or not at run time.
Your application program will then only need to be about 1 or 2 pages long.
Copy the CLASS from that post and save it as an INCLUDE.
Here's just a taster to show you how easy it is.
This program reads 200 sales orders from VAPMA and displays it in a GRID
If you double click on a cell transaction VA02 is called. After you leav VA02 the GRID table is updated with a 'C' in the sales order line where you doyble clicked.
The Toolbar EXCEL will create an EXCEL spreadsheet directly with column headings etc where you can save the data as a file.
Do these 2 things first
Create a Blank Screen with a custom container on it called CCONTAINER 1. (SE51)
(optional) create a STATUS (SE41) so you can have the standard SAP toolbar at the top of the SAP screen .
Copy this program and the CLASS referred to in my post in the ABAP OBJECTS FORUM.
Program ZZORDERDISP.
DEFINE col_name.
read table it_fldcat into wa_it_fldcat index &1.
wa_it_fldcat-coltext = &2.
modify it_fldcat from wa_it_fldcat index &1.
END-OF-DEFINITION.
Jimbo 2007.
FIELD-SYMBOLS :
<fs1> TYPE ANY,
<fs2> TYPE STANDARD TABLE,
<fs3> TYPE ANY,
<field_catalog> TYPE STANDARD TABLE,
<dyn_table> TYPE STANDARD TABLE,
<orig_table> TYPE STANDARD TABLE,
<dyn_field>,
<dyn_wa>.
<b>INCLUDE ZZJIMBOXX_INCL. ===> copy the CLASS definition
From my post in ABAP OBJECTS FORUM.</b>
INCLUDE <icon>.
TABLES : VAPMA.
TYPES: BEGIN OF s_elements,
vbeln TYPE vapma-vbeln,
posnr TYPE vapma-posnr,
matnr TYPE vapma-matnr,
kunnr TYPE vapma-kunnr,
werks TYPE vapma-werks,
vkorg TYPE vapma-vkorg,
vkbur TYPE vapma-vkbur,
status TYPE c,
END OF s_elements.
DATA: z_object TYPE REF TO zcl_dog, "Instantiate our class
grid_container1 TYPE REF TO cl_gui_custom_container,
t_elements TYPE TABLE OF s_elements, "refers to our ITAB
wa_elements TYPE s_elements,
wa_dyn_table_line TYPE REF TO DATA,
it_fldcat TYPE lvc_t_fcat,
i_gridtitle TYPE lvc_title,
wa_it_fldcat TYPE lvc_s_fcat,
new_table TYPE REF TO DATA,
dy_table TYPE REF TO data,
dy_line TYPE REF TO data,
row_id TYPE sy-index.
START-OF-SELECTION.
CALL SCREEN 100.
END-OF-SELECTION.
MODULE status_0100 OUTPUT.
break-point 2.
ASSIGN wa_elements TO <fs1>.
CREATE OBJECT z_object EXPORTING z_object = z_object.
CALL METHOD z_object->build_dynamic_structures
CHANGING it_fldcat = it_fldcat.
Here before displaying you can change the field catalog to
adjust your own names
Method call just uses the names in the table structure.
col_name 1 'Order Nr'.
col_name 2 'Item'.
col_name 3 'Material'.
col_name 4 'Customer'.
col_name 5 'Plant'.
col_name 6 'Sales Org'.
col_name 7 'Sales Office'.
col_name 8 'Status'.
PERFORM populate_dynamic_itab.
CALL METHOD z_object->display_grid
CHANGING it_fldcat = it_fldcat.
SET PF-STATUS '0001'.
SET TITLEBAR '000'.
ENDMODULE.
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
LEAVE PROGRAM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'RETURN'.
LEAVE PROGRAM.
WHEN OTHERS.
ENDCASE.
ENDMODULE.
FORM populate_dynamic_itab.
SELECT vbeln posnr matnr kunnr werks vkorg vkbur
UP TO 200 rows
FROM vapma
INTO CORRESPONDING FIELDS OF TABLE <dyn_table>.
Populate Dynamic table and save a copy
create 2nd Dyn table to hold original data
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fldcat
IMPORTING
ep_table = dy_table.
ASSIGN dy_table->* TO <orig_table>.
CREATE DATA dy_line LIKE LINE OF <orig_table>.
ASSIGN dy_line->* TO <dyn_wa>.
<orig_table> = <dyn_table>.
ENDFORM.
FORM VERWERK.
break-point 1.
Orig table is in dynamic table <orig_table>
ALV GRID changed table is in <dyn_table>.
Loop at <orig_table> into <dyn_wa>.
Do what you want
end
endloop.
ENDFORM.
FORM refresh.
data: ord_nr TYPE vapma-vbeln.
READ TABLE <dyn_table> index row_id into wa_elements.
ord_nr = wa_elements-vbeln.
set parameter id 'AUN' field ord_nr.
CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.
wa_elements-status = 'C'.
modify <dyn_table> from wa_elements index row_id.
break-point 1.
CALL METHOD z_object->refresh_grid.
ENDFORM.
form dubbleklik using
e_row type LVC_S_ROW
e_column type LVC_S_col
es_row_no type lvc_s_roid.
break-point 1.
Get Row id into a variable for this program.
row_id = e_row.
SET TITLEBAR '001'.
i_gridtitle = 'Grid Title Changed'.
CALL METHOD z_object->change_title
EXPORTING i_gridtitle = i_gridtitle.
PERFORM refresh.
endform.
That's it --code exactly as shown and it will work --you can have a lot of fun with the toolbar options including the excel spread sheet creation without usiing GUI download or whatever.
Have fun -- and if you ever need to take more than about 5 mins to generate an ALV report in the future your Boss will be upset.
Cheers
Jimbo -
I want to make my ALV like this [https://weblogs.sdn.sap.com/weblogs/images/1918/wda_alv17.jpg|https://weblogs.sdn.sap.com/weblogs/images/1918/wda_alv17.jpg] by coding. I've found a pdf about how to do it, but it doesn't work.
Here is my code:
DATA:
l_ref_cmp_usage TYPE REF TO if_wd_component_usage,
l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table.
l_ref_cmp_usage = wd_this->wd_cpuse_salv( ).
IF l_ref_cmp_usage->has_active_component( ) is INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
l_ref_interfacecontroller = wd_this->wd_cpifc_salv( ).
wd_this->r_table = l_ref_interfacecontroller->get_model( ).
cl_salv_wd_model_table_util=>if_salv_wd_table_util_stdfuncs~set_all(
r_model = wd_this->r_table ).
wd_this->r_table->if_salv_wd_table_settings~set_display_type(
if_salv_wd_c_table_settings=>display_type_hierarchy ).
DATA: lr_column TYPE REF TO cl_salv_wd_column.
lr_column = wd_this->r_table->if_salv_wd_column_settings~get_column( 'CNOID' ).
lr_column->if_salv_wd_column_hierarchy~set_hierarchy_column( abap_true ).
lr_column = wd_this->r_table->if_salv_wd_column_settings~get_column( 'STOID' ).
lr_column->if_salv_wd_column_hierarchy~set_hierarchy_column( abap_true ).
wd_this->r_table->if_salv_wd_table_hierarchy~set_last_hier_column_as_leaf( abap_true ).
how can i make these code work?
thx
by jkchenhi arjun,
it still doesn't work. when i debug it, the system sets the column hierarchy "false"...
the code is like this now:
DATA:
l_ref_cmp_usage TYPE REF TO if_wd_component_usage,
l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table,
l_value TYPE REF TO cl_salv_wd_config_table.
l_ref_cmp_usage = wd_this->wd_cpuse_salv( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
l_ref_interfacecontroller = wd_this->wd_cpifc_salv( ).
l_value = l_ref_interfacecontroller->get_model( ).
* cl_salv_wd_model_table_util=>if_salv_wd_table_util_stdfuncs~set_all(
* r_model = l_value ).
l_value->if_salv_wd_std_functions~set_hierarchy_allowed( abap_true ).
l_value->if_salv_wd_table_settings~set_display_type(
if_salv_wd_c_table_settings=>display_type_hierarchy ).
DATA: lr_column TYPE REF TO cl_salv_wd_column.
lr_column = l_value->if_salv_wd_column_settings~get_column( 'CNOID' ).
lr_column->if_salv_wd_column_hierarchy~set_hierarchy_column( abap_true ).
lr_column = l_value->if_salv_wd_column_settings~get_column( 'STOID' ).
lr_column->if_salv_wd_column_hierarchy~set_hierarchy_column( abap_true ).
l_value->if_salv_wd_table_hierarchy~set_last_hier_column_as_leaf( abap_true ). -
hi guys
i want know when we are going to us hieratical alv and blocked alv...can any one tell me the differences between those....
i need some useful data abt those topics in interview point of view..if any one have
plz send to my mail id [email protected]
thex
suneel erkPlease don't post the same question is all of the ABAP forums, we will see it regardless of where it is at.
Check the following links. Heirarchy lists is a 2 level list where you have header records and detail records directly under the header records, you can collaspe and expand to see the detail. The block list is actually multiple ALV lists in the same report which can have different structures(columns), they are not all the same list, just different ones right after another.
http://www.sap-img.com/abap/how-to-use-alv-for-hierarchical-lists.htm
http://www.sap-basis-abap.com/abap/sample-program-on-block-lists.htm
Regards,
Rich Heilman -
About ALV o/p to PDF Conversion
Hi
Thanks for giving fast response.But Allready I am getting ALV o/p.After that only I want.I am using line-size 300 characters in my report. Then that o/p how to convert PDF file.Please send me the solution.
Regards
HariHi,
You can use FM: CONVERT_OTFSPOOLJOB_2_PDF. For more details check the following link:
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
For sample code , refer below link :
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/business_packages/a1-8-4/abap-code-samples/sap%20pdf%20viewer.pdf
Or
check below program :
SAP_PDF_VIEWER_DEMO
Please check this blog also,
/people/community.user/blog/2006/11/08/calling-smartforms-dynamically-using-dynamic-function-parameters
Dont forget to Provide Reward points.... -
Hi experts,
this is kalyan.
im new to this topic i.e,ALV.
according to my document i want the fields names of the fields with respect to their table names
the document is as below:
Invoice creation date
Invoice Type
Material
Customer
Name
Sales Order
Approved by
Product
Qty
COGS
Selling Price
Sales order
Invoice
i hope that the experts could help me.
regards,
kalyan.goto se80
|
click on repository information system
|
expand ABAP Dictionary
|
expand fields
|
double click on table fields
on the right side of the screen enter the description of the field and press execute to find the tables where the field is present. once you get into one table you can know the others by clicking on the where used list.
<b>Thats the way to search any fields!</b>
regards,
srinivas
<b>*reward for useful answers*</b> -
hi, all
I want download data to excel from alv in webdynpro application, but the date
field is "########" in excel.
Can you help me?
Thank you very much!Hello!
Go to your excel sheet (where ####### is displayed), find that column, go to the top of teh sheet where column names (A,B,C etc) are there and Just double click on the column line right next to your column.
E.g., If your date is displayed in column 'B' (second column), then double click on the line in between columns B and C.
Hope this works for you.
Regards,
Neha -
hi,
i am haveing one alv list output in this list output
i have 3 users , first user can see the two colums and second user can see 3 coloums and 3rd user can see 4 coloums,
could u plz explain the code with commentswhile populating field catalog itself......u put a check :
case sy-uname.
when 'USER1'.
*---populate fieldcatalog 1 with only required fields to be dsipalyed to this particular user
when 'USER2'.
*--Field catalog2
when others.
*--general fieldcatalog for all users....
endcase.
Hope this helps.
Regards
Vasu -
Questions about ALV object model
Hi,
for a new report i´m planing to use the "new" ALV object model to create the ALV list. Now I´ve got two questions concerning this topic:
- is it possible to switch the ALV into the edit mode like it´s possible if the "old" CL_GUI_ALV_GRID class
is used?
- how I can encolor specific cells?
I couldn´t find any hints or demo programms for these questions
Regards,
Andyit is not possible to Edit the ALV using Object Model.
For coloring...check this code.
DATA: alv TYPE REF TO cl_salv_table.
TYPES: BEGIN OF ty_tab,
carrid TYPE sflight-carrid,
connid TYPE sflight-connid,
color TYPE lvc_t_scol,
END OF ty_tab.
DATA: wt_color TYPE lvc_t_scol,
wa_color TYPE lvc_s_scol,
w_color TYPE lvc_s_colo.
DATA: wa_flight TYPE ty_tab.
DATA: column_tab TYPE REF TO cl_salv_columns_table,
column TYPE REF TO cl_salv_column_table.
DATA: column_ref TYPE salv_t_column_ref,
wa LIKE LINE OF column_ref.
DATA: it_flight TYPE STANDARD TABLE OF ty_tab.
SELECT carrid connid FROM sflight
INTO CORRESPONDING FIELDS OF TABLE it_flight
UP TO 10 ROWS.
w_color-col = 4.
w_color-int = 0.
w_color-inv = 0.
LOOP AT it_flight INTO wa_flight.
w_color-col = 4.
wa_color-fname = 'CARRID'.
wa_color-color = w_color.
APPEND wa_color TO wt_color.
w_color-col = 6.
wa_color-fname = 'CONNID'.
wa_color-color = w_color.
APPEND wa_color TO wt_color.
wa_flight-color = wt_color.
MODIFY it_flight FROM wa_flight.
ENDLOOP.
cl_salv_table=>factory(
IMPORTING
r_salv_table = alv
CHANGING
t_table = it_flight
"get all the columns
column_tab = alv->get_columns( ).
column_tab->set_color_column( value = 'COLOR' ).
column_ref = column_tab->get( ).
"loop each column
LOOP AT column_ref INTO wa.
"Conditionally set the column type as key or non key
IF wa-columnname = 'CARRID'.
column ?= wa-r_column.
column->set_key( abap_true ).
ENDIF.
ENDLOOP.
alv->display( ). -
About ALV in Web dynpro for Java
hi everybody:
Web dynpro for Java didn't support ALV, i don't know whether it have some UI or other like ALV
if it have ,please tell me,
thank you verymuch!
Best Regards _HI guys:
I have a problem. I want to delete a data form table,ues RFC fuction
(ex: Bapi_Delete_Travel_Expense_Input)
the model need three mandatory parameter ,"number","tripnumber","framedata".
my code:
deleteNode.bind(deleteElement);
deleteElement.setnumber("28002");
deleteElement.setTripnumber("100041");
but the "framedata" is a structure ,is node ,not a attribute.
I don't know how to write the code. Please give me some suggest
Best Regard
Yan -
Hi,
I need to add a custom button to the alv grid menu and i couldnt able to see the screen when i execute this program. Will u please tell me how to add a new button to the existing application toolbar of the ALV grid. I had tried this code but couldnt succeeded.
Here is my code.
REPORT ZZZZ .
*& Report ZZZZ
type-pools: slis.
Data to be displayed
data: gt_wrkpool type table of zte_wrkpool.
data: gs_wrkpool type zte_wrkpool.
data: gs_layout type slis_layout_alv.
DATA:G_REPID TYPE SY-REPID.
Selection
select * from zte_wrkpool into corresponding fields of table gt_wrkpool.
Eingabebereit
gs_layout-edit = 'X'.
G_REPID = SY-REPID.
Call ABAP List Viewer (ALV)
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
I_CALLBACK_PROGRAM = g_repid
I_CALLBACK_USER_COMMAND = 'ACTION'
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
i_structure_name = 'zte_wrkpool'
is_layout = gs_layout
IT_SORT = SORT[]
IT_EVENTS = events[]
tables
t_outtab = gt_wrkpool.
FORM pf_status_set USING gt_extab TYPE slis_t_extab.
SET PF-STATUS <ZSTANDARD>.
ENDFORM.
Create another subroutine:
*& Form user_command
Takes the User command and acts accordingly
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
call function 'sAP_WI_FORWARD'
endform.Hi vicky,
1. The important things are :
a) New PF-STATUS is required , say 'ABCD'.
b) Handle user_commmand
2. First of all, from Function group SALV,
copy the STANDARD gui status to your program,
from SE80, by right clicking.
3. come to your program.
start-of-selection.
SET PF-STATUS 'ABCD'.
4. Double click ABCD and activate the gui status.
6. AT USER-COMMAND.
IF sy-ucomm = 'MYFCODE'.
ENDIF.
regards,
amit m.
Maybe you are looking for
-
Creation of inbound delivery without reference to a PO
Dear gurus, Let's say that a normal inbound flow is something like this: PO > Create inbound delivery with reference to PO > inbound shipment > Transfer Order > Confirm Transfer Order > Post Goods Receipt > Putaway Issue: My client does not want to c
-
Urgent Please help me... How to access BAPIs from abstract portal component
I am developing an application in Abstract Portal Component (in PDK). In that application I can able to acess BAPIs from my Componets using the code like inputPopSearchBapi = new Zad_Bapi_Pop_Search_Form_Input(); outputPopSearchBapi = new Zad_Bapi_Po
-
I can not to open a prior project in 10.0.4 version
I was working with a project en the prior version of FCPX, I mean 10.0.3 version, after the upgrade, the project doesn't open, the program tell me: Help!!!!!! I know it works with the prior version, because I was working 10 min before of the upgrade
-
Is there anyway to post the HD video to my iWeb website via mobileme? I'll be traveling a lot next year and want to post videos for friends and family to be able to see without having to connect to my computer and wifi
-
How to minimize the use of memory ?
I have problems with a memory leak in my JSP file. I'm not sure, of course,it is in there, it could also be something in Internet explorer (5.5). If I let the explorer open for 12 hours IEXPLORER.EXE is using almost 150 MB of my memory. I need to ref