‎2012 Oct 12 12:03 PM
Hi,
In the first image i have enter the no in the 4th row eg. 5 5 5 and then if we hit the enter it will add the value column and percentage values
and will populate in total column for the respective row...
In the second image if we remove the value in the 4th row and hit enter means the internal table does not modify.
the value is populating in the same column...It will display in the 3rd image......
My requirement is, if we enter the value in the respective row and hit enter means the calculation should be done.
if the user think the calculated row is no need like that the user should remove the value and hit enter means
the respective row should be empty.......I paste my code below the image.
Can u tell wheather i have made any mistake kindly help me.....
LOOP AT lt_scrn_output .
CHAIN.
FIELD:
ls_scrn_output-te_mon_jan, ls_scrn_output-te_mon_feb,
ls_scrn_output-te_mon_mar,ls_scrn_output-te_mon_apr,
ls_scrn_output-te_mon_may,ls_scrn_output-te_mon_jun,
ls_scrn_output-te_mon_jul,ls_scrn_output-te_mon_aug,
ls_scrn_output-te_mon_sep,ls_scrn_output-te_mon_oct,
ls_scrn_output-te_mon_nov,ls_scrn_output-te_mon_dec,
ls_scrn_output-te_total_perc.
* MODULE validate_basic.
MODULE modify_detail ON CHAIN-INPUT.
ENDCHAIN.
ENDLOOP.
MODULE modify_detail INPUT.
* clear ls_scrn_output-te_total_perc.
ls_scrn_output-te_total_perc = ls_scrn_output-te_mon_jan + ls_scrn_output-te_mon_feb + ls_scrn_output-te_mon_mar +
ls_scrn_output-te_mon_apr + ls_scrn_output-te_mon_may + ls_scrn_output-te_mon_jun +
ls_scrn_output-te_mon_jul + ls_scrn_output-te_mon_aug + ls_scrn_output-te_mon_sep +
ls_scrn_output-te_mon_oct + ls_scrn_output-te_mon_nov + ls_scrn_output-te_mon_dec + ls_scrn_vpg1stpay-zzperc.
IF ls_scrn_output-te_total_perc <> 100 AND ls_scrn_output-te_total_perc <> 0 .
MESSAGE 'Total should not be greater than or less than 100' TYPE 'E'.
endif.
MODIFY lt_scrn_output FROM ls_scrn_output INDEX tc-current_line.
* ENDIF.
ENDMODULE. " MODIFY_DETAIL INPUT
‎2012 Oct 12 12:33 PM
Hi,
Modify the Value using module on each field between chain and endchain.
‎2012 Oct 12 12:48 PM
Hi Vinoth,
I did the same but its not modifying..........
LOOP AT lt_scrn_output .
CHAIN.
FIELD:
ls_scrn_output-te_mon_jan, ls_scrn_output-te_mon_feb,
ls_scrn_output-te_mon_mar,ls_scrn_output-te_mon_apr,
ls_scrn_output-te_mon_may,ls_scrn_output-te_mon_jun,
ls_scrn_output-te_mon_jul,ls_scrn_output-te_mon_aug,
ls_scrn_output-te_mon_sep,ls_scrn_output-te_mon_oct,
ls_scrn_output-te_mon_nov,ls_scrn_output-te_mon_dec,
ls_scrn_output-te_total_perc.
* MODULE validate_basic.
MODULE modify_detail ON CHAIN-INPUT.
ENDCHAIN.
ENDLOOP.
‎2012 Oct 12 1:14 PM