FF7A: Drill down layout
Hello,
when I look at my structure report in FF7A, I can drilldown till I see the customer/vendor invoices, in the layout is also the field NAME1 containing the name of the relevant customer/supplier.
when I do the same drilldown for the outstanding purchase/sales orders, the field is lacking. How can I modify this?
kind reg
s
Hi,
I hope your problem may solved by this time. Still if its open please check follwoing:
System displays the line items based on default line item layouts defined in AR/AP. Same way please include the required fields in FI customization to get all deails while drilling down FF7A for Purchase/Sale orders
Regards
Prasad AV
Similar Messages
-
Query Drill Down without affecting the structure layout
Hi All,
We have a query which has structure both in Rows & Columns . When we drilldown ( WAD ) the drilldown characteristics goes within the structure . What i want is even we drilldown the sturcture layout shoud not chnage .
For example the structure is as below
2007 2008
Revenue 100 200
Cost 50 100
Margin 50 100
say we drill down by material , then i want the layout to be like this
Material 0001 2007 2008
Revenue 50 100
Cost 25 50
Margin 25 50
Material 0002
Revenue 50 100
Cost 25 50
Margin 25 50
currently we are getting
2007 2008
Revenue
Material 001 50 100
Material 002 50 100
Cost
Material 001 25 50
Material 002 25 50
Margin
Material 001 25 50
Material 002 25 50
We are currently in BW 3.5 version . Is there any settings in WAD or anywhere , by which the drilldown should not affect the structure layout. ( Please note i dont want to fix the drilldown in query or swap axis during navigation to get the desired result ).
Kind Regards
SudipHi,
For the example shown by you, does not require 2 structure, You can doing it using One structure.
Consider the following in Rows and Columns:
Rows:
1. Material or other cahar and material in Free char.
Columns:
1. Fiscal Year
2. Structure comprising the KFs Revenue, cost and Margin.
Try this it should solve.
Regards,
Vishwa. -
Layout problem for Drill down ALV Report
Hello Everyone,
I have developed a ALV drill down report using the method G_GRID->SET_TABLE_FOR_FIRST_DISPLAY. The problem is what ever layout i save for the primary list 'Screen 100' is effecting my secondary list 'Screen 200'. User need to save both Screen 100 and Screen 200 layouts independently without affecting each other.
I am calling screen 100 as below,
Call metthod g_grid_100->set_table_for_first_display
Exporting
i_Save = 'A'
is_layout = ls_layout
is_Variant = ls_Variant
Changing
it_outtab = ct_poitems
it_fieldcatalog = lt_fieldcat
Exceptions
Invalid_parameter_combimation = 1
Program_error = 2
too_many_lines = 3
others = 4.
Could any body suggest me a way to do this..
Thanks in advance.
Regards,
Shyam.Hi,
Use multiple Layout structure (each alv have its own structure) .
Note the use of disvariant-log_group .
DATA: gs_disvariant_1 TYPE disvariant ,
gs_disvariant_2 TYPE disvariant .
* Layout-Logical groups
CONSTANTS: gc_log_group_1 TYPE disvariant-log_group VALUE 'ALV1' ,
gc_log_group_2 TYPE disvariant-log_group VALUE 'ALV2' .
INITIALIZATION.
PERFORM at_initialization .
FORM at_initialization .
DATA: vari TYPE disvariant-variant .
PERFORM alv_variant_get_default USING gc_log_group_1 CHANGING gs_disvariant_1 vari .
PERFORM alv_variant_get_default USING gc_log_group_2 CHANGING gs_disvariant_2 vari .
ENDFORM.
FORM alv_variant_get_default
USING
log_group TYPE disvariant-log_group
CHANGING
disvariant TYPE disvariant
variant TYPE slis_vari .
DATA: ls_disvariant TYPE disvariant.
ls_disvariant-report = sy-repid .
ls_disvariant-log_group = log_group .
disvariant = ls_disvariant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = ls_disvariant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
disvariant = ls_disvariant.
variant = ls_disvariant-variant .
ENDIF.
ENDFORM. "alv_variant_get_default
Later....
CALL METHOD gui_alv_grid_1->set_table_for_first_display
EXPORTING
is_layout = wa_layout
is_print = wa_print
i_save = 'A'
is_variant = gs_disvariant_1
CHANGING
it_sort = it_sort
it_fieldcatalog = it_fieldcatalog
it_outtab = it_alv_grid_1.
CALL METHOD gui_alv_grid_2->set_table_for_first_display
EXPORTING
is_layout = wa_layout
is_print = wa_print
i_save = 'A'
is_variant = gs_disvariant_2
CHANGING
it_sort = it_sort
it_fieldcatalog = it_fieldcatalog
it_outtab = it_alv_grid_2.
Regards. -
Use different Layouts for Summary and Details in Drill down report
Hi All,
I have a 2 level drill down report in ALV.
The summary report has certain fields and the Detail report has different fields. Now my problem is that when i use a default layout (with all fields of summary report) for the summary report, and drill down to the detail report i'm missing the fields on detail that are not in Summary. And if i save the default layout as default (with all fields of Detail) and go back to sumary, I'm missing the some other fields on summary (which are not on detail report).
Is there a way to make different default layouts for each of those summary and detail reports:
Also as the layouts are choosen by the user, i cannot hardcode any particular layout;
So if the user chooses a layout for detail; it has to stay the same layout for the detail report if he goes to summary and then back to detail; unless the user changes the layout again.
I'm using two different Layout types for each report. but i still cannot get the desired effect.
Data:
gt_layout_s type slis_layout_alv,
gt_layout_d type slis_layout_alv,
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
is_layout = <b>gt_layout_s</b>
i_callback_top_of_page = g_top_of_page
i_callback_user_command = g_user_command
i_callback_pf_status_set = g_status
i_save = g_save
is_variant = gs_variant
it_fieldcat = gt_fieldcat[]
it_events = gt_events[]
importing
es_exit_caused_by_user = gs_exit_caused_by_user
tables
t_outtab = it_summary.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
is_layout = <b>gt_layout_d</b>
i_callback_top_of_page = g_top_of_page
i_callback_user_command = g_user_command
i_callback_pf_status_set = g_status
i_save = g_save
is_variant = gs_variant
it_fieldcat = gt_fieldcat[]
it_events = gt_events[]
importing
es_exit_caused_by_user = gs_exit_caused_by_user
tables
t_outtab = it_detail_disp.Here is how you differentiate between the layout of two different grids. There is the parameter, IS_VARIANT in the function. You usually leave it empty or pass only the report name and username. <b>What you need to do is to pass unique string for each grids to the HANDLE field of the parameter IS_VARIANT.</b> You can probably hard code it as HEADER and DETAILS in your case. Once that is done, system identified that these two different layout for different grids.
Regards,
Ravi
Note : Please mark all the helpful answers<u></u> -
Alv : drill down not working.
Hi All,
Could you please tell me whats wrong with this code ? its not drilling down to show 'ebeln' with me22n. Am I missing something ?
Please help.
Hrishi
code is :-
REPORT Z_VENDOR_BACKORDER_REPORT_ALV .
TABLES: EKKO, LFA1, MAKT, EKET, EKPO, AFPO, MARC.
*Data Declaration
DATA: BEGIN OF ITAB OCCURS 0 ,
ebeln LIKE ekko-ebeln , " PO number
aedat LIKE ekko-aedat , " creation date
ebelp LIKE ekpo-ebelp , " item no
lifnr LIKE ekko-lifnr , " vendor number
name1 LIKE lfa1-name1 , " vendor name
RESWK LIKE EKKO-RESWK , " PLANT NO
MEMORY LIKE EKKO-MEMORY , " ORDER INCOMPLETE
matnr LIKE ekpo-matnr , " material number
werks like ekpo-werks , " plant
txz01 LIKE ekpo-txz01 , " material description
eindt LIKE eket-eindt , " Promised date
menge LIKE eket-menge , " quantity
wemng LIKE eket-wemng , " delivered quantity
netpr like ekpo-netpr , " value in AUD
peinh like ekpo-peinh , " price unit
banfn like ekpo-banfn , " PR no
aufnr like ebkn-aufnr , " Production order no
MAABC LIKE MARC-MAABC , " MATERIAL ABC Indicator
maktx like makt-maktx , " material long description
open_quant type p decimals 2, " quantity - delivered
VALUE TYPE p decimals 2, " $ VALUE * OPEN QUANTITY
end of ITAB.
data: wa like itab.
DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
DATA: TEMP TYPE EKKO-LIFNR.
data: opt like CTU_PARAMS.
*DATA: WA TYPE FINAL.
all ALV declarations
type-pools: slis. "ALV Declarations
DATA: fieldcatalog TYPE slis_t_fieldcat_alv with header line,
G_REPID TYPE SY-REPID,
GS_PRINT TYPE SLIS_PRINT_ALV,
GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
GT_EVENTS TYPE SLIS_T_EVENT,
GT_SORT TYPE SLIS_T_SORTINFO_ALV,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
COL_POS TYPE I.
-----------------SELECTION SCREEN----------------------
selection-screen begin of block b1 with frame title text-001.
select-options VENDORNO for ekko-lifnr.
select-options MATERIAL for ekpo-matnr.
SELECT-OPTIONS PLANT FOR EKKO-RESWK.
select-options REQDAT for eket-eindt.
selection-screen end of block b1.
*................... GET DATA..................
START-OF-SELECTION.
PERFORM GATHER_DATA.
END-OF-SELECTION.
FORM USER_COMMAND USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&IC1'.
CASE rs_selfield-sel_tab_field.
WHEN 'ITAB-EBELN'.
CHECK NOT rs_selfield-value IS INITIAL.
SET PARAMETER ID 'BUS' FIELD rs_selfield-value.
CALL TRANSACTION 'ME22N' AND SKIP FIRST SCREEN.
Do something at 'Sales document type' field selection
when 'ITAB-MATNR'.
SET PARAMETER ID 'BUS' FIELD rs_selfield-value.
CALL TRANSACTION 'MD04' AND SKIP FIRST SCREEN.
ENDCASE.
ENDCASE.
ENDFORM.
form gather_data.
SELECT EKKO~EBELN
EKKO~AEDAT
EKKO~LIFNR
EKKO~MEMORY
EKKO~RESWK
EKPO~EBELP
EKPO~MATNR
ekpo~werks
ekpo~netpr
ekpo~peinh
ekpo~banfn
ekpo~txz01
makt~maktx
EKET~EINDT
EKET~MENGE
EKET~WEMNG
LFA1~NAME1
INTO corresponding fields of ITAB
FROM (
EKKO inner JOIN EKPO
ON EKKOEBELN = EKPOEBELN
inner JOIN EKET
ON EKPOEBELN = EKETEBELN
AND EKPOEBELP = EKETEBELP
inner JOIN LFA1
ON EKKOLIFNR = LFA1LIFNR
*left outer join makt
*on ekpomatnr = maktmatnr
WHERE EKKO~LIFNR IN VENDORNO
AND EKKO~RESWK IN PLANT
and EKPO~MATNR IN MATERIAL
and ekpo~elikz eq ' '
and ekpo~loekz ne 'L'
and eket~eindt in REQDAT.
append itab.
CLEAR ITAB.
endselect.
clear temp.
sort itab by lifnr.
loop at itab .
ITAB-OPEN_QUANT = ITAB-MENGE - ITAB-WEMNG.
if itab-matnr eq ''.
select single aufnr from ebkn into itab-aufnr where banfn = itab-banfn.
select single matnr from afpo into itab-matnr where aufnr = itab-aufnr.
endif.
select single maktx from makt into itab-maktx where matnr = itab-matnr.
select single maabc from MARC INTO ITAB-MAABC WHERE MATNR = ITAB-MATNR.
ITAB-VALUE = ITAB-NETPR * ITAB-OPEN_QUANT / itab-peinh.
modify itab.
endloop.
SKIP.
fieldcatalog-tabname = 'ITAB'.
fieldcatalog-fieldname = 'LIFNR'.
fieldcatalog-seltext_m = 'vendor no'.
fieldcatalog-col_pos = 1.
fieldcatalog-outputlen = 15.
fieldcatalog-inttype = 'C'.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-tabname = 'ITAB'.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'po Number'.
fieldcatalog-col_pos = 2.
fieldcatalog-inttype = 'C'.
fieldcatalog-emphasize = 'C401'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-tabname = 'ITAB'.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'po date'.
fieldcatalog-col_pos = 3.
fieldcatalog-inttype = 'C'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-tabname = 'ITAB'.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'item number'.
fieldcatalog-col_pos = 4.
fieldcatalog-inttype = 'C'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-tabname = 'ITAB'.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-no_zero = 'X'.
fieldcatalog-seltext_m = 'material number'.
fieldcatalog-col_pos = 5.
fieldcatalog-inttype = 'C'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-tabname = 'ITAB'.
fieldcatalog-fieldname = 'MAABC'.
fieldcatalog-seltext_m = 'material type'.
fieldcatalog-col_pos = 6.
fieldcatalog-inttype = 'C'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-tabname = 'ITAB'.
fieldcatalog-fieldname = 'TXZ01'.
fieldcatalog-seltext_m = 'short text'.
fieldcatalog-col_pos = 7.
fieldcatalog-inttype = 'C'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-tabname = 'ITAB'.
fieldcatalog-fieldname = 'MAKTX'.
fieldcatalog-seltext_m = 'long text'.
fieldcatalog-col_pos = 8.
fieldcatalog-inttype = 'C'.
fieldcatalog-outputlen = 15.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-tabname = 'ITAB'.
fieldcatalog-fieldname = 'EINDT'.
fieldcatalog-seltext_m = 'date promised'.
fieldcatalog-col_pos = 9.
fieldcatalog-inttype = 'C'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-tabname = 'ITAB'.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'Quantity'.
fieldcatalog-col_pos = 10.
fieldcatalog-inttype = 'C'.
fieldcatalog-outputlen = 15.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-tabname = 'ITAB'.
fieldcatalog-fieldname = 'WEMNG'.
fieldcatalog-seltext_m = 'Delivered'.
fieldcatalog-col_pos = 11.
fieldcatalog-inttype = 'C'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-tabname = 'ITAB'.
fieldcatalog-fieldname = 'OPEN_QUANT'.
fieldcatalog-seltext_m = 'Open quantity'.
fieldcatalog-col_pos = 12.
fieldcatalog-inttype = 'C'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-tabname = 'ITAB'.
fieldcatalog-fieldname = 'VALUE'.
fieldcatalog-seltext_m = '$ value'.
fieldcatalog-col_pos = 13.
fieldcatalog-inttype = 'C'.
fieldcatalog-do_sum = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
it_fieldcat = fieldcatalog[]
is_layout = GS_layout
IT_SORT = gt_sort
I_DEFAULT = 'X'
I_SAVE = 'X'
is_variant = z_template
tables
t_outtab = ITAB
exceptions
program_error = 1
others = 2.
endform.hi,
please run the code below.
REPORT yfi7g_ing_mic_001 .
*PROGRAM YFI7G_ING_MIC_001.
TABLES: vbak .
TABLES: mara .
TYPES: BEGIN OF tp_vbak ,
vbeln TYPE vbak-vbeln,
erdat TYPE vbak-erdat,
erzet TYPE vbak-erzet,
ernam TYPE vbak-ernam,
vbtyp TYPE vbak-vbtyp,
trvog TYPE vbak-trvog,
auart TYPE vbak-auart,
lifsk TYPE vbak-lifsk,
faksk TYPE vbak-faksk,
waerk TYPE vbak-waerk,
vkorg TYPE vbak-vkorg,
kunnr TYPE vbak-kunnr,
vgbel TYPE vbak-vgbel,
vgtyp TYPE vbak-vgtyp,
END OF tp_vbak .
TYPES: BEGIN OF tp_mara ,
matnr TYPE mara-matnr,
END OF tp_mara .
TYPES: BEGIN OF tp_alv1_data.
INCLUDE TYPE tp_vbak .
TYPES: END OF tp_alv1_data.
TYPES: BEGIN OF tp_alv2_data.
INCLUDE TYPE tp_mara .
TYPES: END OF tp_alv2_data.
TYPE-POOLS: slis.
DATA: gt_vbak TYPE STANDARD TABLE OF tp_vbak WITH HEADER LINE.
DATA: gt_mara TYPE STANDARD TABLE OF tp_mara WITH HEADER LINE.
DATA: gs_variant LIKE disvariant.
DATA: gt_alv1_data TYPE STANDARD TABLE OF tp_alv1_data WITH HEADER LINE.
DATA: gt_alv2_data TYPE STANDARD TABLE OF tp_alv2_data WITH HEADER LINE.
SELECTION-SCREEN *
BLOCK b0 *
SELECTION-SCREEN BEGIN OF BLOCK b0 WITH FRAME.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln. "<field not defined?>
PARAMETERS: p_matnr LIKE mara-matnr. "<field not defined?>
SELECTION-SCREEN END OF BLOCK b0.
BLOCK bvar *
SELECTION-SCREEN BEGIN OF BLOCK bvar WITH FRAME.
PARAMETERS: p_vari LIKE disvariant-variant.
SELECTION-SCREEN END OF BLOCK bvar.
BLOCK bbox *
SELECTION-SCREEN BEGIN OF BLOCK bbox WITH FRAME.
PARAMETERS: p_box_up RADIOBUTTON GROUP b1,
p_box_do RADIOBUTTON GROUP b1 DEFAULT 'X',
p_box_no RADIOBUTTON GROUP b1.
SELECTION-SCREEN END OF BLOCK bbox.
AT SELECTION-SCREEN ON P_VARI *
AT SELECTION-SCREEN ON p_vari.
PERFORM alv_variant_existence USING p_vari
CHANGING gs_variant.
AT SELECTION-SCREEN ON VALUE REQUEST FOR P_VARI *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM alv_variant_f4 CHANGING p_vari
gs_variant.
INITIALIZATION *
INITIALIZATION.
START-OF-SELECTION *
START-OF-SELECTION.
PERFORM authority_check.
PERFORM get_control_data.
PERFORM get_transaction_data.
PERFORM process_transaction_data.
END-OF-SELECTION *
END-OF-SELECTION.
PERFORM output_data.
F O R M S *
FORM AUTHORITY_CHECK *
Perform authority checks for the report *
FORM authority_check.
!!! Note: authorisation checks are application-dependent.
!!! Some common cases are listed below - please select one of them
!!! or add new authorisation checks.
!!! If the report is creating batch input session or using LDB
!!! it may be sufficient to use automatic SAP auth.checks.
Authorisation for displaying documents in a single company code
authority-check object 'F_BKPF_BUK'
id 'BUKRS' field p_bukrs
id 'ACTVT' field '03'.
if sy-subrc <> 0.
message e001(z9) with 'No authorisation to display documents'
'in company code' p_bukrs.
endif.
Displaying documents from a list of company codes (select-options)
call function 'Y_BUKRS_AUTHORITY_CHECK'
EXPORTING
ACTVT = '03'
NOMESSAGE = ' '
tables
s_bukrs = s_bukrs.
ENDFORM. " AUTHORITY_CHECK
FORM GET_CONTROL_DATA *
Read configuration etc. *
FORM get_control_data.
ENDFORM. " GET_CONTROL_DATA
FORM GET_TRANSACTION_DATA *
Read documents etc. *
FORM get_transaction_data.
!!! Data selection statement below has been generated automatically.
!!! Please check if it is correct and complete.
!!! Use table joins or 'SELECT FOR ALL ENTRIES' when selecting data
!!! from related tables.
SELECT
vbeln
erdat
erzet
ernam
FROM vbak
INTO CORRESPONDING FIELDS OF TABLE gt_vbak
CHECK NOT gt_vbak[] IS INITIAL.
SELECT
matnr
FROM mara
INTO CORRESPONDING FIELDS OF TABLE gt_mara
FOR ALL ENTRIES IN gt_vbak
WHERE ernam = gt_vbak-ernam
ENDFORM. " GET_TRANSACTION_DATA
FORM PROCESS_TRANSACTION_DATA *
FORM process_transaction_data.
LOOP AT gt_vbak .
MOVE-CORRESPONDING gt_vbak TO gt_alv1_data .
APPEND gt_alv1_data .
ENDLOOP.
FREE gt_vbak .
LOOP AT gt_mara .
MOVE-CORRESPONDING gt_mara TO gt_alv2_data .
APPEND gt_alv2_data .
ENDLOOP.
FREE gt_mara .
ENDFORM. " PROCESS_TRANSACTION_DATA
FORM OUTPUT_DATA *
FORM output_data.
PERFORM alv_list_display.
ENDFORM. " OUTPUT_DATA
FORM DISPLAY_RECORD *
Display object associated with the current ALV line *
FORM display_record USING is_selfield TYPE slis_selfield.
READ TABLE gt_alv1_data INDEX is_selfield-tabindex.
CHECK sy-subrc = 0.
!!! SAMPLE IMPLEMENTATION FOR DISPLAYING FI DOCUMENTS:
SET PARAMETER ID 'BUK' FIELD gt_alv1_data-vbeln.
set parameter id 'BLN' field gt_alv1_data-belnr.
set parameter id 'GJR' field gt_alv1_data-gjahr.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
ENDFORM. " DISPLAY_RECORD
FORM ALV_LIST_DISPLAY *
Invoke main ALV function to format and show the report *
FORM alv_list_display.
DATA: ls_layout TYPE slis_layout_alv,
ls_print TYPE slis_print_alv,
ls_keyinfo TYPE slis_keyinfo_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv,
lt_exctab TYPE slis_t_extab,
lt_sorttab TYPE slis_t_sortinfo_alv,
lt_events TYPE slis_t_event.
PERFORM alv_init_report_events TABLES lt_events.
PERFORM alv_init_report_layout TABLES lt_fieldcat
lt_exctab
lt_sorttab
CHANGING ls_layout
ls_print
ls_keyinfo.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
i_interface_check = ' '
i_callback_program = sy-cprog
is_layout = ls_layout
it_fieldcat = lt_fieldcat
it_excluding = lt_exctab
IT_SPECIAL_GROUPS =
it_sort = lt_sorttab
IT_FILTER =
IS_SEL_HIDE =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_DEFAULT = 'X'
i_save = 'A'
is_variant = gs_variant
it_events = lt_events
IT_EVENT_EXIT =
i_tabname_header = 'GT_ALV1_DATA'
i_tabname_item = 'GT_ALV2_DATA'
I_STRUCTURE_NAME_HEADER =
I_STRUCTURE_NAME_ITEM =
is_keyinfo = ls_keyinfo
is_print = ls_print
IS_REPREP_ID =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab_header = gt_alv1_data
t_outtab_item = gt_alv2_data.
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
ENDFORM. " ALV_LIST_DISPLAY
FORM ALV_INIT_REPORT_LAYOUT *
Set up report layout definition for ALV_LIST_DISPLAY *
<-- OT_FIELDCAT list of fields *
<-- OT_EXCTAB excluded menu options *
<-- OT_SORTTAB sorting/grouping definition *
<-- OS_LAYOUT global report layout settings *
<-- OS_PRINT global report printout settings *
<-- OS_KEYINFO itab key fields (required only for hier.lists) *
FORM alv_init_report_layout TABLES ot_fieldcat TYPE slis_t_fieldcat_alv
ot_exctab TYPE slis_t_extab
ot_sorttab TYPE slis_t_sortinfo_alv
CHANGING cs_layout TYPE slis_layout_alv
cs_print TYPE slis_print_alv
cs_keyinfo TYPE slis_keyinfo_alv.
add menu items to be excluded to ot_exctab.
REFRESH ot_exctab.
REFRESH ot_fieldcat.
REFRESH ot_sorttab.
!!! List all ALV data fields for display here:
DD-struct = data dictionary structure name
DD-field = field of data dictionary structure
itab = internal table for output data
itab-field = internal table field name
key = set to 'X' if key field
sum = set to 'X' for totals
hid = set to 'X' if field is initially hidden
row = list row number (multi-line list if >1)
DD-struct DD-field itab itab-field key sum hid row
PERFORM alv_build_fieldcat TABLES ot_fieldcat USING:
'VBAK' 'VBELN' 'GT_ALV1_DATA' 'VBELN' ' ' ' ' ' ' 1 ,
'VBAK' 'ERDAT' 'GT_ALV1_DATA' 'ERDAT' ' ' ' ' ' ' 1 ,
'VBAK' 'ERZET' 'GT_ALV1_DATA' 'ERZET' ' ' ' ' ' ' 1 ,
'VBAK' 'ERNAM' 'GT_ALV1_DATA' 'ERNAM' ' ' ' ' ' ' 1.
PERFORM alv_build_fieldcat TABLES ot_fieldcat USING:
'MARA' 'MATNR' 'GT_ALV2_DATA' 'MATNR' ' ' ' ' ' ' 1 .
!!! List all ALV data fields for sorting/grouping here
itab = internal table for output data
itab-field = internal table field name
up = sort ascending
down = sort descending
grp = group by
comp = group initially compressed
pos = field position in sort sequence
itab field up down grp comp pos
PERFORM alv_build_sorttab TABLES ot_sorttab USING:
'GT_ALV1_DATA' 'VBELN' 'X' ' ' ' ' ' ' 1.
PERFORM alv_build_sorttab TABLES ot_sorttab USING:
'GT_ALV2_DATA' 'MATNR' 'X' ' ' ' ' ' ' 1.
!!! key definition - required only for hierarchical display (2 itabs)
cs_keyinfo-header01 = 'VBELN' .
cs_keyinfo-item01 = 'MATNR' .
!!! See the declaration of type SLIS_LAYOUT_ALV and set the fields
!!! of OS_LAYOUT record to change list-level attributes
os_layout-no_colhead = 'X'. " no headings
cs_layout-zebra = 'X'. " stripped pattern
os_layout-no_vline = 'X'. " columns separated by space
os_layout-totals_only = 'X'. " show only totals
os_layout-totals_text = 'Total'. " totals line label
os_layout-subtotals_text = 'Subtotal'. " subtotals line label
os_layout-subtotals_text = 'Subtotal'. " subtotals line label
os_layout-key_hotspot = 'X'. " keys as hotspot
os_layout-expand_all = 'X'. " Expand all positions
os_layout...
cs_print-no_print_selinfos = 'X'. " Skip selection statistics
cs_print-no_print_listinfos = 'X'. " Skip list statistics
os_print-...
ENDFORM. " INIT_REPORT_LAYOUT
FORM ALV_BUILD_FIELDCAT *
Format a single line for ALV_INIT_REPORT_LAYOUT *
FORM alv_build_fieldcat TABLES ot_fieldcat
USING iv_ref_tabname "ref to a table/field
iv_ref_fieldname
iv_tabname "actual table/field name
iv_fieldname
iv_key
iv_do_sum
iv_no_out
iv_row_pos.
status variables for auto-numbering of field column position
(column number reset when a new table or row begins)
STATICS: sv_last_tabname TYPE slis_tabname,
sv_last_row_pos TYPE i,
sv_current_col TYPE i.
IF sv_last_tabname <> iv_tabname OR sv_last_row_pos <> iv_row_pos.
sv_current_col = 1.
ELSE.
ADD 1 TO sv_current_col.
ENDIF.
sv_last_tabname = iv_tabname.
sv_last_row_pos = iv_row_pos.
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
DATA: lv_fieldname TYPE slis_fieldname.
lv_fieldname = iv_fieldname.
!!! List all the special formatting requirements in cases below
case lv_fieldname.
when 'WRBTR'. "<-- link with currency required
ls_fieldcat-cfieldname = 'WAERS'.
ls_fieldcat-ctabname = iv_tabname.
when 'HKONT'. "<-- change default column header
ls_fieldcat-seltext_s = 'GL Acc.'.
ls_fieldcat-ddictxt = 'S'. " (S)hort (M)iddle (L)ong
when 'SOME_NUMBER' "<-- change number formatting
ls_fieldcat-nosign = 'X'.
ls_fieldcat-nozero = 'X'.
ls_fieldcat-just = 'L'. " (L)eft (R)ight (C)enter
endcase.
ls_fieldcat-ref_tabname = iv_ref_tabname.
ls_fieldcat-ref_fieldname = iv_ref_fieldname.
ls_fieldcat-tabname = iv_tabname.
ls_fieldcat-fieldname = iv_fieldname.
ls_fieldcat-key = iv_key.
ls_fieldcat-do_sum = iv_do_sum.
ls_fieldcat-no_out = iv_no_out.
ls_fieldcat-row_pos = iv_row_pos.
ls_fieldcat-col_pos = sv_current_col.
APPEND ls_fieldcat TO ot_fieldcat.
ENDFORM. " ALV_BUILD_FIELDCAT
FORM ALV_BUILD_SORTTAB *
Set up sorting information for ALV_INIT_REPORT_LAYOUT *
FORM alv_build_sorttab TABLES ot_sorttab TYPE slis_t_sortinfo_alv
USING iv_tabname TYPE slis_fieldname
iv_fieldname TYPE slis_fieldname
iv_up TYPE c
iv_down TYPE c
iv_subtot TYPE c
iv_comp TYPE c
iv_spos TYPE n.
ot_sorttab-spos = iv_spos.
ot_sorttab-fieldname = iv_fieldname.
ot_sorttab-tabname = iv_tabname.
ot_sorttab-up = iv_up.
ot_sorttab-down = iv_down.
ot_sorttab-subtot = iv_subtot.
ot_sorttab-comp = iv_comp.
APPEND ot_sorttab.
ENDFORM. " ALV_BUILD_SORTTAB
FORM ALV_INIT_REPORT_EVENTS *
Set up program events for ALV_LIST_DISPLAY *
<-- OT_EVENTS list of events and associated report subroutines *
FORM alv_init_report_events TABLES ot_events TYPE slis_t_event.
CLEAR ot_events.
REFRESH ot_events.
ot_events-name = slis_ev_user_command.
ot_events-form = 'USER_COMMAND'.
APPEND ot_events.
ot_events-name = slis_ev_pf_status_set.
ot_events-form = ''. "'PF_STATUS_SET'.
APPEND ot_events.
ot_events-name = slis_ev_top_of_list.
ot_events-form = 'TOP_OF_LIST'.
APPEND ot_events.
ot_events-name = slis_ev_end_of_list.
ot_events-form = 'END_OF_LIST'.
APPEND ot_events.
ot_events-name = slis_ev_top_of_page.
ot_events-form = 'TOP_OF_PAGE'.
APPEND ot_events.
ot_events-name = slis_ev_end_of_page.
ot_events-form = 'END_OF_PAGE'.
APPEND ot_events.
ot_events-name = slis_ev_foreign_top_of_page.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_foreign_end_of_page.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_top_of_coverpage.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_end_of_coverpage.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_before_line_output.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_after_line_output.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_caller_exit_at_start.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_list_modify.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_subtotal_text.
ot_events-form = ''.
APPEND ot_events.
ENDFORM. " ALV_INIT_REPORT_EVENTS
FORM USER_COMMAND *
Subroutine attached as callback form to ABAP List Viewer *
--> UCOMM - user command code passed from ALV *
--> SELFIELD - information record describing current line/field *
FORM user_command USING value(iv_ucomm) LIKE sy-ucomm
is_selfield TYPE slis_selfield.
CASE iv_ucomm.
WHEN '&IC1'. "ALV record selection
PERFORM display_record USING is_selfield.
when ...
ENDCASE.
ENDFORM. " USER_COMMAND
FORM PF_STATUS_SET *
Subroutine attached as callback form to ABAP List Viewer, *
allows setting alternative menu. If necessary: *
1. Copy 'STANDARD' menu from SAPLKKBL and modify as required, *
2. Activate callback *
FORM pf_status_set USING it_exctab TYPE slis_t_extab.
set pf-status 'STANDARD' excluding it_exctab.
ENDFORM. " PF_STATUS_SET
FORM TOP_OF_LIST *
Subroutine attached as callback form to ABAP List Viewer, *
executed once at the start of list output. *
FORM top_of_list.
DATA: lt_seltab TYPE STANDARD TABLE OF rsparams WITH HEADER LINE.
DATA: lv_report LIKE sy-repid.
lv_report = sy-repid. "do not pass sy-repid to function!
IF p_box_up = 'X'. "display select options at report start
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = lv_report
TABLES
selection_table = lt_seltab.
remove 'technical' parameters with 'DELETE LT_SELTAB WHERE...'
before display, if necessary
CALL FUNCTION 'RS_LIST_SELECTION_TABLE'
EXPORTING
report = lv_report
seltext = 'X'
dyn_range =
newpage = ' '
screennr = 1000
TABLES
sel_tab = lt_seltab
EXCEPTIONS
sel_tab_empty = 1.
ENDIF. "p_box_up = 'X'
ENDFORM. " TOP_OF_LIST
FORM END_OF_LIST *
Subroutine attached as callback form to ABAP List Viewer *
executed once at the end of list output. *
FORM end_of_list.
DATA: lt_seltab TYPE STANDARD TABLE OF rsparams WITH HEADER LINE.
DATA: lv_report LIKE sy-repid.
lv_report = sy-repid. "do not pass sy-repid to function!
IF p_box_do = 'X'. "display select options at report end
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = lv_report
TABLES
selection_table = lt_seltab.
remove 'technical' parameters with 'DELETE LT_SELTAB WHERE...'
before display, if necessary
CALL FUNCTION 'RS_LIST_SELECTION_TABLE'
EXPORTING
report = lv_report
seltext = 'X'
dyn_range =
newpage = ' '
screennr = 1000
TABLES
sel_tab = lt_seltab
EXCEPTIONS
sel_tab_empty = 1.
ENDIF. "p_box_do = 'X'
ENDFORM. " END_OF_LIST
FORM TOP_OF_PAGE *
Subroutine attached as callback form to ABAP List Viewer *
FORM top_of_page.
standard Ingram Micro report page heading
DATA: lv_coco_pos TYPE i, "CurPos of 'Company confidential'
lv_title_pos TYPE i, "CurPos of report title
lv_title(70) TYPE c, "Truncated report title
lv_page_pos TYPE i, "CurPos of page number
lv_date_pos TYPE i, "CurPos of date and time
lv_page_no(10) TYPE c,
lv_date(25) TYPE c,
lv_time(20) TYPE c,
lv_page(10) TYPE c.
We may need to truncate title if the line size is < 81.
IF sy-linsz < 81.
lv_title = sy-title+0(50).
ELSE.
lv_title = sy-title.
ENDIF.
Decide on positioning of text depending on width of page
lv_title_pos = ( sy-linsz / 2 ) - ( STRLEN( lv_title ) / 2 ).
lv_coco_pos = sy-linsz - 20.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE: / 'Ingram Micro',
AT lv_title_pos lv_title,
AT lv_coco_pos 'Company Confidential'.
Setup data correctly in the correct format for the display fields.
lv_page = sy-pagno.
SHIFT lv_page LEFT DELETING LEADING ' '.
CONCATENATE sy-datum6(2) sy-datum4(2) sy-datum+0(4)
INTO lv_date SEPARATED BY '.'.
CONCATENATE sy-uzeit0(2) ':' sy-uzeit2(2) INTO lv_time.
CONCATENATE lv_date lv_time INTO lv_date SEPARATED BY ' '.
CONCATENATE 'Page' lv_page INTO lv_page_no SEPARATED BY ' '.
Decide on positioning of text depending on width of page.
lv_page_pos = sy-linsz - ( STRLEN( lv_page_no ) ).
WRITE: / lv_date,
AT lv_page_pos lv_page_no.
ULINE.
ENDFORM. " TOP_OF_PAGE
FORM END_OF_PAGE *
Subroutine attached as callback form to ABAP List Viewer *
FORM end_of_page.
ENDFORM. " END_OF_PAGE
Form ALV_VARIANT_EXISTENCE
Reads ALV variant definition
FORM alv_variant_existence USING iv_variant LIKE disvariant-variant
CHANGING os_variant LIKE disvariant.
CHECK NOT iv_variant IS INITIAL.
os_variant-report = sy-repid.
os_variant-variant = iv_variant.
IF iv_variant CP '/*'. "user-specific variants begin with slash
os_variant-username = sy-uname.
ENDIF.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = os_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE e001(z9) WITH 'Please select a valid display variant.'.
ENDIF.
ENDFORM. " ALV_VARIANT_EXISTENCE
FORM ALV_VARIANT_F4 *
Display list of layout variants on report selection screen *
FORM alv_variant_f4 CHANGING cv_varname LIKE disvariant-variant
cs_variant LIKE disvariant.
DATA: lv_exit(1) TYPE c.
cs_variant-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = cs_variant
i_save = 'A'
it_default_fieldcat =
IMPORTING
e_exit = lv_exit
es_variant = cs_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF lv_exit = space.
cv_varname = cs_variant-variant.
ENDIF.
ENDIF.
hope this will help.
see form user_command.
regards,
Ruchika -
S_ALR_87012168 drill down list change
hi,
could somebody tell me the way of changing the currency list in drill down list to get the open items of customers in two currencies in report S_ALR_87012168.
pls reply soon
thanx.
keshiHiya
Click on the Currency icon {Ctrl + Shift + F9} and select whatever currency you want it to be displayed on.
It gets converted. Then when you hit the green arrow back, it will sk you whether you want to save the data, if you click yes it gets saved.
Then everytime you execute this report, it will ask you, which layout you want to be displayed as the output - and you can select the one that you saved. And it aint user specfic either. The pop up Qs comes up for all users.
Rukshana -
Cash Management Report FF7B - drill-down from planning levels to AP/AR OIs
Hi
I'm configuring cash management and have created all planning levels and groups needed.
All master data, ie GL accounts, vendors and customers, have the correct planning level or group.
I've created all the groupings etc that I need.
I'm running the reports FF7A and FF7B. I have two questions and problems.
1. When running the Liquidity Forecsat for customers and vendors I drill-down to the standard PL or SL planning levels for AP and AR postings respectively. Then I drill into the planning groups correctly (E1-E9 and R1-R8). But when I try to drill into the cash management detail records (or is it the AP/AR line items?) I get "Memo Records: List - List Contains No Data". This happens every time. Should I now see the AP or AP line items? Or should I see some cash management memo records? I have deleted all the cash management data several times and recreated but I still get this problem (using reports RFFDDL00 and RFFDKU00)
When I do the same for purchase orders, purchase requisitions or sales orders I see a Memo Records List which agrees with the previous planning level total and I can then drill into the actiual POs, PRs or SOs from this list without an issue.
2. When running the Cash Position and I do the drill-down to the GL Line Items, I get an enormous list which does not just show the total of items at the previous planning level. Why is this please? Example: a bank account with a balance of £2,000 (shown on the panning level) but with 000's of line items totalling say £5m. Again I have deleted the CM data and recreated but without any improvement to the problem.
Any help anyone can give me with these issues will be very much appreciated.
Thanks.
WayneHi
I have the same trouble with Tcode FF7B. There´s a message "Memo Records: List - List Contains No Data"; bit in the TcodeFF7A, it runs OK. The message appears just witn Tcode FF7A.
Also, There´s all TR data in tables FDSB for GL accounts, FDSR and FDFIEP for customers/vendors.
Can you help me?? can you solved this issue?
Tanks for your Help -
How can i call one report from another report (Drill Down Approach)
Hi Friends,
I've two reports in completely different layout format.
One is in Crosstab & another is in Tabular.
Now i want to call my Tabular report(report 1) from my Crosstab (report 2) without using BO's default drill down feature. Or, you can show using BO's feature if it supports my requirement.
How to do that?
Is it at all possible?
Please share your thoughts. Thanks in advance for your time.
Regards.
Satyaki De.hi
you can use openDocument for this.
[http://help.sap.com/businessobject/product_guides/boexir31/en/xi3-1_url_reporting_opendocument_en.pdf]
I would suggest to use variables that build the HTML code for the hyperlinks dynamically, and display them in your crosstab. Set the display option for the related cells (ie. the cells where your variables are displayed in) so that the cell's contents as interpreted as HTML code.
Regards,
Stratos -
Error in Drilled down ALV Report.
Hi all
i am creating a single level drilled down report , in that in the first screen i am displaying the header detials , in the second level i am displaying the item detial of the particular line..
While processing the second level i am getting a dump like
A PERFORM was used to call the routine "USER_COMMAND" of the program
"SAPLSLVC_FULLSCREEN".
This routine contains exactly 1 formal parameters, but the current
call contains 2 actual parameters.
parameters.
here is my code :
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM.
CASE R_UCOMM.
WHEN '&IC1'.
PERFORM BUILD_CATALOG_EKPO.
PERFORM EVENT_EKPO.
PERFORM POPULATE_EVENT_EKPO.
PERFORM DATA_EKPO.
PERFORM BUILD_LIST.
PERFORM DISPLAY_EKPO.
ENDCASE.
ENDFORM.
*& Form BUILD_CATALOG_EKPO
text
--> p1 text
<-- p2 text
FORM BUILD_CATALOG_EKPO .
WA_FIELDCAT-TABNAME = 'ITAB_EKPO'.
WA_FIELDCAT-FIELDNAME = 'EBELN'.
WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'ITAB_EKPO'.
WA_FIELDCAT-FIELDNAME = 'EBELP'.
WA_FIELDCAT-SELTEXT_M = 'Item No.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'ITAB_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-SELTEXT_M = 'Material NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'ITAB_EKPO'.
WA_FIELDCAT-FIELDNAME = 'WERKS'.
WA_FIELDCAT-SELTEXT_M = 'PLANT.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'ITAB_EKPO'.
WA_FIELDCAT-FIELDNAME = 'LGORT'.
WA_FIELDCAT-SELTEXT_M = 'Storage Loc.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'ITAB_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MENGE'.
WA_FIELDCAT-SELTEXT_M = 'Quantity.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'ITAB_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MEINS'.
WA_FIELDCAT-SELTEXT_M = 'UNIT.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. " BUILD_CATALOG_EKPO
*& Form EVENT_EKPO
text
--> p1 text
<-- p2 text
FORM EVENT_EKPO .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = V_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 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. " EVENT_EKPO
*& Form POPULATE_EVENT_EKPO
text
--> p1 text
<-- p2 text
FORM POPULATE_EVENT_EKPO .
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'TOP_OF_PAGE'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME = WA_EVENT-FORM.
ENDIF.
ENDFORM. " POPULATE_EVENT_EKPO
FORM F_TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LISTHEADER
i_logo =
I_END_OF_LIST_GRID =
ENDFORM.
*& Form DATA_EKPO
text
--> p1 text
<-- p2 text
FORM DATA_EKPO .
DATA:RS_SELFIELD TYPE SLIS_SELFIELD.
READ TABLE ITAB_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
SELECT EBELN EBELP MATNR WERKS LGORT MENGE MEINS
FROM EKPO
INTO CORRESPONDING FIELDS OF TABLE ITAB_EKPO
WHERE EBELN = WA_EKKO-EBELN.
DATA :ID_ITEM_COLOR.
LOOP AT ITAB_EKPO INTO WA_EKPO.
ID_ITEM_COLOR = ID_ITEM_COLOR + 1.
IF ID_ITEM_COLOR = 8.
ID_ITEM_COLOR = 1.
ENDIF.
CONCATENATE 'C' ID_ITEM_COLOR '10' INTO WA_EKPO-LINE_COLOR_ITEM.
MODIFY ITAB_EKPO FROM WA_EKPO TRANSPORTING LINE_COLOR_ITEM.
ENDLOOP.
ENDFORM. " DATA_EKPO
*& Form DISPLAY_EKPO
text
--> p1 text
<-- p2 text
FORM DISPLAY_EKPO .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = V_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND '
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE = I_TITLE_EKPO
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = I_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = V_EVENTS
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
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = ITAB_EKPO
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_EKPO
*& Form BUILD_LIST
text
--> p1 text
<-- p2 text
FORM BUILD_LIST .
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
Set layout field for row attributes(i.e. color)
gd_layout-info_fieldname = ' LINE_COLOR_ITEM'.
ENDFORM. " BUILD_LIST
Arun JosephThe form USER_COMMAND should have 2 changing/actual parameters which is standard.
Ex:
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
ENDFORM. -
S_ALR_87012169 R3 FCC 6.0 drill down help (AR account balance)
Can anyone teach me how to display 87012169 Classic Drill Down Report? I need check the history data from Oct. 2010 to Feb. 2012 AR transactions. The Help > Application Help showed "No documentation available", I believe we did not install the help data.
I tried to use ALR_87012173 for Customer Open Items (the partical payment did not deduct from original invoice) or 87012177 (did not setup the layout yet).
Thanks,Hi PPIO: I used FBL5N but all partial payment did not deduct from original invoice if you short of 0.01 cent, that is why I am trying other reports from SAP. How you retrieve data and create your customized reports in R3? We will implement BW in April 2012 but do we need any report tool to create our own reports?
Our internal SAP administrator told me the FBL5N can NOT display correct balance due that is can not do task. I can not believe it, Can you teach me why we got incorrect balance due and what caused the problem? Tks. -
KSB1 - Incorrect line item selected on drill down
Dear Guru's
To set the scene we have been using KSB1 for a long time. Now something odd is occuring - but what appears to be quite randomly.
When we run a standard KSB1 report and drill down to line item detail we are getting the wrong (and completely unassociated) detail.
We have not seen this happen before and wondered what could be causing it.
We are running KSB1 using parameters for Cost Centre, Cost Element (range) and Posting Date (range)
We are also using a plain layout variant.
If anyone else has seen this before advice would be appreciated.
Regards
Steve
points will be assignedNitish,
We run KSB1 to show us how much has been spent by a certain cost centre during the financial period. We would then usually double click on a certain line that appears high or overspent to see the detailed transaction. In almost all circumstances you see the accounting document (eg: SA, KR etc)
But for some reason (and for a small percentage of items) when you double click you do not get shown the correct accounting document.
On these items when you double click to see more detail you get presented with an accounting document that does not match the original screen. In some instances you get an accounting document that is several years old and for a completely different GL account and cost centre -eg: bearing no relation to you original query.
It's almost like the link to the correct accounting document is broken?
I could screen dump what it happening but as a newbie I don't know if this is allowed or would work on here.
Regards.
Steve -
Dynamic filter with drill down in WAD
Hello Expert,
I am new in WAD and I have a requirement as below:
Data in Provider:
Mat1 Mat2 Plant qty
M1 M2 P1 10
M1 M2 P2 20
Report layout in Bex as below:
Row:
Mat1
Column:
Qty
Free char:
Mat2
Initially I open the WAD report, data should filter on Plant = P1
Output:
Mat1 qty
M1 10
Now If I right click on Mat1 (select filter value and drill on Mat2 level) data get filter on Plant = P2, it show as below
Mat2 qty
M2 20
How I can achieve in WAD.
Thanks in advance!!!
Regards,
AbhishekYou can restrict the value in variable screen with default value plant as "P1" and added the query to template. Now you can executed the query in portal you drill down through context ment filter -> filter on value then select the value to "P2" and add it then click "OK" it will show only P2 value. http://help.sap.com/saphelp_nw73/helpdata/en/44/33eb19e2173ec8e10000000a1553f6/content.htm https://help.sap.com/saphelp_nw73/helpdata/en/43/152fa54b315a38e10000000a422035/content.htm
-
ALV Reporting with drill down capabillities
I'm creating a abap custom report using the ALV. I want to drill down to CJ03 which is projects. I know how to do it in regular custom reporting, but I don't seem to be able to get it to work using the ALV. Can anyone help?
Thanks.
LindaHi Linda,
Take a look at this sample program. The logic to handle any interaction with the user is in my "PORCESS_USER_COMMANDS" routine.
This is defined in the "I_CALLBACK_USER_COMMAND" parameter in the ALV FM.
Hope this helps.
Cheers,
Pat.
[code]
Modification History
Date | Author | Chg Req # | Description
15.08.2001| Pat Yee | $TMP | Program Creation
This program is an example of how the ALV Display works.
It will display Customer Data.
This report will also show how to display an ALV report with different
colored lines and icons
REPORT zpat.
Include Programs
INCLUDE <icon>.
Database Tables
TABLES: kna1. "Customer Master
Types
TYPE-POOLS: kkblo.
Structures
Structure to hold the Color Information
DATA: BEGIN OF st_color,
color(3) TYPE c,
END OF st_color.
Structure to hold the Icon Information
DATA: BEGIN OF st_icon,
icon(4) TYPE c,
END OF st_icon.
ALV Field Catalog Structure
DATA: st_fieldcat TYPE slis_fieldcat_alv.
ALV Layout Structure
DATA: st_layout TYPE slis_layout_alv.
Internal Tables
Output Table
DATA: BEGIN OF tbl_kna1 OCCURS 0.
INCLUDE STRUCTURE st_icon. "Icon Structure
INCLUDE STRUCTURE kna1. "Customer Master Structure
INCLUDE STRUCTURE st_color. "Color Structure
DATA: END OF tbl_kna1.
ALV Field Catalog Table
DATA: tbl_fieldcat TYPE slis_t_fieldcat_alv.
Variables
DATA: fieldname(30) TYPE c,
g_repid LIKE sy-repid.
Start of Selection
START-OF-SELECTION.
g_repid = sy-repid.
PERFORM get_data.
End of Selection
END-OF-SELECTION.
PERFORM do_fancy_stuff.
PERFORM get_layout.
PERFORM get_fieldcat.
PERFORM create_report.
*& Form CREATE_REPORT
Learn to read the subroutine name!
FORM create_report.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_interface_check = ' '
i_callback_program = g_repid
i_callback_user_command = 'PROCESS_USER_COMMANDS'
it_fieldcat = tbl_fieldcat
i_default = 'X'
i_save = ' '
is_layout = st_layout
TABLES
t_outtab = tbl_kna1
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. " CREATE_REPORT
*& Form GET_FIELDCAT
Build the Field Catalog
FORM get_fieldcat.
Here the field catalog is created. To display more fields simply
'uncomment' the additional lines and add the field name. Also note
that the field catalog is much more powerful than this. You can
intensify fields, change the colour, assign reference fields, etc.
Look at type slis_fieldcat_alv for more options.
PERFORM write_fieldcat USING 'ICON' 'TBL_KNA1' ' ' 'X' 1 '2' 'X'
PERFORM write_fieldcat USING 'KUNNR' 'TBL_KNA1' 'KNA1' 'X' 2 ' ' ' '
PERFORM write_fieldcat USING 'NAME1' 'TBL_KNA1' 'KNA1' ' ' 3 '10' ' '
'X'.
PERFORM write_fieldcat USING 'STRAS' 'TBL_KNA1' 'KNA1' ' ' 4 ' ' ' '
PERFORM write_fieldcat USING 'TELF1' 'TBL_KNA1' 'KNA1' ' ' 5 ' ' ' '
PERFORM write_fieldcat USING 'ORT01' 'TBL_KNA1' 'KNA1' ' ' 6 ' ' ' '
PERFORM write_fieldcat USING 'PSTLZ' 'TBL_KNA1' 'KNA1' ' ' 7 ' ' ' '
PERFORM write_fieldcat USING 'SORTL' 'TBL_KNA1' 'KNA1' ' ' 8 ' ' ' '
PERFORM write_fieldcat USING 'ERNAM' 'TBL_KNA1' 'KNA1' ' ' 9 ' ' ' '
PERFORM write_fieldcat USING 'SPRAS' 'TBL_KNA1' 'KNA1' ' ' 10 ' ' ' '
perform write_fieldcat using ' ' 'TBL_KNA1' 'KNA1' ' ' 10 ' '.
perform write_fieldcat using ' ' 'TBL_KNA1' 'KNA1' ' ' 11 ' '.
perform write_fieldcat using ' ' 'TBL_KNA1' 'KNA1' ' ' 12 ' '.
ENDFORM. " GET_FIELDCAT
*& Form WRITE_FIELDCAT
Write the Field Catalog data to the Field Catalog Table
-->name Field name
-->tab Table name
-->st Structure Name
-->key Is this field a Key?
-->pos Position Number
-->length Field Length
-->icon Display as Icon
-->hot Hotspot
FORM write_fieldcat USING name tab st key pos length icon hot.
st_fieldcat-fieldname = name.
st_fieldcat-tabname = tab.
st_fieldcat-ref_tabname = st.
st_fieldcat-key = key.
st_fieldcat-col_pos = pos.
st_fieldcat-outputlen = length.
st_fieldcat-icon = icon.
st_fieldcat-hotspot = hot.
APPEND st_fieldcat TO tbl_fieldcat.
CLEAR st_fieldcat.
ENDFORM. " WRITE_FIELDCAT
*& Form PROCESS_USER_COMMANDS
Interactive Reporting Commands
FORM process_user_commands USING syst-ucomm LIKE syst-ucomm
selfield TYPE slis_selfield.
This subroutine is called when there is user interaction in the output
In this case if the user double clicks the Customer Number then the
program will call transaction XD03 and display the Customer Master
Data
CASE syst-ucomm.
WHEN '&IC1'.
get cursor field fieldname.
READ TABLE tbl_kna1 INDEX selfield-tabindex.
SET PARAMETER ID 'KUN' FIELD tbl_kna1-kunnr.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
ENDCASE.
ENDFORM. " PROCESS_USER_COMMANDS
*& Form GET_LAYOUT
set the layout of the ALV.
add color to the row?
FORM get_layout.
st_layout-info_fieldname = 'COLOR'.
st_layout-colwidth_optimize = 'X'.
st_layout-get_selinfos = 'X'.
ENDFORM. " GET_LAYOUT
*& Form get_data
Get some data to play with
FORM get_data.
SELECT * FROM kna1 INTO CORRESPONDING FIELDS OF TABLE tbl_kna1
UP TO 30 ROWS.
ENDFORM. " get_data
*& Form do_fancy_stuff
Do some fancy pants stuff for example changing the color of
lines and adding icons
FORM do_fancy_stuff.
Here we will demonstrate changing the color of ALV Record lines as
well as displaying Icons
LOOP AT tbl_kna1.
All records where NAME1 begins with 'M', will be displayed in Bluish
Green
IF tbl_kna1-name1(1) EQ 'M'.
tbl_kna1-color = 'C41'. "Bluish Green
MODIFY tbl_kna1 TRANSPORTING color.
ENDIF.
All records with no TELF1 will be displayed in White and have a
Warning Icon
IF tbl_kna1-telf1 IS INITIAL.
tbl_kna1-color = 'C00'. "White
tbl_kna1-icon = '@AH@'. "Warning Icon
MODIFY tbl_kna1 TRANSPORTING icon color.
ENDIF.
ENDLOOP.
ENDFORM. " do_fancy_stuff[/code] -
Line Chart cannot drill down on legends and lines
I am doing a drill down Group report which will show the Sum of Last year's Sales By Country, State and city over a period of time(by date) for throughout the year 2007. Every group will have a line chart with Data title as Sum of Last year's Sales ($), Group Title as Date and legends displaying countries (or states or cities) as USA,UK,Australia. etc.. I have same sort of line chart for State and City as well. So, I got 3 levels of groups with a line-chart displayed in every group level.
Now, the problem is my drill down would not work on chart lines or legends as it would do for a 2-dimensional data chart like a bar-chart or pie-chart. In the Chart Expert->Data->Layout:Group ->in the On Change Of event selection I am able to specify either Sales.Country (or) Sales.country and Sales.Sales.State. Both options would not let me get the correct linechart with correct data and drill-down working as well.
The only work-around i got is to display the line chart with legends and showing the Country(or State or City) names in a field in the Group Footer. The drilling will work on those fields, but not on the legends or lines of the line chart. This make my report showing the Country names twice once on legend (with no drill-down) and once on group-footer(with drilling ability to groups below) which is untidy.
Have anyone tried to make a drill-down crystal report on a 3-dimensional data like this? The World Sales report in Crystal reports C:\Program...\BO\Samples\General Business\World Sales Report is the best example of how i would like to see my charts to drill down. However, they drill down across a 2-dimensional data. I am publishing this Crystal Reports in Business Objects Infoview.Please re-post if this is still an issue
-
How we can drill-down, sorting, traffic lights, in ALV report
hi gurus ,
how we can drill-down, sorting, traffic lights, in ALV report .
please any one suggest that...
regards,
praveenCheck the sample code for drill-down, sorting, traffic lights, in ALV report.
REPORT YMS_COLOURALV NO STANDARD PAGE HEADING.
TYPE-POOLS: SLIS, ICON.
DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: BEGIN OF IMARA OCCURS 0,
LIGHT(4) TYPE C,
MATNR TYPE MARA-MATNR,
MTART TYPE MARA-MTART,
MAKTX TYPE MAKT-MAKTX,
COLOR_LINE(4) TYPE C,
TCOLOR TYPE SLIS_T_SPECIALCOL_ALV, "cell
END OF IMARA.
DATA: XCOLOR TYPE SLIS_SPECIALCOL_ALV.
START-OF-SELECTION.
PERFORM GET_DATA.
PERFORM WRITE_REPORT.
FORM GET_DATA.
WRITE ICON_GREEN_LIGHT AS ICON TO IMARA-LIGHT.
IMARA-MATNR = 'ABC'.
IMARA-MTART = 'ZCFG'.
IMARA-MAKTX = 'This is description for ABC'.
APPEND IMARA.
WRITE ICON_YELLOW_LIGHT AS ICON TO IMARA-LIGHT.
IMARA-MATNR = 'DEF'.
IMARA-MTART = 'ZCFG'.
IMARA-MAKTX = 'This is description for DEF'.
APPEND IMARA.
WRITE ICON_RED_LIGHT AS ICON TO IMARA-LIGHT.
IMARA-MATNR = 'GHI'.
IMARA-MTART = 'ZCFG'.
IMARA-MAKTX = 'This is description for GHI'.
APPEND IMARA.
LOOP AT IMARA.
IF SY-TABIX = 1.
IMARA-COLOR_LINE = 'C410'. " color line
ENDIF.
IF SY-TABIX = 2. " color CELL
CLEAR XCOLOR.
XCOLOR-FIELDNAME = 'MTART'.
XCOLOR-COLOR-COL = '3'.
XCOLOR-COLOR-INT = '1'. " Intensified on/off
XCOLOR-COLOR-INV = '0'.
APPEND XCOLOR TO IMARA-TCOLOR.
ENDIF.
MODIFY IMARA.
ENDLOOP.
ENDFORM. "get_data
FORM WRITE_REPORT.
DATA: LAYOUT TYPE SLIS_LAYOUT_ALV.
LAYOUT-COLTAB_FIELDNAME = 'TCOLOR'.
LAYOUT-INFO_FIELDNAME = 'COLOR_LINE'.
PERFORM BUILD_FIELD_CATALOG.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDCAT
TABLES
T_OUTTAB = IMARA.
ENDFORM. "write_report
FORM BUILD_FIELD_CATALOG.
DATA: FC_TMP TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
CLEAR: FIELDCAT. REFRESH: FIELDCAT.
CLEAR: FC_TMP.
FC_TMP-REPTEXT_DDIC = 'Status'.
FC_TMP-FIELDNAME = 'LIGHT'.
FC_TMP-TABNAME = 'IMARA'.
FC_TMP-OUTPUTLEN = '4'.
FC_TMP-ICON = 'X'.
APPEND FC_TMP TO FIELDCAT.
CLEAR: FC_TMP.
FC_TMP-REPTEXT_DDIC = 'Material Number'.
FC_TMP-FIELDNAME = 'MATNR'.
FC_TMP-TABNAME = 'IMARA'.
FC_TMP-OUTPUTLEN = '18'.
APPEND FC_TMP TO FIELDCAT.
CLEAR: FC_TMP.
FC_TMP-REPTEXT_DDIC = 'Material Type'.
FC_TMP-FIELDNAME = 'MTART'.
FC_TMP-TABNAME = 'IMARA'.
FC_TMP-OUTPUTLEN = '10'.
APPEND FC_TMP TO FIELDCAT.
CLEAR: FC_TMP.
FC_TMP-REPTEXT_DDIC = 'Material'.
FC_TMP-FIELDNAME = 'MAKTX'.
FC_TMP-TABNAME = 'IMARA'.
FC_TMP-OUTPUTLEN = '40'.
APPEND FC_TMP TO FIELDCAT.
ENDFORM. "build_field_catalog
Maybe you are looking for
-
Room Data not getting exported to excel file
Hello, I am facing a small issue regarding collaboration rooms. I created some Rooms and Created few Tasks in each room. I tried to export the task details in a excel file. For most of the rooms it is working fine but for few rooms either data is not
-
Microfone not working in normal call mode, works on speaker and bluetooth hads-free
I can not remember when i updated to 7.0.2 so i do not know if that is the problem but since today when i am in a call the other person can not hear me if i am in normal mode but they can hear me if i turn on speaker or i use a bluetooth headset, i r
-
Duke$ - Multiple packages in one jar... again
My jar contains 2 packages. One is my own, the other one is the JNIRegistry from Ice. (Excellent for Windows. Download it at: http://www.trustice.com/java/jnireg/index.shtml ) My application starts from the jar file and works just fine, but as soon a
-
IPod touch 4 sometimes freezing for few seconds on wake up
Sometimes it freezes on wake up for 2~3 seconds. I tried restoring it several times and it dosen't help at all.
-
OWA packages?? Where can I find them?
May it's wrong group for this subject, but I need these OWA packages. Any help would be appriciated. Thanks