Skip to Content
author's profile photo Former Member
Former Member

Problem while updating Data through IDOC

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Feb 10, 2010 at 03:41 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.