Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Code in the print program.(SCRIPT)

Former Member
0 Likes
555

Hi all

can any body tell me the code for the following logic

suppose i have items like this

item | material desc | Total Boxes | Quantity | Gross weight

0010 test-1 5 EA 20 KG

0020 test-2 5 EA 15 KG

0010 test-1 5 EA 15 KG

0020 test-2 3 EA 20 KG

now i want them to be printed item wise with quantity and gross weight totaled,

i want this in the perform of the script, and the form should be written in the print program,

the whole logic should be like this

i. Delivery Item= LIPS-POSNR

ii. Delivery Qty for Item = LIPSD-G_LFIMG= LIPSD-PIKMG

c. Add Total Boxes for each item, this should be a calculation field for each material HUMV4-MATNR, count how many handling unit VEKPVB-EXIDV has been used to pack the same material , output the total boxes for each delivery item.

d. Add Gross Weight for each item , retrieve data from LIPS-BRGEW

Please this is very very urgent.

Message was edited by:

ram g

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
522

HI,

you have these in the internal table

now sort itab by item

before

0010 test-1 5 EA 20 KG

0020 test-2 5 EA 15 KG

0010 test-1 5 EA 15 KG

0020 test-2 3 EA 20 KG

after this

then loop at itab.

collect itab2 from itab.

clear itab2.

endloop.

0010 test-1 10 EA 35 KG

0020 test-2 8 EA 35 KG

in script

perform get_details from program zprog.

using & variable&

changing & variable2&

endperform

regards,

Venkatesh

4 REPLIES 4
Read only

Former Member
0 Likes
523

HI,

you have these in the internal table

now sort itab by item

before

0010 test-1 5 EA 20 KG

0020 test-2 5 EA 15 KG

0010 test-1 5 EA 15 KG

0020 test-2 3 EA 20 KG

after this

then loop at itab.

collect itab2 from itab.

clear itab2.

endloop.

0010 test-1 10 EA 35 KG

0020 test-2 8 EA 35 KG

in script

perform get_details from program zprog.

using & variable&

changing & variable2&

endperform

regards,

Venkatesh

Read only

0 Likes
522

that is OK. i want to know about the the other logic that i have included in the Down, i am little bit uncomfortable with scripts... please help me

Read only

0 Likes
522

the problem is that i have the previous logic which need to be unchanged, so can any body help to solve it..

Read only

0 Likes
522

Can any body help me, i am struck in the middle of this development..