abap question

KiranKumar Akula KiranKumar_Akula at aprilasia.com
Wed Jan 27 21:00:44 EST 2010


This code snippet helps:
 
DATA: BEGIN OF line,
         col1(1) TYPE c,
         col2(1) TYPE c VALUE 'X',
       END OF line.

FIELD-SYMBOLS <fs> LIKE line.

ASSIGN line TO <fs>.

MOVE <fs>-col2 TO <fs>-col1.
WRITE: <fs>-col1, <fs>-col2.
 
 
By the way, using SE38 we can refer to the following list of demo
reports:
 
DEMO_FIELD_SYMBOLS_ASSIGN_COMP Assigning a Structure Component by
Component to a Field Symbol
DEMO_FIELD_SYMBOLS_ASSIGN_DECI Cast Decimal Places
DEMO_FIELD_SYMBOLS_ASSIGN_ERR  Data Areas for Field Symbols
DEMO_FIELD_SYMBOLS_ASSIGN_TYPE Cast with Predefined Data Types
DEMO_FIELD_SYMBOLS_CASTING     Casting Using Field Symbol Type
DEMO_FIELD_SYMBOLS_CASTING_TYP Casting Using Explicit Type
DEMO_FIELD_SYMBOLS_DYNAMI_AS_1 Dynamic ASSIGN
DEMO_FIELD_SYMBOLS_DYNAMI_AS_2 Dynamic ASSIGN
DEMO_FIELD_SYMBOLS_DYNAMI_AS_3 Assigning Field Symbols
DEMO_FIELD_SYMBOLS_STAT_AS_OF2 Static ASSIGN Using Offset
DEMO_FIELD_SYMBOLS_STAT_AS_OFF Static ASSIGN Using Offset
DEMO_FIELD_SYMBOLS_STAT_ASSIGN Static ASSIGN
DEMO_FIELD_SYMBOLS_STRUCTURE   Forcing a Structure on a Field Symbol
DEMO_FIELD_SYMBOLS_TYPE        Specifying the Full Type of a Field
Symbol
________________________________

From: KiranKumar Akula 
Sent: Thursday, January 28, 2010 9:51 AM
To: 'SAP Workflow Users' Group'
Subject: RE: abap question
 
Here it is:
 
  DATA name(20) TYPE c VALUE 'ITAB-FIELDNAME'.
  FIELD-SYMBOLS <fs> TYPE ANY.
  ASSIGN (name) TO <fs>.
  IF sy-subrc EQ 0.
    WRITE / <fs>.
  ENDIF.
 
Regards
Kiran
________________________________

From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
Of Shoaib Mirza
Sent: Thursday, January 28, 2010 3:49 AM
To: sap-wug at mit.edu
Subject: abap question
 
Hi
 
I'm integrating a workflow analysis report i've written into another
report.  This other report selects data from a database and puts it in
to a data reference object i.e.:
 
* assign data reference to table field symbol
  ASSIGN lh_paa_tab->* TO <fs_paa_tab>.
 
-> then a subroutine pulls back the data in to <fs_paa_tab>.
 
 
Now my traditional abap report starts with an internal table whick
matches <fs_paa_tab> structure.
 
I want to transfer the contents of  <fs_paa_tab> in to my internal table
so I can start my processing, but if I try I get a short dump because of
incompatibility.
 
How do I transfer the data from this data reference to a standard
internal table?
 
Any suggestion would be greatly appreciated.
 
Kind REgards
Sunni
 
________________________________

Do you have a story that started on Hotmail? Tell us now
<http://clk.atdmt.com/UKM/go/195013117/direct/01/> 

The above message is for the intended recipient only and may contain confidential information and/or may be subject to legal privilege. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this message, or any attachment, is strictly prohibited. If it has reached you in error please inform us immediately by reply e-mail or telephone, reversing the charge if necessary. Please delete the message and the reply (if it contains the original message) thereafter. Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20100128/ca5b8b97/attachment.htm


More information about the SAP-WUG mailing list