10-15-2008 5:43 AM
Hi,
I am displaying the report output in ALV.
if the customer contains all the numerical values as Zero those
records should be deleted from the internal table. Please suggest how can i do that.
Output internal table contains the following structure.
TYPES: BEGIN OF T_OUTPUT,
KUNNR LIKE BSID-KUNNR,
NAME1 LIKE KNA1-NAME1,
OPNBAL TYPE P DECIMALS 2, "Opening Bal
SALE LIKE KNC1-UM02S, "Sales
RECEIPT LIKE KNC1-UM02S, "Sales Receipt
RETRN LIKE KNC1-UM02S, "Sales Retn
CLETRAGODN LIKE KNC1-UM02S, "clearing from transporter godn
CLETRAGODN type p decimals 2, "clearing from transporter godn
CLOBAL TYPE P DECIMALS 2, "Sales Clobal
V_VARIANCE LIKE KNC1-UM02S, "Sales-Receipt
END OF T_OUTPUT.
data : IT_OUTPUT TYPE STANDARD TABLE OF T_OUTPUT.
10-15-2008 5:45 AM
Hi
Sort itab
delete itab where field1 = 0 and field2 = 0 etc.
Regards
Madhan
10-15-2008 5:45 AM
Hi
Sort itab
delete itab where field1 = 0 and field2 = 0 etc.
Regards
Madhan
10-15-2008 5:47 AM
Hi,
Loop at it_output.
if it_output-kunnr is initial and it_output-name1 is initial etc .
delete it_output.
endif.
endloop.
Regards,
Dhan
10-15-2008 5:50 AM
Hi,
Use this...
http://help.sap.com/saphelp_nw04/helpdata/EN/06/aafd54fc4011d195280000e8353423/content.htm
Else use ALV filter property....
10-15-2008 5:57 AM
Hi venkat,
try this one.
delete it_output where
OPNBAL is initial and
SALE is initial and
RECEIPT is initial and
RETRN is initial and
CLETRAGODN is initial and
CLOBAL is initial and
V_VARIANCE is initial .
Here first record in it_output table contains values, and when the second record is appeneded to it_output there is no values for remaining fields. So delete the record from it_output where these values are initial.
TYPES: BEGIN OF T_OUTPUT,
KUNNR LIKE BSID-KUNNR,
NAME1 LIKE KNA1-NAME1,
OPNBAL TYPE P DECIMALS 2, "Opening Bal
SALE LIKE KNC1-UM02S, "Sales
RECEIPT LIKE KNC1-UM02S, "Sales Receipt
RETRN LIKE KNC1-UM02S, "Sales Retn
CLETRAGODN LIKE KNC1-UM02S, "clearing from transporter godn
*CLETRAGODN type p decimals 2, "clearing from transporter godn
CLOBAL TYPE P DECIMALS 2, "Sales Clobal
V_VARIANCE LIKE KNC1-UM02S, "Sales-Receipt
END OF T_OUTPUT.
data : IT_OUTPUT TYPE STANDARD TABLE OF T_OUTPUT,
fs_output type t_output.
fs_output-KUNNR = '123'.
fs_output-NAME1 = 'raj'.
fs_output-OPNBAL = '20000'.
fs_output-SALE = '12'.
fs_output-RECEIPT ='123'.
fs_output-RETRN = '123'.
fs_output-CLETRAGODN = '1'. "clearing from transporter godn
*CLETRAGODN type p decimals 2, "clearing from transporter godn
fs_output-CLOBAL = '2300'.
fs_output-V_VARIANCE ='34.7'. "Sales-
append fs_output to it_output.
clear fs_output.
fs_output-KUNNR = '456'.
fs_output-NAME1 = 'SIRI'.
append fs_output to it_output.
delete it_output where
OPNBAL is initial and
SALE is initial and
RECEIPT is initial and
RETRN is initial and
CLETRAGODN is initial and
CLOBAL is initial and
V_VARIANCE is initial .
Regards,
Rajitha.