2008 Nov 20 7:07 AM
Hi Gurus,
Iam working on a requirement
Requirement: Displaying Quantity from EKET . It is having matnr and lifnr
but i want to display quntity in Output based on matnr only
So iam Looping the internal table and doing some calculations.
Here i have to use control break events.
What i want is to add all Quantities of lifnr and display Matnr wise
loop at i_eket into wa_eket.
at end of matnr.
if some condition.
i_poqty-totpo = i_eket-menge - i_ekpo-wmeng.
endif.
collect wa_eket into i_eket.
endat.
Is it right or wrong .
Please give your valuble suggessitions.
regards,
endloop.
2008 Nov 20 7:24 AM
See this code.
Here we have to calculate the total on job days and ready days depending on the Equipment number.
I think u can add some condition before claculating the amount.
SORT int_cycle_time_alv BY equnr.
LOOP AT int_cycle_time_alv.
wf_on_job = wf_on_job + int_cycle_time_alv-on_job.
wf_ready = wf_ready + int_cycle_time_alv-ready.
AT END OF equnr.
wg_end_flag = 'X'.
ENDAT.
IF wg_end_flag = 'X'.
int_cycle_time_alv-on_job = wf_on_job.
int_cycle_time_alv-ready = wf_ready.
MODIFY int_cycle_time_alv TRANSPORTING on_job ready w_utilisation.
CLEAR: wf_on_job,
wf_ready,
wg_end_flag.
ENDIF.
ENDLOOP.
Hope this helps.
2008 Nov 20 7:12 AM
hi can you provide some example data and output how yu required....
2008 Nov 20 7:27 AM
Hi,
I want the output to be
material vendor PastDueQty
mat-1 Vendor1 Total of (V1 + V2 + V3)
Vendor2
Vendor3
V1, V2, V3 -
vendor1, vendor2, Vendor3
Qty of V1 = menge - wenge.
So here
loop
endloop.
Qty by vendor wise we to display by material wise.
2008 Nov 20 7:12 AM
Hi
see this sample program you can understand it very well
how we can write the control break events.
* Using AT FIRST , AT NEW, AT THE END OF , AT LAST.
DATA: BEGIN OF ITAB OCCURS 0,
F1 TYPE I,
F2(6) TYPE C,
F3(10) TYPE N,
F4(16) TYPE P DECIMALS 2,
END OF ITAB.
DATA: SUB_TOT(10) TYPE P DECIMALS 3.
**--1
ITAB-F1 = 1.
ITAB-F2 = 'ONE'.
ITAB-F3 = 10.
ITAB-F4 = '1000.00'.
APPEND ITAB.
CLEAR ITAB.
ITAB-F1 = 1.
ITAB-F2 = 'ONE'.
ITAB-F3 = 20.
ITAB-F4 = '2000.00'.
APPEND ITAB.
CLEAR ITAB.
ITAB-F1 = 1.
ITAB-F2 = 'ONE'.
ITAB-F3 = 30.
ITAB-F4 = '3000.00'.
APPEND ITAB.
CLEAR ITAB.
*--2
ITAB-F1 = 2.
ITAB-F2 = 'TWO'.
ITAB-F3 = 10.
ITAB-F4 = '1000.00'.
APPEND ITAB.
CLEAR ITAB.
ITAB-F1 = 2.
ITAB-F2 = 'TWO'.
ITAB-F3 = 20.
ITAB-F4 = '2000.00'.
APPEND ITAB.
CLEAR ITAB.
*-- 3
ITAB-F1 = 3.
ITAB-F2 = 'THREE'.
ITAB-F3 = 10.
ITAB-F4 = '1000.00'.
APPEND ITAB.
CLEAR ITAB.
ITAB-F1 = 3.
ITAB-F2 = 'THREE'.
ITAB-F3 = 20.
ITAB-F4 = '2000.00'.
APPEND ITAB.
CLEAR ITAB.
SORT ITAB BY F1.
LOOP AT ITAB.
AT FIRST.
WRITE: /35 ' MATERIAL DETAILS:'.
ULINE.
ENDAT.
AT NEW F1.
WRITE: / 'DETAILS OF MATERIAL:' COLOR 7 , ITAB-F1.
ULINE.
ENDAT.
WRITE: / ITAB-F1, ITAB-F2, ITAB-F3, ITAB-F4.
SUB_TOT = SUB_TOT + ITAB-F4.
AT END OF F1.
ULINE.
WRITE: / 'SUB TOTAL :' COLOR 3 INVERSE ON, SUB_TOT COLOR 3 INVERSE ON.
CLEAR SUB_TOT.
ENDAT.
AT LAST.
SUM.
ULINE.
WRITE: 'SUM:', ITAB-F4.
ULINE.
ENDAT.
ENDLOOP.
2008 Nov 20 7:24 AM
See this code.
Here we have to calculate the total on job days and ready days depending on the Equipment number.
I think u can add some condition before claculating the amount.
SORT int_cycle_time_alv BY equnr.
LOOP AT int_cycle_time_alv.
wf_on_job = wf_on_job + int_cycle_time_alv-on_job.
wf_ready = wf_ready + int_cycle_time_alv-ready.
AT END OF equnr.
wg_end_flag = 'X'.
ENDAT.
IF wg_end_flag = 'X'.
int_cycle_time_alv-on_job = wf_on_job.
int_cycle_time_alv-ready = wf_ready.
MODIFY int_cycle_time_alv TRANSPORTING on_job ready w_utilisation.
CLEAR: wf_on_job,
wf_ready,
wg_end_flag.
ENDIF.
ENDLOOP.
Hope this helps.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |