2008 Apr 23 11:28 AM
I have one ITAB having following values:
GRN IR Date Price
11249432 6075620 31.07.2007 1082104
11249433 6075620 31.07.2007 1082104
11249436 6075620 31.07.2007 1082104
But i wish to write in this manner tht amt come only once.
GRN IR Date Price
11249432 6075620 31.07.2007 1082104
11249433 6075620 31.07.2007
11249436 6075620 31.07.2007
Please guide
2008 Apr 23 11:38 AM
Hi,
1.Take two structures as str1 and str2.
2.First compare as If str1 eq str2.First time it fails,then move the values into the str2.
3.From second time onwards clear the value .
Regards,
Shiva.
Hi,
1.Take two structures as str1 and str2.
2.First compare as If str1 eq str2.First time it fails,then move the values into the str2.
3.From second time onwards clear the value .
Regards,
Shiva.
2008 Apr 23 11:32 AM
Hi Abhut,
Refer the Below Example Program :
REPORT YH1072_TEST.
DATA: wa_maktx LIKE makt-maktx,
wa_menge TYPE c.
DATA: BEGIN OF t_mara OCCURS 0,
matnr LIKE mara-matnr,
werks LIKE marc-werks,
maktx LIKE makt-maktx,
menge TYPE c,
END OF t_mara.
t_mara-matnr = 'A1' .
t_mara-werks = 602.
t_mara-maktx = 'Milk'.
t_mara-menge = '1'.
APPEND t_mara.
t_mara-matnr = 'A1' .
t_mara-werks = 602.
t_mara-maktx = 'Milk'.
t_mara-menge = '1'.
APPEND t_mara.
t_mara-matnr = 'A1' .
t_mara-werks = 602.
t_mara-maktx = 'Milk'.
t_mara-menge = '1'.
APPEND t_mara.
LOOP AT t_mara.
IF t_mara-maktx = wa_maktx AND
t_mara-menge = wa_menge.
WRITE:/ t_mara-matnr,
t_mara-werks .
ELSE.
WRITE:/ t_mara-matnr,
t_mara-werks ,
t_mara-maktx,
t_mara-menge.
ENDIF.
MOVE: t_mara-maktx TO wa_maktx,
t_mara-menge TO wa_menge.
ENDLOOP.Regards,
Sunil
2008 Apr 23 11:33 AM
HI,
loop at itab.
write: / GRN IR Date.
at new ir.
write: price.
endat.
endloop.
regards
Nicole
2008 Apr 23 11:38 AM
Hi,
1.Take two structures as str1 and str2.
2.First compare as If str1 eq str2.First time it fails,then move the values into the str2.
3.From second time onwards clear the value .
Regards,
Shiva.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |