‎2006 May 08 6:20 AM
HI.
I wanted to download file to Application Server..
I looped the internal table and concatenating with seperated by..
CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
Now the issue is.. i have to download almost 8 to 9 internal tables in seperate files.. for which.. i created the subroutine to populate the same..
For Presentation Server.. using field symbol i downloaded the file successfully.. but in application server .. to loop at the internal table and i have to pass it to the work area to proceed with..
The work area declared should be dynamically taking the new structure. from the sub routine..
Can Any one please guide me
Thanks & Regards
Guhapriyan..
‎2006 May 08 6:36 AM
in the subroutine parameters , dont pass work area , instead pass a variable of <b>type ref to data</b>.
let <fs> be a field symbol declared inside the form representing the work area
assign data->* to <fs>.
‎2006 May 08 6:25 AM
Hi,
Did you try doing this inside the sub routine where p_table is the name of the table.
DATA : WA_TABLE LIKE LINE OF (P_TABLE)
Regards,
Ravi
Note : Please mark the helpful answers
‎2006 May 08 6:36 AM
in the subroutine parameters , dont pass work area , instead pass a variable of <b>type ref to data</b>.
let <fs> be a field symbol declared inside the form representing the work area
assign data->* to <fs>.
‎2006 May 08 12:39 PM
HI..
THANK YOU CAN YOU PLEASE SEND SOME CODE SNIPPET..
COZ.. I AM TRYING TO DECLARE THE VARIABLE IN THE PARAMETER
IT IS GIVING.. SYNTAX ERROR..
pLZ..
aDVANCE THANKS
gUHAPRIYAN
‎2006 May 08 12:43 PM
Hi,
Take a look at thse weblogs.
/people/ravikumar.allampallam/blog/2005/05/31/expand-the-list-of-columns-in-a-report-dynamically
/people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table
Regards,
Ravi
Note : Pleasse mark all the helpful answers
‎2006 May 08 12:16 PM
HI.
i WANTED TO DECLARE A TYPE USING THE FIELD SYMBOL
cAN ANYONE PLEASE GUIDE ME..
thANKS IN ADVANCE
gUHAPRIYAN
‎2006 May 08 12:20 PM
Hi
FIELD-SYMBOLS : <FS_WORK_AREA> LIKE LINE OF TABLE (P_TABLE).
Is this what you are lookin for?
Regards,
Ravi
Note : Please mark the helpful answers
‎2006 May 08 12:33 PM
hI,
nO.. ACTUALLY.. I AM DOWNLOADING SOME 10 INTERNAL TABLE .
SO I USED FIELDSYMBOL.. THE FIELDSYMBOL IS GLOBALLY DECLARED.. AND EVERYTIME THE DOWNLOAD SUBROUTINE. THE FIELD SYMBOL DATA AND STRUCTURE CHANGES..
BUT. NOW I WANTED TO DECLARE AN WORK AREA WITH THIS FIELD SYMBOL..
cANY YOU PLEASE GUIDE ME
thANKS IN aDVANCE
gUHAPRIYA
‎2006 May 08 12:36 PM
Hi,
If you have declared your field symbols like this
FIELD-SYMBOLS : <FS_TABLE> TYPE ANY TABLE,
THEN
DATA : WA_TABLE LIKE LIKE OF TABLE <FS_TABLE>.
If not, then please post the code here.
Regards,
Ravi
‎2006 May 08 12:46 PM
HI..
its not working..
**********************************************************
F I E L D S Y M B O L S *
**********************************************************
gLOBAL DECLARATION.
FIELD-SYMBOLS: <FS_ITAB> TYPE STANDARD TABLE
Sub routine Declaration.
Local Inside the subroutine..
Data: l_r_output LIKE LINE OF <FS_ITAB>.
Thanks in advance
Guhapriyan
‎2006 May 08 1:07 PM
Hi,
Try this.
DATA : T_DATA TYPE REF TO DATA.
FIELD-SYMBOLS : <FT_TABLE> TYPE ANY TABLE.
CREATE DATA T_DATA TYPE (P_TABLE).
ASSIGN T_DATA->* TO <FT_TABLE>.
FIELD-SYMBOLS : <FS_ANY>.
LOOP AT <FT_TABLE> ASSIGNING <FS_ANY>.
ENDLOOP.
Regards,
Ravi
Note : Please mark all the helpful answers
‎2006 May 08 1:52 PM
Hi..
i have populated an internal table of a big structure (custom table) which has more than 100 fields.
i wanted to download it into the application server.. as a tab de-limited file..
Can anyone guide me how to proceed with
Thanks In Advance
Guhapriyan..
‎2006 May 08 5:48 PM
Hi,
Use the following
1. OPEN DATASET
2. TRANSFER DATASET
3. CLOSE DATASET
This will write the table contents to the file on the app server. Here is a example from help.sap.com
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c8c358411d1829f0000e829fbfe/frameset.htm
DATA FNAME(60) VALUE 'myfile'.
DATA NUM TYPE I.
OPEN DATASET FNAME FOR OUTPUT.
DO 10 TIMES.
NUM = NUM + 1.
TRANSFER NUM TO FNAME.
ENDDO.
PERFORM INPUT.
OPEN DATASET FNAME FOR OUTPUT.
NUM = 0.
DO 5 TIMES.
NUM = NUM + 10.
TRANSFER NUM TO FNAME.
ENDDO.
PERFORM INPUT.
CLOSE DATASET FNAME.
Regards,
Ravi
Note : Please mark the helpful answers.