2018 Mar 26 8:20 AM
hiii,
i need to print the total amount , cgst,igst,sgst, for multiple number of same hsn odes.
for example
hsn------------- amount----- cgst---- igs----t sgst
4016 ----------- 240 ---------10- -- 0------ 10
565------------ -450-------------- 6------ 0------- 6
4016------------478------------- 10----- 0------ 10
in this i have to add the total amount for same hsn i.e., 4016 = 240+478
565 = 450.
i written code as
LOOP AT gt_item INTO ls_item.
ls_item2-hsn = ls_item-hsn.
ls_item2-tax_val = ls_item-tax_val.
APPEND ls_item2 TO lt_item2.
clear ls_item2.
ENDLOOP.
move lt_item2 to t_final.
DELETE ADJACENT DUPLICATES FROM lt_item2 COMPARING hsn .
LOOP AT lt_item2 INTO ls_item2.
LOOP AT t_final INTO ls_final WHERE hsn = ls_item2-hsn .
v_tax = v_tax + ls_final-tax_val.
ENDLOOP.
ls_item2-hsn = ls_final-hsn.
ls_final-tax_val = v_tax.
ENDLOOP........but its not working.
can any one suggest the code for this ..........please its very urgent.
2018 Mar 26 8:42 AM
hiii,
i need to print the total amount , cgst,igst,sgst, for multiple number of same hsn odes.
for example
hsn------------- amount----- cgst---- igs----t sgst
4016 ----------- 240 ---------10- -- 0------ 10
565------------ -450-------------- 6------ 0------- 6
4016------------478------------- 10----- 0------ 10
in this i have to add the total amount for same hsn i.e., 4016 = 240+478
565 = 450.
i written code as
LOOP AT gt_item INTO ls_item.
ls_item2-hsn = ls_item-hsn.
ls_item2-tax_val = ls_item-tax_val.
APPEND ls_item2 TO lt_item2.
clear ls_item2.
ENDLOOP.
move lt_item2 to t_final.
DELETE ADJACENT DUPLICATES FROM lt_item2 COMPARING hsn .
LOOP AT lt_item2 INTO ls_item2.
LOOP AT t_final INTO ls_final WHERE hsn = ls_item2-hsn .
v_tax = v_tax + ls_final-tax_val.
ENDLOOP.
ls_item2-hsn = ls_final-hsn.
ls_final-tax_val = v_tax.
ENDLOOP........but its not working.
can any one suggest the code for this ..........please its very urgent.
2018 Mar 26 8:42 AM
2018 Mar 26 8:45 AM
2018 Mar 26 9:01 AM
Hi Karuna,
Use collect statement as shown below which summaries the internal table value based on HSN CODE. Check link here for reference.
LOOP AT gt_item INTO ls_item.
ls_item2-hsn = ls_item-hsn.
ls_item2-tax_val = ls_item-tax_val. "amount
ls_item2-CGST = ls_item-CGST. "CGST amount
ls_item2-IGST = ls_item-IGST. "IGST amount
ls_item2-SGST = ls_item-SGST. "SGST amount
COLLECT ls_item2 INTO lt_item2.
clear ls_item2.
ENDLOOP.
2018 Mar 26 10:01 AM
thank you so much yaaar...
i need one more help.........
here i have to list the hsn code details with corresponding total CGST SGST IGST in HSN summary at the footer of the main window in smartforms .
but here , i am getting the the last hsn code details only ...but i want to list all the hsn codes incuded in it. how to overcome this..
thanks & regards..
2018 Mar 27 6:17 AM
iHi Karuna
"but here , i am getting the the last hsn code details only ...but i want to list all the hsn codes incuded in it. how to overcome this..
While mentioning the issue, show the problematic code also, which help to suggest somehow better.
"here i have to list the hsn code details with corresponding total CGST SGST IGST in HSN summary at the footer of the main window in smartforms
If Total required in footer, did you try to add the value inside the loop like below.
LOOP AT gt_item INTO ls_item.
....
l_sgst_tot = l_sgst_tot + ls_item-SGST. "SGST Total amount
l_cgst_tot = l_cgst_tot + ls_item-CGST. "CGST Total amount
l_igst_tot = l_igst_tot + ls_item-IGST. "IGST Total amount
ENDLOOP.
2018 Mar 27 1:13 PM
hi sir,
here i want to display the totals for each hsn code
example : in footer window i want to display like below:
HSN-SUMMARY
hsn------------- amount----- cgst---- igs----t sgst
4016 ----------- 718 ---------20- -- 0------ 20
565------------ -450-------------- 6------ 0------- 6
:
:
:
if there is increase in line items i have to show them tooo in the footer window
2024 Dec 10 6:28 AM - edited 2024 Dec 10 6:29 AM
Hi,
can you tell me which table you have used fetch the cgst ,sgst,igst values
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |