Problem in BDC program when executed using scheduled job
I have developed a BDC program for J1I5 T-code whcih updates RG1 Register. This is working as expected when run in foreground as well as in background. But it is not giving expected results when scheduled in Job. It is not giving any error message, job is executed without error.
What can be the problem? pls. help.
Thanks!
Prakash
Hi,
Thanks for reply.
I have checked log using SM37, it is not showing any error.
Log details are as follows...
Date Time Message text Message class Message no. Messag
08.05.2010 11:47:10 Job started 00 516 S
08.05.2010 11:47:10 Step 001 started (program ZSDB_J1I5_REG_UPDATE_BDC, variant 1101_1_RMA, user ID STK) 00 550 S
08.05.2010 11:47:20 Job finished 00 517 S
Similar Messages
-
I purchased my Macbook (17") through a certified apple tecnition in August 2012, it was refurbished and the motherboard was completely replaced. I do a lot of photo editing, but I have been unable to do so because of the red vibrating lines that interrupt my screen. The issue disappears temporarily when I tap on the computer, and the problem does not occur when I use external display or try to screen capture the problem. I brought the computer back to the technition I purchased it from and he said that it was a problem with my fan, so I have two new fans but the issue is still occuring. He says he doesnt know whats wrong. Does anyone have any information on this issue?
Here is an image of the issue
http://www.flickr.com/photos/67839707@N08/8884847081/I recommend having your Mac serviced by someone competent. A force sufficient to "blow apart" the fans was clearly excessive and may have damaged the display cable, as well as any number of other problems.
Dust is properly cleaned with a vacuum, preferably one designed for computer service, and they are not cheap.
Compressed air should never be used. It just blows dust everywhere, often into places where it can no longer be removed. -
Whwn to use BDC and When to use LSMW
Hi all,
Kindly tell me when to use BDC and when to use LSMW.
Please give me some scenarios, so that I can get a clear idea.
Note : Do not give the difference between BDC and LSMW.
Thanks to all in advance.
Regards,
Rajesh PHi Rajesh,
LSMW is for standard SAP applications and BDC is for customized applications.
Its worth to check the below link. Its already answered by our Community
Diff between LSmw and Bdc
Regards,
Suresh -
Run bdc program when flat file comes
Hi friends
I want to schedule my bdc program such that it automatically runs as soon as the flat file comes into application server.
Please help me.
Cheers
VamshiHI,
Follow this procedure, it might help you.
In the program, use following logic.
IF SY-BATCH = 'X'. * This is for checking
whether program is set for back ground
processing.
open dataset .....
if sy-subrc =0.
process data.
else.
continue.
endif.
if you write this logic, as the background job will be scheduled for repetition at a certain interval thenautomatically the flat file will be checked and when it encounters, SY-SUBRC =0 ,the process starts , else no process will be done.
Hope this solves the problem.
Reward points if helpful.
Thanks and Regards.
Edited by: Ammavajjala Narayana on May 29, 2008 11:36 AM -
Dialog Box Problem in BDC Program...
Hi friends,
I am facing a problem while creating service entry sheet no throgh bdc ( Tcode ML81N) . I use 'no disply' mode in call transaction method.
whenever i regarding in our development client there is no dialog box with the following screen. But in QAS server it displays the same. I have already include the following code in my bdc program. But the dialog box been displayed finally. Our user doesn't require this interaction. Kindly give solutions.
perform bdc_dynpro using 'SAPLMLSR' '0110'.
perform bdc_field using 'BDC_CURSOR'
'IMKPF-BLDAT'.
perform bdc_field using 'BDC_OKCODE'
'=OK'.
perform bdc_transaction using 'ML81N'.
Thanks & Regards,
SP.Manavalan.Hi,
Thanks for reply.
I have checked log using SM37, it is not showing any error.
Log details are as follows...
Date Time Message text Message class Message no. Messag
08.05.2010 11:47:10 Job started 00 516 S
08.05.2010 11:47:10 Step 001 started (program ZSDB_J1I5_REG_UPDATE_BDC, variant 1101_1_RMA, user ID STK) 00 550 S
08.05.2010 11:47:20 Job finished 00 517 S -
BDC PROGRAM WITH OUT USING A FM?
Hi Experts,
I need wirte a BDC program for tcode PA30.
i did the screen recording part using tcode-shdb.
i need to use field i recorded as input fields.
Now the main part is how to write code? with out using a class/method?
class/method which i earlier used is class : CL_GUI_FRONTEND_SERVICES.
method: gui_upload.
am not using ny flat file/xml file to upload?
are there any function modules which i can use?
and how to write code with out using FM?
if any can solve my issue would be very helpful...plz provide code...which would be more helpful.
Thanks in Adv.
Krrish.Hi,
If you are migrating employee data, I would suggest you to do it through PA40 transaction rather PA30. systematic screen validations it will go through. If you dont want to use any FM and wanted to do using recording pls find the below code which will update the employee data through PA40 with call transaction method.
SELECTION SCREEN
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_plan TYPE ibipparms-path OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK b1.
TYPES: BEGIN OF ty_error,
pernr TYPE persno, " Personnel number
rel_obj_id(12), " Related Object ID
msg(200) TYPE c, " To store Message
END OF ty_error.
DATA: i_tplan TYPE STANDARD TABLE OF alsmex_tabline WITH HEADER LINE,
i_intern TYPE STANDARD TABLE OF alsmex_tabline WITH HEADER LINE,
i_error TYPE ty_error OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF w_pa000,
pernr TYPE persno,
begda TYPE begda,
END OF w_pa000.
DATA: wa_plan LIKE i_plan,
wa_messtab TYPE bdcmsgcoll, " Messages
wa_error TYPE ty_error. " Errors
DATA: it_pa000 LIKE STANDARD TABLE OF w_pa000 WITH HEADER LINE,
it_pa002 LIKE STANDARD TABLE OF w_pa000 WITH HEADER LINE,
it_pa001 LIKE STANDARD TABLE OF w_pa000 WITH HEADER LINE.
DATA: g_mode LIKE ctu_params-dismode VALUE 'N',
g_file TYPE ibipparms-path.
ALV field catalog
DATA : i_fieldcat TYPE slis_t_fieldcat_alv.
Batchinputdata of single transaction
DATA: i_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
messages of call transaction
DATA: i_messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
error session opened (' ' or 'X')
Table to hold the return messages
DATA: BEGIN OF i_errmsg OCCURS 10.
INCLUDE STRUCTURE bapiret2.
DATA: END OF i_errmsg.
ALV List header table
DATA : i_header1 TYPE slis_t_listheader.
ALV List header table
DATA : i_header TYPE slis_listheader.
***ALV Events
DATA: is_layout TYPE slis_layout_alv.
DATA : it_event TYPE slis_alv_event.
DATA : it_event1 TYPE slis_t_event.
To get the F4 help for file
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_plan.
PERFORM get_filename.
START OF SELECTION
START-OF-SELECTION.
Initialise data
PERFORM initialise_events.
Retrieve data from Excel file
PERFORM retreive_data.
Populate final data into an internal table
PERFORM populate_data.
Process the excel file data to create a record for IT0007
PERFORM process_data.
END OF SELECTION
END-OF-SELECTION.
PERFORM final_output.
*& Form GET_FILENAME
FORM get_filename .
*Function module used for F4 help
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_plan.
ENDFORM. " GET_FILENAME
*& Form INITIALISE_EVENTS
FORM initialise_events .
i_header-typ = 'H'.
i_header-key = 'R'.
i_header-info = 'BDC Interface for PA Infotypes 0000,0001,0002'.
APPEND i_header TO i_header1.
CLEAR i_header.
i_header-typ = 'S'.
i_header-info = 'Hiring, Org.Assignment, Personnel Data'.
APPEND i_header TO i_header1.
CLEAR i_header.
***Events and form name
it_event-name = 'TOP_OF_PAGE'.
it_event-form = 'TOP_OF_PAGE'.
APPEND it_event TO it_event1.
ENDFORM. " INITIALISE_EVENTS
*& Form RETREIVE_DATA
FORM retreive_data .
PERFORM upload_data.
ENDFORM. " RETREIVE_DATA
*& Form UPLOAD_DATA
FORM upload_data .
FM to upload data from excel sheet to internal table
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_plan
i_begin_col = g_colbeg
i_begin_row = g_rowbeg
i_end_col = g_colend
i_end_row = g_rowend
TABLES
intern = i_tplan
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.
ENDFORM. " UPLOAD_DATA
*& Form POPULATE_DATA
FORM populate_data .
processing the internal table generated from the function module
Passing data from Excel file to internal table
CLEAR: g_cnt_processed,
g_cnt_err_processed,
i_intern,
i_plan.
LOOP AT i_tplan.
AT NEW row.
CLEAR i_plan.
ENDAT.
CASE i_tplan-col.
Begin Date
WHEN '0001'.
i_plan-pernr = i_tplan-value.
End Date
WHEN '0002'.
i_plan-begda = i_tplan-value.
WHEN '0003'.
i_plan-massg = i_tplan-value.
Sign
WHEN '0004'.
i_plan-plans = i_tplan-value.
WHEN '0005'.
i_plan-werks = i_tplan-value.
WHEN '0006'.
i_plan-persg = i_tplan-value.
WHEN '0007'.
i_plan-persk = i_tplan-value.
WHEN '0008'.
i_plan-anrex = i_tplan-value.
WHEN '0009'.
i_plan-nachn = i_tplan-value.
WHEN '0010'.
i_plan-vorna = i_tplan-value.
WHEN '0011'.
i_plan-gesch = i_tplan-value.
WHEN '0012'.
i_plan-gbdat = i_tplan-value.
WHEN '0013'.
i_plan-fatxt = i_tplan-value.
WHEN '0014'.
i_plan-famdt = i_tplan-value.
WHEN '0015'.
i_plan-gblnd = i_tplan-value.
WHEN '0016'.
i_plan-anzkd = i_tplan-value.
WHEN '0017'.
i_plan-natio = i_tplan-value.
WHEN '0018'.
i_plan-btrtl = i_tplan-value.
WHEN '0019'.
i_plan-gsber = i_tplan-value.
WHEN '0020'.
i_plan-abkrs = i_tplan-value.
ENDCASE.
Appending the internal table tb_data, tb_chng
AT END OF row.
APPEND i_plan.
IF i_plan IS INITIAL.
g_cnt_err_processed = g_cnt_err_processed + 1.
ENDIF.
ENDAT.
ENDLOOP.
To get the total number of records processed
DESCRIBE TABLE i_plan LINES g_lines.
g_cnt_processed = g_cnt_err_processed + g_lines.
CLEAR g_lines.
ENDFORM. " POPULATE_DATA
*& Form PROCESS_DATA
FORM process_data .
CLEAR wa_error.
REFRESH i_bdcdata.
Check if the employee numbers from the template has already been hired
SELECT pernr
begda
FROM pa0000
INTO TABLE it_pa000
FOR ALL ENTRIES IN i_plan
WHERE pernr = i_plan-pernr
AND massn = 'ZA'.
IF sy-subrc = 0.
SORT it_pa000 BY pernr.
Check if employee has a corresponding infotype 0001 record
SELECT pernr
begda
FROM pa0001
INTO TABLE it_pa001
FOR ALL ENTRIES IN it_pa000
WHERE pernr = it_pa000-pernr AND
begda = it_pa000-begda.
IF sy-subrc = 0.
SORT it_pa001 BY pernr.
Check if employee has a corresponding infotype 0002 record
SELECT pernr
begda
FROM pa0001
INTO TABLE it_pa002
FOR ALL ENTRIES IN it_pa001
WHERE pernr = it_pa001-pernr AND
begda = it_pa001-begda.
IF sy-subrc = 0.
SORT it_pa002 BY pernr.
ENDIF.
ENDIF.
ENDIF.
LOOP AT i_plan.
REFRESH i_bdcdata.
***your recording to be pasted here***
PERFORM bdc_field USING 'BDC_CURSOR'
'P0006-BEGDA'.
PERFORM call_transaction.
APPEND wa_error TO i_error.
REFRESH: i_bdcdata, i_messtab.
CLEAR: wa_error, i_error.
ENDLOOP.
ENDFORM. " PROCESS_DATA
*& Form BDC_DYNPRO
FORM bdc_dynpro USING program dynpro.
CLEAR i_bdcdata.
i_bdcdata-program = program.
i_bdcdata-dynpro = dynpro.
i_bdcdata-dynbegin = 'X'.
APPEND i_bdcdata.
ENDFORM. "BDC_DYNPRO
*& Form BDC_FIELD
FORM bdc_field USING fnam fval.
IF fval <> nodata.
CLEAR i_bdcdata.
i_bdcdata-fnam = fnam.
i_bdcdata-fval = fval.
APPEND i_bdcdata.
ENDIF.
ENDFORM. "bdc_field
*& Form ERROR_RECORD_DATA
FORM error_record_data .
CLEAR: g_lines,
wa_messtab,
g_msg.
DESCRIBE TABLE i_messtab LINES g_lines.
READ TABLE i_messtab INTO wa_messtab INDEX g_lines.
IF sy-subrc = 0.
CLEAR g_msg.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = wa_messtab-msgid
lang = sy-langu
no = wa_messtab-msgnr
v1 = wa_messtab-msgv1
v2 = wa_messtab-msgv2
v3 = wa_messtab-msgv3
v4 = wa_messtab-msgv4
IMPORTING
msg = g_msg
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF wa_messtab-msgtyp = 'E'.
IF wa_messtab-msgtyp = 'S' AND wa_messtab-msgnr = '102' AND wa_messtab-msgid = 'PG'.
wa_error-pernr = i_plan-pernr.
wa_error-rel_obj_id = 'S'.
wa_error-msg = 'Personnel Number Created Successfully'.
ELSE.
wa_error-pernr = i_plan-pernr.
wa_error-rel_obj_id = 'E'.
wa_error-msg = g_msg.
ENDIF.
APPEND wa_error TO i_error.
CLEAR i_error.
ENDIF.
ENDFORM. " ERROR_RECORD_DATA
*& Form FINAL_OUTPUT
FORM final_output .
CLEAR g_lines.
SORT i_error.
*************added*********************************************
loop at i_error into wa_error.
if wa_error-MSG eq 'No batch input data for screen MP000600 2000'.
wa_error-rel_obj_id = 'S'.
wa_error-MSG = 'Record Created Successfully'.
modify i_error from wa_error.
endif.
endloop.
loop at i_error into wa_error.
if wa_error-rel_obj_id = 'S'.
g_cnt_success = g_cnt_success + 1. " Append success count
elseif wa_error-rel_obj_id = 'E'.
g_cnt_failure = g_cnt_failure + 1. " Append error count
endif.
endloop.
***Field catalog
PERFORM field_cat.
***Assigning Program name
g_repid = sy-repid.
SORT i_error.
***Display Output
IF NOT it_final[] IS INITIAL.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'PF_STATUS_SET'
i_save = 'A'
it_events = it_event1
is_layout = is_layout
it_fieldcat = i_fieldcat[]
TABLES
t_outtab = i_error[].
ELSE.
MESSAGE i015(zv_msg) WITH 'No Data Found for this selection'.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " FINAL_OUTPUT
*& Form top_of_page
text
FORM top_of_page.
***FM for Displaying Heading
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_header1[]
i_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "top_of_page
*& Form FIELD_CAT
FORM field_cat .
ENDFORM. " FIELD_CAT
*& Form CALL_TRANSACTION
FORM call_transaction .
CALL TRANSACTION 'PA40' USING i_bdcdata
MODE g_mode
UPDATE 'S'
MESSAGES INTO i_messtab.
If call transaction successful
IF sy-subrc = 0.
g_cnt_success = g_cnt_success + 1. " Append success count "changed
PERFORM error_record_data. " Populate all data
If call transaction not successful
ELSE.
PERFORM error_record_data. " Populate all table
g_cnt_failure = g_cnt_failure + 1. " Append error count "changed
ENDIF.
ENDFORM. " CALL_TRANSACTION -
When I click on a link, whether e-mail, yahoo or other search engines, E-bay, Amazon, etc. I get sent to another site. If I click back and then re-click on the original site I get sent to where I wanted to be. While I am browsing on a web page of any of the above, or other sites, I sometimes get a voice ad or possibly a video, but I can't locate it or turn it off. This does not happen when I use windows internet, or it's Google chrome internet, only with Firefox. I have used Ad aware, and Mal-bytes anti-virus but they come up blank.
Do a malware check with some malware scanning programs on the Windows computer.<br />
You need to scan with all programs because each program detects different malware.<br />
Make sure that you update each program to get the latest version of their databases before doing a scan.
*http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
*http://www.superantispyware.com/ - SuperAntispyware
*http://www.microsoft.com/security/scanner/en-us/default.aspx - Microsoft Safety Scanner
*http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
*http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
You can also do a check for a rootkit infection with TDSSKiller.
*http://support.kaspersky.com/viruses/solutions?qid=208280684
See also:
*"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked -
I have a problem while I am doing BDC program for Maintaining Quotation.i.e,I have Header data and Item Data.In Item data it has multiple items.For each item I have to give condition type in the table control(which has already pre-existed condition types),but I have to place new Condition type at the last line of the table control.
Hi,
In pricing element Table Control we have to pass condition type. For each material a set of condition types pre-exists, for us to pass condition types we have to capture index number which changes dynamically.
We have to pass the index number to T_BDCDATA prior calling the transaction ME47 to append the condition type to the last line of the Pricing element table control which changes dynamically. -
I've a problem with QuickTime controlbar when I use transparent wmode
Hello All,
I've a problem with QuickTime controlbar. When I use this code :
<object height="592" width="690" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B">
<param value="http://streamer.podcast.ulg.ac.be/reflexions/scienceensamusant/doccafe/D ocHorlogesBis.mov" name="src">
<param value="true" name="autoplay">
<param value="true" name="controller">
<param value="true" name="kioskmode">
<param value="true" name="loop">
<param value="video/quicktime" name="type">
<param value="transparent" name="wmode">
<embed height="592" width="690" type="video/quicktime" loop="true" kioskmode="true" controller="true" autoplay="true" pluginspage="http://www.apple.com/quicktime/download/" src="http://streamer.podcast.ulg.ac.be/reflexions/scienceensamusant/doccafe/Doc HorlogesBis.mov">
</object>
with transparent wmode, the controlbar don't print correcty on IE7/IE8.
If I use this code without wmode='transparent', It work but my css menu doesn't work.
Anybody can help me ? Thank in advance.
JPHello,
The suggestion made by Golubkov is correct. Make sure that you have configured the CAN objects to correspond to the Ports- for instance, Port1 to CAN0 and Port 2 to CAN1.
If this dosen't fix the problem, let us know what the error message clearly states ( can be found out by clicking on the details tab). -
Tomcat problem finding MySQL driver when context used
Hi all.
I have a context set in tomcat3.3 which allows me to run JSPs saved in TOMCAT_HOME/webapps/examples/jsp from /luc.
Initially, I had problems using beans when I used the context (the whole thing works ok when I just enter the actual path in the URL).
I solved that by adding the ...WEB-INF/classes directories to my CLASSPATH. But now that the beans are found, Tomcat is giving errors regarding the mySQL driver I'm using, which is mm-mysql-2.0.11.
The error is:
Error: 500
Location: /luc/validateLogin.jsp
Internal Servlet Error:
javax.servlet.ServletException:
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:460)
at validateLogin_1._jspService(validateLogin_1.java:139)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:484)
Root cause:
java.lang.NullPointerException:
at customerProfile.customerProfileBean.validateUser(customerProfileBean.java:135)
at validateLogin_1._jspService(validateLogin_1.java:98)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:484)
And I've outputted the the following stuff:
Unable to load driver java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
java.sql.SQLException: No suitable driver
Remember, this all works fine when I don't use the context.
In my CLASSPATH, I point to the JAR file:
/usr/local/jdk1.3.1/lib/mm.mysql-2.0.11/mm.mysql-2.0.11-bin.jar
Any ideas?try moving the mm.mysql-2.0.11-bin.jar file to %TOMCAT_HOME%/common/lib. This should make the classes available to all contexts.
-
I have an Ipod Touch 4 gen. and I'm having problems with audio when I use other than Apple brand earphones. I'm talking about music only so far, when I use apple earphones all is fine, but if I use other type of phones ( sony for exemple ) I can only hear the music and the background but not the lead singer voice, can anybody explain this to me? thank you.
- Try cleaning out/blowing out the headphone jack. Try inserting/removing the plug a dozen times or so.
- If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
Apple Retail Store - Genius Bar -
Howto change NLS_ENV variables when creating Oracle Scheduler jobs
Hello,
i have installed EMGrid 10.2.0.3 x86_64 and 10.2.0.3 agent on other computer. With standard NLS_LANGUAGE='AMERICAN' NLS_TERRITORY='AMERICA' settings.
When I create DB job with EMGrid Oracle Sheduler interface, NLS_xx parameters are set as NLS_LANGUAGE='AMERICAN' NLS_TERRITORY='AMERICA'.
How can I change the default settings to NLS_LANGUAGE='CZECH', NLS_TERRITORY='CZECH REPUBLIC' when creating DB jobs with EMGrid?
Thanks for reply.
Regards,
Stanislav StudenyHi,
You need to call the create_job (or submit) procedure from a session which has the appropriate NLS settings set. I can think of two ways of doing this from EMGrid
- create a stored procedure which takes in job parameters, does appropriate "alter session" statements and then calls create_job/subit with the passed in parameters. You can then call that stored procedure from EMGrid
- create a job from EMGrid which as the action does the alter session statements and then creates the real job
Hope this helps,
Ravi. -
Problem in BDC program using MIGO_GO transaction code
Hi Gurus
I have developed a BDC session upload program. The program is
running fine except for the issue that when it goes the subscreen in
MIGO_GO transaction (same as MIGO) it does not generates any code
for page down or next page key. While recording after 15 entries
(end of page) it moves automaticaly to the next page on line 2 but
when I have used my own itab to fill data into this screen it
passes/generates the code for page down with clear screen. It does
go to item 2 but overwrites earlier entries instead of generting new
one.
Any suggestions?
Guys this is very urgent so need ur feedback immediately?
Lots of thanks in advance.
The code is as follows:
PURPOSE: The purpose of this upload program is to upload
receipt
against Production Order. Data is uploaded into SAP
via text
file which is converted from pre-defined excel file
pattern.
REPORT zmm_migo_rec
NO STANDARD PAGE HEADING LINE-SIZE 255.
*Excel column sequence SAP Material Number Batch # Crop Year
Process Date Net Weight Plant Area Gross
Weight Plant Number Shift Mat.Desc Prod.Ord#
TYPES : BEGIN OF st_barcode,
m_matnr LIKE mara-matnr,
m_batch_no LIKE mseg-charg,
m_crop_year TYPE c LENGTH 4,
m_process_date LIKE mkpf-bldat,
m_net_wt TYPE c LENGTH 7,
m_plant_area TYPE c LENGTH 5,
m_gross_wt TYPE c LENGTH 7,
m_plant_num TYPE c LENGTH 1,
m_shift TYPE c LENGTH 1,
m_matnr_desc TYPE c LENGTH 30,
m_prod_ord LIKE mseg-aufnr,
text(200),
text1(200),
END OF st_barcode.
DATA : itab_barcode TYPE TABLE OF st_barcode WITH HEADER LINE.
DATA : itab_log TYPE TABLE OF st_barcode WITH HEADER LINE.
DATA : itab_log1 TYPE TABLE OF st_barcode WITH HEADER LINE.
DATA : g_filename TYPE rlgrap-filename.
INCLUDE bdcrecx1.
Start of Selection Screen for document data, screen data and
posting date fields.
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-000.
PARAMETERS :
p_dummy TYPE i DEFAULT 0,
p_bldat LIKE sy-datum OBLIGATORY DEFAULT sy-
datum, "Document date
p_budat LIKE sy-datum OBLIGATORY DEFAULT sy-
datum, "Posting date
p_frmplt LIKE t001l-werks OBLIGATORY,
p_frmloc LIKE t001l-lgort OBLIGATORY,
p_toloc LIKE t001l-lgort OBLIGATORY,
p_rsnmov LIKE mseg-grund OBLIGATORY,
p_bsarea LIKE mseg-gsber OBLIGATORY,
cb_simul AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK a1.
START-OF-SELECTION.
*to remove unnecessary fields from selection screen
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group4 LT '060' AND screen-group3 NE 'BLK'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
*to Process Call Transaction in Error Mode
ctu = 'X'.
ctumode = 'A'.
nodata = space.
END-OF-SELECTION.
Get data from file
PERFORM f_get_data.
Validate data retrieved from excel file
PERFORM f_validate_data.
Batch data / simulate.
IF cb_simul IS INITIAL.
PERFORM f_prized_data.
PERFORM f_write_log.
ELSE.
PERFORM f_write_log.
ENDIF.
*& Form F_GET_DATA
This module is used to read text file data into SAP itab.
FORM f_get_data .
Select the file to be uploaded
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = g_filename
filetype = 'DAT'
TABLES
data_tab = itab_barcode
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
ENDFORM. " F_GET_DATA
*& Form F_VALIDATE_DATA
text
FORM f_validate_data .
DATA : BEGIN OF lt_marc OCCURS 0,
matnr LIKE mard-matnr,
werks LIKE mard-werks, " Plant
END OF lt_marc.
RANGES : lr_matnr FOR mara-matnr.
READ TABLE itab_barcode INDEX 1.
Prepare Ranges to check/verify Material from Table MARD i.e.
respective plant
lr_matnr-sign = 'I'.
lr_matnr-option = 'EQ'.
LOOP AT itab_barcode.
Add leading zeros incase of numeric value.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = itab_barcode-m_matnr
IMPORTING
output = itab_barcode-m_matnr.
lr_matnr-low = itab_barcode-m_matnr.
APPEND lr_matnr.
MODIFY itab_barcode TRANSPORTING m_matnr.
ENDLOOP.
IF NOT lr_matnr[] IS INITIAL.
SORT lr_matnr BY low.
DELETE ADJACENT DUPLICATES FROM lr_matnr COMPARING low.
SELECT matnr werks FROM marc
INTO TABLE lt_marc
WHERE matnr IN lr_matnr AND
werks = p_frmplt.
ENDIF.
LOOP AT itab_barcode.
READ TABLE lt_marc
WITH KEY matnr = itab_barcode-m_matnr
werks = p_frmplt.
IF sy-subrc <> 0 .
CONCATENATE 'Material' itab_barcode-m_matnr
' does not exist in Plant ' p_frmplt
INTO itab_barcode-text SEPARATED BY space.
MOVE-CORRESPONDING itab_barcode TO itab_log.
APPEND itab_log.
MODIFY itab_barcode TRANSPORTING text.
CONTINUE.
ENDIF.
ENDLOOP.
ENDFORM. " F_VALIDATE_DATA
*& Form F_WRITE_LOG
text
FORM f_write_log .
LOOP AT itab_log.
WRITE :/ itab_log-text.
ENDLOOP.
LOOP AT itab_log1.
WRITE :/ itab_log1-text1.
ENDLOOP.
ENDFORM. " F_WRITE_LOG
*& Form f_prized_data
text
--> p1 text
<-- p2 text
FORM f_prized_data.
DATA: ld_lines LIKE sy-tabix,
ld_sw TYPE i,
lh_loop TYPE i,
ld_recno TYPE i,
lremain TYPE i,
ld_total TYPE i,
ld_counter LIKE sy-index,
ld_counter TYPE i,
ld_save LIKE sy-index,
ld_last TYPE i,
sc_counter(2) TYPE n,
ld_budat(10),
ld_bldat(10).
DATA: wa_matnr(40) TYPE c,
wa_bwtar(40) TYPE c,
wa_erfme(40) TYPE c,
wa_charg(40) TYPE c.
WRITE: p_budat TO ld_budat,
p_bldat TO ld_bldat.
ld_recno = 300. " Number of records in the upload file.
ld_last = 0.
Open BDC session.
PERFORM open_group.
DESCRIBE TABLE itab_barcode LINES ld_lines.
CLEAR: lh_loop, lremain.
lh_loop = ld_lines DIV ld_recno.
lremain = ld_lines MOD ld_recno.
IF lremain > 0.
lh_loop = lh_loop + 1.
ENDIF.
ld_sw = 1.
LOOP AT itab_barcode.
ADD 1 TO ld_counter.
ADD 1 TO sc_counter.
ADD 1 TO ld_total. " Check for 300
IF ld_sw = 1.
Header data.
PERFORM open_group.
PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
PERFORM bdc_field
USING 'BDC_OKCODE' '=MIGO_OK_ACTION'.
PERFORM bdc_field
USING 'BDC_CURSOR' 'GODYNPRO-ACTION'.
PERFORM bdc_field USING 'GODYNPRO-
ACTION' 'A01'.
PERFORM bdc_field USING 'GODYNPRO-
REFDOC' 'R02'.
PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
PERFORM bdc_field
USING 'BDC_OKCODE' '=OK_GO'.
PERFORM bdc_field USING 'GODYNPRO-
ACTION' 'A01'.
PERFORM bdc_field USING 'GODYNPRO-
REFDOC' 'R08'.
PERFORM bdc_field USING 'GODEFAULT_TV-
BWART' '101'.
PERFORM bdc_field
USING 'BDC_CURSOR' 'GODYNPRO-
ORDER_NUMBER'.
PERFORM bdc_field USING 'GOHEAD-
BLDAT' ld_bldat.
PERFORM bdc_field USING 'GOHEAD-
BUDAT' ld_budat.
PERFORM bdc_field USING 'GOHEAD-
XNAPR' 'X'.
PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
PERFORM bdc_field
USING 'BDC_OKCODE' '=MIGO_OK_DETAIL_OP
EN'.
PERFORM bdc_field USING 'GODYNPRO-
ACTION' 'A01'.
PERFORM bdc_field USING 'GODYNPRO-
REFDOC' 'R08'.
PERFORM bdc_field USING 'GODEFAULT_TV-
BWART' '101'.
PERFORM bdc_field
USING 'BDC_CURSOR' 'GODYNPRO-
ORDER_NUMBER'.
PERFORM bdc_field USING 'GOHEAD-
BLDAT' ld_bldat.
PERFORM bdc_field USING 'GOHEAD-
BUDAT' ld_budat.
PERFORM bdc_field USING 'GOHEAD-
XNAPR' 'X'.
PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
PERFORM bdc_field
USING 'BDC_OKCODE' '=OK_GO'.
PERFORM bdc_field USING 'GODYNPRO-
ACTION' 'A01'.
PERFORM bdc_field USING 'GODYNPRO-
REFDOC' 'R08'.
PERFORM bdc_field USING 'GODEFAULT_TV-
BWART' '101'.
PERFORM bdc_field
USING 'BDC_CURSOR' 'GODYNPRO-
ORDER_NUMBER'.
PERFORM bdc_field USING 'GODYNPRO-
ORDER_NUMBER' itab_barcode-m_prod_ord.
PERFORM bdc_field USING 'GOHEAD-
BLDAT' ld_bldat.
PERFORM bdc_field USING 'GOHEAD-
BUDAT' ld_budat.
PERFORM bdc_field USING 'GOHEAD-
XNAPR' 'X'.
PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
PERFORM bdc_field
USING 'BDC_OKCODE' '=MIGO_OK_LINE_CLIC
K'.
PERFORM bdc_field USING 'GODEFAULT_TV-
BWART' '101'.
PERFORM bdc_field USING 'GOHEAD-
BLDAT' ld_bldat.
PERFORM bdc_field USING 'GOHEAD-
BUDAT' ld_budat.
PERFORM bdc_field USING 'GOHEAD-
XNAPR' 'X'.
PERFORM bdc_field USING 'GOHEAD-
WEVER' '3'.
PERFORM bdc_field
USING 'BDC_CURSOR' 'GOITEM-ZEILE(01)'.
PERFORM bdc_field USING 'GODYNPRO-
DETAIL_ZEILE' ' 1'.
PERFORM bdc_field USING 'GOITEM-
ERFME' 'KG'.
PERFORM bdc_field USING 'GOITEM-
BWART' '101'.
PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
PERFORM bdc_field
USING 'BDC_OKCODE' '=MIGO_OK_SPLIT_QUA
N'.
PERFORM bdc_field USING 'GODEFAULT_TV-
BWART' '101'.
PERFORM bdc_field USING 'GOHEAD-
BLDAT' ld_bldat.
PERFORM bdc_field USING 'GOHEAD-
BUDAT' ld_budat.
PERFORM bdc_field USING 'GOHEAD-
XNAPR' 'X'.
PERFORM bdc_field USING 'GOHEAD-
WEVER' '3'.
PERFORM bdc_field
USING 'BDC_CURSOR' 'GOITEM-ZEILE(01)'.
PERFORM bdc_field USING 'GODYNPRO-
DETAIL_ZEILE' ' 1'.
PERFORM bdc_field USING 'GOITEM-
ERFME' 'KG'.
PERFORM bdc_field USING 'GOITEM-
MIGO_ELIKZ' '1'.
PERFORM bdc_field USING 'GOITEM-
BWART' '101'.
ld_sw = 0.
ENDIF.
IF sc_counter = 16.
CLEAR sc_counter.
PERFORM bdc_field USING 'BDC_OKCODE' 'DOWN'.
PERFORM bdc_field
USING 'BDC_OKCODE' '/00'.
add 2 to sc_counter.
ELSE.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
ENDIF.
CLEAR wa_matnr.
CONCATENATE 'GOSPLIT-ERFMG(' sc_counter ')' INTO wa_matnr.
CLEAR wa_bwtar.
CONCATENATE 'GOSPLIT-CHARG(' sc_counter ')' INTO wa_bwtar.
PERFORM bdc_dynpro USING 'SAPLMIGO' '1000'.
PERFORM bdc_field
USING 'BDC_OKCODE' '=OK_SP_CH'.
PERFORM bdc_field
USING 'BDC_CURSOR' 'GOSPLIT-CHARG
(sc_counter)'.
PERFORM bdc_field USING wa_matnr itab_barcode-
m_gross_wt.
PERFORM bdc_field USING wa_bwtar itab_barcode-
m_batch_no.
PERFORM bdc_field
USING 'BDC_CURSOR' 'GOSPLIT-CHARG
(sc_counter)'.
*When end of itab
AT LAST.
PERFORM bdc_dynpro USING 'SAPLMIGO' '1000'.
PERFORM bdc_field
USING 'BDC_OKCODE' '=OK_GOON'.
PERFORM bdc_field
USING 'BDC_CURSOR' 'GOSPLIT-CHARG
(sc_counter)'.
PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
PERFORM bdc_field
USING 'BDC_OKCODE' '=MIGO_OK_NEXT_IT'.
PERFORM bdc_field USING 'GODEFAULT_TV-
BWART' '101'.
PERFORM bdc_field USING 'GOHEAD-
BLDAT' ld_bldat.
PERFORM bdc_field USING 'GOHEAD-
BUDAT' ld_budat.
PERFORM bdc_field USING 'GOHEAD-
XNAPR' 'X'.
PERFORM bdc_field USING 'GOHEAD-
WEVER' '3'.
PERFORM bdc_field
USING 'BDC_CURSOR' 'GOITEM-ZEILE(01)'.
PERFORM bdc_field USING 'GODYNPRO-
DETAIL_ZEILE' ' 1'.
PERFORM bdc_field USING 'GOITEM-
ERFME' 'KG'.
PERFORM bdc_field USING 'GOITEM-
MIGO_ELIKZ' '1'.
PERFORM bdc_field USING 'GOITEM-
BWART' '101'.
PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
PERFORM bdc_field
USING 'BDC_OKCODE' '=MIGO_OK_TAKE_VALU
E'.
PERFORM bdc_field USING 'GODEFAULT_TV-
BWART' '101'.
PERFORM bdc_field USING 'GOHEAD-
BLDAT' ld_bldat.
PERFORM bdc_field USING 'GOHEAD-
BUDAT' ld_budat.
PERFORM bdc_field USING 'GOHEAD-
XNAPR' 'X'.
PERFORM bdc_field
USING 'BDC_CURSOR' 'GOITEM-TAKE_IT
(01)'.
PERFORM bdc_field USING 'GOITEM-TAKE_IT
(01)' 'X'.
PERFORM bdc_field USING 'GODYNPRO-
DETAIL_ZEILE' ' 1'.
PERFORM bdc_field USING 'GOITEM-
ERFME' 'KG'.
PERFORM bdc_field USING 'GOITEM-
MIGO_ELIKZ' '1'.
PERFORM bdc_field USING 'GOITEM-
BWART' '101'.
PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
PERFORM bdc_field
USING 'BDC_OKCODE' '=OK_CHECK'.
PERFORM bdc_field USING 'GODEFAULT_TV-
BWART' '101'.
PERFORM bdc_field USING 'GOHEAD-
BLDAT' ld_bldat.
PERFORM bdc_field USING 'GOHEAD-
BUDAT' ld_budat.
PERFORM bdc_field USING 'GOHEAD-
XNAPR' 'X'.
PERFORM bdc_field
USING 'BDC_CURSOR' 'GOITEM-TAKE_IT
(01)'.
PERFORM bdc_field USING 'GODYNPRO-
DETAIL_ZEILE' ' 1'.
PERFORM bdc_field USING 'GOITEM-
ERFME' 'KG'.
PERFORM bdc_field USING 'GOITEM-
MIGO_ELIKZ' '1'.
PERFORM bdc_field USING 'GOITEM-
BWART' '101'.
PERFORM bdc_field USING 'GODYNPRO-
DETAIL_TAKE' 'X'.
PERFORM bdc_dynpro USING 'SAPMSSY0' '0120'.
PERFORM bdc_field
USING 'BDC_OKCODE' '=&ONT'.
PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
PERFORM bdc_field
USING 'BDC_OKCODE' '=OK_POST1'.
PERFORM bdc_field USING 'GODEFAULT_TV-
BWART' '101'.
PERFORM bdc_field USING 'GOHEAD-
BLDAT' ld_bldat.
PERFORM bdc_field USING 'GOHEAD-
BUDAT' ld_budat.
PERFORM bdc_field USING 'GOHEAD-
XNAPR' 'X'.
PERFORM bdc_field
USING 'BDC_CURSOR' 'GOITEM-TAKE_IT
(01)'.
PERFORM bdc_field USING 'GODYNPRO-
DETAIL_ZEILE' ' 1'.
PERFORM bdc_field USING 'GOITEM-
ERFME' 'KG'.
PERFORM bdc_field USING 'GOITEM-
MIGO_ELIKZ' '1'.
PERFORM bdc_field USING 'GOITEM-
BWART' '101'.
PERFORM bdc_field USING 'GODYNPRO-
DETAIL_TAKE' 'X'.
PERFORM bdc_transaction USING 'MIGO_GO'.
ENDAT.
ENDLOOP.
PERFORM close_group.
ENDFORM. "f_prized_dataHi
Thanks Peram for your swift reply but I am a newbie to BAPIs ...... is there anyway i can do this from within the code i had written ....
for BAPIs I have to do R & D in detail and I need to complete this urgently. If BAPI is the only solution kindly provide my some quick guideline to proceed.
Thanks,
Imran -
Query slow when executing using prepared statement compared to sqlDeveloper
Oracle version is 10.2.0.1.0.
I have got a query which when submitted from java code using prepared statement and parameter substitutions, takes more than 20 seconds to give results.
I can see this SELECT sql sitting there when I run Monitor Sessions through sqlDeveloper, with its wait time increasing and then finally getting through. During that time no other SQLs are waiting.
DURING THAT TIME then I am able to run the same query (with values included) multiple times using sqlDeveloper, and it gives results in no time.
Sqldeveloper connects using thin client using lib provided by oracle in windows.
Java code runs from linux and uses the thin client using lib provided by oracle in linux.
Both are hitting the same DB running on a separate Linux machine.
What could be the cause of this problem?
What db parameters, queries should I run to identify the bottleneck?
Edited by: user10390517 on Jun 14, 2010 3:06 AMHi Rob,
at least you should see some differences in the statistics for the different child cursor (the one for the execution in the application should show at least a higher value for ELAPSED_TIME). I would use something like the following query to check the information for the child cursors:
select sql_id
, PLAN_HASH_VALUE
, CHILD_NUMBER
, EXECUTIONS
, ELAPSED_TIME
, USER_IO_WAIT_TIME
, CONCURRENCY_WAIT_TIME
, DISK_READS
, BUFFER_GETS
, ROWS_PROCESSED
from v$sql
where sql_id = your_sql_idRegards
Martin -
Visa Control grayed out when executable used with Run-time Engine
When I run an executable on a machine with only the Run-time Engine the Visa Control for Com Ports is grayed out. I'm guessing that I am missing a library, but do not know which one.
You need to install the VISA run-time. If you are just using VISA for serial communication, then there is an option on the app builder (Installer Settings>Advanced) for Serial Port Support. This will add a much smaller version of the VISA run-time engine to the installer you create. If you are using GPIB, etc., you have to install the hardware driver (i.e. NI-GPIB) and the full VISA run-time engine.
Maybe you are looking for
-
My mini ipod has been giving me lots of problems (like bad battery, hardd drive problems, etc..). I am considering buying a nano or the video ipod. Do they bring the same problems as the mini or were those problems overcome? Thanks! AMy
-
can i change my google searches back to being in alphabetical order rather than in most searched for?
-
Incompatible signature after creating a new Flex mobile project in Flashbuilder 4.6
When I create a new flex mobile project and try to build it right away it gives me this error 1144: Interface method initialize in namespace mx.core:IUIComponent is implemented with an incompatible signature in class utest. I have tried reinstalling
-
Dear All, I am using the javax.mail to send email my only problem is sending multiple CC copies. Below is a part of my codes. This line where I set the CC does not work emailMessage.setRecipients(Message.RecipientType.CC,InternetAddress.parse(eMArray
-
Clicking on portal link second time does not take to default view of comp
Hi, Created multi screen Dynpro component which works fine when run directly in R/3. Problem occurs when it is run through portal link. First time you click The default View opens up. You go to second view by clicking on action. So far so good.