Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

smartforms

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

9 REPLIES 9

Former Member
0 Kudos

Hi

data: matnr(18), v_mat(8) type N.

matnr = '000000000000008633'.

v_mat = matnr+10(8).

Regards

anji

Former Member
0 Kudos

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

0 Kudos

hi thank you for that..

but how can i declare c8 in smartfor as 8characters?

regards,

mae

0 Kudos

Hi ,

you can declare the same in GLOBAL SETTINGS ---> GLOBAL DEFINITION.

Regards

Saket Sharma

0 Kudos

hi,

I tried it c8(8) type c.

but it displays an error...:(

please help...

thank you...

regards,

mae

0 Kudos

Hello ,

Try c type char08.

Regards

Saket

Former Member
0 Kudos

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.

former_member387317
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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