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

Split error

Good morning friends, first greet for this coming year , below 'm putting together a report load and I have a problem in finding a pair of variables , this is the code:

TYPES : BEGIN OF t_dw ,
text ( 65435 ) TYPE c ,
data (70 ) TYPE c ,
END OF t_dw .

DATA: TYPE w_dw t_dw ,
it_dw LIKE STANDARD TABLE OF w_dw .

LOOP AT INTO w_dw it_dw .
TRANSLATE TO UPPER CASE w_dw .
W_dw - text SPLIT AT ',' INTO
w_input - aufnr
w_input - vornr
w_input - budat
w_input - zzcant1
w_input - zzmot1
w_input - zzcant2

In the fields zzcant1 zzcant2 the following error message :

" W_INPUT - ZZCANT1 " must be a character -type data object (data type C , N , D , T, or STRING)" .

These two fields are zzcant1 zzcant2 type and QUAN, please can guide and give me an example on how to resolve this error .

Thank you very much experts.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 02, 2014 at 05:46 PM

    Try the following....

    DATA : lc_par1 type char25 , lc_par2 type char25.

    clear : lc_par1 , lc_par2.

    SPLIT W_dw - text AT ',' INTO
    w_input - aufnr
    w_input - vornr
    w_input - budat
    lc_par1
    lc_par2
    w_input - zzcant2

    Write lc_par1 to w_input - zzcant1.

    Write lc_par2 to w_input - zzcant2.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 03, 2014 at 05:29 AM

    Hii Brujo,

    As it's clearly illustrated in the error that while splitting the text , you can not put this splitted text into QUAN field .This is conversion error. so before moving one field to another check out the data type of the fields and two must be same.If two fields data types are not same then always declare the target fields which will get the data as alpha-numeric(CHAR type).

    So create a char type field and get the splitted text into this char type field and finally assign/ write this char type field to your QUAN type field as illustrated by others.

    regards

    Syed

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 03, 2014 at 05:44 AM

    Hi Brujo ,

    data: v_zzcant1 type char10 ,

    v_zzmot1 type char10 .


    W_dw - text SPLIT AT ',' INTO
    w_input - aufnr
    w_input - vornr
    w_input - budat
    w_input - zzcant1 V_ZZCANT1
    w_input - zzmot1 V_ZZMOT1
    w_input - zzcant2 .


    w_input-zzcant1 = v_zzcant1 .

    w_input-zzmot1 = v_zzmot1 .


    With Regards ,

    Juneed Manha

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 03, 2014 at 06:16 AM

    Hi Brujo,

    You are splitting and trying to put the value in quantity or currency fields(w_input - zzcant1 and w_input - zzmot1).

    So first split and put in character or numeric type fields and then use MOVE or WRITE statement to move these character fields in quantity or currency fields.

    Use as suggested by Former Member

    Regards,

    Sheetal.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 03, 2014 at 04:12 AM

    Hi Brujo,

    Please move those fields as character type and then assign the value to real field.

    For eg.

    split field at ',' into field1 field2.

    zzcant1 = field1.

    zzcant2 = field2.

    Arivazhagan S.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 03, 2014 at 05:51 AM

    Hi,

    You are trying to put Character data to Quantity variable. This is not possible. you will face a problem Conversion Error. Make sure Source and Target data type should be same.

    Regards,

    Ravindra.

    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.