Restriction in subtotal
hi
i have one report,there i am using oops-alv.here i am calculating subtotal,total on the basis of account nmber but for certain account we will not calulate total & subtotal,please help me,my program is
T Y P E S D E C L A R A T I O N S *
Types for storing final output table for all GL Accounts
TYPES:BEGIN OF ty_faglflexa,
rbukrs TYPE faglflexa-rbukrs, "company code
racct TYPE faglflexa-racct, "account no
prctr TYPE faglflexa-prctr, "profit center
ryear TYPE faglflexa-ryear, "year
docnr TYPE faglflexa-docnr, "document no
pprctr TYPE faglflexa-pprctr, "partner PC
tsl TYPE faglflexa-tsl, "trans value key
poper TYPE faglflexa-poper, "posting period
rassc TYPE faglflexa-rassc, "trading partner
stblg TYPE bkpf-stblg, "Reverse docu no
END OF ty_faglflexa.
Types for storing final output table for all INTER-COMPANY Accounts
TYPES:BEGIN OF ty_faglflexa1,
pprctr TYPE faglflexa-pprctr, "partner PC
tsl TYPE faglflexa-tsl, "trans value key
prctr TYPE faglflexa-prctr, "profit center
ryear TYPE faglflexa-ryear, "year
docnr TYPE faglflexa-docnr, "document no
racct TYPE faglflexa-racct, "account no
rbukrs TYPE faglflexa-rbukrs, "company code
poper TYPE faglflexa-poper, "posting period
rassc TYPE faglflexa-rassc, "trading partner
stblg TYPE bkpf-stblg, "Reverse docu no
END OF ty_faglflexa1.
Types for storing output table for account
TYPES: BEGIN OF ty_tf100,
item TYPE tf100-item, "account
END OF ty_tf100.
D A T A D E C L A R A T I O N S *
DATA:w_faglflexa TYPE faglflexa.
-----Data declaration for ALV display
DATA:
gr_table TYPE REF TO cl_salv_table,
gr_functions TYPE REF TO cl_salv_functions,
gr_display TYPE REF TO cl_salv_display_settings,
gr_columns TYPE REF TO cl_salv_columns_table,
gr_column TYPE REF TO cl_salv_column_table,
lr_events TYPE REF TO cl_salv_events_table,
lr_aggregations TYPE REF TO cl_salv_aggregations,
lr_groups TYPE REF TO cl_salv_sorts,
gr_filter TYPE REF TO cl_salv_filters.
I N T E R N A L T A B L E D E C L A R A T I O N S *
DATA:
Internal table storing data for Profit Center
gt_faglflexa TYPE STANDARD TABLE OF ty_faglflexa INITIAL SIZE 0,
Internal table storing data for Partner Profit Center
gt_faglflexa1 TYPE STANDARD TABLE OF ty_faglflexa1 INITIAL SIZE 0,
Internal table storing data for accounts
gt_tf100 TYPE STANDARD TABLE OF ty_tf100 INITIAL SIZE 0.
data:wa_faglflexa type ty_faglflexa.
S E L E C T I O N S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-b01.
SELECT-OPTIONS: s_year FOR w_faglflexa-ryear, "year
s_poper FOR w_faglflexa-poper, "posting period
s_acc FOR w_faglflexa-racct DEFAULT 'OC01',"account no
s_code FOR w_faglflexa-rbukrs. "company code
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-b02.
SELECTION-SCREEN SKIP 1.
PARAMETERS: w_profit RADIOBUTTON GROUP pro DEFAULT 'X',
w_pprfit RADIOBUTTON GROUP pro.
SELECTION-SCREEN END OF BLOCK b2.
I N C L U D E P R O G R A M *
INCLUDE ZFI_PC1. "Contains the subroutine definitions
S T A R T O F S E L E C T I O N E V E N T *
START-OF-SELECTION.
*To get data for final table.....
PERFORM setdata.
To perform Output......
PERFORM display_data.
***INCLUDE ZFI_PC1 .
*& Form FETCH_DATA
text
--> p1 text
<-- p2 text
FORM setdata .
IF w_profit = 'X'.
PERFORM get_data. "to display data for profit center
ELSE.
PERFORM get_data1. "to display for partner profit center
ENDIF.
ENDFORM. " SETDATA
*& Form GETDATA
text
--> p1 text
<-- p2 text
FORM get_data .
*selecting company code,accont no.......
SELECT a~rbukrs
a~racct
a~prctr
a~ryear
a~docnr
a~pprctr
a~tsl
a~poper
a~rassc
b~stblg INTO TABLE gt_faglflexa
FROM faglflexa AS a INNER JOIN bkpf AS b
ON adocnr = bbelnr
AND arbukrs = bbukrs
AND aryear = bgjahr
WHERE ryear IN s_year AND
poper IN s_poper AND
racct IN s_acc AND
rbukrs IN s_code AND
prctr IN ('0000099999', ' ').
ENDFORM. " GET_DATA
*& Form GETDATA1
text
--> p1 text
<-- p2 text
FORM get_data1 .
*selecting account.....
SELECT item INTO TABLE gt_tf100
FROM tf100
WHERE itgrp = '0110'
OR itgrp = '1110'.
*selecting company code,accont no.......
SELECT a~pprctr
a~tsl
a~prctr
a~ryear
a~docnr
a~racct
a~rbukrs
a~poper
a~rassc
b~stblg
INTO TABLE gt_faglflexa1
FROM faglflexa AS a INNER JOIN bkpf AS b
ON adocnr = bbelnr
AND arbukrs = bbukrs
AND aryear = bgjahr
FOR ALL ENTRIES IN gt_tf100
WHERE ryear IN s_year AND
poper IN s_poper AND
racct = gt_tf100-item AND
rbukrs IN s_code AND
pprctr IN ('0000099999', ' ').
ENDFORM. " GET_DATA1
*& Form DISPLAYDATA
text
--> p1 text
<-- p2 text
FORM display_data .
IF NOT gt_faglflexa[] IS INITIAL.
TRY.
cl_salv_table=>factory( IMPORTING r_salv_table = gr_table CHANGING t_table = gt_faglflexa ).
CATCH cx_salv_msg.
ENDTRY.
lr_aggregations = gr_table->get_aggregations( ).
gr_functions = gr_table->get_functions( ).
gr_functions->set_all( abap_true ).
lr_aggregations->clear( ).
lr_groups = gr_table->get_sorts( ) .
lr_groups->clear( ).
PERFORM column_name.
TRY.
lr_groups->add_sort(
columnname = 'RBUKRS'
position = 1
subtotal = abap_true
sequence = if_salv_c_sort=>sort_up ).
lr_groups->add_sort(
columnname = 'RACCT'
position = 2
subtotal = abap_true
sequence = if_salv_c_sort=>sort_up )
lr_groups->add_sort(
columnname = 'PRCTR'
position = 3
subtotal = abap_true
sequence = if_salv_c_sort=>sort_up ).
gr_filter->add_filter(
columnname = 'RACCT'
sign = 'I'
option = 'NE'
low = '34896' ).
*CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing.
CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing.
ENDTRY.
IF gr_columns->get_column( 'RACCT' ) NE '34896' .
IF '34896' NE gr_columns->get_column( 'RACCT' ) .
wa_faglflexa-racct = gt_faglflexa-racct.
IF wa_faglflexa-racct NE '0000034896'.
READ TABLE gt_faglflexa INDEX sy-index INTO wa_faglflexa .
LOOP AT gt_faglflexa INTO wa_faglflexa.
IF wa_faglflexa-racct NE '0000034896'.
TRY.
lr_aggregations->add_aggregation( columnname = 'TSL' ).
CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing.
ENDTRY.
ELSE.
TRY.
lr_aggregations->add_aggregation( columnname = 'TSL'
aggregation = '0' ).
CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing.
ENDTRY.
ENDIF.
ENDLOOP.
APPEND wa_faglflexa TO gt_faglflexa.
gr_display = gr_table->get_display_settings( ).
gr_display->set_striped_pattern( cl_salv_display_settings=>true ).
gr_display->set_list_header( text-031 ).
gr_table->display( ).
ELSE.
TRY.
cl_salv_table=>factory( IMPORTING r_salv_table = gr_table CHANGING t_table = gt_faglflexa1 ).
CATCH cx_salv_msg.
ENDTRY.
lr_aggregations = gr_table->get_aggregations( ).
gr_functions = gr_table->get_functions( ).
gr_functions->set_all( abap_true ).
lr_aggregations->clear( ).
lr_groups = gr_table->get_sorts( ) .
lr_groups->clear( ).
PERFORM column_name1.
TRY.
lr_groups->add_sort(
columnname = 'PPRCTR'
position = 1
subtotal = abap_true
sequence = if_salv_c_sort=>sort_up ).
lr_groups->add_sort(
columnname = 'TSL'
position = 2
subtotal = abap_true
sequence = if_salv_c_sort=>sort_up ).
CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing.
ENDTRY.
TRY.
lr_aggregations->add_aggregation( columnname = 'TSL' ).
CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing.
ENDTRY.
gr_display = gr_table->get_display_settings( ).
gr_display->set_striped_pattern( cl_salv_display_settings=>true ).
gr_display->set_list_header( text-031 ).
gr_table->display( ).
ENDIF.
ENDFORM. " DISPLAY_DATA
*& Form COLUMN_NAME
text
--> p1 text
<-- p2 text
FORM column_name .
gr_columns = gr_table->get_columns( ).
TRY.
gr_column ?= gr_columns->get_column( 'RBUKRS' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-003 ).
TRY.
gr_column ?= gr_columns->get_column( 'RACCT' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-001 ).
TRY.
gr_column ?= gr_columns->get_column( 'PRCTR' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-005 ).
TRY.
gr_column ?= gr_columns->get_column( 'RYEAR' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-006 ).
TRY.
gr_column ?= gr_columns->get_column( 'DOCNR' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-007 ).
TRY.
gr_column ?= gr_columns->get_column( 'PPRCTR' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-008 ).
TRY.
gr_column ?= gr_columns->get_column( 'TSL' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-009 ).
TRY.
gr_column ?= gr_columns->get_column( 'POPER' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-010 ).
TRY.
gr_column ?= gr_columns->get_column( 'RASSC' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-011 ).
TRY.
gr_column ?= gr_columns->get_column( 'STBLG' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-012 ).
ENDFORM. " COLUMN_NAME
*& Form COLUMN_NAME1
text
--> p1 text
<-- p2 text
FORM column_name1 .
gr_columns = gr_table->get_columns( ).
TRY.
gr_column ?= gr_columns->get_column( 'PPRCTR' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-008 ).
TRY.
gr_column ?= gr_columns->get_column( 'TSL' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-009 ).
TRY.
gr_column ?= gr_columns->get_column( 'PRCTR' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-005 ).
TRY.
gr_column ?= gr_columns->get_column( 'RYEAR' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-006 ).
TRY.
gr_column ?= gr_columns->get_column( 'DOCNR' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-007 ).
TRY.
gr_column ?= gr_columns->get_column( 'RACCT' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-001 ).
TRY.
gr_column ?= gr_columns->get_column( 'RBUKRS' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-003 ).
TRY.
gr_column ?= gr_columns->get_column( 'POPER' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-010 ).
TRY.
gr_column ?= gr_columns->get_column( 'RASSC' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-011 ).
TRY.
gr_column ?= gr_columns->get_column( 'STBLG' ).
CATCH cx_salv_not_found.
ENDTRY.
gr_column->set_long_text( text-012 ).
ENDFORM. " COLUMN_NAME1
Hi misra
Check this
gr_sorts = gr_table->get_sorts( ).
CLEAR: lv_text.
TRY.
gr_sorts->add_sort( columnname = 'ZBUKRS' subtotal = abap_true ).
gr_sorts->add_sort( columnname = 'ZWERKS').
gr_sorts->add_sort( columnname = 'ZMATNR' subtotal = abap_true ).
gr_sorts->add_sort( columnname = 'ZLOT_NUMBER').
CATCH cx_salv_not_found INTO err_not_found.
lv_text = err_not_found->get_text( ).
CATCH cx_salv_existing INTO err_existing.
lv_text = err_existing->get_text( ).
CATCH cx_salv_data_error INTO err_data.
lv_text = err_data->get_text( ).
ENDTRY.
--- Add Aggregation to subtotal on ZQuantity, SAP Quantity and Delta -
TRY.
gr_agg = gr_table->get_aggregations( ).
gr_agg->add_aggregation( 'ZQUANTITY' ).
gr_agg->add_aggregation( 'ISTMN' ).
gr_agg->add_aggregation( 'DELTA' ).
CATCH cx_salv_not_found INTO err_not_found.
lv_text = err_not_found->get_text( ).
CATCH cx_salv_existing INTO err_existing.
lv_text = err_existing->get_text( ).
CATCH cx_salv_data_error INTO err_data.
lv_text = err_data->get_text( ).
ENDTRY.
Similar Messages
-
Restriction on subtotal in ALV
Dear ALL
I have requirement like for one particular column in ALV report subtotal should not be enable only sorting can be done .
If user clicks on subtotal button for that particular field then system generated message should come subtotal on this field is not possible.
Let me know how can I achieve this i tried using
no-sum field of ALV fieldcat but this is not working .
Regards
Sunanda MandaviHi,
This doesn't seems to be possible using 'REUSE_ALV_GRID_DISPLAY', though you can use the OOPS ALV and overwrite the SubTotal method to write a custom code to check that the specific column is not selected.
Regards,
Nirmal -
Dear Gurus,
In Pricing Procedure how the subtraction is controlled.
I do have a selling price and a set of Surcharges.
I have a total of the Surcharges and I need to subtract this total surcharges from selling price.
It is working fine for unit qty of Material,but for a increase in quantity the values are abnormal.
Kindly guide me to restrict the Subtotal value to be calculated based on Quantity.
Regards,
RK
Edited by: ravi kumar on Dec 13, 2009 11:34 AMHi,
In My Pricing Procedure I have maintained
Selling Price PR00 1000 USD /TO
Ocean Freight -20 USD
Transportation -1.60 USD
Finance Charges -10.50 USD
Brokerages - 0.72 USD
Total Logistics Cost is 20 + 1.6010.500.72 = 32,82 USD
FOB Price = 1110-32.82
=1077.2 USD
The above formula works fine for unit qty of material.
But if the Quantity is more than 1 then the
The Logistics Cost for 99 TO appears as
Amount = -0.33 USD/TO instead of -32.82 USD
Cond.Base Value 99 TO
Condition Value -32.82 USD
My requirement is to get the Logistics cost to be calculated as a fixed amount irrespective of the entered Qty.
Here the Logistics Cost is a Subtotal in my pricing procedure.
Regards,
RK
Edited by: ravi kumar on Dec 13, 2009 1:17 PM
Edited by: ravi kumar on Dec 13, 2009 1:19 PM
Edited by: ravi kumar on Dec 13, 2009 1:27 PM -
Restrict calculation for condition type in Subtotal
Hi Experts,
In my organisaion i have a requirement to retrict the calculation of Subtotal value in the pricing calculation.
I have two Internal price condition type VPRS & ZCST.
VPRS is calculated in Step20
ZCST is calculated in Step30
The subtotal is calculated in Step40 (The subtotal is calculation From 20 to 30)
Now my requirement is to restrict the calculation of sub-total. Eventhough the subtotal is calculated from 20 to 30. I need to have the subtotal value only for 20. I need to exclude fro step 30.
Example:
VPRS - 100
ZCST - 100
Subtotal - 200
My requirement is the subtotal value should be only 100 not 200.
Regards,
JagadishHi Jagdish,
Please try the follwing.
1: Enter 20 in the From column and leave To column blank
or
2: Enter 20 in both the From and To columns in the pricing procesdure. -
Restriction of sales order conversion to billing request for projects not r
Dear all,
We have SD integrated with Project systems. Each of the sales order is linked to the WBS element of the project which has to be billed. Sometimes a project which is not released is attached to the sales order and while billing it doesnu2019t get posted to accounts because that project/WBS element is not released. Is there a way to restrict conversion of sales order to billing request if the project is not released?
Looking forward for help.
Thanks and regards,
PadmajaDefine a new condition type and assign it to the pricining procedure
In the requirement routine have a new routine and put a logic so that it compares the subtotal field A of nett price
For e.g KOMP-NTPRC
The condition type should apply when KOMP-NTPRC < =the draft amount
You have to try this
I havent done it practically
Regards
Raja -
Total and Subtotal for set_table_for_first_display
Hello,
I am displaying data in ALV by using set_table_for_first_display , i want to do_sum for
10-15 columns starting from the column index 11.. and i have also passed the value in internal table of type LVC_T_SORT and in the fieldcatlog this fields are checked for DO_SUM but sum is not coming in the final output even summation button is disabled and subtotal is also getting reflected.
Is it i need to do extra to do this when i am displaying data by using the OOPS methos?
Please sugggest what could be the reason..
Thanks
PrinceHi,
Try the below code.
TABLES: mara.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
types: begin of ty_marc,
matnr type marc-matnr,
werks type marc-werks,
count type i,
end of ty_marc.
data: it_marc type standard table of ty_marc with header line.
START-OF-SELECTION.
SELECT matnr werks FROM marc INTO TABLE it_marc WHERE matnr IN s_matnr and werks in ('0888', '0811').
loop at it_marc.
it_marc-count = 1.
modify it_marc transporting count.
endloop.
"* Definition for Object Oriented ALV
DATA: gr_table TYPE REF TO cl_salv_table.
DATA: gr_sorts TYPE REF TO cl_salv_sorts.
DATA: gr_agg TYPE REF TO cl_salv_aggregations.
DATA: gr_agg2 TYPE REF TO cl_salv_aggregation.
DATA: gr_display TYPE REF TO cl_salv_display_settings.
DATA: gr_layout TYPE REF TO cl_salv_layout.
DATA: ls_key TYPE salv_s_layout_key.
"* Display ALV as a Grid
TRY.
cl_salv_table=>factory( IMPORTING r_salv_table = gr_table
CHANGING t_table = it_marc[] ).
CATCH cx_salv_msg.
ENDTRY.
TRY.
gr_agg = gr_table->get_aggregations( ).
CALL METHOD gr_agg->add_aggregation
EXPORTING
columnname = 'COUNT'
aggregation = if_salv_c_aggregation=>total
RECEIVING
value = gr_agg2.
CATCH cx_salv_data_error .
CATCH cx_salv_not_found .
CATCH cx_salv_existing .
ENDTRY.
"* Set up Sorts
TRY.
gr_sorts = gr_table->get_sorts( ).
CALL METHOD gr_sorts->add_sort
EXPORTING
columnname = 'MATNR'
position = 1
sequence = if_salv_c_sort=>sort_up
subtotal = if_salv_c_bool_sap=>true
group = if_salv_c_sort=>group_none
obligatory = if_salv_c_bool_sap=>false.
CATCH cx_salv_data_error .
CATCH cx_salv_not_found .
CATCH cx_salv_existing .
ENDTRY.
"* Add layout variants in report
TRY.
gr_layout = gr_table->get_layout( ).
"*... set the Layout Key
ls_key-report = sy-repid.
gr_layout->set_key( ls_key ).
"*... set usage of default Layouts
gr_layout->set_default( abap_true ).
"*... set Layout save restriction
gr_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
ENDTRY.
TRY.
"* Display ALV
gr_table->display( ).
ENDTRY.
Hope it helps.
Thanks,
Balaji -
Subtotal foramtting in first page
Hi ,
Please can anyyone help me on this issue.
I have one invoice header record and for that invoice there are 20 invoice lines record.
1)my requirement is i want to print the 10 invoice records in first page and remaining records,in next page.--this i had achieved*(byusing solution posted inthe forum)*
i have the layout like this
main group data table
i had inserted another table for inner group data.
again main group data in main table.
2)But here i don't want print header info again in second page.
4) if lines record are going to second page i don't want to print subtotal,tax,total (these are main group data)in first page, instead of this
in place of
subtotal-- want to print Continued......
Tax- null
Total:page 1 of 2. like that i want to print in first page.
i want them to print at end f data
i have one doubt by using inner group data whether we can control outer group data.
if any of my requirement's are not possible to meet ,please provide me the information.Madhu,
To restrict number of rows in a page use this code just before <?end for-each?> of your inner group
---- This will restrict 10 rows per page -----
<?if: position() mod 10 = 0?>
<?split-by-page-break:?>
<?end if?>
Total:page 1 of 2. like that i want to print in first page.
To print page numbers like this in word menu go to View > Header and Footer > Insert Auto Text > (select)Page X of Y and close Header and Footer dialog box.
If you dont want to print header information again in the second page.
keep your header outside of <?for-each:GROUP_INVOICES_LINES?> and <?end for-each?>
by doing this it will not print header information again in the new page, it will print header again in case of new invoice only.
Print your subtotals outside the innner group and inside the main group.
let me know if more info required. -
Hi,
I have been designing quite a complex report and need your help at a point.
ColA ColB ColC
10 1 60*1=60
20 2 120
30 3 180
60
ColC is subtotal of ColA x ColB per line item.
How can i acheive this please help ....
Regards,
RAJHello,
Here ColA and ColB are RKF and ColC is CKF right? You can try this one then. Say, Your report format is like below
PLANT___MATERIAL___ColA___ColB___ColC (Plant and Matl just for an example),
In the RKF ColA, add a restriction for MATERIAL with the value ]#[ (Exclude #). And mark that as constant selection which is very important. Now you can see your ColC is producing the expected result.
In your case, use the right most characteristic from the your report for the constant selection.
Hope this help,
Regards,
BIJESH -
Restriction of Sales Order Value
Hi,
Plz. help me in mapping the below business scenario
My client wants to restrict the end user not to exceed the sales order value(demand draft amount as my client sells the materials in cash).
System should restrict the end user to generate the sales order for an amount less or equal to certain amount.Define a new condition type and assign it to the pricining procedure
In the requirement routine have a new routine and put a logic so that it compares the subtotal field A of nett price
For e.g KOMP-NTPRC
The condition type should apply when KOMP-NTPRC < =the draft amount
You have to try this
I havent done it practically
Regards
Raja -
SD: Pricing: Subtotal, Alt Cal type, Requirements
Dear All
Can you please help providing details on functions of standard Subtotal and Alt Cal Types provided in SAP-SD Pricing.
I mean:
1. Standard Subtotals like 2,3,5,G etc.
2. Alt Cal Types like 4,7 etc.
3. Requirements Like 10, 70, 71, 4 etc.
Any document details will be highly appreciated.
Thanks
Raghu A.Subtotal:
u2022 The value of this field determines where the values of subtotals to be captured i.e. in which table and which field.
u2022 Controls whether and in which fields condition amounts or subtotals (for example, a customer discount or the cost of a material) are stored.
u2022 If the same fields are used to store different condition amounts, the system totals the individual amounts.
u2022 These condition amounts or subtotals are used as a starting point for further calculations. You may, for example, want a subtotal of all the discounts included in the pricing of a sales order.
Requirement:
u2022 It is a routine that is written by an ABAP consultant according to the business requirement.
u2022 By defining Requirement in condition technique we can restrict the access of condition type.
u2022 To understand the concept, we will take the example of the Rebates. Rebates are to be included during the billing document processing and not in the sales document processing. As rebates are given on the delivered quantity and not on the ordered quantity (in case of cut-off period for rebates).
u2022 For rebates we use the condition types BO01 to BO05, and in the Requirement column we give the value 24 which is "Only in Billing Document".
u2022 This Requirement will ensure that these condition types will appear only during the billing document processing.
u2022 If new Requirements are to be defined we follow the procedure given below.
u2022 Go to T.Code: VOFM. - Maintain Requirements & Formulas
u2022 Click on the "Requirements" in the top menu and then click on "pricing".
u2022 We have a list of requirements, we can ask ABAP consultant to create new requirement based on the client requests.
u2022 And we assign the application type like V - Sales/Distribution etc.
AltCty - Condition formula for alternative calculation type:
u2022 It is again a Routine that is written by ABAP Consultant.
u2022 It is an alternative formula for the condition type that can be used instead of standard formulas.
u2022 For example, let us take the Profit Margin which can be both + / - , so here this routine will help us in generating the value which can be either + or -. Profit margin is not a condition type so it cannot be classified as +ve or -ve in the V/06.
u2022 Ex.: 950 0 Profit Margin 11.
u2022 So we assign 11 - Profit Margin.
u2022 If new routines are to be defined we follow the procedure given below.
u2022 Go to T.Code: VOFM. - Maintain Requirements & Formulas
u2022
u2022 Click on the "Formulas" and then on the "Condition Values".
u2022 We have a list of routines, we can ask ABAP consultant to create new routines based on the client requests.
u2022 And we assign the application type.
AltCBV - Alternative formula for condition base value:
u2022 Formula for determining the condition basis as an alternative to the standard.
u2022 It is again a Routine that is written by ABAP Consultant.
u2022 It is used as a basis to calculate value of the condition type instead of using it from the "FROM" column.
u2022 Ex.: Freight - KF00.
u2022 Freight is calculated based on weight, volume etc. and not on the base price. In pricing there is no entry of weight from which the value can be referred like we do for discounts using base price. We have to get the value from the Material master.
u2022 In this column we can mention the value as 12 - Gross Weight or 13 - Net Weight.
u2022 During pricing, the system will consider the value that is mentioned in this column and determine the freight based on this value.
u2022 Suppose we have Net weight: 100 kgs and Gross Weight: 150 kgs. And if we mention 13 in this column then the Freight condition KF00 will be calculated using the weight as 100 kgs. -
Hi All,
How to display Grand Totals and Subtotals in the out put. Please let me know.
Thanks,
KNHi KN,
In order to display the sub total you need to restrict your key figure with respect to the concerned characteristic.
Take an example of Top 20 Customers in which you want to display the Top 20 Customers along with their sales for a period specified and also the total sales for that period.
Here in this example we can get the Subtotal which is the sales of period for Top 20 Customers and also the Grand Total which will include those top 20 customers along with remaing customers sales for that period
For getting the Subtotal and Grand total in same report I will apply a condition on Sales for a period[0SALES]
I will create a condtion for Key figure 0SALES with Operator Top N and Values 20 and on the characteristics Assignment Tab I will click on the Individual chars and char combinations Radio button and select fiscal year/period as my char.So that it will restrict my 0SALES for a period.
same logic you can apply for getting subtotal and grand total.
hope this helps.. -
How can I setup a mail-specific passcode/restriction on iPad used by multiple family members?
Have an Exchange mail account setup and accessible in my mail on iPad... however my kids use it and i would like to restrict them from accessing this specific portion of the device. I tried viewing restriction options and do not see that i can apply a restriction specifically to Mail. Thanks for your help.Not a feature of iOS. Check the AppStore to see if there are other
mail apps that allow passcode protection.
Or use Safari to log onto your email via a web-based interface and
enter your credentials each time. A bit slower, but the kids will
not know the details to login. -
How to restrict manual changing of free goods in sales order
Hi ,
Goodmorning ,
We have some requirement : In sales order free goods quantity determination by system should not be allowed to change manually , where can we do this ?
Looking for your inputs
Thanks and regards
VenkatAs per SAP Standard, when the main Item quantity is changed, the Free Goods are redetermined. In this case any manual changes to Free Goods Quantities are lost.
But your requirement is for restricting the Chages of the Quantity of Free Goods Correct?
I believe there is no SAP standard solution for this. You will have to apply a User Exit, which will check the Item category of each LIne item & if it is free goods (TANN) then changes are not permitted.
Hope this helps.
Thanks,
Jignesh Mehta -
Retrieving ALL values from a single restricted user property
How can I retrieve ALL values of a single restricted user property from within
a .jpf file?
I want to display a dropdown list within a form in a JSP which should contain
all the locations listed in the property 'locations'. I ever get just the default
value when I access the property via
ProfileWrapper pw = userprofile.getProfileForUser(user);
Object prop = pw.getProperty("ClockSetup", "Locations");Well, the code you've got will retrieve the single value of the property
for the current user. You're getting the default value because the
current user doesn't have Locations property set, so the ProfileWrapper
returns the default value from the property set.
I assume you want to get the list of available values that you entered
into the .usr file in Workshop. If so, I've attached a
SetColorController.jpf, index.jsp, and GeneralInfo.usr (put in
META-INF/data/userprofiles) I wrote for an example that does just this.
It uses the PropertySetManagerControl to retrieve the restricted values
for a property, and the jsp uses data-binding to create a list from that
pageflow method.
For a just-jsps solution, you can also use the
<ps:getRestrictedPropertyValues/> tag. I've attached a setcolor-tags.jsp
that does the same thing.
Greg
Dirk wrote:
How can I retrieve ALL values of a single restricted user property from within
a .jpf file?
I want to display a dropdown list within a form in a JSP which should contain
all the locations listed in the property 'locations'. I ever get just the default
value when I access the property via
ProfileWrapper pw = userprofile.getProfileForUser(user);
Object prop = pw.getProperty("ClockSetup", "Locations");
[att1.html]
package users.setcolor;
import com.bea.p13n.controls.exceptions.P13nControlException;
import com.bea.p13n.property.PropertyDefinition;
import com.bea.p13n.property.PropertySet;
import com.bea.p13n.usermgmt.profile.ProfileWrapper;
import com.bea.wlw.netui.pageflow.FormData;
import com.bea.wlw.netui.pageflow.Forward;
import com.bea.wlw.netui.pageflow.PageFlowController;
import java.util.Collection;
import java.util.Iterator;
* @jpf:controller
* @jpf:view-properties view-properties::
* <!-- This data is auto-generated. Hand-editing this section is not recommended. -->
* <view-properties>
* <pageflow-object id="pageflow:/users/setcolor/SetColorController.jpf"/>
* <pageflow-object id="action:begin.do">
* <property value="80" name="x"/>
* <property value="100" name="y"/>
* </pageflow-object>
* <pageflow-object id="action:setColor.do#users.setcolor.SetColorController.ColorFormBean">
* <property value="240" name="x"/>
* <property value="220" name="y"/>
* </pageflow-object>
* <pageflow-object id="action-call:@page:index.jsp@#@action:setColor.do#users.setcolor.SetColorController.ColorFormBean@">
* <property value="240,240,240,240" name="elbowsX"/>
* <property value="144,160,160,176" name="elbowsY"/>
* <property value="South_1" name="fromPort"/>
* <property value="North_1" name="toPort"/>
* </pageflow-object>
* <pageflow-object id="page:index.jsp">
* <property value="240" name="x"/>
* <property value="100" name="y"/>
* </pageflow-object>
* <pageflow-object id="forward:path#success#index.jsp#@action:begin.do@">
* <property value="116,160,160,204" name="elbowsX"/>
* <property value="92,92,92,92" name="elbowsY"/>
* <property value="East_1" name="fromPort"/>
* <property value="West_1" name="toPort"/>
* <property value="success" name="label"/>
* </pageflow-object>
* <pageflow-object id="forward:path#success#begin.do#@action:setColor.do#users.setcolor.SetColorController.ColorFormBean@">
* <property value="204,160,160,116" name="elbowsX"/>
* <property value="201,201,103,103" name="elbowsY"/>
* <property value="West_0" name="fromPort"/>
* <property value="East_2" name="toPort"/>
* <property value="success" name="label"/>
* </pageflow-object>
* <pageflow-object id="control:com.bea.p13n.controls.ejb.property.PropertySetManager#propSetMgr">
* <property value="31" name="x"/>
* <property value="34" name="y"/>
* </pageflow-object>
* <pageflow-object id="control:com.bea.p13n.controls.profile.UserProfileControl#profileControl">
* <property value="37" name="x"/>
* <property value="34" name="y"/>
* </pageflow-object>
* <pageflow-object id="formbeanprop:users.setcolor.SetColorController.ColorFormBean#color#java.lang.String"/>
* <pageflow-object id="formbean:users.setcolor.SetColorController.ColorFormBean"/>
* </view-properties>
public class SetColorController extends PageFlowController
* @common:control
private com.bea.p13n.controls.ejb.property.PropertySetManager propSetMgr;
* @common:control
private com.bea.p13n.controls.profile.UserProfileControl profileControl;
/** Cached possible colors from the User Profile Property Set definition.
private String[] possibleColors = null;
/** Get the possible colors, based upon the User Profile Property Set.
public String[] getPossibleColors()
if (possibleColors != null)
return possibleColors;
try
PropertySet ps = propSetMgr.getPropertySet("USER", "GeneralInfo");
PropertyDefinition pd = ps.getPropertyDefinition("FavoriteColor");
Collection l = pd.getRestrictedValues();
String[] s = new String[l.size()];
Iterator it = l.iterator();
for (int i = 0; it.hasNext(); i++)
s[i] = it.next().toString();
possibleColors = s;
catch (P13nControlException ex)
ex.printStackTrace();
possibleColors = new String[0];
return possibleColors;
/** Get the user's favorite color from their profile.
public String getUsersColor()
try
ProfileWrapper profile = profileControl.getProfileFromRequest(getRequest());
return profileControl.getProperty(profile, "GeneralInfo", "FavoriteColor").toString();
catch (P13nControlException ex)
ex.printStackTrace();
return null;
// Uncomment this declaration to access Global.app.
// protected global.Global globalApp;
// For an example of page flow exception handling see the example "catch" and "exception-handler"
// annotations in {project}/WEB-INF/src/global/Global.app
* This method represents the point of entry into the pageflow
* @jpf:action
* @jpf:forward name="success" path="index.jsp"
protected Forward begin()
return new Forward("success");
* @jpf:action
* @jpf:forward name="success" path="begin.do"
protected Forward setColor(ColorFormBean form)
// set the color in the user's profile
try
ProfileWrapper profile = profileControl.getProfileFromRequest(getRequest());
profileControl.setProperty(profile, "GeneralInfo", "FavoriteColor", form.getColor());
catch (P13nControlException ex)
ex.printStackTrace();
return new Forward("success");
* FormData get and set methods may be overwritten by the Form Bean editor.
public static class ColorFormBean extends FormData
private String color;
public void setColor(String color)
this.color = color;
public String getColor()
return this.color;
[GeneralInfo.usr]
[att1.html] -
Field should not display in the subtotal row in ALV report after sorting .
we have a requirement, after sorting and subtotaling, the output in ALV is -
vbeln amount1 amount2 amount3
123 11 12 13
123 12 13 14
123 23 25 27
133 11 12 13
133 12 13 14
133 23 25 27
Now the customer wants the ALV outpput in this fashion -
123 11 12 13
123 12 13 14
23 25 27 --->123 (vbeln) should not come in subtotaling row
133 11 12 13
133 12 13 14
23 25 27--->133(vbeln) should not come in subtotaling rowHi,
if it helps you could create a hierachy. In this way you can define the field catalog for the lines and for the subtotal columns. The only thing is that you would always show the subtotal rows.
You have references of hierachy alvs in
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c060fcb4-2c62-2b10-d2b2-f32407a5cc6f
ALV Hierarchy
alv hierarchy
In this case it also sorts
Sorting for ALV hierarchy
I hope it helps.
Edited by: Oscar Pecharroman on Aug 2, 2010 1:13 PM
Maybe you are looking for
-
Windows Vista Ultimate and Error -42018
Hi there, I upgraded to Windows Vista Ultimate about a month ago. I was trying to play music and download new content and the new content downloads would stop with -42018 - unexpected error. I had to run the compatability wizard and allow Windows XP
-
How to Print Selection-Screen along with ALV Report output
Hi, I have a requirement wherein i need to also print the Selection Screen of a report when I print the ALV report output. Basically i need to print the ALV output along with selection screen. Could you plz suggest me the way. Regards, Nitin
-
The procedure appears to be failing when it hits a Wire transfer (Record #6800). When it aborts the filename is not getting updated to “xloaded_”<filename> so it keeps attempting to reload the same file and is creating duplicate batches until the f
-
Authentication error occurred code 8007ffff
When attempting to access Windows 2012 R2 server using Remote Desktop on another Windows 2012 R2, I receive this message: authentication error occurred code 8007ffff. Windows 7 doesn't have this problem. Bob Lin, MCSE & CNE Networking, Internet, Rout
-
HT201272 cant find the movie i downloaded
cant find the movie i rented and downloaded.