Subtotal in classical report
hello experts,
how can i make subtotal in classical report,
scenario is like this,
say for a single likp-vbeln, there is lips-lfimg, i need to subtotal for lips-lfimg for each likp-vbeln,
how to du it?plz help
Hi Rajdeep,
Add lifmg to a variable, then
at end of vbeln print the sum and clear it.
Check the below code for example, here field a is similar to your vbeln and c is
similar to your lifmg,
TYPES: BEGIN OF ty_tab,
a TYPE char2,
b TYPE char3,
c TYPE i,
END OF ty_tab.
DATA: it_tab TYPE TABLE OF ty_tab,
wa_tab TYPE ty_tab.
DATA: w_sum TYPE i.
wa_tab-a = 'A'.
wa_tab-b = 'AAA'.
wa_tab-c = 1.
APPEND wa_tab TO it_tab.
wa_tab-a = 'A'.
wa_tab-b = 'AAA'.
wa_tab-c = 1.
APPEND wa_tab TO it_tab.
wa_tab-a = 'A'.
wa_tab-b = 'AAA'.
wa_tab-c = 1.
APPEND wa_tab TO it_tab.
wa_tab-a = 'B'.
wa_tab-b = 'BBB'.
wa_tab-c = 1.
APPEND wa_tab TO it_tab.
wa_tab-a = 'B'.
wa_tab-b = 'BBB'.
wa_tab-c = 1.
APPEND wa_tab TO it_tab.
"Print the header
WRITE: sy-uline.
WRITE: /, 5 'A', 10 'B', 24 'C'.
WRITE: sy-uline.
"Print the values
LOOP AT it_tab INTO wa_tab.
ADD wa_tab-c TO w_sum. "calculating sub total for field c
WRITE: / ,5 wa_tab-a,
10 wa_tab-b,
15 wa_tab-c.
AT END OF a. "For each new a print the subtotal
WRITE: sy-uline.
WRITE: /, 5 'Sub total of C',
15 w_sum.
WRITE: sy-uline.
CLEAR w_sum.
ENDAT.
Regards,
Manoj Kumar P
Similar Messages
-
Hide total, but show subtotal in classic report with breaks
Hi,
Is it possible to use the sum function for a report with a break, but not display the total sum? I have a financial report with a break on currency. But I don't want to display the total sum, because it is meaningless.
I don't have a clue how to fix this.
JacobHi Jacob,
I'm not sure of your overall target but perhaps this will help: http://apex.oracle.com/pls/otn/f?p=31517:86:3502666127312777
Mike -
Hi Experts,
I hv been used the COL_NEGATIVE and COL_TOTAL in my classical report for the SubTotal purpose. On the screen, they r looking fine.
But,
When am printing it on SAP Printer, am getting like, /////////////////////// over my totals!
So,
Is it my printer fault?
OR it is a property of theses clours? I mean, I need to change the clour to like, CLO_KEY!
thanq.Hi
No doubt it is purely a Printer problem
certain printers will behave like that for colors
I hope there is some OSS note also reg this
If you wants to take out print of the Report
better don't give colors to the fields and the data
Reward points for useful Answers
Regards
Anji -
hi,
can any one of you send me the simple classical report using ALV functionality.
and if you can send me also an interactive report on ALV functionality plsssssss.
advance thanks and also i will give points .
yours,
sara.Hi,
For <b>Classical Report</b> Example refer to link,
http://www.sapmaterial.com/?gclid=CN322K28t4sCFQ-WbgodSGbK2g
For <b>Interactive Report</b> check the following Example,
Check this sample code which provides exact info.
REPORT YMS_ALVINTER1.
TABLE DECLARATION
TABLES: vbak , "Sales Document: Header Data
vbap , "Sales Document: Item Data
makt , "Material Descriptions
lips . "SD document: Delivery: Item data
DECLARATION OF TYPE-POOL
*THIS TYPE-POOL CONTAINS THE EVENTS,
TYPE-POOLS : slis.
DECLARATION OF EVENTS
DATA: i_event TYPE slis_t_event.
DATA: t_event TYPE slis_alv_event.
DECLARATION OF LIST HEADER
DATA: i_listheader TYPE slis_t_listheader.
DECLARATION OF FIELD CATALOG FOR SCREEN 1
DATA: i_fldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DECLARATION OF FIELD CATALOG FOR SCREEN 2
DATA: i_fldcat2 TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DECLARATION OF FIELD LAYOUT
DATA: i_layout TYPE slis_layout_alv.
SORTING OF OUTPUT
DATA: i_sort TYPE slis_t_sortinfo_alv.
*DATA DECLARATION
DATA: v_auart TYPE tvak-auart,
v_vkorg TYPE tvko-vkorg,
v_kunnr TYPE kna1-kunnr,
v_matnr TYPE mara-matnr ,
v_spart TYPE tvta-spart .
TYPES: BEGIN OF it_so ,
vbeln TYPE vbeln_va , "SALES ORDER NO.
auart TYPE auart , "SALES DOC. TYPE
vkorg TYPE vkorg , "SALES ORG.
spart TYPE spart , "DIVISION
kunnr TYPE kunag , "SOLD TO PARTY
posnr TYPE posnr_va , "SALES DOC. ITEM
matnr TYPE matnr , "MATERIAL NO
maktx TYPE maktx , "DESCRIPTION
kwmeng TYPE kwmeng , "QUANTITY
vrkme TYPE vrkme , "SALES UNIT
line_color(4) TYPE c ,
END OF it_so .
TYPES: BEGIN OF it_del ,
vbeln TYPE vbeln_vl , "SALES ORDER NO.
posnr TYPE posnr_vl , "SALES DOC. ITEM
matnr TYPE matnr , "MATERIAL NO
werks TYPE werks_d , "PLANT
lgort TYPE lgort_d , "STORAGE LOCATION
charg TYPE charg_d , "BATCH NO.
lfimg TYPE lfimg , "ACTUAL DELIVERY QTY.
vrkme TYPE vrkme , "SALES UNIT
END OF it_del .
TYPES: BEGIN OF type_vbfa ,
vbelv TYPE vbeln_von , "Preceding sales and distribution document
posnv TYPE posnr_von , "Preceding item of an SD document
vbeln TYPE vbeln_nach, "Subsequent sales and distribution document
posnn TYPE posnr_nach, "Document category of subsequent document
vbtyp_n TYPE vbtyp_n ,
END OF type_vbfa .
DATA: it_so1 TYPE STANDARD TABLE OF it_so ,
it_del1 TYPE STANDARD TABLE OF it_del ,
it_vbfa TYPE STANDARD TABLE OF type_vbfa,
it_del_ful TYPE STANDARD TABLE OF it_del.
DATA: wa_so TYPE it_so ,
wa_del TYPE it_del ,
wa_vbfa TYPE type_vbfa,
wa_it_del_ful TYPE it_del.
DATA: i_title_vbfa TYPE lvc_title VALUE 'SALES ORDER LIST DISPLAYED'.
DATA: i_title_vbpa TYPE lvc_title VALUE
'DELIVERY DETAILS DISPLAYED AGAINST GIVEN SALES ORDER'.
*SELECTION SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-004 .
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln ,
s_auart FOR v_auart ,
s_vkorg FOR v_vkorg ,
s_spart FOR v_spart ,
s_kunnr FOR v_kunnr ,
s_matnr FOR v_matnr .
SELECTION-SCREEN END OF BLOCK blk1 .
*AT SELECTION SCREEN *
AT SELECTION-SCREEN.
SELECT SINGLE vbeln
FROM vbak INTO vbak-vbeln
WHERE vbeln IN s_vbeln.
IF sy-subrc <> 0.
MESSAGE e202.
ENDIF.
*START OF SELECTION *
START-OF-SELECTION .
PERFORM data_select.
PERFORM t_sort USING i_sort .
PERFORM event_cat USING i_event .
PERFORM fld_cat USING i_fldcat[] .
PERFORM t_layout USING i_layout .
PERFORM fld_cat2 USING i_fldcat2[] .
PERFORM call_alv.
DATA SELECT *
*& Form DATA_SELECT
text
--> p1 text
<-- p2 text
FORM data_select .
REFRESH: it_vbfa, it_so1, it_del_ful ,it_del1 .
BREAK-POINT.
SELECT
a~vbeln
a~auart
a~vkorg
a~spart
a~kunnr
b~posnr
b~matnr
c~maktx
b~kwmeng
b~vrkme
INTO TABLE it_so1 FROM vbak AS a
JOIN vbap AS b ON bvbeln = avbeln
JOIN makt AS c ON cmatnr = bmatnr
AND c~spras = sy-langu
WHERE a~vbeln IN s_vbeln .
COLURING DISPLAY *
DATA: ld_color(1) TYPE c .
LOOP AT it_so1 INTO wa_so.
Populate color variable with colour properties
Char 1 = C (This is a color property)
Char 2 = 3 (Color codes: 1 - 7)
Char 3 = Intensified on/off ( 1 or 0 )
Char 4 = Inverse display on/off ( 1 or 0 )
i.e. wa_ekko-line_color = 'C410'
ld_color = ld_color + 1.
Only 7 colours so need to reset color value
IF ld_color = 8.
ld_color = 1.
ENDIF.
CONCATENATE 'C' ld_color '10' INTO wa_so-line_color.
wa_ekko-line_color = 'C410'.
MODIFY it_so1 FROM wa_so.
ENDLOOP .
IF sy-subrc = 0.
SELECT vbelv
posnv
vbeln
posnn
vbtyp_n
INTO TABLE it_vbfa
FROM vbfa
FOR ALL ENTRIES IN it_so1
WHERE vbelv = it_so1-vbeln
AND posnn = it_so1-posnr
AND vbtyp_n ='J' .
IF sy-subrc = 0.
SELECT vbeln
posnr
matnr
werks
lgort
charg
lfimg
vrkme
FROM lips INTO TABLE it_del_ful
FOR ALL ENTRIES IN it_vbfa
WHERE vbeln = it_vbfa-vbeln
AND posnr = it_vbfa-posnn.
ENDIF.
ENDIF.
ENDFORM. " DATA_SELECT
EVENT CATALOG ****************************************
*& Form EVENT_CAT
text
-->P_I_EVENT text
FORM event_cat USING p_i_event TYPE slis_t_event .
REFRESH p_i_event .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
et_events = p_i_event
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.
READ TABLE p_i_event WITH KEY name = slis_ev_top_of_page INTO t_event.
IF sy-subrc = 0.
MOVE 'TOP_OF_PAGE' TO t_event-form.
MODIFY p_i_event FROM t_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
CLEAR t_event .
ENDFORM. " EVENT_CAT
*********FORM FOR EVENT TOP_OF_PAGE*********************************
FORM top_of_page .
REFRESH i_listheader.
DATA: t_header TYPE slis_listheader.
DATA: v_text(50).
WRITE sy-datum TO v_text.
CLEAR t_header.
t_header-typ = 'S'.
t_header-key = 'Date'.
t_header-info = v_text.
APPEND t_header TO i_listheader.
CLEAR t_header.
CLEAR v_text.
WRITE: 'SALES ORDER REPORT ' TO v_text .
t_header-typ = 'S'.
t_header-key = 'TITLE'.
t_header-info = v_text.
APPEND t_header TO i_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_listheader
I_LOGO = 'ENJOYSAP_LOGO' .
I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
FIRST ALV GRID DISPLAY ***************************************
*& Form CALL_ALV
text
--> p1 text
<-- p2 text
FORM call_alv .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND1'
i_callback_top_of_page = 'TOP_OF_PAGE'
I_BACKGROUND_ID = 'ALV_BACKGROUND'
i_grid_title = i_title_vbfa
is_layout = i_layout
it_fieldcat = i_fldcat[]
it_sort = i_sort
it_events = i_event
TABLES
t_outtab = it_so1
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. " CALL_ALV
FIRST FIELDCATALOG *************************************
*& Form FLD_CAT
text
-->P_I_FLDCAT[] text
FORM fld_cat USING p_i_fldcat TYPE slis_t_fieldcat_alv.
CLEAR i_fldcat.
i_fldcat-fieldname = 'VBELN'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'."TABLE NAME
i_fldcat-seltext_m = 'SALES ORDER NO.'.
i_fldcat-col_pos = 1. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'AUART'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'."TABLE NAME
i_fldcat-seltext_m = 'SALES DOC. TYPE'.
i_fldcat-col_pos = 2. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 15. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'VKORG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SALES ORG.'.
i_fldcat-col_pos = 3. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 12. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'SPART'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'DIVISION'.
i_fldcat-col_pos = 4. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 10. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'KUNNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SOLD TO PARTY'.
i_fldcat-col_pos = 5. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 15. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'POSNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SALES DOC. ITEM'.
i_fldcat-col_pos = 6. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 17. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'MATNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'MATERIAL NO.'.
i_fldcat-col_pos = 7. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'MAKTX'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'DESCRIPTION'.
i_fldcat-col_pos = 8. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'KWMENG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'QUANTITY'.
i_fldcat-col_pos = 9. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 15. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-do_sum = 'X'. " For doing "SUM"
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'VRKME'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SALES UNIT'.
i_fldcat-col_pos = 10. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 10. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
ENDFORM. " FLD_CAT
ALV SORTING ***************************************
*& Form SORT
text
-->P_I_SORT text
FORM t_sort USING p_i_sort TYPE slis_t_sortinfo_alv .
DATA: i_sort TYPE slis_sortinfo_alv .
REFRESH p_i_sort .
CLEAR i_sort.
i_sort-spos = 1.
i_sort-tabname = 'IT_SO1'.
i_sort-fieldname = 'VBELN'.
i_sort-up = 'X'.
i_sort-subtot = 'X'.
i_sort-group = '*'.
APPEND i_sort TO p_i_sort.
ENDFORM. " SORT
*FORM SET_PF_STATUS USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZSTANDARD'.
*ENDFORM. "Set_pf_status
**********FORM FOR EVENT USER_COMMAND1*******************************
FORM user_command1 USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
*CASE R_UCOMM .
WHEN '&IC1' .
IF rs_selfield-FIELDNAME = 'VBELN' .
ENDIF .
WHEN OTHERS .
ENDCASE .
CLEAR wa_so.
REFRESH: it_del1 .
IF r_ucomm = '&IC1' AND rs_selfield-fieldname = 'VBELN' AND
rs_selfield-value IS NOT INITIAL.
READ TABLE it_so1 INTO wa_so INDEX rs_selfield-tabindex.
IF sy-subrc = 0.
LOOP AT it_vbfa INTO wa_vbfa WHERE vbelv = wa_so-vbeln
AND posnv = wa_so-posnr.
READ TABLE it_del_ful INTO wa_it_del_ful
WITH KEY vbeln = wa_vbfa-vbelv
posnr = wa_vbfa-posnn.
IF sy-subrc = 0.
CLEAR wa_del.
MOVE wa_it_del_ful TO wa_del.
APPEND wa_del TO it_del1.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
SECOND ALV GRID DISPLAY ***********************************
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND2'
i_callback_top_of_page = 'TOP_OF_PAGE'
I_BACKGROUND_ID = 'ALV_BACKGROUND'
i_grid_title = i_title_vbpa
it_fieldcat = i_fldcat2[]
it_sort = i_sort
TABLES
t_outtab = it_del_ful
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 . "USER_COMMAND1
FORM FOR EVENT USER_COMMAND 2 ******************************
FORM user_command2 USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CLEAR wa_so.
REFRESH: it_del1 .
IF r_ucomm = '&IC1' AND rs_selfield-fieldname = 'VBELN' AND
rs_selfield-value IS NOT INITIAL.
READ TABLE it_so1 INTO wa_so INDEX rs_selfield-tabindex.
IF SY-SUBRC = 0.
LOOP AT it_vbfa INTO wa_vbfa WHERE vbelv = WA_SO-vbeln
AND posnv = WA_SO-posnr.
READ TABLE it_del_ful INTO wa_it_del_ful
WITH KEY vbeln = rs_selfield-value
posnr = wa_vbfa-posnn.
IF rs_selfield-fieldname = 'VBELN'.
SET PARAMETER ID 'VL' FIELD wa_vbfa-vbeln .
CALL TRANSACTION 'VL03' AND SKIP FIRST SCREEN.
ENDIF .
ENDLOOP.
ENDIF.
ENDIF.
ENDFORM . "USER_COMMAND2
SECOND FIELDCATALOG ******************************************
*& Form FLD_CAT2
text
-->P_I_FLDCAT2[] text
FORM fld_cat2 USING p_i_fldcat2 TYPE slis_t_fieldcat_alv .
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'VBELN'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-tabname = 'IT_DEL_FUL'."TABLE NAME
i_fldcat2-seltext_m = 'DELIVERY NO.'.
i_fldcat2-col_pos = 1. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-hotspot = 'X'.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'POSNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'DELIVERY ITEM'.
i_fldcat2-col_pos = 2. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'MATNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'MATERIAL NO.'.
i_fldcat2-col_pos = 3. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'WERKS'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'PLANT.'.
i_fldcat2-col_pos = 4. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'LGORT'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'ST. LOCATION'.
i_fldcat2-col_pos = 5. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'CHARG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'BATCH NO.'.
i_fldcat2-col_pos = 6. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'LFIMG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'ACT. DEL. QTY.'.
i_fldcat2-col_pos = 7. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'VRKME'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'SALES UNIT.'.
i_fldcat2-col_pos = 8. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
ENDFORM. " FLD_CAT2
ALV LAYOUT *******************************************
*& Form LAYOUT
text
-->P_I_LAYOUT text
FORM t_layout USING p_i_layout TYPE slis_layout_alv .
p_i_layout-zebra = 'X'.
p_i_layout-totals_text = 'GRAND TOTAL ='.
p_i_layout-CONFIRMATION_PROMPT = 'X'.
p_i_layout-DEF_STATUS = ' '.
p_i_layout-info_fieldname = 'LINE_COLOR'.
ENDFORM. " LAYOUT
Regards,
Padmam. -
Classic report - Condition evaluated for every row
APEX 4.2.2
I am seeing something strange in a classic report region. A report started to fail at run-time with a strange error about bad syntax. When I run the page in debug mode, I see the following
print column headings
rows loop: 30 row(s)
...Execute Statement: begin wwv_flow.g_boolean := '' is not null;
end;
......Result = false
...Execute Statement: begin wwv_flow.g_boolean := '' is not null;
end;
......Result = false
...Execute Statement: begin wwv_flow.g_boolean := 'string with a embedded ' single quote' is not null;
end;
......Result = true
Looks like the APEX engine is evaluating a boolean expression after rendering and each and every row in the report. And for some strange reason, it is using a piece of data from my query's resultset and failing because of the bad syntax introduced due to the single-quote in the string.
I have never seen this before. Any idea what is going on?
ThanksHowdy Paul, sorry should have provided all the details. No, this is a standard generic column template. Ah, you are right, drat I should have looked closer. The template has use a condition to show either a highlighted row or normal one. Sorry for the false alarm, I can take it from here. Enjoy your flight :-)
-
How to Print a text in bold format in a classic report ??
How to Print a text in bold format in a classic report ??
hi
u can use
<b>FORMAT INTENSIFIED ON.</b>
regards
ravish
reward if useful -
How to set the number of rows displayed in a classical report at runtime?
Hi,
Our customer has several standard client hardware configuration and would like to enable end users to choose their 'display profile' at login time. This 'display profile' would contain predefined values for these hardware configurations and supposed to set various paramters that should define the number of rows displayed in a classical report region.
I tried to provide parameters on the report region but it refused to accept anything but numerical values. Is it possible to do this?
Regards, TamasThe link is to the closest linkable point in the documentation to the description of the Number of Rows (Item) attribute.
It sounds like you have been trying to enter—unsuccessfully—an item name or substitution string into the Number of Rows attribute. The Number of Rows (Item) attribute is the one that actually allows you to do this. Click on the flashlight icon beside it to get a list of items from the application. -
END-OF-PAGE not displayed in the last page of the classical report.
Hi all..
The END-OF-PAGE is not displayed in the last page of the classical report.
SY-LINCT value is 30.
Lines displayed in the report per page is 24.
[3 for TOP-OF-PAGE and 3 for END-OF-PAGE]
My Internal table has 6942 records.
It comes 289 pages with 24 records in a page and 290 th page with 6 records.
The END-OF-PAGE is not coming for the 290 th page.
Please help.
Thank You.
Karthi M R.There are multiple links in SDN on this subject; Please search,
end-of-page -
Need help in sorting a column in classic report
Hi I am trying to create and classic report and I need to do sorting on the columns. Also I am using a select list to filter the records in the column. When I am not using the select list the sorting is working but when I am using the selcet list and select the sort option then it is showing error. Can anyone help...
Thnaks,
RikSelect lists prior to v4 will sort on the return value. In v4, it sorts on the display value (as you're probably expecting). There's nothing really for you to fix here except if it's really important, see if you can get upgraded to v4.
-
Classical Report for linking/applying the goods receipts transaction
Classical Report for linking/applying the goods receipts transaction quantities against oldest schedule line item dates and then downloading the file to Excel.
o Classical Interactive Reports for calculating average Day Payable Outstanding. Option 1) in summary by company code, vendor, currency. (w/ DPO calc) Option 2) in detail (w/o DPO calc) Option 3) special summary by vendor and roughly convert different currency into one currency of choice, using current YEARLY rate.
thow to do these objects
plz assist me
and how to transfer the data from from one server to other like 3.1 to 5.0
plz assist me
Edited by: Alvaro Tejada Galindo on Feb 21, 2008 5:28 PMHi,
You can use Call Transcation tcode
for calling the transaction u can pass values to the transaction by using SET PARAMETER ID and GET PARAMETER ID
technique.
For downloading use function module LIST_DOWNLOAD
or GUI_DOWNLOAD. -
Mixing of interactive report and classic report fails the RESET PAGINATION process.
I have a tab page where i got 3 different reports REPORT_A (classic), REPORT_B(interactive) and REPORT_C (CLASSIC) in the same alphabetic order. I have a reset pagination page process which will always fire (without any condition) when you visit the page via tab.
The reset pagination process which exists in the before header stage is firing but not resetting the interactive report. It does affect the subsequent classic report REPORT_C as well. The REPORT_A would reset pagination fine since it exists before the interactive report. Is this a know bug in apex?
I created a test demo application with exact steps to reproduce the problem. The steps are in the demo website itself.
http://apex.oracle.com/pls/apex/f?p=56638
U: testuser
P: password
Apex Version: 4.2.4.00.08
In my real application i would have a dropdownlist in the page based on which I would filter the data. The dropdownlist will have a corresponding after-submit branch which will handle the reset pagination & RIR absolutely fine. But when we visit the website through tab the above problem would crash the page.
I tried solutions like gReport.search('SEARCH') but that will fix only the interactive report, not the classic REPORT_C. That is just a hack anyway.
Any ideas.?Ramani_vadakadu wrote:
in classic report pagination need to be make it up max rows in APEX_SCHEMA(APEX_040200) itself. i was fixed this issue long back myself,but right now i don't remember which table! so please check the schema and track it.
This makes very little sense to me. Please explain this in detail. Are you advocating making changes to APEX metadata by executing DML on tables in the APEX_040200 schema? Doing so will leave your APEX instance in an unsupported an possibly inoperable state. -
hello freinds,
I am facing problem of subtotal in alv report.
I am explaining my problem.....................
In my report there are 8 columns...
in first colum there is <b>'Acount Number'</b> field. I have to sort out it.and I have done it succesfully. Now in my seventh and eighth column there are fields 'PAYMENT GROSS AMOUNT' and ' IVA AMOUNT' respectively.
Now I have to do subtotal of these two columns (7th & 8th) according to first column value i.e Acount Number.
Please send me solution.
Thanks in Advance........Hi,
try this code ,hope usefull to u, please reward point if usefull to u.
*& Report ZALV_SUBTOTAL
This program lists orders (VBAK) with sort and sub-total for *
'sold-to-party' (KUNNR) and 'Sales organization' (VKORG) *
REPORT ZALV_SUBTOTAL.
TABLES : vbak.
TYPE-POOLS: slis. " ALV Global types
SELECT-OPTIONS :
s_vkorg FOR vbak-vkorg, " Sales organization
s_kunnr FOR vbak-kunnr, " Sold-to party
s_vbeln FOR vbak-vbeln. " Sales document
SELECTION-SCREEN :
SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max.
PARAMETERS p_max(2) TYPE n DEFAULT '20' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
DATA:
BEGIN OF gt_vbak OCCURS 0,
vkorg LIKE vbak-vkorg, " Sales organization
kunnr LIKE vbak-kunnr, " Sold-to party
vbeln LIKE vbak-vbeln, " Sales document
netwr LIKE vbak-netwr, " Net Value of the Sales Order
waerk LIKE vbak-waerk, " Document currency
END OF gt_vbak.
INITIALIZATION.
v_1 = 'Maximum of records to read'.
START-OF-SELECTION.
PERFORM f_read_data.
PERFORM f_display_data.
Form f_read_data
FORM f_read_data.
SELECT * INTO CORRESPONDING FIELDS OF TABLE gt_vbak
FROM vbak
UP TO p_max ROWS
WHERE kunnr IN s_kunnr
AND vbeln IN s_vbeln
AND vkorg IN s_vkorg.
ENDFORM. " F_READ_DATA
Form f_display_data
FORM f_display_data.
DEFINE m_fieldcat.
add 1 to ls_fieldcat-col_pos.
ls_fieldcat-fieldname = &1.
ls_fieldcat-ref_tabname = 'VBAK'.
ls_fieldcat-do_sum = &2.
ls_fieldcat-cfieldname = &3.
append ls_fieldcat to lt_fieldcat.
END-OF-DEFINITION.
DEFINE m_sort.
add 1 to ls_sort-spos.
ls_sort-fieldname = &1.
ls_sort-up = 'X'.
ls_sort-subtot = &2.
append ls_sort to lt_sort.
END-OF-DEFINITION.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv,
lt_sort TYPE slis_t_sortinfo_alv,
ls_sort TYPE slis_sortinfo_alv,
ls_layout TYPE slis_layout_alv.
m_fieldcat 'VKORG' '' ''.
m_fieldcat 'KUNNR' '' ''.
m_fieldcat 'VBELN' '' ''.
m_fieldcat 'NETWR' 'X' 'WAERK'.
m_fieldcat 'WAERK' '' ''.
m_sort 'VKORG' 'X'. " Sort by vkorg and subtotal
m_sort 'KUNNR' 'X'. " Sort by kunnr and subtotal
m_sort 'VBELN' ''. " Sort by vbeln
ls_layout-cell_merge = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_layout = ls_layout
it_fieldcat = lt_fieldcat
it_sort = lt_sort
TABLES
t_outtab = gt_vbak.
ENDFORM. " F_DISPLAY_DATA
END OF PROGRAM Z_DEMO_ALV_SORT **********************
Regards
fareedas -
Display image in classical report
Experts,
Please share how to display image stored in SO10 in to a classical report??Hi
check this
In the transaction OAOR, you should be able to insert your company Logo.
GOTO - OAOR (Business Document Navigator)
Give Class Name - PICTURES Class Type - OT..... then Execute
It will show you the list, then select ENJOYSAP_LOGO.
On that list, you will find one control with a "create" tab.
Click std. doc types.
Select SCREEN and double-click.
It will push FILE selection screen.
Select your company logo (.gif) and press OK.
It will ask for a description- for instance: "company logo".
It will let you know your doc has been stored successfully.
You can find your logo under ENJOYSAP_LOGO->Screen->company logo.
Just run your ALV program, you should find your company logo in place of the EnjoySAP logo.
FORM TOP-OF-PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = HEADING[]
I_LOGO = 'ENJOYSAP_LOGO'
I_END_OF_LIST_GRID ='GT_LIST_TOP_OF_PAGE'.
ENDFORM. "TOP-OF-PAGE
Here 'ENJOYSAP_LOGO' will replace by ur created logo.
Refer this link
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_enhanced.htm
http://www.sap-img.com/abap/alv-logo.htm
http://www.sap-img.com/fu002.htm
Re: Logo on Login screen
Re: To change image into main menu of sap
Regards
Anji -
How to get add/edit button in classic report
Hi,
Iam trying to built a classic report,but here i need to have add/edit button.How can i achieve this in classic reports?
I know this add/edit button with a pencil on note will come through the interactive report.
But here iam trying to build a page same as the sample application Orders tab i.e. My Orders page.Here he created a classic report with alternating rows but has an add/edit button to it.How could that be achieved??
Can Anyone help me in this regard to built the My orders page including the add/edit navigation getting to order for items.How can tat sample application of My orders built?
TIA,
Regards,
Kranthi.
Edited by: Kranthi.K on Sep 29, 2009 12:38 AMOne more doubt is
But here iam trying to build a page same as the sample application Orders tab i.e. My Orders page and when we hit add/edit image it directs us to the My orders info and order items.
How can we build that page of My orders info and order items.Can anyone guide me through the steps the sample is created.
I tried many times with master detail,but dint achieve what the default Sample Application has been done.
Thanks in Advance
Edited by: Kranthi.K on Sep 29, 2009 4:54 AM -
How to create a dynamic action from link column in classic report
I Have an apex page that display a modal window utilizing jquery. In the modal window I have a classic report with a link column that I want to capture its click event.
I was thinking I could create a dynamic action with selection type=jquery selector. Not for sure if I need to do anything on link column and do not know the syntax
for jquery selector. Would appreciate any help or direction???Thank you for your response. I am very new to Jquery so don't understand all that well.
What I did:
I created a dynamic action
Event: Click
Selection Type: jQuery Selector
jQuery Selector: tdheaders
Created True Actions
I created an alert to see if this is being executed.
Alert 'I made it here'
What I have:
I created a report region with the following query:
Select empno, ename, 'SELECT' from emp
where (ename like '%'||ltrim(rtrim(:P2_SEARCHPU))||'%'
or :P2_SEARCHPU is null)
I created 'SELECT' column as Link Column
Report Attributes
Link Text Select
Target Page in this Application
Page 2
Region Header
<div id="ModalForm2" title="Employee List" style="display:none">
Region Footer
</div>
This report is displayed in a modal form when a button is clicked.
Code for modal window in Page Header
<script type="text/javascript">
$( function() {
$('#ModalForm2').dialog(
{ modal : true ,
autoOpen : false ,
buttons : {
Cancel : function() {
closeForm2();
function openForm2()
$('#ModalForm2').dialog('open');
function closeForm2()
$('#ModalForm2 input[type="text"]').val('');
$('#ModalForm2').dialog('close');
</script>
I am trying to capture the click event on the link column of the report in the modal form. I want to pass a couple of column values
back to the main form and close the modal window. I do not want to do the submit that happens if I click on the link column and link back to the main page(2)
If I let the submit to happen, all other entered fields are cleared on my main form.
Just don't understand the jQuery selector. I have no problem catching the button clicks on the modal form.
Maybe you are looking for
-
Error while deploying SOA composite via ant
I am getting following error while deploying SOA composite through ant from SOA server (UNIX).It is unable to get mds configuration. Jdeveloper is not installed in SOA server. I am trying to copy the SOA project from local machine to SOA server and t
-
Qosmio X70-A-120 - Corrupt NVIDIA display driver for Win 8.1
Hi, I have problem with last display driver nvidia (windows 8.1 update) ... After download .zip file is corrupt... Need help. Thanks in advance.
-
How to I determine the firmware version on my hp prime?
Friends How to I determine the firmware version on my hp prime? Thanks Migs
-
Starting a Weblogic server as non system user
Can we start a Weblogic server as a non system user? I didn't find any option to pass in the user name to the startup script? Is there any undocumented parameter to pass in the user name? The reason I am suspecting this can be done is one opf the ACL
-
How do i set up iCloud keychain if the security code was sent to a device i lost
So I lost my original ipone 5 while i was overseas. I locked it and wiped out the the information using Find My iPhone. Now i have a new ipone 5C but the verifivation code is being sent to my old phone number instead of my new one. I just want to key