Mass BMP upload in background mode
Hello all,
I have to upload 20 Gb of BMP images to SE78 with background mode via coding. I wrote a code about this and it works in foreground mode but it gives error in background mode becouse i adressed my local drive for the source of these images . So should i put these images in the folders of AL11 for background mode? How should i do it? Any ideas?
Thanks..
HI..,
u cannot upload a presentation server file in BACKGROUND processing mode.. because it doesnt know where to go for that file....
The solution for this problem is... save this file in Application server and upload from application server into the program..
this is the standard procedure for background processing....
TO save a file in Application server we use OPEN DATASET ... TRANSFER ... and CLOSE DATASET.. commands..
regards,
sai ramesh
Similar Messages
-
Hi
After running a BDC program in background, next day morning when you see the results, few records
are not updated(error records). So at that what we do to update the remaining error records.
Waiting for reply...
Regards.Hi,
I am also using BDC Uploads in background mode. I move the error records to separate internal table based on MSTYP in call transaction method. After execution of Recording ,that internal table has set of error records .I will get a file path from the variant saved and upload in error records in tat file path in application server . So they Can Know which records are not created.Some Sample code for moving errors.
CALL TRANSACTION 'VK11' USING it_BDCDATA MODE 'N'
MESSAGES INTO IT_MESSTAB1.
loop at IT_MESSTAB1 INTO WA_MESSTAB1 .
WA_MESSTAB-MSGTYP = WA_MESSTAB1-MSGTYP .
WA_MESSTAB-SPRAS = WA_MESSTAB1-MSGSPRA .
WA_MESSTAB-MES_ID = WA_MESSTAB1-MSGID .
WA_MESSTAB-MES_NO = WA_MESSTAB1-MSGNR .
WA_MESSTAB-MSGV1 = WA_MESSTAB1-MSGV1 .
WA_MESSTAB-MSGV2 = WA_MESSTAB1-MSGV2 .
WA_MESSTAB-MSGV3 = WA_MESSTAB1-MSGV3 .
WA_MESSTAB-MSGV4 = WA_MESSTAB1-MSGV4 .
WA_MESSTAB-e_rec1 = WA_head1-vtweg .
WA_MESSTAB-e_rec2 = WA_head1-werks .
APPEND WA_MESSTAB TO IT_MESSTAB.
endloop.
CLEAR: WA_MESSTAB, WA_MESSTAB1,idx.
REFRESH IT_MESSTAB1.
REFRESH IT_BDCDATA.
IDX = 01.
ENDLOOP.
Regards,
Manesh.R -
How to upload a Excel document in background mode
Hello there, how are you?
I am doing an interface program that needs to upload an excel document into an internal table, to do this I used the FM ALSM_EXCEL_TO_INTERNAL_TABLE. The problem with this FM is that only works in foregroung mode, If I run the programin bcakground the FM does not work.
I would like to know if exist a way to upload an excel document into an internal table, for a program that have to be execute in background mode.
Thanks in advance
Best Regards
Alexis Ramirez*& Form application_server
* text
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*FORM APPLICATION_SERVER .
TYPE-POOLS: KCDE.
DATA : lt_intern TYPE kcde_cells OCCURS 0 WITH HEADER LINE.*DATA : INTERN1 TYPE KCDE_INTERN.FILE = PATH.
OPEN DATASET FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.**--- Display error messages if any.IF SY-SUBRC NE 0.
MESSAGE E001(ZSD_MES).
EXIT.* ENDIF.ELSE.
DO.
READ DATASET FILE INTO Wa_TAB.
append wa_tab to IT_TAB.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
ENDDO.
clear wa_TAB.
LOOP AT IT_TAB into wa_tab.
CASE wa_tab-COL.
WHEN '0001'.
WA_TAB2-PLANT = wa_tab-VALUE.
WHEN '0002'.
WA_TAB2-STGE_LOC = wa_tab-VALUE.
WHEN '0003'.
WA_TAB2-MATERIAL = wa_tab-VALUE.
WHEN '0004'.
WA_TAB2-QUANTITY = wa_tab-VALUE.
WHEN '0005'.
WA_TAB2-BASE_UOM = wa_tab-VALUE.
WHEN '0006'.
WA_TAB2-COSTCENTER = wa_tab-VALUE.
ENDCASE.
AT END OF ROW.
APPEND WA_TAB2 TO IT_TAB2.
CLEAR WA_TAB2.
ENDAT.
clear wa_tab.
ENDLOOP.
ENDIF.
CLOSE DATASET FILE.
ENDFORM. " application_server
Refer here:[How to Read Excel file from Application or Presentation Server and Download into Internal Table. |https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/how%252bto%252bread%252bexcel%252bfile%252bfrom%252bapplication%252bor%252bpresentation%252bserver%252band%252bdownload%252binto%252binternal%252btable.] -
Is it possible upload local file to internal table in background mode?
Hi, all,
Is it possbile to upload local file(not server file) to internal table in background mode.
If possbile ,please tell me detail . Thanks in advance.
Regards,
LilyHello,
This is possible.
If you report has to be executed in background using schedule Job. Then the file path should be constant and it can be hard coded in the report itself while populationg the internal table.
Then create a variant for your report and use that variant in the job.
This will solve your problem I guess.
Regards
Arindam -
Uploading Excel File in SAP In Background Mode
Dear All,
We require to upload Excel File in SAP in Background Mode.
Could anyone suggest me the Function Module for this?
Or any other method..........please.
Thanks in advance for ur kind help.
Best Regards,
Prasadhi check this..
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2
Download in Background
http://sapabap.iespana.es/sap/info/rfcexec/rfcexec_e.htm
Reward if find useful -
Download DMS attachment into an application server in background mode?
Is it possible to download DMS attachment into an application server in background mode?
Currently I am using the following code but does not work in background mode
CALL FUNCTION 'CVAPI_DOC_GETDETAIL'
EXPORTING
pf_dokar = 'Z06'
pf_doknr = gs_drad-doknr
pf_dokvr = gs_drad-dokvr
pf_doktl = gs_drad-doktl
pf_read_kpro = 'X'
TABLES
pt_files = lt_file
EXCEPTIONS
not_found = 1
no_auth = 2
error = 3
OTHERS = 4.
*Copy Attachment from DMS to PC File
CALL FUNCTION 'CVAPI_DOC_VIEW'
EXPORTING
pf_dokar = 'Z06'
pf_doknr = gs_drad-doknr
pf_dokvr = gs_drad-dokvr
pf_doktl = gs_drad-doktl
pf_appl_start = ' '
pf_apptp = '1'
pf_filename = 'C:\TEMP\ZLINK.BMP'
ps_file = ls_file
IMPORTING
pfx_file = l_pfx_file
EXCEPTIONS
OTHERS = 0.
*Load BMP into SE78
PERFORM import_bitmap_bds
IN PROGRAM saplstxbitmaps
USING l_filename "Local File for Upload/Download
l_bmpnam "Name
'GRAPHICS' "Application Object
'BMAP' "ID
'BCOL' "Color
'BMP' "Extension
'ZLINK PICTURE' "Title
space "Resides in Printer Memory in Print Request
'X' "Reserve Height of Graphic Automatically
space "Graphic Storage: Compressed Bitmaps
CHANGING l_docid
l_wf_res. "Graphic Resolution
ThanksHi!
You didn't find answer for this, because it is not possible. If you run your program in background, it is running on the server, and does not have any connection to your local machine. That's why you can't upload/download in background mode.
You might try to address somehow your local PC, with its IP or MAC address, but I don't think does this task worth so much time.
Run your program in online mode, or if you want to run it in background, then upload your file into the SAP server.
Regards
Tamá -
Picture upload in background using TCode OAOH
I have a requirement to upload picture using Tcode -OAOH.
I'm trying to use call transaction in background mode.
Let me know how to give the picture file name.
Any suggestion on uploading picture using OAOH in background
Thanks in advanceHI
for uploading picture su have tcode se78 and program rstxldmc .
but se78 u use it for forms(smaretforms and scripts)
but remember tht for loading pics u need to have either .BMP or .JPEG fmt only -
XLS from Application server in background mode to internal table
Hi,
I need to transfer the content of an excel file in the application server to an internal table while running my program in background. My file is xls, cant use csv. For dataset bin mode, I need to know how to transfer the data to my internal table, already searched on forum but didnt find answer, at least not for background..
ow, I am using v6 here
about the ALSM_EXCEL_TO_INTERNAL_TABLE, I get the upload_ole error all the time, and with TEXT_CONVERT_XLS_TO_SAP, conversion_failed all the time too...
here is the code, just the load part and data declaration:
REPORT zbeto.
TYPE-POOLS: truxs.
TYPES:
BEGIN OF y_cot,
text1(12) TYPE c,
text2(12) TYPE c,
text3(12) TYPE c,
text4(12) TYPE c,
text5(12) TYPE c,
END OF y_cot.
DATA: it_datatab TYPE STANDARD TABLE OF y_cot,
wa_datatab TYPE y_cot,
it_raw TYPE truxs_t_text_data.
DATA:
v_file TYPE rlgrap-filename,
begin_col TYPE i VALUE '1',
begin_row TYPE i VALUE '2',
end_col TYPE i VALUE '5',
end_row TYPE i VALUE '102',
t_ctmp TYPE y_cot OCCURS 0 WITH HEADER LINE,
t_xls TYPE alsmex_tabline OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
PERFORM f_load_xls.
FORM : f_load_xls
FORM f_load_xls.
v_file = '
ZSAPDEV\SAPDEVINTERF$\COTACAO\TESTE.XLS'.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = v_file
i_begin_col = begin_col
i_begin_row = begin_row
i_end_col = end_col
i_end_row = end_row
TABLES
intern = t_xls
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
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 = v_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.
t_ctmp[] = it_datatab[].
ENDFORM. "f_load_xls
both FM arent working, and when I try to execute in background mode, before anything, I recieve the following error:
Message text:
Error during import of clipboard contents
Message class:
ALSMEX
Message no.:
037
Message type:
A
and without the ASLM FM, the TEXT_CONVERT give me the conversion_failed exception...
the directories are right, that I am sure, because I just copy&paste it from CG3Z/CG3Y when I uploaded and downloaded to
check the file in the server...
am I missing something?
thanks again,
Roberto Macedo
(PS: I made another topic because none replied the other in 4 days and wasnt solved yet)Hi!
You didn't find answer for this, because it is not possible. If you run your program in background, it is running on the server, and does not have any connection to your local machine. That's why you can't upload/download in background mode.
You might try to address somehow your local PC, with its IP or MAC address, but I don't think does this task worth so much time.
Run your program in online mode, or if you want to run it in background, then upload your file into the SAP server.
Regards
Tamá -
Can we schedule BDC in Background Mode - SM37
Hi Guru,
Can we schedule our BDC in background - SM37 . Upload file will be on Local Sustem - C drive.
Regards
Durgesh
Moderator message: background/GUI problems = FAQ, please search before posting.
locked by: Thomas Zloch on Oct 6, 2010 2:14 PMGUI functions (like GUI_UPLOAD) will not work in background, they need an actual Gui active.
There are plenty of threads on this subject, search also in the wiki for threads/guide like [Working with files |http://wiki.sdn.sap.com/wiki/display/ABAP/Workingwithfiles] or [Communication to Presentation Server in Background Mode|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2&overridelayout=true] or [Working with FTP Server |http://wiki.sdn.sap.com/wiki/display/ABAP/WorkingwithFTP+Server]
(To execute a BDC in background use report RSBDCSUB.)
Regards,
Raymond -
Hi experts as per the requirement my program should run at specific time in background mode, it need to upload the Personal numbers from the input file and for those personal numbers extract the data from multiple tables. but this report shd run in background.
and download the output in the form of flat file.
as i'm running in background mode can't use the F.M GUI_Download and GUI_Upload.
can any one guide me how to solve this issue and why can't we use these F.M. if we can't use then what is the alternative to run in background mode.A program that runs in background mode doesn't have any connection to a frontend. After all, you can schedule it to run at a time where your frontend computer is not running.
In this case you have to load your files on the application server (or a mount point) and use the FMs C13Z_FILE_DOWN(UP)LOAD_ASCII(BINARY)
Regards
Frank -
Read flat file form other than sapserver(not in sapser) in background mode
Dear Friends,
I want to upload data from flat file to sap in background mode.
I know how to read file for application server in background mode, but my requirement is , i need to read the flat file data from other than sap server in backgound mode.
please help me,
Regards,
prabhuhi
you can do like this way.
fist should get de directory file name.
CALL FUNCTION 'RZL_READ_DIR_LOCAL'
EXPORTING
NAME = FILE_PATH
TABLES
FILE_TBL = I_FILES
EXCEPTIONS
ARGUMENT_ERROR = 1
NOT_FOUND = 2
OTHERS = 3.
IF SY-SUBRC EQ 0.
FILES_TAG = 1.
ENDIF.
second
LOOP AT I_FILES.
open datafilenaem.
close datafilename.
endloop. -
Hi experts,
Is it possible to upload data from local drive(presentation server) to sap in background mode.
As I know ,in the background mode we can upload files from application server only.
but here my functional consultant saying they did upload data from local drive to sap in background mode.
please suggest.
thanks in advance.
sastry.hey,
Yes it can be made possible,
The only way to access files in a background job is to have them on the application server and opened via OPEN DATASET or similar.
*--Local Variables
DATA : l_file TYPE string,
l_line TYPE string,
l_index TYPE sy-tabix.
*--Clear
CLEAR : l_file.
l_file = p_ipfile.
*--Read the data from application server file.
OPEN DATASET l_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
*--Error in opening file
MESSAGE i368(00) WITH text-005.
ENDIF.
*--Get all the records from the specified location.
DO.
READ DATASET l_file INTO l_line.
IF sy-subrc NE 0.
EXIT.
ELSE.
SPLIT l_line AT cl_abap_char_utilities=>horizontal_tab
INTO st_ipfile-vbeln
st_ipfile-posnr
st_ipfile-edatu
st_ipfile-wmeng.
APPEND st_ipfile TO it_ipfile.
ENDIF.
ENDDO.
Regards,
Midhun Abraham
Edited by: Midhun Abraham on Oct 8, 2008 4:36 AM -
How to debugg in background mode
Hi ,
I have problem while running in background ,
in mm01 transaction while crating a material in forground it is getting created ,and its perfect .but at the same time while trying to run the BDC in the background
the same thing is going for dump,so i need to debugg in the background mode .
can any one help me out on this how to debugg on the background mode.
Thanks in advance ,
vinay .Hi srinivas,
Below is the dump iam getting .
Error analysis
A RAISE statement in the program "CL_GUI_TEXTEDIT===============CP" raised the
exception
condition "ERROR_CNTL_CREATE".
Since the exception was not intercepted by a superior program
in the hierarchy, processing was terminated.
Short description of exception condition:
For detailed documentation of the exception condition, use
Transaction SE37 (Function Library). You can take the called
function module from the display of active calls.
How to correct the error
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
"RAISE_EXCEPTION" C
"CL_GUI_TEXTEDIT===============CP" or "CL_GUI_TEXTEDIT===============CM002"
"CONSTRUCTOR"
or
"CL_GUI_TEXTEDIT===============CP" "ERROR_CNTL_CREATE"
"CL_GUI_TEXTEDIT===============CP" "ERROR_CNTL_CREATE"
or
"SAPMMG01 " "ERROR_CNTL_CREATE"
If you cannot solve the problem yourself and you wish to send
an error message to SAP, include the following documents:
1. A printout of the problem description (short dump)
To obtain this, select in the current display "System->List->
Save->Local File (unconverted)".
2. A suitable printout of the system log
To obtain this, call the system log through transaction SM21.
Limit the time interval to 10 minutes before and 5 minutes
after the short dump. In the display, then select the function
"System->List->Save->Local File (unconverted)".
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, select the Editor function "Further Utilities->
Upload/Download->Download".
4. Details regarding the conditions under which the error occurred
or which actions and input led to the error.
Thanks,
vinay -
BDC Program is not working in background mode
Hi All,
I hv one bdc program for tcode fb02 which is working fine in foreground mode and data is updated to each screen properly. While running the same program in Background mode data is not updated. Can u seggust the solution.
Regards,
Rahul SHi ,
Remove the break point in the BDC performs.
put the break point once u complete the BDC.... otherwise execute the BDC in MODE 'E'.. error mode.
regards,
Rama Reddy
Edited by: ram reddy on Nov 16, 2009 5:37 AM -
BDC is not working in background mode and working fine in Foreground mode
Hi Experts,
I have created a BDC in SHDB for the transaction code:CWBQM for creating and deleting the record and converted the BDC recording into the program using call transaction. It is working fine in both foreground and background. When I given the same program for users testing one for the user was able to delete the records but Creation is not working in the same BDC. He is able to create the same records in another PC and the problem is only in that PC and only during the creation of the record. When I change the mode to 'A' mode for testing and request the user to execute and it is working fine the records created successfully. What could be the issue ?
Thanks,
HemaHello,
While recording BDC in SHDB try setting "Simulate background mode" flag and give a try.
Cheers,
Nag
Maybe you are looking for
-
How to print BAR CODE in SAP SMART FORMS
Hi, I want to print inspection lot's BAR CODE in the smart form, but i dont know the way how to print this into the smartform. if anyone have any idea, please suggest me how to print this as it is urgent for me to complete the object. Thanks in advan
-
I get an error message when trying to install the Akamai Download Manager Installer. When I click on the link to download the files directly, it does nothing. I've tried on Chrome, FF, and Safari. I'm running OS 10.9.3. This is for my laptop at h
-
My Iphone 3 is broken where the SIM is inserted. How can I use it as an ipod?
Iphone 3 has sim slot that does not reconize the sim. still says no sim.
-
Sharepoint 2013 app store issue
Hi, I am getting below error while adding apps.Please advise for process. Steps: SiteCollection->settings->Add an app->clicking on app->Trust it Next its giving below error.i have checked this correlation id on log files issue is. Issue found in log
-
Impressions of new Apple wired keyboard?
I'm very seriously considering picking up the new wired keyboard. Planning on wired as it is for a desktop Mac and I prefer an extended keyboard. The main reason I'm considering the new keyboard is that I am sick of cleaning all of the crap out of th