Application Development and Automation 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: 
Read only

Initializing field

Former Member
0 Likes
777

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
Read only

ferry_lianto
Active Contributor
0 Likes
756

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
Read only

Former Member
0 Likes
756

Hi,

i'm not understanding the question.

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

Regards,

Read only

Former Member
0 Likes
756

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

parameter  : p_no(15) default '999999999999999'.

Message was edited by:

Chandrasekhar Jagarlamudi

Read only

Former Member
0 Likes
756

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,

Read only

Former Member
0 Likes
756

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

Read only

ferry_lianto
Active Contributor
0 Likes
757

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

Read only

former_member194669
Active Contributor
0 Likes
756

data : v_customer(15) type c.

v_customer = '999999999999999'.

or

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

aRs

Read only

Former Member
0 Likes
756

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