RE: [sap-abap] Appending zeros to use in READ_TEXT
Posted by
Admin at
|
Share this post:
|
0 Comments
| | Posted by Dave Thornburgh on Aug 21 at 3:16 PM | |
Neal -
That's all well and good - as long as your replacement code takes care of
all eventualities. ALPHA_INPUT doesn't buy you much with a document number,
but don't try to skip it with a partner (customer/vendor) number. Since
those values don't have to be numeric, you really ought to use the FM.
Dave
From: R. Neal Wilhite via sap-abap [mailto:sap-abap@Groups.ITtoolbox.com]
Sent: Friday, August 21, 2009 12:05 PM
To: Dave Thornburgh
Subject: Re: [sap-abap] Appending zeros to use in READ_TEXT
Posted by R. Neal Wilhite (Senior
Project Manager)
on Aug 21 at 2:53 PM
<http://it.toolbox.com/api/ContentVote/2946607/1/1/> Mark this reply as
helpfulMark as helpful
To defend Ellie's opinion:
By using an FM you automatically take on the overhead of at least 1 context
switch. The one line of code will be vastly more efficient. - Neal
-----Original Message-----
From: Niceguy7376 via sap-abap <sap-abap@Groups.ITtoolbox.com>
To: R. Neal Wilhite <wilhiten@aol.com>
Sent: Fri, Aug 21, 2009 2:52 pm
Subject: RE: [sap-abap] Appending zeros to use in READ_TEXT
Posted by Niceguy7376 (SAP )
on Aug 21 at 2:42 PM
Mark as helpful
Ellie,
I have a different opinion. If I already have a standard FM, why should I
write my own code to do the same.
Ravi
From: sap-abap@Groups.ITtoolbox.com
To: peddu@hotmail.com
Date: Fri, 21 Aug 2009 14:25:51 -0400
Subject: RE:[sap-abap] Appending zeros to use in READ_TEXT
Posted by epalmer (SR ABAPS Developer)
on Aug 21 at 2:26 PM
Mark as helpful
Ravi,
Why do you need to design a cadilac when a chevy will do.
data: w_10(10) type n.
data: w_7(7) type c value '7777777'.
w_10 = w_7.
Just set up a data field to the size you want the output to be and make it
type n. Then move the input to the data field. If for any reason you need a
type C field you can move the type n to the type C and it will retain the
leading zeros.
Ellie
__.____._ That's all well and good - as long as your replacement code takes care of
all eventualities. ALPHA_INPUT doesn't buy you much with a document number,
but don't try to skip it with a partner (customer/vendor) number. Since
those values don't have to be numeric, you really ought to use the FM.
Dave
From: R. Neal Wilhite via sap-abap [mailto:sap-abap@Groups.ITtoolbox.com]
Sent: Friday, August 21, 2009 12:05 PM
To: Dave Thornburgh
Subject: Re: [sap-abap] Appending zeros to use in READ_TEXT
Posted by R. Neal Wilhite (Senior
Project Manager)
on Aug 21 at 2:53 PM
<http://it.toolbox.com/api/ContentVote/2946607/1/1/> Mark this reply as
helpfulMark as helpful
To defend Ellie's opinion:
By using an FM you automatically take on the overhead of at least 1 context
switch. The one line of code will be vastly more efficient. - Neal
-----Original Message-----
From: Niceguy7376 via sap-abap <sap-abap@Groups.ITtoolbox.com>
To: R. Neal Wilhite <wilhiten@aol.com>
Sent: Fri, Aug 21, 2009 2:52 pm
Subject: RE: [sap-abap] Appending zeros to use in READ_TEXT
Posted by Niceguy7376 (SAP )
on Aug 21 at 2:42 PM
Mark as helpful
Ellie,
I have a different opinion. If I already have a standard FM, why should I
write my own code to do the same.
Ravi
From: sap-abap@Groups.ITtoolbox.com
To: peddu@hotmail.com
Date: Fri, 21 Aug 2009 14:25:51 -0400
Subject: RE:[sap-abap] Appending zeros to use in READ_TEXT
Posted by epalmer (SR ABAPS Developer)
on Aug 21 at 2:26 PM
Mark as helpful
Ravi,
Why do you need to design a cadilac when a chevy will do.
data: w_10(10) type n.
data: w_7(7) type c value '7777777'.
w_10 = w_7.
Just set up a data field to the size you want the output to be and make it
type n. Then move the input to the data field. If for any reason you need a
type C field you can move the type n to the type C and it will retain the
leading zeros.
Ellie
Copyright © 2009 CEB Toolbox, Inc. and message author.
Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
Related Content
In the Spotlight
White Papers
In the Spotlight
How Can Predictive Analytics Drive Competitive Advantage? Find out here
View this thread online
Manage group e-mails
Create an FAQ on this topic
Tell us what you think
Unsubscribe from discussion
Manage group e-mails
Create an FAQ on this topic
Tell us what you think
Unsubscribe from discussion