‎2006 Sep 14 12:51 PM
<b>Item
{
Item2000249CYANINE BLUE 3011 ~ ~;
} </b>
The above output is a downloaded report.
You should remove the empty spaces when the actual field value is less than the max filed size eg if a field size is defined as 20 and field value is Mumbai than you are sending some 16 empty spaces after that and then placing a delimiter ~.
and also if database is not having any value for particular selection then there should be only one gap between two '~'.
--->Any Solution
‎2006 Sep 14 12:58 PM
Hi,
Try using SHIFT statement.
SHIFT <FIELD NAME> LEFT DELETING LEADING ' '.
Hope this would help out.
Cheers,
Prashanth
‎2006 Sep 14 12:58 PM
Hi,
use describe field length f.
condense field no-gaps
strlen functions for your requirement.
Regards
amole
‎2006 Sep 14 1:00 PM
U can use the DESCRIBE statement to get the field length.
DESCRIBE FIELD item-field length lfldlen.
llen = strlen ( item-field ).
if llen <> lfldlen and item-field is not initial.
loutput = item-field.
write ldel to loutput+lfldlen(1). "ldel is ~
endif.
‎2006 Sep 14 1:01 PM
Hi ,
Use statement 'condense' For removing additional spaces.
and to check weather there is value check is initial.
ex :
if field is initial put only '~'
else.
condese field.
endif.
‎2006 Sep 14 1:02 PM
Hi,
Item2000249CYANINE BLUE 3011 ~ ~;
data lv_test(20) type c value 'test'.
describe lv_test length lv_len
lv_len1 = strlen(lv_test)
if lv_len1 < lv_len .
condense lv_test.
endif.
if database has no value
concatenate lv_test '~ ~' into lv_test.
Regards
Amole
‎2006 Sep 14 1:11 PM
Hi satyanarayana,
I guess you can do this in 2 steps.
1. concatenate field1 field2 filed3 ... into wa_string seperated by '~'.
2. condense wa_string no-gaps.
Regards'
Srikanth M