abap question (abap objects)

Shoaib Mirza shoaib_mirza at hotmail.com
Thu Jan 28 03:50:31 EST 2010


Hi Kiran

 

Thanks, but what I'm doing is the other way around I think.

 

I have some SAP code that has already read a table in to <fs>, <fs> is an object ref (lh_int_tab->*<fs> , call function using <fs>.. etc)

 

What I want to do is take the contents of <fs> and copy them in to a normal internal table (standard table), when I try I get a short dump stating that the conversion is incompatible.

 

How do I read the contents of the data object reference table in <fs> in to an internal table?

 

 

Kind Regards

Sunni
 


Subject: RE: abap question
Date: Thu, 28 Jan 2010 10:00:44 +0800
From: KiranKumar_Akula at aprilasia.com
To: sap-wug at mit.edu







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

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. 		 	   		  
_________________________________________________________________
Do you have a story that started on Hotmail? Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20100128/ac816448/attachment.htm


More information about the SAP-WUG mailing list