Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

urgent

Former Member
0 Likes
713

i want to assign values in p0019 or p0021 or p0006 which have subtype to a FIELD SYMBOL which should hold values of any type.

what should be the type of FIELD SYMBOL. how to declare it.

when i give FIELD-SYMBOL : <A> TYPE ANY TABLE

OR FIELD-SYMBOL : <A> TYPE STANDARD TABLE.

iam getting error. please clarify it.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
687

Hi Ramana,

Try using the below code format

FIELD-SYMBOL : <fs-name> TYPE ANY.

ASSIGN 'workarea' TO <fs-name>.

Regards,

Chandru

i want to assign values in p0019 or p0021 or p0006 which have subtype to a FIELD SYMBOL which should hold values of any type.

what should be the type of FIELD SYMBOL. how to declare it.

when i give FIELD-SYMBOL : <A> TYPE ANY TABLE

OR FIELD-SYMBOL : <A> TYPE STANDARD TABLE.

iam getting error. please clarify it.

4 REPLIES 4
Read only

former_member156446
Active Contributor
0 Likes
687

Hi Ramana



FIELD-SYMBOLS: <fs_name> TYPE ANY.
or
FIELD-SYMBOLS: <fs_name> TYPE char5.
or
FIELD-SYMBOLS: <fs_name> TYPE numc5.

to use this field symbol use assign statement.
assign 'p0019' to <fs_name>..
....
..

Read only

Former Member
0 Likes
687

hi,

i don't want to assign the string P0019. i want to assign the work area to field symbol

Read only

Former Member
0 Likes
688

Hi Ramana,

Try using the below code format

FIELD-SYMBOL : <fs-name> TYPE ANY.

ASSIGN 'workarea' TO <fs-name>.

Regards,

Chandru

Read only

0 Likes
687

Hi,

In field-symbols any type of value can assign .

Try using the below code format

FIELD-SYMBOL : <fs-name> TYPE ANY.

ASSIGN 'workarea' TO <fs-name>.

example : run this programs u can understand .

****************************************************

&----


*

*& EXAMPLE OF FIELD-SYMBOL

&----


DATA : FIR TYPE I,

NAME(20) TYPE C.

FIR = 100.

FIELD-SYMBOLS : <MFS>.

FORMAT COLOR 3.

ASSIGN FIR TO <MFS>.

WRITE : / <MFS>.

NAME = 'FIRST REPORT'.

ASSIGN NAME TO <MFS>.

WRITE 😕 <MFS>.

&----


*& EXAMPLE OF FIELD-SYMBOL

&----


TABLES : EKKO.

DATA STAB LIKE EKKO OCCURS 3 WITH HEADER LINE.

FIELD-SYMBOLS : <FSPO> LIKE STAB.

SELECT * UP TO 40 ROWS FROM EKKO INTO TABLE STAB.

FORMAT COLOR 3.

FORMAT COLOR 3.

LOOP AT STAB.

ASSIGN STAB TO <FSPO>.

WRITE : / <FSPO>-EBELN, <FSPO>-BUKRS ,<FSPO>-STATU.

ENDLOOP.

Thanking you.

Subash

email:- [email protected]