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

How to know or check the type of a field when processing a dynamic table?

Dear all,

When processing a dynamic table i have a short dump because of a convert_of_type incorrect, so i would like to check the type of field-symbol <f> before moving the data (type char) to this field-symbol <f>.

Could you please help me how to check or get the type of field-symbol <f> (because field-symbol <f> is assigned dynamic, so this <f> can be type char, unit, or quantity, ...)?

The source code same as below:

ASSIGN COMPONENT lc_field OF STRUCTURE ls_data TO <f>.

MOVE lv_field TO <f>. (Dump is here when lv_field is char type and <f> is quantity type => could i check the type of <f> if it's char type before using this instruction "MOVE ..."?)

Thanks a lot in advance,

Vinh Vo

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Dec 23, 2008 at 04:04 AM

    Try to use this way

    WRITE lv_field TO <f>. 
    

    Instead of

    MOVE lv_field TO <f>. 
    

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 23, 2008 at 04:00 AM

    Hi,

    declare <f> as type any, it should be able to accept any valu.

    Regards,

    Dev.

    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.