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

assigning structures with different fields to a field symbol

Hi,

can anybody give a example code of how to assign a structure to a field symbol in aloop if the structure is containing more than 1 type of data .

i am giving the code please try so that it could run ina unicode environment.and doesnt give dump.

TABLES: SNAP,

SNAP_BEG,

SNAPT.

DATA: BEGIN OF I_SNAP_BEG OCCURS 0.

INCLUDE STRUCTURE SNAP_BEG.

DATA TCODE LIKE SY-TCODE.

DATA REPID LIKE SY-REPID.

DATA TLINE LIKE SNAPT-TLINE.

DATA SIGN(1).

DATA END OF I_SNAP_BEG.

DATA DATUM LIKE SY-DATUM.

DATA: BEGIN OF FCC,

ID(2), LL(3), ERRID LIKE SNAPT-ERRID,

END OF FCC.

FIELD-SYMBOLS: <F> .

SELECT * FROM SNAP_BEG INTO TABLE I_SNAP_BEG.

SELECT * FROM SNAP UP TO 1 ROWS

WHERE DATUM = I_SNAP_BEG-DATUM.

ENDSELECT.

MODIFY I_SNAP_BEG.

LOOP AT I_SNAP_BEG ASSIGNING <F>.

MOVE-CORRESPONDING I_SNAP_BEG TO SNAP.

FCC = I_SNAP_BEG-FLIST.

IF FCC-LL CO '0123456789'.

ASSIGN FCC-ERRID(FCC-LL) TO <F>.

SNAPT-ERRID = <F>.

ELSE.

SNAPT-ERRID = '?????'.

ENDIF.

ENDLOOP.

WRITE : <F>.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 16, 2008 at 01:11 PM

    hi it useful

    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.