2006 Sep 04 6:22 AM
Hi,
In my output list assume dat dere r 10 rows.say 1st, 2nd and 5th r blanks and remaining ones contain some info.
Now my requirement is i need to club all dese blanks and show it in one row.
2006 Sep 04 6:28 AM
put like this .
loop at itab where matnr eq ''.
put ur logic here.
endloop.
Regards
Prabhu
Hi,
In my output list assume dat dere r 10 rows.say 1st, 2nd and 5th r blanks and remaining ones contain some info.
Now my requirement is i need to club all dese blanks and show it in one row.
2006 Sep 04 6:28 AM
put like this .
loop at itab where matnr eq ''.
put ur logic here.
endloop.
Regards
Prabhu
2006 Sep 04 6:37 AM
Hi,
Just sort the internal table. If the entire row is appended as blank, then it would come at the bottom.
So that would be segregated at the end.
SORT ITAB.
But if you want to club all the blanks and display it in one row, still it would be blank. So do you want to display a blank record.
Best regards,
Prashant
2006 Sep 04 6:40 AM
even if you add all the blank lines the result is also a Blank line. i am not getting why you are adding them ?
here is the logic to print ONLY 1 blank line on the output.
just say SORT ITAB.
then your blank lines will come first.
then write them.
SORT ITAB.
DATA : V_FLAG TYPE C.
CLEAR V_FLAG.
loop at itab.
if ITAB IS INITIAL.
if V_FLAG IS INITIAL.
V_FLAG = 'X'.
WRITE :/ ITAB.
"this is a blank line,print first time.
endif.
ELSE.
WRITE ITAB.
ENDIF.
endloop.here i am checking ITAB is initial and V_FLAG is initial. this will work for the first blank line and the empty line will be printed on the output. for next empty ITAB,w e are not printing any blank line on the output.
Regards
srikanth
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |