XD02 Recording in background mode
Hi All,
I am trying to create a BDC of XD02 by selecting "Simulation to Background" option in SHDB. My BDC is working fine but it is not returning any message. BDCMSGCOLL table is empty after BDC call.
It is not saying like "Data saved" or "Changes has been made". I mean no system message is generated.
Reply if any one has solution. Its urgentt.
Thanks.
Edited by: lucky on Oct 8, 2010 8:50 AM
Hi Lucky,
Try this.
data: wl_opt type ctu_params.
wl_opt-updmode = 'S'.
wl_opt-nobinpt = 'X'.
wl_opt-dismode = 'A'. "'N'.
wl_opt-nobiend = 'X'. "Simulate background mode
CALL TRANSACTION 'XD02' USING bdcdata OPTIONS FROM WL_OPT
MESSAGES INTO messtab.
LOOP AT messtab.
WRITE: / messtab.
ENDLOOP.
I was getting in all mode the messtab.
Sujay
Similar Messages
-
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 -
SM35 Re-processing of Incorrect/Error session in Background Mode
Hi all,
I am trying to reprocess a session in SM35 which is in Error status. Here I am a facing an issue, if I reprocess this session in background mode then it says that Batch input data is not available for a screen which is already processed. Ideally it should start from the screen where it threw error in the first run. If I select mode as Foreground or Display error then session is getting processed correctly.
Note:
If the session is in Ready to Process state then processing in background works perfectly fine. Has anyone came across this problem ?
Has anyone tried reprocessing Incorrect Session in background mode ??????
Regrads,
AntonyThanks Sandra,
Indeed I understood the problem. And the problem is that transaction KEBC is always executed correctly & since its processed correctly its removed from the BDC Queue
Here transaction KEBC, sets a Memory Parameter, and transaction KEU2, first checks whether the memory parameter is initial, if found intial it pops-up a screen and makes the user enter it. In my case KEBC always run successfully
As you rightly suggested when session is in error, transaction KEBC is not getting called again to set the memory parameter & its throwing the pop-up from the transaction KEU2 to be entered by the user. ( BDCDATA currently dosent handle this Pop-up).
I could have omitted the KEBC transaction, but handling this pop-up from transaction KEU2 becomes tricky since it will only pop-up if the memory parameter is initial. And unfortunately Pop-up is the first screen in the sequence for transaction for KEU2 & nothing can be done in coding level to call KEU2 with the pop-up in all scenarios(Even when Memmory varaible is set) !
So I am kind of in a dilema, how to handle this? What I am suggesting to the Functional consultant is that let the session be only run in background mode (as it will be always in a new internal session memory variable will always be inital ) & I will record this pop-up in my BDC omitting transaction KEBC.
Do you have anyother solution for this?
Or is there any option to re process even the successfull transacations ? -
Execute one thread in background mode.
hello ,
I have an application where the user can shows dialogs to displays, adds, modify and delete rows of one tale inside some JTextFields.
I have a problem to use this application, when one same dialog is showed more then one time....
Exactly: not problems come the first time the dialog is showed, but the second time, the time to wait because the performance is executed is very long..., and further, ....when the dialog at last was is shoved, no data of the table are in the JTextFields.
I get errors too when at last the dialog was shoved, and the errors not aways said the same reason..., but all the errors are referred to the impossibility (in the performances that followed the first) to have a suitable resultset containing the data.
Some error are "null pointer exception" to read the resultSet, other error is "Impossibils get a block in the required time" ...
I read documentation and I understand that the fault, probably, could came from the Event Dispach Thread that had the task to manage the creation of the ResultSet.
Now I am trying to solve (at this moment without success) the problem in this direction, ...as well I have not experience about to manage the use of SwingWorker class.
I should like hear what it is wrong in that I am doing...
Initially my code was this
* Create a resultSet, for the current table
private void createResultSet() {
statement = dbconn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
currentResultSet = statement.executeQuery("Select * from " + tableName);
boolean validateState = currentResultSet.last();
regsNmbrOnTheTable = currentResultSet.getRow();
System.out.println("Numero attuale di records = " + regsNmbrOnTheTable);
// here come the exception:
// Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
} catch (SQLException ex) {
reportErrors.checkingSyntaxInInputTags("metodo createResultSet(): Errore nel creare il resultSet");
// Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
} // createResultSetrecently I modified it in order to put the creation of the ResultSet in background....
* Create a resultSet, for the current table
private void createResultSet() {
(acquiresResultSetInBackground = new AcquiresResultSetInBackground()).execute();
currentResultSet = acquiresResultSetInBackground.doInBackground();
} // createResultSet
// inner class to manage the performance in background mode.
class AcquiresResultSetInBackground extends SwingWorker <ResultSet, Void> {
ResultSet resultSet;
@Override
protected ResultSet doInBackground() {
try {
statement = dbconn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
resultSet = statement.executeQuery("Select * from " + tableName);
} catch (SQLException ex) {
reportErrors.checkingSyntaxInInputTags("metodo createResultSet(): Errore nel creare il resultSet");
return resultSet;
}How I said I get again the same behavior that was before......
thank you
Regards
tonyMrsangeloFor custom transactions you shouldn't have a problem - unless you're trying to do something that needs dialog with the presentation server.
Set an infinite loop in the custom transaction, launch your program in backround, then from Sm50, go to debug and find out what's going on.
DATA: debug.
WHILE debug IS INITIAL. " Debug from SM50 will get you here, change field DEBUG in the
ENDWHILE. " debugger to contain 'X', and the loop will end.
Also, if your custom tx calls any standard SAP programs/FM, there is a chance that those programs work differently in background than foreground. -
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 -
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 -
FM not executing in background mode sometimes
Hi,
I'm using one Z function module for Production order confirmations which inturn calls 'BAPI_PRODORD_COMPLETE_TECH'.
There is 'BAPI_TRANSACTION_COMMIT' and 'BAPI_TRANSACTION_ROLLBACK' also present.
My issue is, this functionality works perfectly fine when I execute the program in foreground mode, but does not go through sometimes when I schedule it in background.
Note : Its not completely skiping the entries in background mode. It works sometimes and sometimes doesn't.
Can anyone comment if they have faced similar issues ?
Regards,
ShivaHi !
In my opinion it fails, when there is a popup coming from the BAPI.
We have the issue that when we process in background the orders where a popup should be shown (e.g. the popup asking if setting TECO is OK although reprocessing records exist).
When we reprocess our IDOC (which are calling that BAPI) in BD87, the popup is even shown in BD87 !
Any idea how to tell the BAPI to ignore such messages and still set the TECO ?
Any other way to set the TECO ?
thx a lot ! -
Error in BDC in background mode.
Hello Experts,
I am having a query related to BDC. I have written the BDC for TCode : CKMPRPN (Future Price Maintenance). When I execute the BDC thru Call transaction method it works properly.
When I Create the Session and execute in foreground mode then also it woks but when i try to execute in background mode it gives me an error.
Please suggest me the proper Solution.
Thanks
SwatiHi ,
Check wheter the field names for the transaction recorded are correct sometimes the field names are not fully copied to se38, if the filed name is to long.However when you run the BDC in foreground it runs ,but when you execute in background it fails, Check for the field names for the recorded transaction in SHDB and in the program.
Thanks,
Ahsan -
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á -
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 -
Submit + LIST_FROM_MEMORY in background mode
Hi,
I need to capture the output results from standard program RFKORK00 and hence I designed a wrapper program that calls the standard program.
RFKORK00 generates a report output and I am able to capture the results correctly using the FM LIST_FROM_MEMORY and FM LIST_FROM_ASCI in foreground mode. But when I try to run the same job in background, the FM LIST_FROM_MEMORY does not return any results (I have checked the log by inserting information messages at various points in the program).
I have searched for similar contexts here on SDN and everyone is in agreement that LIST_FROM_MEMORY would work well even in the background mode too but I am unable to find the fault in this case. Could you please help, attached is the code -
SUBMIT RFKORK00
USING SELECTION-SET c_variant
EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = lt_abaplist
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
list_index = '-1'
with_line_break = ' '
TABLES
listasci = lt_vlist[]
listobject = lt_abaplist[]
EXCEPTIONS
empty_list = 1
list_index_invalid = 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.
MESSAGE i099(z1) WITH 'LIST TO ASCI CALL'.
ENDIF.Well, RFKORK00 is indeed a print program that triggers spool in the background.
I gave up playing around memory id, instead I am using the following code to check whether a spool was created in table TSP03.
CLEAR r_rqcretime[].
r_rqcretime-sign = 'I'.
r_rqcretime-option = 'BT'.
CALL FUNCTION 'IB_CONVERT_INTO_TIMESTAMP'
EXPORTING
i_datlo = sy-datlo
i_timlo = sy-uzeit
i_tzone = 'EST'
IMPORTING
e_timestamp = v_tzntstmps.
r_rqcretime-low = v_tzntstmps.
**Submit job with changed variant
SUBMIT (p_prog)
USING SELECTION-SET c_variant
EXPORTING LIST TO MEMORY
AND RETURN.
WAIT UP TO 5 SECONDS.
**Fetch the spool number generated by the program
CALL FUNCTION 'IB_CONVERT_INTO_TIMESTAMP'
EXPORTING
i_datlo = sy-datlo
i_timlo = sy-uzeit
i_tzone = 'EST'
IMPORTING
e_timestamp = v_tzntstmps.
r_rqcretime-high = v_tzntstmps.
CONDENSE: r_rqcretime-low,r_rqcretime-high.
CONCATENATE r_rqcretime-low '00' INTO r_rqcretime-low.
CONCATENATE r_rqcretime-high '00' INTO r_rqcretime-high.
APPEND r_rqcretime.
SELECT SINGLE rqident FROM tsp01
INTO v_rqident
WHERE rqowner = sy-uname
AND rqcretime IN r_rqcretime. -
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 -
Calling a function from a DLL, exectution in background mode.
Dear Experts,
We have created an ABAP report the calls a function from a DLL file. If the report is executed in on-line mode the program calls and executes the function from the DLL, but if the ABAP programa is executed in background mode it doesnt calls the DLL function.
Do you know a way to solve the problem when executing in background mode?
Best regards.
AntonioHi Gabriel,
Let me explain in details about my DLL function.
We are importing the business partners from legacy system into the SAP CRM system, so at the moment we created the BP master data via BAPI, I get the name of the BP and this moment I call the function in the DLL file. I export the parameter name and I receive back a simplified string with the name reduced to a code. This code I get back from the dll it is insert in a Z table, so there is no interaction in the screen, all must be executed in background mode, because there are a lot of business partners to be converted in SAP system.
I am sending my code for your considerations.
Instancia a DLL
CREATE OBJECT dll 'MTCODE.CPFONET'.
IF sy-subrc NE 0.
RAISE without_dll.
ENDIF.
Move para a tabela interna IT_NAME os valores recebidos na TI_NAME
it_name[] = ti_name[].
Para cada registro importado
LOOP AT it_name.
CLEAR v_string_ret.
wa_matchcode-zregid = it_name-zregid.
wa_matchcode-name1_text = it_name-name1_text.
v_string = it_name-name1_text.
CONDENSE v_string.
TRANSLATE v_string TO UPPER CASE.
CALL METHOD OF dll 'SetNome' EXPORTING #1 = v_string.
CALL METHOD OF dll 'ExecMatch'.
CALL METHOD OF DLL 'GetMCData' = v_string_ret.
FREE OBJECT dll.
Preenche os campos do match-code de acordo com o retorno da DLL
SPLIT v_string_ret
AT '|'
INTO wa_matchcode-zparmcln
wa_matchcode-zparmcfn
v_empty
wa_matchcode-name_first
wa_matchcode-name_last
wa_matchcode-namemiddle.
Adiciona o registro com o match-code correspondente na TE_MATCHCODE
APPEND wa_matchcode TO te_matchcode.
ENDLOOP. -
Running a Dynpro-based Report as a Job/in Background mode
Hello,
i've got a report which hasn't got a selection-screen as its startscreen, but a complex dynpro and is based on different start-buttons and not only the "basic" F8/Run-Button. the users still would like to be able to run the report in background mode and as an automated weekly job. moreover they want to use their own configuration/variant for date-fields etc., just like they are used from a selection-screen. is this possible "out of the box" with a dynpro-based report or how can i archive this through my own programming logic?
thanks for your help,
dspHi,
I guess yes, but since you seem to have several processes possible at startup (those buttons), you will have to code a new bit of code at the start of your application. This to choose the correct process... you should have a new statement like
IF sy-batch IS NOT INITIAL.
"Perform batch process
ELSE.
"Perform normal run
ENDIF.
For the variant, I'm not sure to really get the idea... Do the users already use variants with the actual version? or is there no selection screen at all? If not, you should use one and set-up parameters to pre-fill your dynpro fields...
Kr,
Manu -
Create Quality Management view for a Material in background mode
I want to know if there is a way to create a Quality Management View (Quality Management tab) on Material Master (material already extended to plant ) in background mode.
The requirement is to add inspection setup data for a material extended to a particular plant in background. I tried using 'BAPI_MATINSPCTRL_SAVEREPLICA' to add the data and it works perfect as required. Now the problem is this BAPI is creating the inspection setup data only for the material which has QM tab in MM02 for e.g. I manually created the inspection setup for a Material from MM01 and then deleted it , now the BAPI works fine for this material because when I created an inspection setup from MM01 it created the QM tab and after i deleted the entry the tab was still there with no entry in inspection setup.
I want to create inspection setup for a material which does not have QM tab.
I have to create everything is background mode. BDC is one option which I am list interested in.
Thank you for helping in advance.Thank you for looking into my issue. I have to do the inspection setup in background without using any front end transaction.
Maybe you are looking for
-
I am currently using an iPhone 5C and 4S. Upon updating from 7.1.1 to 8.0.2, both of my phone had literally been useless indoors now! I used to get a nice 3-4 bars within the comfort of my room to No Service. This is ridiculous by all means. I have t
-
I am trying to log on to iwork but it keeps saying that my password is incorrect. I have already reset it and entered my new password and it still is not working. what should i do?
-
Hi there, I'm working with 5.6.1 version and using the following way of parameter for a dynamic image it seems to work : alternative text url:{IS_GIS} where IS_GIS is a variable coming by an sql script, here the url http://www.affecto.lt/gfx/it_group
-
Why is converted PDF opening as Picture?
The first PDF converted well into a word document readable by JAWS. This second one goes straight to compatibility view and the picture tab opens up.I have made multiple attempts at making this work and have checked the FAQ's, forums etc but am not h
-
Unable to connect to editor application in PSE4
I've been running PSE4 quite happily on XPHome for some years. Today, having down loaded some new photos, I clicked to open the Quick Fix editor and got a dialogue box saying "Attempt to access invalid address". When I clear this another db appears s