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: 

Initializing field

Former Member
0 Kudos

I need to set my client customer number to fifteen 9s. Any one know of syntax so I dont have to type in 9 fifteen times

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

You can try like this.


DATA: WA_KUNNR(15) TYPE C.

IF WA_KUNNR IS INITIAL.
  TRANSLATE WA_KUNNR USING ' 9'.
ENDIF.

Regards,

Ferry Lianto

7 REPLIES 7

Former Member
0 Kudos

Hi,

i'm not understanding the question.

Customer number is a char10, and you want 15 9s ?

Regards,

Former Member
0 Kudos

is it in selection screen????????

parameter  : p_no(15) default '999999999999999'.

Message was edited by:

Chandrasekhar Jagarlamudi

Former Member
0 Kudos

Hi,

i'm not understanding the question.

Customer number is a char10, and you want 15 9s ?

Anyway,

you can fill a field like this.

DATA: FIELD(20).

DO 15 TIMES.

FIELD+SY-INDEX(1) = '9'.

ENDDO.

Regards,

Former Member
0 Kudos

I am not using the std customer number

I will be having a customer customer number new_customer and I merely need to set it to 15 9s

Instead of typin in 15 9s I would like something better

ferry_lianto
Active Contributor
0 Kudos

Hi,

You can try like this.


DATA: WA_KUNNR(15) TYPE C.

IF WA_KUNNR IS INITIAL.
  TRANSLATE WA_KUNNR USING ' 9'.
ENDIF.

Regards,

Ferry Lianto

former_member194669
Active Contributor
0 Kudos

data : v_customer(15) type c.

v_customer = '999999999999999'.

or

data : v_customer(15) type c value '999999999999999'.

aRs

Former Member
0 Kudos

Hi

Select-options: skunar for kna1-kunar no obligatory no extention.

INITIALIZATION.

Data : kunar like kna1-kunar.

Kunnr = ‘999999999999999’.

skunar = kunar.

Append skunar.

Try this code...

Sasmita