08-08-2012 9:59 AM
Hi Experts,
I am updating a ZTABLE through report using insert statement. One field length of table is 255. For this i have created a domain and data element. In selection screen, input parameter accepts 255 characters. But after executing report, when I check the ZTABLE in DDIC, that field has only around 150 characters. When debugging, in input parameter has 255 characters, corresponding field of work area & internal table contain 255 characters. In DDIC ZTABLE filed has less than characters. Why is it happening??
My code is bellow:
-----------------------------------------------------------------------------------------------------
"Data Declaration part
TYPES: BEGIN OF ty_event.
INCLUDE STRUCTURE zps_event.
TYPES:END OF ty_event.
DATA: it_event TYPE STANDARD TABLE OF ty_event,
wa_event TYPE ty_event.
FORM update_table .
REFRESH it_event.
CLEAR wa_event.
wa_event-pspid = lv_proj.
wa_event-category = p_cate.
wa_event-long_text = p_event. " This field has 255 cahr length, but DDIC ZTABLE can't accept full length characters
wa_event-erdate = p_date.
APPEND wa_event TO it_event.
INSERT zps_event FROM wa_event.
* MODIFY zps_event FROM TABLE it_event.
IF sy-subrc IS INITIAL.
WRITE: 'Record successfully updated.'.
ELSE.
WRITE: ' Record already exists.'.
ENDIF.
ENDFORM. " UPDATE_TABLE
--------------------------------------------------------------------------------------------------------------------
08-08-2012 10:20 AM
08-08-2012 1:55 PM
Are you sure you see the entire content of the cell when you check the DDIC table?
(in SE16(n) you sometimes don't see the entire content of table fields).
08-08-2012 2:18 PM
Yes, I am sure. I checked in se16n. But not updated upto 255 characters. It is only 169.
08-08-2012 2:38 PM
Hi
But you can see about 150 chars only or you are sure only first 150 chars are saved?
max
08-08-2012 2:28 PM
Hi,
If p_event is a selection-screen parameter, try to declare it as "...TYPE string."
Regards,
Gautam
08-08-2012 6:33 PM