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

how to assign structure fild to a structure

my req is to make unicode enabled ..in ecc6.10.

code is:

TYPES: BEGIN OF xs_pa0007,

country(2),

national_id(20),

schkz type pa0007-schkz, "work schd rule

teilk(3), "type pa0007-teilk Part time EE yes/no

empct type pa0007-empct, "Emp percent

wostd(6). "Weekly work hours

TYPES: END OF xs_pa0007.

TYPES: BEGIN OF gs_paxxxx,

fill1,

begda TYPE pa0000-begda,

fill2,

seqnr TYPE pa0000-seqnr,

infty(4),

fill3,

subty TYPE pa0000-subty,

fill4,

pernr TYPE pa0000-pernr,

fill5,

copied,

fill6,

rec(1500),

END OF gs_paxxxx.

data: gw_pa0007 type xs_pa0007,

ga_paxxxx type gs_paxxxx.

gw_pa0007 = ga_paxxxx-rec.

in this line im getting error that

gw_pa0007 and ga_paxxxx-rec are not mutualy compatible in unicode program.

please tell me how to solve this ..

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Jul 11, 2007 at 05:28 AM

    Hi,

    Try

    gw_pa0007-country = ga_paxxxx-rec+0(2).

    gw_pa0007-national_id = ga_paxxxx-rec+2(20).

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Yayanthi..

      thxs its not gving error but how i need to knw only country n nation id.

      is it like conssidering only type c flds from str..?

      how u hv taken only country n nation id.. inthis ex?

      please clear me..

  • Posted on Jul 11, 2007 at 05:30 AM

    HI,

    Try this

    FIELD-SYMBOLS: <fs> TYPE ANY.

    ASSIGN ga_paxxxx-rec to <fs> CASTING TYPE xs_pa0007.

    gw_pa0007 = <fs>.

    Regards,

    Sesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 11, 2007 at 05:35 AM

    Hi,

    Use the WRITE TO Statment

    WRITE ga_paxxxx-rec TO gw_pa0007.

    Regards

    Sudheer

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 11, 2007 at 06:18 AM

    Hi,

    gw_pa0007-country = ga_paxxxx-rec+0(2).

    gw_pa0007-national_id = ga_paxxxx-rec+2(20).

    gw_pa0007-schkz = ga_paxxxx-rec+22(8).

    gw_pa0007-teilk = ga_paxxxx-rec+30(3).

    gw_pa0007-empct = ga_paxxxx-rec+33(5)."Check this,I am not very sure abt the values.Otherwise, change offset 5 accordingly to 6 or whateever

    gw_pa0007-wostd = ga_paxxxx-rec+33(6)."accordingly change 33 to 34 or whatever

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 11, 2007 at 06:31 AM

    Hi,

    It is based on declaration.If it is declared by database field other than character, go to that field and find the length of the field and then use it for offset.

    field+starting_position(no. of characters)

    and then add accordingly

    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.