‎2009 Feb 05 9:47 AM
Dear Experts,
i develoed report,But my report is executing
1 hyd1 55000001 hydraulics 0010 10 04.07.2008 10
1 hyd1 55000001 hydraulics 0020 25 09.07.2008 25
1 hyd1 55000001 hydraulics 0030 15 30.07.2008 15.
in my coding:
LOOP AT IT_OUTPUT INTO WA_OUTPUT.
IF WA_OUTPUT-WEMNG = 0.
BAL_QTY = WA_OUTPUT-MENGE.
ELSE.
BAL_QTY = WA_OUTPUT-MENGE - WA_OUTPUT-WEMNG.
ENDIF.
at end of ebeln.
WRITE:/1 SY-VLINE, WA_OUTPUT-SLNO UNDER 'SL.NO' CENTERED,
10 SY-VLINE, WA_OUTPUT-MATNR UNDER 'PART NUMBER',
30 sy-vline, WA_OUTPUT-EBELN UNDER 'DOC NO',
45 SY-VLINE, WA_OUTPUT-MAKTX UNDER 'DESCRIPTION',
70 SY-VLINE,WA_OUTPUT-EBELP UNDER 'ITEM NUMBER',
83 SY-VLINE, BACKLOG UNDER 'BACKLOG QTY',
100 SY-VLINE, WA_OUTPUT-XBLNR UNDER 'LASTDOC REF',
120 SY-VLINE, WA_OUTPUT-MENGE UNDER 'SCHEDULE QTY',
140 SY-VLINE, WA_OUTPUT-EINDT UNDER 'DATE',
154 SY-VLINE, WA_OUTPUT-WEMNG UNDER 'DELIVERED QTY',
172 SY-VLINE, BAL_QTY UNDER 'BALANCE QTY',
190 SY-VLINE. " wa_output-etenr Under 'schedule lines' .
append wa_output.
*ENDAT.
ENDLOOP.
if im using control break statements,it is displaying o/p as ****************
how to solve the output format?
but my o/p should be in this format.
1 hyd1 55000001 hydraulics 0010 10 04.07.2008 10
0020 25 09.07.2008 25
0030 15 30.07.2008 15.
‎2009 Feb 05 9:50 AM
Hi Bharath
Declare a work area of the same structure as that of your current work area and before the control break statements copy your work area into the new one.
Now use the contents of this work area.
Pushpraj
‎2009 Feb 05 9:52 AM
try using AT NEW EBELN..
Note whenever u use AT control statements, it replaces all the left fields of EBELN with ******. So u are getting such O/p..
So previously copy the WA into another before the AT statmnt. then use this temp WA inside the AT statmnt. this is the correct way of doing it.
regards,
ags
‎2009 Feb 05 9:53 AM
Hi ,
If possible could you please give me the structure of the table.... i will try to help you out with the issue...
At end or AT First event only takes the left fields from the mentioned field in AT event rest all fields are *** or 0.
So if you can let me know the structure of your internal table... I might be in position to help you out....
‎2009 Feb 05 9:55 AM
Hi,
This is because of your structure format. Try it changing your structure i.e., keep the ebeln field in the last
it will work.
‎2009 Feb 05 9:55 AM
Hi
Use At-NEW value of 1 hyd1 55000001 hydraulics
write: 1 hyd1 55000001 hydraulics
end at.
write: rest of the lines.
Hope this clears it out
Thanks
Viquar Iqbal
‎2009 Feb 05 9:55 AM
Hi,
Go through the online documentation (F1 help) for loop control events like AT END OF.
You have to use a temporary work area when using this statement as the fields to the right of EBELN in your work area will be either * or space.
before using AT END OF statement
write WA_OUTPUT_TEMP = WA_OUTPUT.
and use WA_OUTPUT_TEMP in the logic b/w AT END OF....ENDAT instead of WA_OUTPUT.
With Regards,
Dwaraka.S
‎2009 Feb 05 9:57 AM
Hi,
Try to keep the first field of your internal table same as on which you are using at new or your control break statement. If it is not the first field then all characters are replaced by * and intergers by 0.
If you are using control break on PO number keep ebeln as your first field in the internal table. Also make sure to sort the table on that field. these are the 2 main points while using control break processing.
hope this helps in solving your query.
Regards,
Sachin
‎2009 Feb 05 10:19 AM
Hi,
Befor using the control event statements in a loop first you have to sort the table.
IF u use,
at end of ebeln,
the fields before the ebeln in ur internal table or a structure are treated as key fields.
In your program, you used at end of ebeln so it prints the data before the fields of ebeln and if any fields after the ebeln will be printerd as '*' s.
Regards
Kiran
‎2009 Feb 06 3:45 AM