‎2014 Apr 05 6:14 AM
Hi Expert,
I have a report for vendor return process.Currently everything is ok. but now end user want to some changes like in grand total.
Grand total = total + Taxes(12%+2%+1%+Add duty+5%)
But in some cases end user want to print
grand total = total value
they have a condition when MRP indicator is Tick (in MIGO) then print
grand total : total
When MRP indicator untick then
Grand total = total + Taxes(12%+2%+1%+Add duty+5%)[(curently this is using)]
I am using this logic for grand total in my program:
grand = item_tot + lv_cst + J_1IEXCHDR-EXBED + J_1IEXCHDR-EXADDTAX1 + J_1IEXCHDR-ECS + lv_adi.
So Please expert suggest me for the solution.
Thanks & Regards
Atin
‎2014 Apr 06 1:01 AM
How is the output in your first screen shoot of the the print for the vendor returns process generated? It looks like it's either a smart form or a SAP scripts. If it's a smart form it is very easy to add condition to a text node to control whether or not it is displayed. So then you have two text node one displayed when MRP indicator unticked containing Grand total = total + Taxes(12%+2%+1%+Add duty+5%) and another containing grand total = total value displayed when the MRP indicator is ticked. If it's a SAP Script then you can achieve the same results by adding IF, ELSE, ENDIF command lines.
‎2014 Apr 07 4:54 AM
Hi Jamie,
I used sap script. And I tried By adding IF, ELSE, ENDIF in report. But same problem. Please Give the solution in detail.
‎2014 Apr 07 7:17 AM
Hi Atin
First of all were you able find out where this chekcbox value is store..? Seconldy do you know the place where total is getting calculated in yoru driver prorgam?
Nabheet
‎2014 Apr 07 7:45 AM
Hello Nabheet sir,
Here is the code.
FORM FORM_TITLE_PRINT.
lv_adi = item_tot + J_1IEXCHDR-exbed.
lv_adi = ( lv_adi * 402 / 10000 ).
lv_cst = item_tot + J_1IEXCHDR-exbed + J_1IEXCHDR-ecs + J_1IEXCHDR-EXADDTAX1 + lv_adi.
lv_cst = ( lv_cst * 5 / 100 ).
grand = lv_cst + J_1IEXCHDR-EXBED + J_1IEXCHDR-EXADDTAX1 + J_1IEXCHDR-ECS + item_tot + lv_adi.
tot_amt2 = grand.
‎2014 Apr 07 7:53 AM
So you just have to find the MRP field check and implement an IF&ELSE. Did you know the table and field..? It is in J_1IEXCHDR/J_1IEXCDTL table
if field blank.
grand = lv_cst + J_1IEXCHDR-EXBED + J_1IEXCHDR-EXADDTAX1 + J_1IEXCHDR-ECS + item_tot + lv_adi.
else.
grnad = item_tot.
endif.
‎2014 Apr 07 7:55 AM
‎2014 Apr 07 7:59 AM
cool so just check its value before calcaulting total as mentioned above
‎2014 Apr 07 7:31 AM
Hi ,
In your driver program please capture the check box value input.
Ex.
If MRP_CHK = 'X'.
Grand total = Total.
else.
Grand Total = Total + Tax value.
Endif.
Thanks and Regards
Srimanta