on 03-25-2009 5:28 AM
Hi Gurus,
I have a form where in i need to print item level data pertaining to a shipment.
1. For single shipment there can be multiple deliveries
2. For each delivery there can be multiple materials
i need to print out in such a way like:
Delivery number:
delivery instructions:
- > all materials pertaining to this delivery
Delivery number:
delivery instructions:
- > all materials pertaining to this delivery
and so on ...
at the end need to print the totals of each delivery material with quantity and other factors.
Please giude me or pls suggest me some best possible ideas.
Regards,
Madan
Hi,
Step 1 :First Write code to get the All Delivery numbers into an internal table in Global Definiton node or get From Driver Program.
Step 2 : Create Table node For main Window Provide that internal table which contain Delivery Numbers
Step 3 : Create Program lines node with in that table node write code to Get the Material details using Current Delivery number
Step 4 : Then Create Another Table node provide Material Details internal Table by checking whether it is empty or not.
Step 5 : Calculate the Total of Material in that Program lines Node which was priorly used to get all relavent materials.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gurus,
Thank you for the immediate response.
My first scenario is solved i.e to display materials pertaining to individual deliveries.
However, my second scenario is still pending.
I have an internal table which contains all Deliveries and there corresponding Materials.
Now based on materials in each delivery i need to get totals of each material like quantity and weight.
Say for instance i have 2 Deliveries D1, D2.
Under D1, i have these materials,
M1, M1, M1, M2, M3, M3 and M4
Under D2, i have materials like,
M4, M5, M5, M6, M7.
Now i need to add up all the materials within each delivery.
Please suggest an idea to go forward.
Regards,
Madan
Hi Madan,
I have here found a wiki from Hareesh Menon.
reffer into this wiki.It explains SUBTOTAL in details with example and screen shots.
https://wiki.sdn.sap.com/wiki/display/ABAP/SUBTOTALINSAP+SMARTFORMS
I am sure you can do it with this. Otherwise let us know
Gr., Frank
Hi Frank,
Thank you for the link.
I tried passing out the subtotals table from the Print program itself and its working.
Once again Thank you all for those suggestions and ideas.
Regards,
Madan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Madan,
In the driver program create the delivery number as select options for the particular delivery number print the
respective material details as per your requirements
Page1:Create the table for the delivery material quantity and other factors as per your requirement and at the end of the all the materials print the totals
Create the command node after page 1.
Page2:Create the text node for the instructions.
Regards,
Sravatnhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
are you planning to create or change a smartform or a SAP-script?
For a SAP-script.
fetch all deliveries for the shipment into a itab.
loop at itab.
print header info for deliveriy In main
print delivery instructions.
fetch all materials belonging to delivery in itab2
loop at itab2.
print material data.
endloop "itab2
endloop. itab
Hope it helps.
Gr., Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create a MAIN Window and make a table or perfect tab spacing and display this
the line items ( Transaction Data) should be in the main window
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Madan,
You can proceed with following strategy for developing this smartform:
- Fetch all the delivery numbers for a shipment.
- Loop at delivery numbers, and print values against delivery number and delivery instructions.
- Fetch all materials for that particular delivery number.
- Define a table to display material related data then loop at material number to populate the table. Here take the values of fields for which total needs to be displayed at last into a variable.
- Use the variable defined in above step to display totals.
This will result into desired output.
Regards,
Brajvir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.