Skip to Content
author's profile photo Former Member
Former Member

Shipment Stage

Dear All,

"Determine the proportion of the stage distance to the total shipment distance.

To calculate the proportion, determine the distance for each stage (VTTS-DISTZ) and add all the distance for all stages. Then for each stage, divide the stage distance to the total distance to get the proportion".

Will you please let me know to do this calculation?

Thanks in Advance,

Ranjan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2006 at 12:07 PM

    data: begin of itab occurs 0,

    distz like vtts-distz,

    prop like vtts-distz,

    end of itab.

    data: gv_distz like vtts-distz,

    lv_distz like vtts-distz.

    select distz into lv_distz from vtts.

    gv_distz = gv_distz + lv_distz .

    itab-distz = lv_distz .

    append itab.

    clear:lv_distz .

    endselect.

    loop at itab.

    itab-prop = gv_distz / itab-distz .

    modify itab.

    endloop.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 13, 2006 at 12:13 PM

    select TKNUM

    TSNUM

    DISTZ

    into table itab

    where tknum in s_tknum.

    loop at itab.

    clear v_distz.

    loop at itab where tknum = itab-tknum.

    v_ditsz = v_distz + itab-distz.

    endloop.

    itab_new-tknum = itab-tknum.

    itab_new-tsnum = itab-tsnum.

    itab_new-avg_distz = itab-distz / v_distz.

    append itab_new.

    clear itab_new.

    endloop.

    Regards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.