BDC is not working in when executing the program in background
Hi gurus,
I have a problem that in BDC is not working when i'm executing the upload program in background thru scheduling(SM36) , while it works fine when i execute directly with NO screen display mode
Many transactions behave differently when executed in foreground and background. The fields on the screen may be different.
In transaction SHBD when starting a recording there is a checkbox where you can select 'Simulate Background Mode'. If you do your recording using this option you will get the code suitable for background mode. If you do not select this option you will get a code for foreground mode.
By compairing the two codes you will know the changes required for background mode.
Hope this helps you
Similar Messages
-
Executing the program in Background
Hi experts i'm trying to Execute the Program in background.
Given the Input and output file locations and Press F9 for process the program in background from SE38. cause i want to run my program as a batch(Background)
but its not accepting. can you please help me how to resolve this issue.
i'm providing the code can you please verify that.
Many Thanks
SELECTION-SCREEN *
selection-screen begin of block b1 with frame title text-001.
*.. Filename
PARAMETERS: f_name TYPE char100, "Upload filename
d_name TYPE char100. " Download filename
selection-screen end of block b1 .
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: p_serv radiobutton group RAD1,
p_frnt radiobutton group RAD1 default 'X'.
SELECTION-SCREEN: END OF BLOCK b2.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR f_name.
*.. Data Declaration
DATA: lt_file TYPE filetable,
lv_file TYPE LINE OF filetable,
rc_i TYPE i,
cl_gui TYPE REF TO cl_gui_frontend_services,
w_path LIKE dxfields-longpath.
*.. Check if from server or frontend
IF p_frnt = 'X'.
*.. Create objects for method
CREATE OBJECT cl_gui.
*.. Clear the filename
CLEAR f_name.
*.. Call method to search for file
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Choose Input File'
CHANGING
file_table = lt_file
rc = rc_i
EXCEPTIONS
OTHERS = 4.
*.. Check if file found
IF sy-subrc EQ 0.
*.. Check that file path not empty
CHECK NOT lt_file[] IS INITIAL.
LOOP AT lt_file INTO lv_file.
*.. Set parameter to filename
f_name = lv_file-filename.
ENDLOOP.
ENDIF.
*.. Free object
FREE cl_gui.
*.. Upload from Server
ELSE.
Retrieve filename
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A'
i_server = ' '
i_path = '/sap_ftp/'
filemask = '**'
fileoperation = 'R'
IMPORTING
O_LOCATION_FLAG =
O_SERVER =
o_path = w_path
ABEND_FLAG =
EXCEPTIONS
rfc_error = 1
error_with_gui = 2
OTHERS = 3.
Set file path
f_name = w_path.
ENDIF.
*.. File selection for output file
AT SELECTION-SCREEN ON VALUE-REQUEST FOR d_name.
*.. Only allow search for front-end
IF p_frnt = 'X'.
*.. Data Declaration
DATA: lt_file TYPE filetable,
lv_file TYPE LINE OF filetable,
rc_i TYPE i,
cl_gui TYPE REF TO cl_gui_frontend_services.
*.. Create objects for method
CREATE OBJECT cl_gui.
*.. Clear the filename
CLEAR d_name.
*.. Call method to search for file
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Choose Input File'
CHANGING
file_table = lt_file
rc = rc_i
EXCEPTIONS
OTHERS = 4.
*.. Check if file found
IF sy-subrc EQ 0.
*.. Check that file path not empty
CHECK NOT lt_file[] IS INITIAL.
LOOP AT lt_file INTO lv_file.
*.. Set parameter to filename
d_name = lv_file-filename.
ENDLOOP.
ENDIF.
*.. Free object
FREE cl_gui.
ENDIF.
*.. General Checks for Selection screen
AT SELECTION-SCREEN.
*.. Check if program run in batch mode and ping directory
IF sy-batch = 'X'.
*.. Move filename to file_name
file_name = d_name.
*.. Check if path can be reached
OPEN DATASET file_name FOR INPUT IN TEXT MODE.
IF sy-subrc NE 0.
MESSAGE e082(zsomerfield).
ENDIF.
ENDIF.
NITIALIZATION.
*.. ALV Variables
variant_save = 'A'.
w_repid = sy-repid.
w_variant_handle = c_handl.
START-OF-SELECTION *
START-OF-SELECTION.
*.. Check if batch program running in batch mode or not
IF sy-batch = 'X'.
*.. Open file on application server for reading
OPEN DATASET file_name FOR INPUT IN TEXT MODE.
DO.
*.. Upload entries
READ DATASET file_name INTO zpernr.
*.. IF end of file reached then exit DO statement
IF sy-subrc = '4'.
EXIT.
ELSE.
*.. IF entry found then add to employee table
in_file-empnum = zpernr.
*.. Add entries to table
APPEND: in_file.
*.. Clear header lines
CLEAR: in_file, zpernr.
ENDIF.
ENDDO.
*.. Close dataset
CLOSE DATASET file_name.
*.. Get file from frontend and run in foreground
ELSE.
*.. Upload from local machine.
DATA: file_name TYPE string. "LIKE rlgrap-filename,
*.. Set filename to filename from screen
file_name = f_name.
*.. Upload the information from the file into the table in_file
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_name
TABLES
data_tab = in_file
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
*.. Make sure file uploaded correctly
IF sy-subrc <> 0.
MESSAGE E018(ZHR_MESSAGES).
ELSE.
MESSAGE i017(ZHR_MESSAGES).
ENDIF.
ENDIF.Hi Vamsi,
<b>First Check in the Foreground your program is working for the application server file or not</b>
When you will Execute your program in Background internal table "ZPERNR" will be populated from the file that is there on the application server.
After that what you want to do with the internal table.I think you have not sent the whole code.
In background FM GUI_UPLOAD willl not work.
If you want to debug your code put wait for 100 seconds at the place where you want to dubug your code.Go to transaction code SM50 your job will be running there.
Select Your job
Go to Menu Bar Program/Mode - > program - > Debugging.
In this way you can debug your code.
First Check in the Foreground your program is working for the application server file or not -
How to send files to others mail id when executing the program
Hi all,
I am getting text file from application server and i am sending total text file data into my internal table.
I am checking this internal table data especially material number and customer number with data base tables mara and kna1.If the matnr and kunnr are existing in database successfully means then only i am creating the sales orders for that text file data.if any record out of 10 records is not success means i am not creating sales orders for total text file data.
My error log file as
file name,date time,total no of records,error record no,error description.
one more text file as
file name,date time,total no of records,succesful records , error records.
I am getting these all data into my one more internal table.
I am appending all data into my internal table.
so i want retrieve only last row of data from that internal table.pls guide me how to get last row from the internal table.
these text files i have to send to my user mail id directly when i am executing the program.
any one knows the any function modules to send that text files to perticular mails.pls send the FM's to me.
Regards,
lokesh.hi
good
go through this report,hope help you to solve your problem
report y_cr17_mail.
data method1 like sy-ucomm.
data g_user like soudnamei1.
data g_user_data like soudatai1.
data g_owner like soud-usrnam.
data g_receipients like soos1 occurs 0 with header line.
data g_document like sood4 .
data g_header like sood2.
data g_folmam like sofm2.
data g_objcnt like soli occurs 0 with header line.
data g_objhead like soli occurs 0 with header line.
data g_objpara like selc occurs 0 with header line.
data g_objparb like soop1 occurs 0 with header line.
data g_attachments like sood5 occurs 0 with header line.
data g_references like soxrl occurs 0 with header line.
data g_authority like sofa-usracc.
data g_ref_document like sood4.
data g_new_parent like soodk.
data: begin of g_files occurs 10 ,
text(4096) type c,
end of g_files.
data : fold_number(12) type c,
fold_yr(2) type c,
fold_type(3) type c.
parameters ws_file(4096) type c default 'c:\debugger.txt'.
Can me any file fromyour pc ....either xls or word or ppt etc ...
g_user-sapname = sy-uname.
call function 'SO_USER_READ_API1'
exporting
user = g_user
PREPARE_FOR_FOLDER_ACCESS = ' '
importing
user_data = g_user_data
EXCEPTIONS
USER_NOT_EXIST = 1
PARAMETER_ERROR = 2
X_ERROR = 3
OTHERS = 4
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
fold_type = g_user_data-outboxfol+0(3).
fold_yr = g_user_data-outboxfol+3(2).
fold_number = g_user_data-outboxfol+5(12).
clear g_files.
refresh : g_objcnt,
g_objhead,
g_objpara,
g_objparb,
g_receipients,
g_attachments,
g_references,
g_files.
method1 = 'SAVE'.
g_document-foltp = fold_type.
g_document-folyr = fold_yr.
g_document-folno = fold_number.
g_document-objtp = g_user_data-object_typ.
*g_document-OBJYR = '27'.
*g_document-OBJNO = '000000002365'.
*g_document-OBJNAM = 'MESSAGE'.
g_document-objdes = 'sap-img.com testing by program'.
g_document-folrg = 'O'.
*g_document-okcode = 'CHNG'.
g_document-objlen = '0'.
g_document-file_ext = 'TXT'.
g_header-objdes = 'sap-img.com testing by program'.
g_header-file_ext = 'TXT'.
call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
exporting
method = method1
office_user = sy-uname
ref_document = g_ref_document
new_parent = g_new_parent
importing
authority = g_authority
tables
objcont = g_objcnt
objhead = g_objhead
objpara = g_objpara
objparb = g_objparb
recipients = g_receipients
attachments = g_attachments
references = g_references
files = g_files
changing
document = g_document
header_data = g_header
FOLMEM_DATA =
RECEIVE_DATA =
File from the pc to send...
method1 = 'ATTCREATEFROMPC'.
g_files-text = ws_file.
append g_files.
call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
exporting
method = method1
office_user = g_owner
ref_document = g_ref_document
new_parent = g_new_parent
importing
authority = g_authority
tables
objcont = g_objcnt
objhead = g_objhead
objpara = g_objpara
objparb = g_objparb
recipients = g_receipients
attachments = g_attachments
references = g_references
files = g_files
changing
document = g_document
header_data = g_header
method1 = 'SEND'.
g_receipients-recnam = 'MK085'.
g_receipients-recesc = 'B'.
g_receipients-sndex = 'X'.
append g_receipients.
call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
exporting
method = method1
office_user = g_owner
ref_document = g_ref_document
new_parent = g_new_parent
importing
authority = g_authority
tables
objcont = g_objcnt
objhead = g_objhead
objpara = g_objpara
objparb = g_objparb
recipients = g_receipients
attachments = g_attachments
references = g_references
files = g_files
changing
document = g_document
header_data = g_header.
*-- End of Program
thanks
mrutyun^ -
I have submitted a bug report to ProBoards, but they cannot duplicate the problem I am having, so I am submitting this here in hopes you can find a solution.
At ProBoards Support and another PB forum while doing searches I found this problem, which continues with repeated testing over the past week or so:
url: http://support.proboards.com/search
1. enter perameters for the search (posts only by staff for the last 2 days)
2. choose one of those post results & click on it (choose a post on page 14 and not on page 1 of the results)
3. using the browser back button, attempt to return to the previous page of search results
4. rather than being taken back to the search results with my parameters, the search parameters have been removed and the page show 1000 results of posts by everybody.
I have tested this over and over again, disabling plugins, and nothing seems to alter the malfunctioning of the back button when I am doing this search function at ProBoards.
I have tested it in Internet Explorer and find that in IE the browser back button works properly with ProBoards searches. I always get the result I expect, so it's a problem with how FF interfaces with ProBoards, I think.Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
Note: ''This will temporarily log you out of all sites you're logged in to.''
To clear cache and cookies do the following:
#Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
#Under "Time range to clear", select "Everything".
#Now, click the arrow next to Details to toggle the Details list active.
#From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
#Now click the ''Clear now'' button.
Further information can be found in the [[Clear your cache, history and other personal information in Firefox]] article.
Did this fix your problems? Please report back to us! -
Please let me know what I can do to get my Numbers (iWork 09) working properly again.
Here is what is going on:
Numbers in iWork 09 not working can't access Blank, Checklist and many other files within Numbers. I can open the program but only a few files are available. When I click on the file (which also has no icon just the name of the file) this warning appears:
The document "Blank.nmbtemplate" is invalid. The index.xml file is missing.
I recently had to get a new hard drive installed and had the system upgraded and more memory put in by a Mac certified specialist recommended to me from the Apple store in Northbrook because this was the 3rd time my drive went bad but this time it was to old (I got the IMAC- in 2007) and the Apple store could no longer work on it this time so they recommended a few places that had certified Mac specialists. Since then Numbers is not working right.
I'm sure it's something simple to fix, but I've tried re installing it and that didn't work. Appreciate any help.
Thanks
AppMareThere is one way its getting fixed. Once I update my Adobe Illustrator CC to Adobe Illustrator CC 2014 it is further allowing me to go into the system folder and allocate the font to the file so that it can replace it. My only concern now is that our MAC partners who will receive these files back from us have Adobe CS6. We will down save it to CS6 but I hope they won't experience any font issues because of us using CC 2014? Any light you can shed on this?
-
Parameter memory not initializing whwn re execute the program
I have used parameter memory in selection screen of module pool program,
The problem is when I exit from the program and re execute the transaction the parameter memory not initializing and the same value come again in the selection screen .Hi,
Please read the help on Parameter memory. The parameter is filled with the value in the memory.
Regards,
Srini. -
Error when executing the program RBDMIDOC with Message type HRMD_ABA
Hello All
I finished the integration between CRM and HR
Now I am able to replicate the employees and the organizations, but when I created a schedule job for the program RBDMIDOC and message type HRMD_ABA the system gives me warning and message: no data selected for distribution even if I try to run the program using SE38 I am getting the same error message
I already activated the message type using BD50 and activated the Change pointers using BD61
Regards
Jacopo Fransoiceus the program
RHALEINI -
FETCH is taking lot of time when executing the program
Hi,
A program is lot of time in production though code looks ok.
Only one select statement is there which fetches data from BKPF.
Cost of the statement is as below:
SELECT STATEMENT ( Estimated Costs = 51 , Estimated #Rows = 1 )
2 TABLE ACCESS BY INDEX ROWID BKPF
( Estim. Costs = 51 , Estim. #Rows = 1 )
Estim. CPU-Costs = 1,938,416 Estim. IO-Costs = 51
Filter Predicates
1 INDEX RANGE SCAN BKPF~Z1
( Estim. Costs = 51 , Estim. #Rows = 1 )
Search Columns: 4
Estim. CPU-Costs = 1,936,841 Estim. IO-Costs = 50
Access Predicates Filter Predicates
And in Se30 Execution time in Data base is 98.7% and Abap is 1.2%
When I checked the Trace I found that the 2,487,732 & 84720,805 secs is being taken in the FETCH stage.
27 BKPF REOPEN 0 SELECT WHERE "MANDT" = '600' AND "GJAHR" = 2003 AND "BUKRS" = '0301' AND "BLART" = 'ZA' AND "BUDAT" = 20030319 AND "STBLG" = ' '
2,487,732 BKPF FETCH 406 0
84,720,805 BKPF FETCH 377 1403
Can you please let me know what wrong in this? And what can I do to tune this fetch statement?
Regards,
PoojaHi,
so we can only use
(MANDT)?
BUKRS
BLART
as access predicates and
STBLG
as filter predicate.
BUDAT schould be part of the access predicates i think.
Watch out for an index where BUDAT can be used as access predicate....
Kind regards,
Hermann -
BDC is not working as background job
Dear Expert,
I have developed a program which contain BDC of FB75 with mode 'E' . I have Schedule this program as background by FM 'JOB OPEN' , Submit statement and 'JOB CLOSE'. My problem is when i run this program as background BDC is not working.
What is the solution of this problem?
Thanks
AvadheshHi Avadhesh,
if FB75 is doing a commit work, then, your batch job will finish with error at the time of BDC execution.
Try to add the option parameter type CTU_PARAMS to the CALL TRANSACTION with field RACOMMIT = 'X'.
DATA opt TYPE ctu_params.
opt-RACOMMIT = 'X'.
CALL TRANSACTION 'FB75' USING bdcdata_tab OPTIONS FROM opt.
Regards. -
My machine is Top of the range (my Company builds them so it had better be :) )
Amd 1100t , 8gb ram , Windows 7 64 bit etc, etc...
The is not a hardware problem , but a software problem with FF...Any help would be appreciated as I hate using IE 8 for anything at all :( but I have to keep it on my machines just to run my remote security cameras at my Computer shop ???
Original question...as question length is limited ...not very bright that limit by the way :(
"My DVR security sofware that I access remotely uses a "dvr .ocx" file....when I try it in Firefox , either the latest non beta (3.6.1.5) or the new beta version (4.0 rc) it will NOT work as it says the plugin is missing... it works in IE 8 (unfortunately) but not IE9...
As I own a Computer company I am fairly computer literate but cannot find a plugin that allows this to work in Firefox.... but I would have expected it to work in the new Firefox :(
All the best, Brett :)The longer this thread continues, the more ancillary comments you throw in that aren't directly pertinent to your problem with your DVR software not working with Firefox 4.0. Sorry, I don't intend to continue with this discussion.
I do agree that ''something'' needs to be done better with regards to plugins for Firefox, but I do disagree with you as to whose responsibility that ''something'' is. -
I am using chat-r wireless and facetime is not working but when i put rogers fido or any other carrier sim in it work. Anyone know what the problem?
I'm guessing it's a compatibility problem similar to that that T-Mobile in the US has. I'm not familiar with chat-r wireless, but I'm guessing it's not a supported carrier for the iPhone. If they can't tell you how to fix it, I'm guessing it's just plain not going to work.
-
Safari is not working on the Mac. Internet is fine. mail, App Store etc all working and connecting to Internet fine. Done the latest software update, still not working. When selecting a web address from bookmarks or typing in search bar, partial blue bar only and coloured wheel appears.
From the Safari menu bar, select
Safari ▹ Preferences ▹ Extensions
Turn all extensions OFF and test. If the problem is resolved, turn extensions back ON and then disable them one or a few at a time until you find the culprit.
If you wish, you may be able to salvage the malfunctioning extension by uninstalling and reinstalling it. That will revert its settings to the defaults.
If extensions aren't causing the problem, see below.
Safari 5.0.1 or later: Slow or partial webpage loading, or webpage cannot be found -
Hi Everyone,
I just deleted PS CS6 and installed PS CC 2014. I'm trying to use the Liquify Filter and it does not work. When I click on the Liquify Filter, my photo does not appear properly. The photo appears as two flourescent color fields - bright turquoise and lime green! Can anyone help me with this? Also, does anyone know if I can re-install Photoshop CS6?
Thanks!
LaraineHi Everyone....I figured it out. Strangely, although I had NEVER used Liquify in PS CC 2014....I just realized that in Liquify Advanced Mode that the "SHOW MASK" option was on by default! I unchecked SHOW MASK. Everything is OK. Whew! Tks!
-
Hi am trying to save Data into a write to measurement file vi using a NI PXI 1042Q and DAQ NI PXI-6229 with a real time mode but it is not working but when i run it without uploading it into the PXI it save in to the file please find attached my vi
Attachments:
PWMs.vi 130 KBother problem is that the channel DAQmx only works at real time mode not on stand alone vi using Labview 8.2 and Real time 8.2
-
The application maps is not working. When I try to run it opens for a few seconds with a blank screen and then closes.
Try a reset by pressing the home and sleep buttons until you see the Apple logo, ignoring the slider. Takes about 5-15 secs of button holding and you won't lose any data or settings.
Maybe you are looking for
-
10g bug? Can't see tables in Access-Dababase
I successfully create a database connection to an Access-Database,but i can't find these tables that i have defined in Access. thanks.
-
I just bought this ATV2. I am using AT&T internet with an EDGE250AEW wireless router and a Motorola modem. I'm attempting to rent movies with my ATV2 and watch them. After a myriad of times of trying to just sign into my iTunes account via ATV2, I fi
-
Hi all, Sorry but i don't speak english I can not export a file FCPXML correct. My intention, export a FCPXML FCPX since then, to create an ugly Xto7 readable XML FCP7 to finalize a 52 'and make the OMF exports to the mix. The thing does not go well
-
Maybe I am an idiot... (Don't answer that) I have been designing web pages for a while now, but never really got into layers (i'm a table/css man myself). But, I now have found a possible use... I have a webpage that is a whole mess of tables, and I
-
Cant open any pdf file on surface rt
i have read and down loaded and tried everybway i know how and it says may not be compatible but everything i read says how easy it is to use,,,been trying to fix this for 4 days now...please help