Function module for transfering a file contents into another?
Hi all,
Is there a Function module for transfering a file contents into another?That is the whole content from a file to other??
Regards,
Shashank.
Hi,
I think there is no such FM. You need to read the data in internal table and then write it in another file.
Regards,
Atish
Similar Messages
-
Function Module for putting Flat File into Application Server
Hi Pals,
what is the Function module for putting my flatfile into application server..
because i dont have authorizations to put my flatfile into application server directly..
I know one function mudule is there for that ...so, can you suggest me.. what is the function module... for that..
thanks.. and points will be assigned..
chittiHi,
well normally you use the method GUI_UPLOAD of class CL_GUI_FRONTEND_SERVICES to upload a file from your client pc. Then you use the abap statements open dataset, transfer and close dataset to put the file to the app-server.
kind regards
Siggi -
Function Modules for uploading the file
Hi experts ,
I have a requirement to download a file (csv) from my local sytem (say desktop) into an internal table first and then update the contents of the same internal table into the database table.
Can anybody provide me with a sample program for doing the same or at least the name of function modules for the same.
Prompt replies will be rewarded.
TIA
AbhishekHi Abhishek,
How to use INSERT Statement..
Check this Sample Program..
TABLES:MARA.
DATA:ITAB LIKE MARA OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
ITAB-MATNR = '123ABCDA'. .
ITAB-MBRSH = 'C'.
ITAB-MTART = 'FERT' .
ITAB-MEINS = 'KG' .
APPEND ITAB.
ITAB-MATNR = '123ABCDB'. .
ITAB-MBRSH = 'C'.
ITAB-MTART = 'FERT' .
ITAB-MEINS = 'KG' .
APPEND ITAB.
LOOP AT ITAB.
INSERT MARA FROM ITAB.
MODIFY MARA .
ENDLOOP. -
Function module for move internal table records into MSexcel file
Hi all,
Tell me the function module which is used to
move internal table records in to MSexcel file.
Give the sample program...Please search the forum for FM "GUI_DOWNLOAD" You will get tons of threads with sample code.
Also take a look into SAP_CONVERT_TO_XLS_FORMAT
Thanks -
Equalent of F4_filename function module for application server file path
hi experts,
i am using cl_gui_frontend_services=>file_open_dialog
for bring file path dynamically for user, in front end.
same feature i want to give when i am trying upload file from application server.
kindly provide me function module or class method, which will do it.
thanks in advance
regards,
pavanHi,
Use FM F4_DXFILENAME_TOPRECURSION
Sample code here
report ztest.
data : filename like DXFIELDS-LONGPATH.
data : begin of itab occurs 0,
a(200) type c,
end of itab.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
I_LOCATION_FLAG = 'A'
*I_SERVER = '?'
*I_PATH =
FILEMASK = '.*'
*FILEOPERATION = 'R'
IMPORTING
*O_LOCATION_FLAG =
*O_SERVER =
O_PATH = filename
*ABEND_FLAG =
EXCEPTIONS
RFC_ERROR = 1
ERROR_WITH_GUI = 2
OTHERS = 3
break-point.
open dataset filename for input in binary mode.
while sy-subrc = 0.
clear itab .
read dataset filename into itab.
append itab.
endwhile.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = 'd:\abc.txt'
FILETYPE = 'BIN'
TABLES
DATA_TAB = itab
Regards,
Satish -
What is the function module which uploads excel file data into tcodes
Hi,
i want to upload data in cs01 tcode.
but data is excel sheet while i am trying to use gui_upload it is not being possible for me to upload data.
can any one tell me what is the function module?
can any send me the steps how to uplaod data if it is in excelsheet?
thanks & regards
naveen
Moderator message: FAQ, please search for available information before asking.
locked by: Thomas Zloch on Aug 18, 2010 1:46 PMHi,
Try the below sample code u ll get an idea of uploading using 'TEXT_CONVERT_XLS_TO_SAP'.
REPORT zupload_excel_to_itab.
TYPE-POOLS: truxs.
PARAMETERS: p_file TYPE rlgrap-filename.
TYPES: BEGIN OF t_datatab,
col1(30) TYPE c,
col2(30) TYPE c,
col3(30) TYPE c,
END OF t_datatab.
DATA: it_datatab type standard table of t_datatab,
wa_datatab type t_datatab.
DATA: it_raw TYPE truxs_t_text_data.
At selection screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = 'P_FILE'
IMPORTING
file_name = p_file.
*START-OF-SELECTION.
START-OF-SELECTION.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = it_raw " WORK TABLE
i_filename = p_file
TABLES
i_tab_converted_data = it_datatab[] "ACTUAL DATA
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
END-OF-SELECTION.
END-OF-SELECTION.
LOOP AT it_datatab INTO wa_datatab.
WRITE:/ wa_datatab-col1,
wa_datatab-col2,
wa_datatab-col3.
ENDLOOP.
Thanks & Regrads,
Neela. -
Function Module for separating a date range into days
Hi all,
Does anyone know if there is a function module which gives back the list of days when we give a date range as input parameter to the function module. For example, we enter the range 10.07.2006 - 13.07.2006 and the function module gives back a table in form 10.07.2006, 11.07.2006, 12.07.2006, 13.07.2006.
Thanks,
SükrüHi suekrue,
1. Exactly for this purpose,
i have written an
INDEPENDENT FORM (subroutine)
wherein we pass
a) fromdate
b) todate
c) ITAB
2. and it gives all the dates in the internal table.
3. just copy paste
4.
data : itab type table of sy-datum with header line.
parameters : fromdate type sy-datum default '20060701'.
parameters : todate type sy-datum default sy-datum.
perform getdays tables itab using fromdate todate.
break-point.
FORM
form getdays
tables itab
using fromdate todate.
data : curdate type sy-datum.
curdate = fromdate.
do.
if curdate > todate.
exit.
endif.
itab = curdate.
append itab.
curdate = curdate + 1.
enddo.
endform. "getdays
regards,
amit m. -
How to insert apex_application_files file content into another table?
Hi All,
I am using Apex 3.2 on Oracle 10g.
I have used 'file_browse' item to upload a spreadsheet file into apex_application_files table.
I would like to populate another table with the contents of this spreadsheet file from apex_application_files.
I have spent almost 2 days looking for an answer on how to do this.
Can you please tell me how to do this or point me to a good resource?
Thank you,
Naushad.Hi Thanks,
I did see this code, but this is not what I was looking for. This code simply inserts the file into another table, but I was looking for the contents of this file (eg. a single column spreadsheet with 10 lines and all ten of these lines to be inserted as rows in a table) inserted as rows into another table.
I managed to implement this by following below link:
http://nzchaudhry.wordpress.com/2011/07/18/uploading-csv-using-oracle-application-express-apex/
Thanks to all of you.
Naushad. -
Hi all,
I need a function module for executing .bat file in application server.
Regards
Sathish Kumar K.CCALL FUNCTION 'SXPG_STEP_COMMAND_START'
EXPORTING
* TARGET =
* DESTINATION =
COMMANDNAME = 'ZCOPY'
ADDITIONAL_PARAMETERS = AD_PAR
OPERATINGSYSTEM = 'Windows NT'
STDINCNTL = 'R'
STDOUTCNTL = 'M'
STDERRCNTL = 'M'
TRACECNTL = '3'
TERMCNTL = 'C'
* TRACELEVEL = 0
* BATCH =
* LONG_PARAMS =
* JOBNAME =
* JOBCOUNT =
* STEPCOUNT =
* CONNCNTL = 'H'
* IMPORTING
* STRTSTAT =
* XPGID =
* CONVID =
* EXITSTAT =
* EXITCODE =
* PARAMS =
* LAST_PROC =
* LAST_HOST =
* LAST_PROC_NUM =
TABLES
LOG = LT_LOG
EXCEPTIONS
COMMAND_NOT_FOUND = 1
PARAMETER_EXPECTED = 2
PARAMETERS_TOO_LONG = 3
SECURITY_RISK = 4
WRONG_CHECK_CALL_INTERFACE = 5
NO_PERMISSION = 6
UNKNOWN_ERROR = 7
COMMUNICATION_ERROR = 8
SYSTEM_ERROR = 9
CANNOT_GET_RFC_DESTS = 10
JOB_UPDATE_FAILED = 11
JOB_DOES_NOT_EXIST = 12
OTHERS = 13 -
Function module for uploading file in background
hi friends
i am working on Inbound IDOC interface where in which i am creating a function module for that,
in which based on the idoc received , the interface has to choose the file from the shared folder and it has to move its contents to an internal table
can anybody suggest me what function module can i use.
we cant use GUI_upload,or cl_gui_frontend_services=>gui_upload
because this requires an user to interact in mines it is not the case
thanks in advance
with regards
s.janagarhi,
check this thread,you will get idea how to transfer data from file to internal table.
[https://forums.sdn.sap.com/click.jspa?searchID=17706879&messageID=6281020] -
Function Module for creating file name in Application Server
Hi Guys,
Can you suggest me a function module to generate a file name for a flat file to be save on application server using DATASET.
Required filename format : <table name >.<times tamp>.TXT
Thanks in advance.Hi,
Please try this ...
DATA: BEGIN OF FILE1,
CONST1(01) TYPE C VALUE '_',
FIELD1 LIKE SY-DATUM,
CONST2(01) TYPE C VALUE '_',
FIELD2 LIKE SY-UZEIT,
END OF FILE1.
DATA: FILENAME LIKE EDI_PATH-PTHNAM.
MOVE SY-DATUM TO FILE1-FIELD1.
MOVE SY-UZEIT TO FILE1-FIELD2.
CONCATENATE <table name> FILE1 INTO FILENAME.
Regards,
Ferry Lianto -
Function module to choose the file for download and upload
what is the function module to choose the file for download and upload for presentation server.
give me with examplePlease search in SCN.
This has been discussed so many times. -
Function Modules for Data and Time
Hi all,
I need 2 function modules for date and time. when we pass current data(sy-datum) and current time (sy-uzeit) into function modules, shoud get date in <b>dd/mm/yyyy or dd.mm.yyyy</b> and time in<b> HH:MM:SS</b> formats.
Thanks in advanceHi Ranjith,
i think this will b usefull for you..
SAP Bar Chart Function Modules and what they are used for
Function module
Used for
BARC_GRAPHIC_PBO
Starting bar chart at PBO time, using a graphic profile (parameter PROFILE)
BARC_GRAPHIC_PAI
Analyzing data returned by the graphic
BARC_SET_TIME_AXIS
Setting start and end of time axis
BARC_SET_OPTIONS
Setting options
BARC_ADD_CHART
Creating a chart
BARC_SET_CHART_ATTRIB
Setting chart attributes
BARC_ADD_SECTION
Creating a section on the time axis
BARC_SET_SECTION_ATTRIB
Setting section attributes
BARC_ADD_RIBBON
Adding a ribbon to the time axis
BARC_SET_RIBBON_ATTRIB
Setting attributes for ribbons in the chart
BARC_ADD_GRID
Adding a time grid
BARC_SET_GRID_ATTRIB
Setting grid attributes
BARC_ADD_LAYER
Adding a layer (graphic elements)
BARC_SET_LAYER_ATTRIB
Setting layer attributes
BARC_ADD_LINE
Adding a line
BARC_ADD_CALENDAR
Creating a calendar
BARC_SET_CALENDAR_ATTRIB
Setting attributes for a calendar
BARC_ADD_TIME_PROFILE
Creating time profiles
BARC_SET_TIME_PROFILE_ATTRIB
Setting attributes for time profile
BARC_ADD_INTERVAL
Adding a time interval
BARC_SET_INTERVAL_ATTRIB
Setting time interval attributes
BARC_ADD_TIME_OBJECT
Creating a time object
BARC_CONVERT_DATE
Creating a date string in bar chart format
BARC_REVERT_DATE
Converting a date string in bar chart format to date and time
BARC_ADD_DATELINE
Creating a date line
BARC_SET_DATELINE_ATTRIB
Setting dateline attributes
BARC_GET_PROFILE_CONTENTS
Obtaining profile contents for customizing a chart
BARC_GET_COLUMN_WIDTH
Selecting new column width
BARC_SET_COLUMN_WIDTH
Setting the column width
BARC_GET_TEXTINDEX
Obtaining the text index of a field
BARC_SET_LABELS
Positioning the chart display
BARC_SET_COLUMN_ATTRIB
Setting column attributes
BARC_SET_ROW_ATTRIB
Setting row attributes
BARC_SET_ROW_HEIGHT
Setting the line height
BARC_SET_MAXCHARTS
Setting the maximum number of charts sent
<b>If its usefull reward points
</b> -
Function Module for search help Exit
How to create a function Module for search help exits?
please explain in details with step by step process.Hi,
How to create a function Module for search help exits?
function module for search help F4IF_SHLP_EXIT_EXAMPLE
dynamic search help use 'F4IF_INT_TABLE_VALUE_REQUEST'
please check out the link below it will help you
A repository object maintained in the ABAP Dictionary. It supplies input fields on Dynpros with single- or multi-column input helps. Search helps can be linked in the Dictionary with components from structures, data elements, and check tables. A search help enables you to search for entry values with assigned data, without you having to know the exact spelling of the value.
http://help.sap.com/saphelp_46c/helpdata/EN/cf/21ee52446011d189700000e8322d00/content.htm
please explain in details with step by step process.
create a search help exit:
1. create an fm with this interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCR_TAB_T
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR_T
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
put this logic in it:
Delete duplicate filter logic.
This logic only needs to apply at the 'DISP' event - which is just
before the hit list is displayed
if callcontrol-step = 'DISP'.
delete adjacent duplicates from record_tab.
endif.
2. edit your search help in se11 and enter the name of the above search help exit fm
check this sample code..for dynamic search help
REPORT ZTEST_F4HELP .
*---Report with selection screen and to display the list of
possible entries for field 'B' as per the value in field 'A'.
parameters: p_vbeln type vbak-vbeln,
p_posnr type vbap-posnr.
at selection-screen on value-request for p_posnr.
data: begin of help_item occurs 0,
posnr type vbap-posnr,
matnr type vbap-matnr,
arktx type vbap-arktx,
end of help_item.
data: dynfields type table of dynpread with header line.
dynfields-fieldname = 'P_VBELN'.
append dynfields.
call function 'DYNP_VALUES_READ'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
translate_to_upper = 'X'
tables
dynpfields = dynfields
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
others = 11.
read table dynfields with key fieldname = 'P_VBELN'.
p_vbeln = dynfields-fieldvalue.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = p_vbeln
importing
output = p_vbeln.
select posnr matnr arktx into table help_item
from vbap
where vbeln = p_vbeln.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'POSNR'
dynprofield = 'P_POSNR'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
tables
value_tab = help_item.
also check this link it will help you
/message/3854825#3854825 [original link is broken]
*********please reward points if the information is helpful to you************* -
BAPI/Function Module for transaction PR05
Hi All,
I am searching for BAPI/Function Module for tx PR05(Travel Expense Manager).
Thanks.Check thread Transferring data into travel manager for Carlos David Moreno Lozano answer in message Re: Transferring data into travel manager
Regards,
Raymond
Maybe you are looking for
-
HT1152 Error 4310 when trying to burn a playlist from iTunes.
I have done all the troubleshooting set forth in the prior discussions, including burning the same playlist via Windows a Media Player. But still no luck burning it from iTunes. I am using Windows 8. It seems that may be the problem. If there is
-
Multiple windows of the same class with a different argument
Suppose I have a main window with a list of users. If I click on any one user, the "chat window" should open with the argument as that "user". If i click on another, a similar "chat window" should open but with a different user. I can't have so many
-
How to compare two files in java & uncommon text should print in text file.
Hi, Can any one help me to write Core java program for this. How to compare two files in java & uncommon text should print in other text file. thanks Sam
-
PC issues - need advise regarding best option...
Hi there, I'm in a bit of a mess and would like advise on the best way to handle it. My PC has just died (WindowsXP - power supply issue on an old model). My iTunes library is stored on an external harddrive, so there should be no data loss. I haven'
-
Is XFA forms an "Open" standard, and is FDF alive for foreseeable future ?
further to my other (first) post "Adobe PDF XML Forms ? Reading user-entered data to and from the form using VB.NET?" ... I've been researching on the web, and getting the feeling that the new XFA forms architecture is not being supported by third pa