‎2007 Jun 20 4:41 AM
hi experts,
can any body help me , in my report am getting 12 char of the filed (EKKN-NPLNR) lenth in that i want to print only last 7 chars. the first 5 chr are zeros. i want elemenate them.
just i want to print last 7chars.
advance thanks
‎2007 Jun 20 5:37 AM
W_NPLNR = '120001578928'
W_NPLNR = W_NPLNR+6(7)
W_NPLNR = '1578928'
dear this is lihe mid function
this mean get 7 characters from index 6 like dat
Rewards if helpful.
‎2007 Jun 20 4:43 AM
‎2007 Jun 20 4:45 AM
hi
Use the fm CONVERSION_EXIT_ALPHA_OUTPUT.
DATA: P(10) VALUE '0000000001'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = P
IMPORTING
OUTPUT = P.
write p.
it would show.. only 1...
hope this helps...
<b>reward if useful...</b>
regards
dinesh
‎2007 Jun 20 5:13 AM
hi
i want to print last 7 degits only. whether the first 5 degits r 0's or any num.
i want to elemenate then print only last 7 degits only what ever it is.
plse help me.
‎2007 Jun 20 5:15 AM
hi
i want to print last 7 degits only. whether the first 5 degits r 0's or any num.
i want to elemenate then print only last 7 degits only what ever it is.
plse help me.
‎2007 Jun 20 4:45 AM
Hi,
You can use shift command..
Ex.
data: v_input(12) value '000001234567'.
shift v_input left deleting leading '0'.
WRITE: / v_input.
Thanks
Naren
‎2007 Jun 20 5:14 AM
hi
i want to print last 7 degits only. whether the first 5 degits r 0's or any num.
i want to elemenate then print only last 7 degits only what ever it is.
plse help me.
‎2007 Jun 20 4:47 AM
hi Puram
thy with this
when you loop or how ever getting value i assume it call W_NPLNR
W_NPLNR = '000001578928'
shift W_NPLNR left deleting leading '0'
W_NPLNR = '1578928'
Rewards if Helpful.
‎2007 Jun 20 4:56 AM
Hi,
You can work on 2 ways.
1.Use the fm CONVERSION_EXIT_ALPHA_OUTPUT.
DATA: number(10) VALUE '0000000001'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = P
IMPORTING
OUTPUT = P.
2. DATA: number(10) VALUE '0000000001'.
number = number+5(12).
Don't forget to reward if useful...
‎2007 Jun 20 5:29 AM
hi murali,
as per ur logic as per my req. i write like
tables : ekkn.
i1 type c.
data: it_ekkn like ekkn occurs 0 with header line.
select * from ekkn into table it_ekkn.
xstring = it_ekkn-nplnr.
i1 = strlen( xstring ).
i1 = i1+5(12).
but am getting error
offsety specification error.
plse help me
advace thaks
‎2007 Jun 20 5:33 AM
Hi,
The code should be like this:
tables : ekkn.
data: it_ekkn like ekkn occurs 0 with header line.
select * from ekkn into corresponding fields of it_ekkn.
it_ekkn-pelnr = it_ekkn-pelnr+5(12).
append it_ekkn.
endselect.
Then loop at it_ekkn and write the records.
Regards,
Himanshu
Message was edited by:
Himanshu Aggarwal
‎2007 Jun 20 5:20 AM
Hi,
For this use below code.
2. DATA: number(10) VALUE '123456789012'.
number = number+5(12).
write number.
Don't forget to reward if useful...
‎2007 Jun 20 5:29 AM
Hi,
In ur case use SHIFT statement.
SHIFT field1 BY 5 PLACES LEFT.
In this case field1 will contain only the last 7 characters whatever be the first five digits.
Regards,
Himanshu
‎2007 Jun 20 5:41 AM
‎2007 Jun 20 5:37 AM
W_NPLNR = '120001578928'
W_NPLNR = W_NPLNR+6(7)
W_NPLNR = '1578928'
dear this is lihe mid function
this mean get 7 characters from index 6 like dat
Rewards if helpful.