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

proble with control breaks

Former Member
0 Likes
409

Hi,

When i use control breaks and write a output i get astreix(*) in the output.

I even tried with a local vriable but the value is not displayed in the output. i need to output the material description in the output.

My code is as follows:

LOOP AT lt_output INTO wa_output.

AT NEW matnr.

CLEAR: lv_matdesc.

MOVE: wa_output-maktx TO lv_matdesc.

WRITE: / '|', wa_output-matnr, 30(40) lv_matdesc, 80(5)

wa_output-cocode, 86(4) wa_output-valarea, 93 '|'.

ENDAT.

AT END OF matnr.

WRITE: / '|', 2(91) sy-uline, 93 '|'.

WRITE: / '|', '*', 4(15) wa_output-matnr, 93 '|'.

WRITE:/'|', 48(10) lv_mat_qty, 59(4) wa_output-bum, 70(15)

lv_mat_amt, 85 wa_output-curr, 93 '|'.

WRITE: / '|', 2(91) sy-uline, 93 '|'.

CLEAR: lv_mat_qty, lv_mat_amt.

ENDAT.

AT LAST.

WRITE: / '|', 2(91) sy-uline , 93 '|'.

WRITE: / '|', '***', 5(15) 'Total', 93 '|'.

WRITE:/'|', 48(10) lv_total_qty, 59(4) wa_output-bum, 70(15)

lv_total_amt, 85 wa_output-curr, 93 '|'.

WRITE: / '|', 2(91) sy-uline, 93 '|'.

ENDAT.

ENDLOOP.

The output looks like this:


9M27W8.X9B.0 **************************************** **** ****

WE 4700001289 001 04/10/2002 1.000 PC 31,667.65 CAD

WE 4700001454 001 07/29/2002 1.000 PC 30,074.63 CAD

WE 4700001455 001 07/29/2002 1.000 PC 30,074.63 CAD

WE 4700001457 001 07/29/2002 1.000 PC 30,513.47 CAD


*9M27W8.X9B.0

4.000 **** 122,330.38 *****



**Total

1,441.000 **** 38,926,097.05 *****


1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
382

Hi,

LOOP AT lt_output INTO wa_output.
wa_out = wa_output.    " and use this variable in the events to print the data instead of wa_output.

AT NEW matnr.
CLEAR: lv_matdesc.
MOVE: wa_output-maktx TO lv_matdesc.
WRITE: / '|', wa_output-matnr, 30(40) lv_matdesc, 80(5)
wa_output-cocode, 86(4) wa_output-valarea, 93 '|'.
ENDAT.

AT END OF matnr.
WRITE: / '|', 2(91) sy-uline, 93 '|'.
WRITE: / '|', '*', 4(15) wa_output-matnr, 93 '|'.
WRITE:/'|', 48(10) lv_mat_qty, 59(4) wa_output-bum, 70(15)
lv_mat_amt, 85 wa_output-curr, 93 '|'.
WRITE: / '|', 2(91) sy-uline, 93 '|'.
CLEAR: lv_mat_qty, lv_mat_amt.
ENDAT.

AT LAST.
WRITE: / '|', 2(91) sy-uline , 93 '|'.
WRITE: / '|', '***', 5(15) 'Total', 93 '|'.
WRITE:/'|', 48(10) lv_total_qty, 59(4) wa_output-bum, 70(15)
lv_total_amt, 85 wa_output-curr, 93 '|'.
WRITE: / '|', 2(91) sy-uline, 93 '|'.

ENDAT.
ENDLOOP.

1 REPLY 1
Read only

Former Member
0 Likes
383

Hi,

LOOP AT lt_output INTO wa_output.
wa_out = wa_output.    " and use this variable in the events to print the data instead of wa_output.

AT NEW matnr.
CLEAR: lv_matdesc.
MOVE: wa_output-maktx TO lv_matdesc.
WRITE: / '|', wa_output-matnr, 30(40) lv_matdesc, 80(5)
wa_output-cocode, 86(4) wa_output-valarea, 93 '|'.
ENDAT.

AT END OF matnr.
WRITE: / '|', 2(91) sy-uline, 93 '|'.
WRITE: / '|', '*', 4(15) wa_output-matnr, 93 '|'.
WRITE:/'|', 48(10) lv_mat_qty, 59(4) wa_output-bum, 70(15)
lv_mat_amt, 85 wa_output-curr, 93 '|'.
WRITE: / '|', 2(91) sy-uline, 93 '|'.
CLEAR: lv_mat_qty, lv_mat_amt.
ENDAT.

AT LAST.
WRITE: / '|', 2(91) sy-uline , 93 '|'.
WRITE: / '|', '***', 5(15) 'Total', 93 '|'.
WRITE:/'|', 48(10) lv_total_qty, 59(4) wa_output-bum, 70(15)
lv_total_amt, 85 wa_output-curr, 93 '|'.
WRITE: / '|', 2(91) sy-uline, 93 '|'.

ENDAT.
ENDLOOP.