Alv output to be uploaded to application server
Hi experts,
I have a requirement wherein I have the output of the ALV to be uploaded to the application server.
The Alv output is based on the layout variant passed to FM: REUSE_ALV_GRID_DISPLAY.
Any pointers would be highly appreciated.
Thanks.
Hi
You don't need to offer the point, however we will try to help
Just yesterday it was problem similar, I means to take the ALV layout
Sandra Rossi found the report demo SALV_TEST_INTERCEPTOR_REPORT. he you can see how to get the layout and download it.
This is the post [url]Force Background processing with SUBMIT and keeping results in memory;url]
Max
Edited by: max bianchi on Aug 24, 2011 4:07 PM
Similar Messages
-
File upload to application server
hi,
i wanna upload a CSD file into the application server is there any FM to do these.
while the program is executed i wanna check whether it is being executed in the foreground or background,if the report is executed is executed in the background a CSD file has to be generated.
its urgent and surely pionts are granted.1) if it is one time only then u can make use of transaction CG3Y and CG3Z to download/upload fiel frm or to application server.
0r
2) refer this code to donwload/upload file on Aserver
REPORT ZGILL_AS message-id rp .
tables: pa0001,pa0002.
select-options s_pernr for pa0001-pernr no intervals MODIF ID XYZ.
parameters: p_dwnld AS CHECKBOX ,
p_upld AS CHECKBOX DEFAULT 'X'.
parameters: P_DSNI(75) TYPE C MODIF ID ABG DEFAULT
'/usr/local/sapdata/amit.dat' LOWER CASE.
data: begin of itab occurs 0,
pernr(8),
sp1(1) value ',',
werks(4),
sp2(1) value ',',
persg(1),
sp3(1) value ',',
persk(2),
end of itab.
data: s_eof(3).
start-of-selection.
if p_upld = 'X'.
OPEN DATASET P_DSNI FOR OUTPUT IN LEGACY TEXT MODE.
PERFORM FETCH_DATA.
STOP.
elseif p_dwnld = 'X'.
OPEN DATASET P_DSNI FOR INPUT IN LEGACY TEXT MODE.
IF SY-SUBRC NE 0.
MESSAGE E016 WITH
'Error opening seq. file, RC:' SY-SUBRC.
EXIT.
ENDIF.
CLEAR S_EOF.
DO.
PERFORM FETCH_file.
IF S_EOF EQ 'YES'. stop. ENDIF.
ENDDO.
endif.
END-OF-SELECTION.
if itab[] is not initial.
perform print_file1 tables itab.
else.
write:/ 'No records exists'.
endif.
*& Form FETCH_DATA
text
--> p1 text
<-- p2 text
FORM FETCH_DATA .
SELECT * FROM PA0001 WHERE PERNR IN S_PERNR.
MOVE-CORRESPONDING PA0001 TO ITAB.
TRANSFER ITAB TO P_DSNI.
APPEND ITAB.
ENDSELECT.
CLOSE DATASET P_DSNI.
ENDFORM. " FETCH_DATA
*& Form FETCH_file
text
--> p1 text
<-- p2 text
FORM FETCH_file .
READ DATASET P_DSNI INTO itab.
append itab.
clear itab.
IF SY-SUBRC NE 0.
S_EOF = 'YES'. EXIT.
ENDIF.
ENDFORM. " FETCH_file
*& Form print_file1
text
-->P_ITAB text
FORM print_file1 tables P_ITAB structure itab .
write:/2 'EmpNo',
14 'Personnel Area',
34 'Emp Group',
47 'Emp SubGroup'.
skip 1.
loop at p_itab.
write:2 p_itab-pernr,
14 p_itab-werks,
34 p_itab-persg,
47 p_itab-persk.
skip 1.
endloop.
ENDFORM. " print_file1
3) for ur third requirement make use of sy-batch field. -
File uploading to Application server
Hi all-
I have a requirement to upload the FTP server file to Application server in Ascii mode. Can anyone send me the code? or atleast tell me the procedure of doing this? pls send any code or info to [email protected]
Thanks
m aHi
See the demo programs RSFTP00*
Max -
Standard report output to be saved in application server
Hi All,
My requirement is to create a program which can save the standard report otuput(The output of the tcode S_ALR_87012936) to the application server.Please help.
Thanks and Regards,
Kowsalya.copy it into a zprogram and do the coding for that .....use it.
-
Regarding file uploading to application server
hi ,
i am facing a problem while uploading a .csv file to the application server.
it is going to dump.
error is ,
the capacity limit has been reached
pls urgent .
points are assured.try these link, if still there is problem, write the error analysis from st22
http://www.sap-img.com/ab004.htm
http://sap.ittoolbox.com/topics/t.asp?t=303&p=448&h2=322&h1=303&h3=448
http://www.sapdevelopment.co.uk/file/file_uploadsap.htm
ajay -
Master Data Flexible Upload from Application Server?
Hi Group,
Anyone know if it's possible to do a flexible upload of master data from a flat file on the application server?
I'd like to upload FS items and hierarchies from the BCS app server into our development environment, then transport to QA & PROD. We would obviously need some way to "save" after the upload was complete.
In the workbench, I can right click--> execute on the flex upload method and get a pop-up for a workstation file. In a data collection method, I can specify a logical file & filename, but I cannot choose master data (which might have allowed me to run a data collection method via the workbench).
Anyone accomplished this before? Or have any ideas if/how this is possible?
Thanks,
- ChrisHi Christopher,
It is not possible to assign Flexible Upload Method with Master Data to be assigned to Data Collection Method.
Flexible Upload with Master Data should be executed independently from Workbench. This is system design.
Regards
Narayana Murty -
About uploading into application server
hi,
i have a flat file with different record types in the sense
first line will be a file header
second line will be a invoice header
third line will be a invoice item
fourth will be a Invoice Item Tax Lines
and at last there will be file trailer
under second line the third and fourt line may or may not repeat
but the thing is file we have different fields for the different lines
so my question is how can we catch that flat file in the internal table
means what are the fields to be declared
can anyone pls help me.
thanks and regardsHI,
first declare a structure and an internal table in the format you expect the file to contain data.
then use
where p_logic is the path of file from selection screen
w_nom = p_flogic.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
logical_filename = w_nom
parameter_1 = w_numlot1
IMPORTING
file_name = w_fichier
EXCEPTIONS
file_not_found = 1
OTHERS = 2.
Data: wa type tt_erreur,
len type i.
OPEN DATASET w_fichier FOR input IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.
do.
READ DATASET w_fichier INTO ws_file.
IF sy-SUBRC = 0.
APPEND ws_file TO wt_file.
else.
exit.
ENDIF.
enddo.
ENDIF.
CLOSE DATASET p_flogic. -
Want to know the file path for application server in upload program
Iam doing upload program(i,e)uploading from application server,iam getting run time error while executing the following piece of code
"OPEN DATASET '/usr/sap/SPE/DVEBMGS00/work/ZPSPAR35_PERS_UP.txt' FOR OUTPUT
IN TEXT MODE
ENCODING DEFAULT."
if the above code is wrong can u mention the correct one.hi,
<b>Note: 699267</b>
<b>Symptom</b>
a) When downloading to the application server a short dump occurs with the error 'UC_OBJECTS_NOT_CHARLIKE'.
b) When downloading to a presentation server from an SAP system running on Unicode, only half the data is actually transferred to the downloaded file.
or
*)When downloading from an SAP system running on an application server with an EBCDIC-type code page, an incorrect code '0A' is written for the LINE FEED character
<b>
Pre-requisite</b>
a) The output file is opened 'in text mode' which does not allow to write non-character-like structures to the file via the TRANSFER command.
b) The file is downloaded in the internal representation which uses two bytes per character in a Unicode system. The number of bytes to download is determined from the number of characters in the SAP system, however.
or
*)The code of the LINE FEED character is incorrectly programmed.
<b>
Solution:</b>
You need to put some support packs attached with this note. For that you definitely need to ask YOUR FRIENDS WHO HAVE AN S-USER id at your WORK PLACE.
<b>Note: 879598</b>
<b>Reason and Prerequisites</b>
The file is downloaded in the internal representation which uses two bytes per character in a Unicode system. The number of bytes to download is determined from the number of characters in the SAP system. Hence when the download happens the data has to be converted to the required format.
<b>Solution</b>
Apply the corresponding support package or manually implement the changes described in the correction instructions.
Hope this helps.
Regards
ak.
PS: Reward useful answers with points. -
How to upload file from Application Server?
Dear Friends,
How to upload file from Application Server?
Plz. with example...
Regards,
Dharmeshhi,
check the code for upload from application server.
tables: kna1.
types: begin of s_file,
customer type kna1-kunnr,
country type kna1-land1,
name type kna1-name1,
region type kna1-regio,
end of s_file.
*--Internal tables
data: it_file type s_file occurs 0 with header line.
*-- Selection screen
selection-screen: begin of block b1 with frame title text-001.
parameter: p_file type rlgrap-filename default 'C:/customer.txt'
obligatory.
selection-screen: end of block b1.
*-- At selection screen
at selection-screen on value-request for p_file.
perform file_help using p_file.
*-- Process File
start-of-selection.
perform upload_file using p_file.
*-- write File data to o/p
end-of-selection.
perform write_data.
*& Form file_help
form file_help using p_p_file.
data: l_filepath type ibipparms-path.
call function 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
importing
file_name = l_filepath
p_p_file = l_filepath.
endform. " file_help
*& Form upload_file
form upload_file using p_p_file.
call function 'WS_UPLOAD'
exporting
filename = p_p_file
filetype = 'DAT'
IMPORTING
FILELENGTH =
tables
data_tab = it_file
exceptions
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
no_authority = 10
others = 11
if sy-subrc <> 0.
message i001.
endif.
endform. " upload_file
*& Form write_data
form write_data .
loop at it_file.
write:/ it_file-customer, it_file-country, it_file-name,
it_file-region.
endloop.
endform.
regards,
keerthi. -
Output XML to Application Server
Hi,
I have successfully output the contents of an xml document object (if_ixml_document) using the following code (where p_xml_document is my xml document object):
TYPES:
BEGIN OF xml_line,
data(256) TYPE x,
END OF xml_line.
DATA:
streamfactory TYPE REF TO if_ixml_stream_factory,
ostream TYPE REF TO if_ixml_ostream,
renderer TYPE REF TO if_ixml_renderer,
ls_xml TYPE xml_line,
lt_xml_table TYPE TABLE OF xml_line,
v_xml_size TYPE i.
Transfer contents of xml document object into an internal table.
streamfactory = g_ixml->create_stream_factory( ).
ostream = streamfactory->create_ostream_itable( table = lt_xml_table ).
renderer = g_ixml->create_renderer( ostream = ostream document = p_xml_document ).
renderer->render( ).
v_xml_size = ostream->get_num_written_raw( ).
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
bin_filesize = v_xml_size
filename = 'c:\hr_sl\aaa_sunlife.xml'
filetype = 'BIN'
CHANGING
data_tab = lt_xml_table.
My problem is I really need to output the XML to the application server, so I need to replace the call to cl_gui_frontend_services=>gui_download with something that will download the xml to the app server.
I've tried using OPEN DATASET/TRANSFER/CLOSE DATASET, and while I am getting a file created on the app server, it only contains one line of XML.
My code looks lile this:
OPEN DATASET l_ofile FOR OUTPUT IN BINARY MODE.
Transfer xml to dataset
LOOP AT lt_xml_table INTO ls_xml.
TRANSFER ls_xml TO l_ofile.
ENDLOOP.
Close the dataset.
CLOSE DATASET l_ofile.
I've searched and searched on SDN and have not found an answer. Any help would be greatly appreciated.
Thanks!
Edited by: Russell Hergott on Jan 16, 2008 10:52 PMhi boss,
some of the code may be useful for u .
try like this sending into the internal table and then try ....
*& Report ZTESTPROGRAMFORUPLOAD
REPORT ZTESTPROGRAMFORUPLOAD message-id zmsg.
tables:pa0002.
types:begin of ty_pa0000,
pernr like pa0000-pernr,
endda like pa0000-begda,
end of ty_pa0000.
types:begin of ty_pa0002,
pernr like pa0002-pernr,
begda like pa0002-begda,
endda like pa0002-endda,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
end of ty_pa0002.
data:it_pa0000 type standard table of ty_pa0000 with header line,
it_pa0002 type standard table of ty_pa0002 with header line.
data: v_pernr like pa0002-pernr,
v_lines type i.
DATA: W_MSG(150) TYPE C.
SELECTION-SCREEN BEGIN OF BLOCK FILE WITH FRAME TITLE TEXT-FIL.
*SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: P_PC RADIOBUTTON GROUP RAD USER-COMMAND USR. "PC
*SELECTION-SCREEN COMMENT 3(5) TEXT-SC1.
PARAMETERS: P_UNIX RADIOBUTTON GROUP RAD DEFAULT 'X'. "UNIX
*SELECTION-SCREEN COMMENT 11(5) TEXT-SC2.
parameters:p_file like rlgrap-filename.
*SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK FILE.
at selection-screen on value-request for p_file.
perform f4_help.
START-OF-SELECTION.
*---Get the active employyes
select pernr
endda
from pa0000
into table it_pa0000 up to 100 rows
where endda >= sy-datum
and begda <= sy-datum
and stat2 = '3'.
if sy-subrc = 0.
sort it_pa0000 by pernr endda descending.
delete adjacent duplicates from it_pa0000 comparing pernr.
endif.
select pernr
begda
endda
vorna
nachn
from pa0002
into table it_pa0002
for all entries in it_pa0000
where pernr = it_pa0000-pernr.
sort it_pa0002 by pernr.
delete adjacent duplicates from it_pa0002 comparing pernr.
append it_pa0002.
endloop.
END-OF-SELECTION.
describe table it_pa0002 lines v_lines .
*---get data into Application Server.
PERFORM OUTPUT_CORPEDIA_VENDOR_FILE .
SKIP 2.
WRITE:/ 'FILE NAME :' , P_FILE .
WRITE:/ 'NO OF RECORDS DOWNLOADED : ', V_LINES .
*& Form f4_help
text
--> p1 text
<-- p2 text
form f4_help .
IF P_UNIX = 'X'.
F4 help for UNIX
CALL FUNCTION 'F4_DXFILENAME_4_DYNP'
EXPORTING
DYNPFIELD_FILENAME = 'P_FILE'
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
FILETYPE = 'P'
LOCATION = 'A'
SERVER = ''.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH TEXT-E01 P_FILE.
ENDIF.
ELSEIF P_PC = 'X'.
F4 help for PC
clear p_file.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_PATH = P_FILE
MASK = ',..'
MODE = '0 '
TITLE = 'Choose File'
IMPORTING
FILENAME = P_FILE
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
ENDIF.
endform. " f4_help
*& Form OUTPUT_CORPEDIA_VENDOR_FILE
text
--> p1 text
<-- p2 text
form OUTPUT_CORPEDIA_VENDOR_FILE .
IF P_PC = 'X'.
data: v_pcfile type string.
v_pcfile = p_file.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = v_pcfile
FILETYPE = 'ASC'
WRITE_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = it_pa0002.
sort it_pa0002 by pernr.
delete adjacent duplicates from it_pa0002.
else.
data: outrec(200) type c .
OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE encoding DEFAULT.
loop at it_pa0002.
outrec+0(8) = it_pa0002-pernr.
outrec+18(8) = it_pa0002-begda.
outrec+36(8) = it_pa0002-endda.
outrec+54(40) = it_pa0002-vorna.
outrec+104(40) = it_pa0002-nachn.
transfer outrec to p_file.
clear outrec.
endloop.
CLOSE DATASET OUTREC.
IF SY-SUBRC = 0.
CLEAR W_MSG.
CONCATENATE 'Corpedia Vendor Demographic File successfully written to:'
P_FILE
INTO W_MSG SEPARATED BY SPACE.
ULINE. SKIP.
WRITE : W_MSG.
ENDIF.
ENDIF.
endform. " OUTPUT_CORPEDIA_VENDOR_FILE
regards,
venkat. -
Sap query output to save on application server
Hi All,
I have one requirement, want to save the output of sap query on application server as a text file?
Is there any work around?
Regards
Vasumathi
Edited by: komma vasumathi on Nov 5, 2009 10:32 AMHi Vasumathi,
Application server path cannot be accessed unless otherwise using OPEN DATASET. More over, Infoset cannot be executed directly. It can be accessed through SAP Query only.
Writing Logic for 2 or 3 tables with Inner Join will not be a big deal. Writing Abap program will be optimum for you FTP requirement.
1. create a folder in AL11 as \sap\common\
2. create z program and Declare sel-screen parameters : selopt1, selopt2
3. Query : Select Afield1 Afield2 Bfield1 Bfield2 from table1 as A inner join table2 as B on Afield1 eq Bfield1 where Afield1 in selopt1 and Afield2 in selopt2 into corresponding fields of table itab.
4. creating file at application sever
w_fileloc = '\sap\common\file.txt'
OPEN DATASET w_fileloc FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
. Loop itab into wa_itab.
Transfer wa_itab to w_fileloc.
clear w_fileloc.
endloop.
5. goto AL11 and check the file file.txt in folder \sap\common
Please let me know if you need more information or close this thread by offiering the points( If you are satisfied).
Regards,
Sakthivel N -
Create report output to the Client of the Application Server inst.of Server
Hi,
Please suggest the soution for the below:
We are using SET_REPORT_OBJECT_PROPERTY and WEB.SHOW_DOCUMENT to create report. Now Requirement is to save the report output to Client instead of server. I tried to use WEBUTIL but web util can be used from form only becuase that is using form item.
(1) We are calling all our report from a form. Is there any option to trigger a action when ever a report job is created in Application server (report server)
(2) Please let me now is there any option to create the output directly to client of application server 10G R1WIN , 10GR2WIN or in 11G. If yes please let me know the details.
Wtih Thanks & Regards
K.Sundar
Edited by: 870860 on Jul 13, 2011 10:27 PMHi,
Please suggest the soution for the below:
We are using SET_REPORT_OBJECT_PROPERTY and WEB.SHOW_DOCUMENT to create report. Now Requirement is to save the report output to Client instead of server. I tried to use WEBUTIL but web util can be used from form only becuase that is using form item.
(1) We are calling all our report from a form. Is there any option to trigger a action when ever a report job is created in Application server (report server)
(2) Please let me now is there any option to create the output directly to client of application server 10G R1WIN , 10GR2WIN or in 11G. If yes please let me know the details.
Wtih Thanks & Regards
K.Sundar
Edited by: 870860 on Jul 13, 2011 10:27 PM -
Uploading data to application server
Hi,
I am working on a report,where in I have to upload the data to application server.Here data is getting uploaded to application server ,but everything is getting clubbed.There is no space between each field.Can anyone send an example for this?
Regards,
HemaHi Hema,
To upload into application server with space, you have to store into another internal table from base inernal table.
suppose you have int_table is the table from where u are currently uploading data, then move into another internal table.
the new internal table will be with one field of length more than total lenght of all fields of base table.
move the data from base table to another internal table.
loop at int_table into wa_table
move wa_table to wa_table1 separated by space
append wa_table1 to int_table1
endloop
now upload from int_table1.
Hope it will work fine.
Regards
krishnendu -
Uploading file in application server to a transaction
Hi All,
I have a requirment where in i want to upload the transaction FF_5 using the file in the application server. Is there any way to do this. I dont want to download the file to presentation server and then upload the file in FF_5 transaction. According to the requirement i have to directly upload the application server file in the tcode FF_5. Pls let me know how to do this.
Thanks,
RajuHi,
You cannot upload the data from the applcation server. You have to upload from the presentation server.
If you have data on the application server then you need to save it to presentation server and upload to FF_5. -
Read Application server file and upload into internal table
Another help needed guys,
My file in the application server is of format
Name Marks 1 Marks 2 Marks 3............
A 10 15 20
The only thing separating the columns is space.
Actually this file was downloaded from an internal table into the app server.
Now I want to load it back into the internal table.
How do I load this into internal table so that each column goes in separate internal table field.
Currently am using cl_abap_char_utilities=>HORIZONTAL_TAB but I can get only the first column name in my field1 of the internal table.
How should I applroach this?
Points will be awarded for useful answers.
Regards
AnkitHi ankit,
i think u have uploaded the tab delimited file in the application sever.
then suppose see if u r file is in the format of name#marks1#marks2#marks3.
then in the program u do like this..
first declare one internal table with one filed.
data:
c_hextab(1) TYPE x VALUE '09'.
data:
begin of t_data occurs 0,
line(256) type c,
endof t_data.
and declare one more intternal table
data:
begin of t_itab occurs 0,
name(15) type c,
marks1(4) type c,
marks2(4) type c,
marks3(4) type c,
endof t_itab.
then
open the file with
OPEN DATASET p_file FOR INPUT IN TEXT MODE.
then between do and endo do like this..
DO.
clear t_data.
READ DATASET p_file INTO t_data.
if sy-subrc ne 0.
exit.
else.
split t_data at c_hextab
into t_itab-name
t_itab-marks1
t_itab-marks2
t_itab-marks3.
append t_itab.
endif.
enddo.
i think it will be helpful to u
Please let me know wht type of file has been uploaded into application server.(tab deleimted, comma separated or something else).
Regards,
Sunil Kumar Mutyala.
Maybe you are looking for
-
I have loaded mountain lion on my iMac and have an old version of iWorks on my machine. It appears that all my Pages documents won't open unless I get the new version of Pages off the App store. Does anyone know if that is a free download if you al
-
Filtering a Query result for a specific value of a key figure
Hi folks, I want to filter a query for a specific value of a key figure. The report should display all customer who has an account balance greater than EUR 500'000. Can I only implement this kind of filter via a condition in Query-Designer? If I run
-
How to List files in a directory into an Array
Does anyone know of the best way to load all of the files in a specified directory into an array. (not going into sub directories either). I was to be able to do something like this.... (pseudo) String directory = "C:\"; String [] theList; do get nex
-
Need new display for White mac Book
My macbook has had a white display for the last year and a half...I have connectors to hook it to my tv...and that is how I use it.. I was wondering how do i go by getting a new dispay when my macbook product has been discontinued...
-
I was hoping to be able to upgrade our App. Server from 10.1.2.0.0 to the 10.1.2.0.2 version which now includes Forms and Reports, but Oracle is saying that there is NO upgrade path from 10.1.2.0.0 to 10.1.2.0.2 . I find this very disconcerting, as i