11-22-2007 1:18 PM
Hi,
I have a material number and i want to display its last 8 digit in the smartforms...
but when i used:
l_dummy = 000000000000008633.
l_dummy = l_dummy+10(8).
the value of the l_dummy = 8633. i want to display it 00008633 how can i do that? does anybody knows?
thank you...
regards,
mae
11-22-2007 1:25 PM
HI,
Please try this.
<b>DATA : c8(8).
data : P_FIELD(4) TYPE P.
P_FIELD = '8633'.
UNPACK P_FIELD to c8</b>.
c8 would have 00008633.
<b>Reward Points if useful.</b>Regards
Saket Sharma
11-22-2007 1:21 PM
Hi
data: matnr(18), v_mat(8) type N.
matnr = '000000000000008633'.
v_mat = matnr+10(8).
Regards
anji
11-22-2007 1:25 PM
HI,
Please try this.
<b>DATA : c8(8).
data : P_FIELD(4) TYPE P.
P_FIELD = '8633'.
UNPACK P_FIELD to c8</b>.
c8 would have 00008633.
<b>Reward Points if useful.</b>Regards
Saket Sharma
11-22-2007 1:42 PM
hi thank you for that..
but how can i declare c8 in smartfor as 8characters?
regards,
mae
11-22-2007 1:49 PM
Hi ,
you can declare the same in GLOBAL SETTINGS ---> GLOBAL DEFINITION.
Regards
Saket Sharma
11-22-2007 1:55 PM
hi,
I tried it c8(8) type c.
but it displays an error...:(
please help...
thank you...
regards,
mae
11-22-2007 2:29 PM
11-22-2007 2:37 PM
Hi..
l_dummy = 000000000000008633.
l_dummy = l_dummy+10(8).
now u r getting l_dummy value = 8633.
<b>Try this logic</b>..
Data var(8) type n.
Now store l_dummy in this variable.
For eg:
l_dummy = 000000000000008633.
var = l_dummy.
Pass this <b>var</b> value to ur smartform.
Regards
Bala.
11-22-2007 2:56 PM
Hi Mae,
l_dummy = 000000000000008633.
in smartform use it as below...
<b>&l_dummy+10&</b>
http://www.howforge.com/formatting-options-in-sapscript-offset
Hope ur problem solved now..
<b>Reward points if useful..</b>
Thanks & Regards
ilesh 24x7
11-22-2007 4:03 PM
Hi Mae,
Have you got the answer?
You can try this way
parameters : P_matnr TYPE mara-matnr.
Data: var(15) type c.
var = P_matnr+10(8).
write var.
Regards,
Satish