‎2009 Jun 07 5:07 PM
Hi Experts,
I am Developed one Smartforms .
Output of the samarforms is below.
PRODUCT QUANTITY
TM500 100
TM500 100
TM250 100
TM200 55
TM250 100
BUT i want the output like
PRODUCT QAUNTITY
TM500 200
TM250 200
TM200 55
Please help me.
TM500,TM250 and TM200 are material codes.
Thanks in advance
purnaneelu
‎2009 Jun 07 5:34 PM
Hi,
How are you displaying the data?
Are you making use of any table to display the data?
What you do is before displaying the data via the table add a program lines node.
In that collect the data from your internal table into a new internal table. This will calculate the sum and then you can display the data.
Code as folllows
Considering your ITAB1 is as follows
Product Quantity
Create one more internal table ITAB2 of the same structure and calculate the sum as follows
LOOP AT ITAB1 into WA1.
MOVE: WA1-PRODUCT to WA2-PRODUCT,
WA1-QUANTITY to WA2-QUANTITY.
COLLECT WA2 into ITAB2.
ENDLOOP.
Then make use of a table to display the data using ITAB2 in your smartforms.
Hope this helps you.
Regards,
Ankur Parab
‎2009 Jun 07 5:34 PM
Hi,
How are you displaying the data?
Are you making use of any table to display the data?
What you do is before displaying the data via the table add a program lines node.
In that collect the data from your internal table into a new internal table. This will calculate the sum and then you can display the data.
Code as folllows
Considering your ITAB1 is as follows
Product Quantity
Create one more internal table ITAB2 of the same structure and calculate the sum as follows
LOOP AT ITAB1 into WA1.
MOVE: WA1-PRODUCT to WA2-PRODUCT,
WA1-QUANTITY to WA2-QUANTITY.
COLLECT WA2 into ITAB2.
ENDLOOP.
Then make use of a table to display the data using ITAB2 in your smartforms.
Hope this helps you.
Regards,
Ankur Parab
‎2009 Jun 08 5:12 AM
Thank you very much probelm is solved.
And more probelm for me here i need to generate one system generate number .
And display in smartforms
Means this form is delivery challan form
i need to give one dc no in the output.
like DC No : 12345
Pls help me
Thanks in Advance
purnaneelu
‎2009 Jun 22 4:05 PM
Thank you very much probelm is solved.
And more probelm for me here i need to generate one system generate number .
And display in smartforms
Means this form is delivery challan form
i need to give one dc no in the output.
like DC No : 12345
Pls help me
Thanks in Advance
purnaneelu
‎2009 Jun 07 5:37 PM