Skip to Content
0
Aug 08, 2012 at 08:59 AM

Updating table through report

24 Views

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

--------------------------------------------------------------------------------------------------------------------