Skip to Content

Assigning Field Symbols.

Hi,

I have declared two field-symbols . like...

FIELD-SYMBOLS : <fs_s> TYPE zbapi_itshead,

<fs> TYPE zpoitshead,

Both the structures contain same fields except <fs> has an extra field , MANDT.

I want to assign now <fs_s> to <fs>. The error message I'm getting " "<FS_S>" and "<FS>" are type-incompatible."

My question is how to assign <fs_s> to <fs>.

If you kindly suggest me the way to do that ,it will be very helpful to me...

Thanks & Regards,

Biswajit.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 05:52 AM

    Hi,

    Simplest would be define <fs> as type ANY instead of <fs> TYPE zpoitshead.

    Regards

    Raju chitale

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 06:00 AM

    Hi Biswajit,

    Use the following declaration:

    Field-symbols: <fs_s> TYPE zbapi_itshead,

    <fs> TYPE any.

    Hope this will solve your problem.

    Regards,

    Nitin.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 06:12 AM

    Hi,

    Use like this:

    <fs> TYPE ANY in second statement you have used.

    Regards,

    Rahul

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 06:20 AM

    Hi,

    You can use move-corresponding <fs_s> to <fs> but prior to this

    you need to assign some temp structure of type zpoitshead to <fs> to

    initialise <fs> otherwise it will give dump.

    If you declare <fs> type any then afterwards you will have to access each

    component of <fs> dynamically. <fs>-fieldname can not be used in that case.

    Regards,

    Vishal

    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.