Application Development 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: 

Updating table through report

arindam_samanta
Participant
0 Kudos

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

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

6 REPLIES 6

Former Member
0 Kudos

Hi,

check the length of table field..

Regards,

Venkat.

Former Member
0 Kudos

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).

0 Kudos

Yes, I am sure. I checked in se16n. But not updated upto 255 characters. It is only 169.

0 Kudos

Hi

But you can see about 150 chars only or you are sure only first 150 chars are saved?

max

Former Member
0 Kudos

Hi,

If p_event is a selection-screen parameter, try to declare it as "...TYPE string."

Regards,

Gautam

Former Member
0 Kudos

Hi Sir

Try to declare in declaration as LIKE instead of TYPE