Application Development and Automation 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: 
Read only

Problem while updating Data through IDOC

Former Member
0 Likes
440

hi!

I have declared an Internal Table like a structure which has 10 fields.

To generate Idoc i need to pass the records from Internal Table to EDIDD-SDATA.

Since SDATA is a string of Char 1000, i'm concatenating all the columns of internal table to a variable.

In debug mode all the fields size are adopting to its correct size.

but after generating the IDOC and view through WE02 the data are miss placed bz of inclusion of space.

Example:

field1 (Size 4) - ABCD

field2 (Size 10) - 0000001234

field3 (size 10) - 09.02.2010

field4 (Size 6) - _12345

field5 (Size 4) - 6 AB --> missed character is continuing in next field after a space data of its corresponding field starts

field6 (Size 3) - C 2 -->missed character is continuing in next field after a space data of its corresponding field starts

Tried by suppressing the space. CONDENSE NO-GAPS. . . .it dnt help me

How to solve this

Regards

Kv

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
373

Hi,

Populate it this way :-

LOOP AT IT_DATA into wa_data.


  CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C
    EXPORTING
      IM_VALUE               = WA_DATA
    IMPORTING
      EX_CONTAINER           = EDIDD-SDATA
    EXCEPTIONS
      ILLEGAL_PARAMETER_TYPE = 1
      others                 = 2    .


append EDIDD.

ENDLOOP.

Thanks,

Best regards,

Prashant

1 REPLY 1
Read only

Former Member
0 Likes
374

Hi,

Populate it this way :-

LOOP AT IT_DATA into wa_data.


  CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C
    EXPORTING
      IM_VALUE               = WA_DATA
    IMPORTING
      EX_CONTAINER           = EDIDD-SDATA
    EXCEPTIONS
      ILLEGAL_PARAMETER_TYPE = 1
      others                 = 2    .


append EDIDD.

ENDLOOP.

Thanks,

Best regards,

Prashant