02-27-2007 7:42 AM
hi
i m getting name of vendor from table i want to restrict upto 15 character
is there any keyword to restrict length up to 15 character .
if any solution than suggest me.
thanks.
02-27-2007 7:44 AM
use the offset option for display upto 15 characters .
<b>write:/ name+0(15).</b>
regards,
vijay.
02-27-2007 7:43 AM
Offset.
If u want to take 6from matnr.
v_matnr = mara-matnr+0(6).
U can use <b>+0(15)</b>
DATA: string(30) TYPE STRING VALUE 'Test this_program'.
DATA: v_string(10) TYPE STRING.
v_string = string+0(10).
Write:/ v_string.
Output will be:
<b>Test this_</b>
Reward points if this helps.
02-27-2007 7:44 AM
use the offset option for display upto 15 characters .
<b>write:/ name+0(15).</b>
regards,
vijay.
02-27-2007 7:52 AM
hi i written below code
i want empname only upto 15 character please help me
FORM get_emp_name TABLES in_tab60 STRUCTURE itcsy
out_tab60 STRUCTURE itcsy.
READ TABLE in_tab60 WITH KEY 'BSEG-PERNR'.
IF sy-subrc = 0.
PA0001-PERNR = in_tab60-value.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = in_tab60-value
IMPORTING
output = PA0001-PERNR.
XBELNR = IN_TAB2-VALUE.
ENDIF.
CALL FUNCTION 'HR_TMW_GET_EMPLOYEE_NAME'
EXPORTING
person_no = pa0001-PERNR
IMPORTING
EDIT_NAME = PA0001-ENAME
NAME_WITH_NO =
.
IF sy-subrc = 0.
READ TABLE out_tab60 INDEX 1.
out_tab60-value = PA0001-ENAME.
MODIFY out_tab60 INDEX 1.
ENDIF.
ENDFORM.
thanks .
02-27-2007 7:57 AM
//READ TABLE out_tab60 INDEX 1.
out_tab60-value = PA0001-ENAME.
MODIFY out_tab60 INDEX 1.
okay in the script or sF o/p just give the offset as
<b>&out_tab60-value+0(15)&</b>
this will do .
chk this .
need not adjust anything in this code but just display it to 15 in the o/p as shown
regards,
vijay
02-27-2007 8:05 AM
READ TABLE out_tab60 INDEX 1.
out_tab60-value =
<b>PA0001-ENAME+0(15).</b>
MODIFY out_tab60 INDEX 1.
Hope this solves.
02-27-2007 8:11 AM
02-27-2007 7:50 AM
JUST DECLARE THE VAR
DATA : NAME(15).
NOW TAKE THE DATA IN NAME IT WILL TAKE ONLY FIRST 15 CHAR AND REST WILL BE TRUNCATED.
IN DISPALY IF YOU WANT TO SHOW.
WRITE : /(15) ITAB-NAME1.
REGARDS
SHIBA DUTTA