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,
Shiva
Hi !
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 !
Similar Messages
-
How to restrict user at selection screen while executing in background mode
hi all,
how to restrict user at selection screen while executing in background mode
Regards
DeepakHi,
We can get the Program whether this is running in background or not then we need to use SY-BATCH, if the SY-BATCH is set to X then the program is running in Background,
so in the INITIALIZATION event, you can use this SY-BATCH and check the User names, and give the error messsage which you want to restrict
Regards
Sudheer -
Suppressed some coloum while executing in Background mode
Hi All
As I am trying to execute report in foreground mode I am getting ALV output properly with all coloum while I am executing the same report in background mode I am getting same output with some of the coloum is not coming properly.
Please guide me to resolve the above issue.
Thanks
KRISHHi All
I am executing the custom report in foreground mode ALV output showing all columns for that same report I am executing in background mode some of the ALV output columns are missed out
For example:
Standard report output showing 10 columns, but I am executing the same report in background some of the columns are suppressed only I am able to view 5 columns remaining I am not able to view.
Please help me to resolve the above issue.
Thanks
KRISH -
My computer has been acting weird lately. Shuts itself off, the mouse goes off in all directions, does not go into sleep mode sometimes, instead shows a gray screen with word definitions in large 3" letters that continuosly flows across the screen. Do I have a virus?
Doesn't really sound like a virus.
See if the Disk is issuing any S.M.A.R.T errors in Disk Utility...
http://support.apple.com/kb/PH7029
How many of these you can answer...
Open Activity Monitor in Applications>Utilities, select All Processes & sort on CPU%, any indications there?
How much RAM & free space do you have also, click on the Memory & Disk Usage Tabs.
Open Console in Utilities & see if there are any clues or repeating messages when this happens.
In the Memory tab, are there a lot of Pageouts? -
BDC not working in Background mode
Hi All,
I have created a BDC. It is working fine in forground mode but not woking in background mode. Please any one know what could be the problem.
thanks,
ShwetaHi,
I think there is some field in your screen is disabled for input. As it will not through you error.
Please run you BDC in foreground mode and check it and see if you get any message. it will be a sucess message.
this thing happend to me also as my ship to party was disbled in one of screen of VA02.
thanks,
Sarbpreet -
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 -
Not running in background mode 'N'
hi experts,,,,,
i have a small issues in my BDC
where i face problem when running in background
if i update in 'A' mode its get updated
whereas in background 'N' mode it doesnt take the changes
and CHANGES NOT GETTING REFLECTED/...
can you pls help me out
thanks in advance
Rachel
piece of my code as follows...
============================
LOOP AT it_final INTO wa_final.
PERFORM bdc_dynpro USING 'X' 'SAPMIEQ0' '1000'.
PERFORM bdc_field USING 'BDC_CURSOR' 'RISA0-SERNR'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
PERFORM bdc_field USING 'RISA0-MATNR' wa_final-matnr.
PERFORM bdc_field USING 'RISA0-SERNR' wa_final-sernr_in.
PERFORM bdc_dynpro USING 'X' 'SAPMIEQ0' '0101'.
PERFORM bdc_field USING 'BDC_OKCODE' '=EQUI'.
PERFORM bdc_field USING 'BDC_CURSOR' 'ITOB-CHARGE'.
PERFORM bdc_dynpro USING 'X' 'SAPMIEQ0' '0101'.
PERFORM bdc_field USING 'BDC_OKCODE' '=T\01'.
PERFORM bdc_field USING 'BDC_CURSOR' 'EQBS-B_LAGER'.
PERFORM bdc_dynpro USING 'X' 'SAPMIEQ0' '0101'.
PERFORM bdc_field USING 'BDC_CURSOR' 'ITOB-SERGE'.
if p_unpair is initial .
PERFORM bdc_field USING 'ITOB-HERST' wa_final-manf.
* PERFORM bdc_field USING 'ITOB-TYPBZ' wa_final-part.
PERFORM bdc_field USING 'ITOB-TYPBZ' wa_final-model.
PERFORM bdc_field USING 'ITOB-MAPAR' wa_final-part.
PERFORM bdc_field USING 'ITOB-SERGE' wa_final-man_ser.
PERFORM bdc_field USING 'ITOB-HERLD' wa_final-country.
PERFORM bdc_field USING 'ITOB-BAUJJ' wa_final-year.
PERFORM bdc_field USING 'ITOB-BAUMM' wa_final-month.
else .
PERFORM bdc_field USING 'ITOB-SERGE' ''.
endif.
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'.
CALL TRANSACTION 'IQ02' USING bdcdat
MODE pr_mode UPDATE 'A'
MESSAGES INTO it_messtab.
CLEAR: bdcdat[], bdcdat.
CLEAR: wa_final, wa_messtab.
ENDLOOP .
end-of-selection .Hi Rachel..
While running the BDC in 'A' Mode check the message that come in the status bar. There could be any screen where just becuase u press enter it is going to the next screen. That is because of your intercation.
But in the case of background this is not hapening and it fails..
So make sure whether when u run in foreground you are pressing any additional enter which is not in your recording. This could be the only problem why it is not updating in background.
Another reson could be that you dont have access to back ground jobs. Check that also..
Regards
Ansari -
Spool not generated in background mode
Hi ,
I am fine tuning a report.
I am working on a program which is collecting data and exporting data into memory id. then two other reports, are importing data from memory and displaying in AlV/list.
When i execute this report in background the spool is not getting generated.
is there any way to generate the spool?
How to measure the execution time, as the program is taking much time and some times going to dump in case of time limit.
Thanks ,
KiranHi Kiran,
For measuring runtime use SE30 transaction. When u run in back ground it wont go to Dump. It may happen only in fore ground. If at all it happend in back ground, the reason might be different. Analyze that dump n see what is going wrong. Also i dont think there is any time limit in back ground as i executed jobs that ran for 11 days!!!!. U can alos debug the batch job.
put break point in ur program, Select that batch job in SE37, enter jdbg in command promt and press enter. Control will go to debug mode.
Which ALV u r using. I think through OOPS ALV batch job will not create spool i guess. Not sure on this.
Thanks,
Vinod. -
Function module not executing in background due to Transactional RFC error in SM58
Hi Team,
I am executing a report which calls a function module in background.This in turn creates a LUW which should eventually get cleared once the processing is completed through commit statement.
However LUW is going for an error whenever it gets executed through commit statement.
The error message in SM58 is
Error msg : Conversation
<init> not found / CPIC-CALL: 'ThSA PCMRCV' : cmRc=19 thRc=
However when I try to excecute the function module in foreground, it works correctly as expected.
Please note that the same report is being used for various clients and the function module is working fine in all others.Hence, I am expecting that thers is no issue with the code.
Is there some settings which we are missing here.
Please provide me your valuable inputs.Hi Divy,
It appears to network issue. please use below SAP note to perform network analysis using NIPING.
SAP note 500235 - Network diagnosis with NIPING
Hope this helps.
Regards,
Deepak Kori -
Hi all,
I developed a software used "inhouse" by most of my colleagues. This software is changed continuously.
In the past I had to inform everyone that there's a new release available.
Thus I developed a "quick and dirty" autoupdate mechanism. (See attachments)
The application looks for a file located on our server, which contains the version number of the most current release.
If the version number of the installed software and the version number in this file differ, the Installer for the new release is executed.
In the Installer settings I run the installed software after installation finished.
So that the user doesn't notice there was an update and the software starts as allways.
The installer is started with commandline options to install in silent mode with surpressed License Notification und supressed restart.
The start of the installed software after installation works if I start setup.exe in "normal" manner (doubleclick setup.exe)
BUT the software DOES NOT start after installation when installed in silent mode. (Commandline prompt: setup.exe /q /AcceptLicenses yes /r:n )
(Tested with XP, Vista, 7)
Does anyone know how to get this working ?
Thanks in advance, best regards,
BalzeBalze wrote:
Hi Andrey,
neither /qb nor /qf works
Well, just checked - it seems to be works as expected in LabVIEW 2010 and doesn't work with 8.5.1 as you have described.
There are some bugs in installer's builder was fixed between versions 8.5 and 10.0.
What you can do - upgrade to latest LabVIEW version or try to fix installer manually. I guess trouble present in \bin\dp\install.msi file. You can check what inside of msi with Orcas utility provided by Microsoft.
Hope it helps,
with best regards,
Andrey.
PS
Whole family a little bit ill due to relative cold weather... -
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á -
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.] -
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.
Maybe you are looking for
-
Which depreciation key is eligible for mid-month convention in SAP?
Dear Experts, I am looking for the depreciation key for mid-month convention for USA in SAP standard system. Do you know what key is for this convention? Thanks. BR, Chris Kim
-
I reformatted my hard drive to help solve the problem of it freezing all the time. After I got done installing the OS, I restarted my computer. It went through the normal startup process. Instead of showing the login screen, it just showed a blue scr
-
MacBook 2009 shutting down / crashing unexpectedly / suddenly - Mavericks 10.9
Hi, My MacBook mid-2009 shut down unexpectedly a couple of weeks ago - it had been running for a while and was very hot to touch - but in the past few days it has been happening more frequently - I counted about 12 crashes/shut downs yesterday and I'
-
Is static constructors exist in java or not?
Hi, I would like to know the existence of static constructors in java. If yes... reason If no... reason Can anyone throw some light on this topic.......?
-
HT201317 If I activate a new iPhone will my Photo Stream photos come over to my new phone?
Or do I need to ensure all photos in Photo Stream are on a laptop before I activate a new phone?