I want to covert the BDC to background process
Hi,
I want to change the BDC program to Background processing . I am posting the code below, can you change it.
FUNCTION YFIIN_CRC_SET_FLG1.
""Local Interface:
*" IMPORTING
*" VALUE(CTU) LIKE APQI-PUTACTIVE DEFAULT 'X'
*" VALUE(MODE) LIKE APQI-PUTACTIVE DEFAULT 'N'
*" VALUE(UPDATE) LIKE APQI-PUTACTIVE DEFAULT 'L'
*" VALUE(GROUP) LIKE APQI-GROUPID OPTIONAL
*" VALUE(USER) LIKE APQI-USERID OPTIONAL
*" VALUE(KEEP) LIKE APQI-QERASE OPTIONAL
*" VALUE(HOLDDATE) LIKE APQI-STARTDATE OPTIONAL
*" VALUE(NODATA) LIKE APQI-PUTACTIVE DEFAULT '/'
*" VALUE(QMNUM_001) LIKE VIQMEL-QMNUM
*" EXPORTING
*" VALUE(SUBRC) LIKE SYST-SUBRC
*" TABLES
*" MESSTAB STRUCTURE BDCMSGCOLL OPTIONAL
subrc = 0.
perform bdc_nodata using NODATA.
perform open_group using GROUP USER KEEP HOLDDATE CTU.
perform bdc_dynpro using 'SAPLIQS0' '0200'.
perform bdc_field using 'BDC_CURSOR'
'RIWO00-QMNUM'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RIWO00-QMNUM'
QMNUM_001.
perform bdc_dynpro using 'SAPLIQS0' '7200'.
perform bdc_field using 'BDC_OKCODE'
'=GNOK'.
perform bdc_field using 'BDC_CURSOR'
'VIQMEL-QMNUM'.
perform bdc_dynpro using 'SAPLIQS0' '7200'.
perform bdc_field using 'BDC_OKCODE'
'=BUCH'.
perform bdc_field using 'BDC_CURSOR'
'VIQMEL-QMNUM'.
perform bdc_transaction tables messtab
using 'IQS2'
CTU
MODE
UPDATE.
if sy-subrc <> 0.
subrc = sy-subrc.
exit.
endif.
perform close_group using CTU.
ENDFUNCTION.
==================================
***INCLUDE BDCRECXY
Batchinputdata of single transaction
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
Nodata-Character
DATA: NODATA_CHARACTER VALUE '/'.
create batchinput session *
FORM OPEN_GROUP
USING P_GROUP LIKE APQI-GROUPID
P_USER LIKE APQI-USERID
P_KEEP LIKE APQI-QERASE
P_HOLDDATE LIKE APQI-STARTDATE
P_CTU LIKE APQI-PUTACTIVE.
IF P_CTU <> 'X'.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING CLIENT = SY-MANDT
GROUP = P_GROUP
USER = P_USER
KEEP = P_KEEP
HOLDDATE = P_HOLDDATE.
ENDIF.
ENDFORM.
end batchinput session *
FORM CLOSE_GROUP USING P_CTU LIKE APQI-PUTACTIVE.
IF P_CTU <> 'X'.
close batchinput group
CALL FUNCTION 'BDC_CLOSE_GROUP'.
ENDIF.
ENDFORM.
Start new transaction according to parameters *
FORM BDC_TRANSACTION TABLES P_MESSTAB
USING P_TCODE
P_CTU
P_MODE
P_UPDATE.
DATA: L_SUBRC LIKE SY-SUBRC.
IF P_CTU <> 'X'.
CALL FUNCTION 'BDC_INSERT'
EXPORTING TCODE = P_TCODE
TABLES DYNPROTAB = BDCDATA
EXCEPTIONS OTHERS = 1.
ELSE.
CALL TRANSACTION P_TCODE USING BDCDATA
MODE P_MODE
UPDATE P_UPDATE
MESSAGES INTO P_MESSTAB.
ENDIF.
L_SUBRC = SY-SUBRC.
REFRESH BDCDATA.
SY-SUBRC = L_SUBRC.
ENDFORM.
Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
IF fval <> NODATA_CHARACTER.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM.
Insert field *
FORM BDC_NODATA USING P_NODATA.
NODATA_CHARACTER = P_NODATA.
ENDFORM.
Hi..
Incase of Session method you have to Schedule the Program RSBDCSUB in backgroud using the Tcode SM36.
This program Takes the Session Name as input and Process the Session in background.
Note: Create a variant with the Session name for this program
<b>Reward if Helpful</b>
Similar Messages
-
Want to change the BSEG-SGTXT while process through the transaction:FF_5
Hi,
I want to change the value in BSEG-SGTXT during the process through the transaction:FF_5.
Can any one suggest any BADI or User Exit to update the SGTXT.
Regards,
Hema THi
If your text is going to remain content based certain transaction types or text in the note to payee field then you can use the below functionality.
Advantage no ABAP help required.
Define Search String :
Strg Name : Text
Strng : Test (say if you want to find the word "test" in the incoming record. You refer the help doc on Search string for combinations)
Mapping : (keep it blank)
In Search string use :
1)
Company code :
House bank id:
Account id:
Int algthm : (if you are using any)
Strg name: Check
Target field: BDC Field name1 BSEG-SGTXT
2)
Company code :
House bank id:
Account id:
Int algthm : (if you are using any)
Strg name: Text
Target field: BDC Field value1 "text that you want to enter in the Bseg- sgtxt field"
3)
Company code :
House bank id:
Account id:
Int algthm : (if you are using any)
Strg name: Check
Target field: BDC Acct type1 0
0: First line, posting area 1
1: First line, posting area 2
2: Second line, posting area 1
3: Second line, posting area 2
Regards
Nikhil -
Want to see debug mode thru background process
I am excuting a job in background mode...with start immdiately.
and its triggering a functionmodule.I wan o know what valuehave been passto the function modul.and I want to ee the function modul in debug mode.
There is no way to process the job in foregound and I am running th dunning through F150.Insert an endless loop with a condition that will never occur inside your code.
like
a = 5.
while a > 1.
a = 5.
endwhile.
This keeps your job to be in Running status in SM50.
Chose this process and chose from menu Program/ Session->Programming->Debugging.
This starts the debugger.
In the debugger, you can change the value of a to break the endless loop. and continue debugging.
Regards,
Ravi -
How to return the result ( fields ) form using the BDC in background mode ?
hi,
I am now having to develop a sub routines for executing the transaction COR1 using BDC ( transaction SHDB ) , in the FORM i pass the 4 params for the fields of the screens of the transaction ( COR1 is used for creating the process order ) , and at last i have to take the number of the process order that has been created by the transaction , how can i do that , if we can no , in which table it is contained ( AUFNR ) ? .
In fact , i use the CALL TRANSACTION 'COR1' USING BDCDATA......
so , if you please to help me resolve this problem ( it is really urgent )...
Thank you so much .Thank you so much for your reply , I think that it would be very useful to me .
Hi Vijay Sai , i have used the itab TYPE BDCMSGCOLL for calling the transaction but just for taking the error messages , so as you say , it contains all the values of the fields including AUFNR ( which i need to get the its value after creating with COR1 ) .......if it is right , we just need to access the new value by using the query at the internal table just like :
LOOP AT itab INTO wa.
if wa-fname = 'AUFNR' .
res = ws-fval .
ENDIF.
Is that right ? -
BDC issue background and foreground
Hiii
i have already write bdc code using batch input. The data is taken from an excel file .
How the program work now is it create a session in SM35 and i can decide to execute the session either in background or foreground.
The reson why i did batch input and not call transaction is because i am told that with call transaction you can't execute batch input program in background since the excel file will be loaded from the user desktop. With call transaction and background execution the file need to be loaded on server first and then take the file from the server to BDC tcode.
My problem is I need my program to execute automatically without passing though the SM35. I also need to give the option to user to either execute is in foreground or background.
BDC code look this:
Call function "OPEN_BDC"
group = "ztest" I use constant
keep = "X'
perform dynpro
perform fillfield
call fuction "CLOSE_BDC"
1) I am told to use the FM file_open / file_submit / file_close but I dont really know hat parameter to pass in those FM the file_submit is giving me exception error.
2) I tried to use submit program RSBDCSUB . it create a session in sm35 and have status background job but the session havent executed
3) All the No1 and No2 is to execute the BDC in background then what about the solution if user what to execute in foreground.
Please i need precise answer??Job_submit is not functioning plzzz ess sample code below because of invalid_jobdata = 3
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobgroup = Ztest //Session name in SM35
jobname = v_jobname
IMPORTING
jobcount = v_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = sy-uname
jobcount = v_jobcount
jobname = v_jobname
language = sy-langu
report = sy-repid
VARIANT = ' '
IMPORTING
STEP_NUMBER =
EXCEPTIONS
bad_priparams = 1
bad_xpgflags = 2
invalid_jobdata = 3
jobname_missing = 4
job_notex = 5
job_submit_failed = 6
lock_failed = 7
program_missing = 8
prog_abap_and_extpg_set = 9
OTHERS = 10
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = v_jobcount
jobname = v_jobname
sdlstrtdt = sy-uzeit
sdlstrttm = sy-datum
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
invalid_target = 8
OTHERS = 9
IF sy-subrc <> 0.
ENDIF. -
I want to run java program on windows environment as background process
Hi all
I want to run java program on windows environment as background processSo command prompt return after executing java command and program on background In Linux we can do this easily �but I do not how to do this in windows
for example look this programe
import java.io.*;
import java.util.*;
public class TestClass {
class ravi extends Thread{
public void run(){
try {
String target_file = "ravind.txt";
File targetfile = new File(target_file);
PrintWriter writer = new PrintWriter(new FileWriter(targetfile)) ;
for (int i =0 ; i < 100 ;i++ ){
Thread.sleep(10000);
writer.println(" ravindra shukla ");
} catch (Exception e) {
e.printStackTrace();
public static void main(String[] args) {
TestClass test1 = new TestClass();
TestClass.ravi r1 = test1.new ravi();
r1.start();
System.out.println(" return from main ");
first i compile this
javac TestClass.java
then i run this by using this command
java TestClass
but becouse i put sleep on threads run function so it takes to much time to get return on command promt .... i want to run this programe as background process so command promt return as soon as i execute java commandThanks dude
This solution �start java TestClass� works fine �. But it does not solve my problem
It opens another black window and that black window persist till the life time of my program
Is it possible application run on complete background without opening another black window �as in Linux -
How to get the xmal of background of DataGridHeaderBorder
Hi all,
I believe that the style of background of DataGridHeaderBorder is like <LinearGradientBrush.....
I want to modify the style of background of DataGridHeaderBorder. But I cannot get the whole xmal by default of it.
so, how to get it? Are there any extend tools?
Thanks!There is no template for a DataGridHeaderBorder. Since the DataGridHeaderBorder is not a control (it inhertits from Border and not Control) it doesn't have any control template so you cannot restyle it.
If you want to change appearance of the DataGridRowHeader, you should replace the DataGridHeaderBorder element with another element like for example a Border. Right-click in the DataGrid in design mode in VS 2012 or later and choose "Edit Additional
Templates"->"Edit RowHeaderTemplate" and then remove and replace the DataGridHeaderBorder element in the generated XAML.
Please remember to mark helpful posts as answer and/or helpful. -
ERROR while uploading the data into ztable with background processing
Hi gurus,
i am trying to upload the data from excel file to internal table
its working fine ..
but........
if i try to upload the data with background processing , in sm37 it is saying "error during the upload of clipboard contents".
Regards,
SriHi,
FM GUI_UPLOAD doesnt work in background, use dataset to upload it from application server.
refer below code
*--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,
Prashant -
Database Alert Macros issue while executing the macros in Background
Hi All,
I am facing some problems while executing the Database alert macros in Background/Process Chain.
There are two macros for which the problem exists.
1.Excess Projected Inventory above Max
The logic here is, the alert should work for Only Fixed Lot size Procedure.
If the Stock on hand (projected EA) > (Safety Stock (EA) + Full SOQ (EA)) then alert = "Projected inventory is XX% above MAX".
XX is the Percent above Max.
Note: SOQ => fixed lot size.
2.Excess Actual Days of Supply
The Logic here is, the alert should work for all Lot size Procedures except for "Fixed lot size".
Actual Days Supply >=180 days. (current -> future buckets)
- For every receipt cell check the Actual Days Supply - if >= 180 days.
The macros are working perfectly as expected.Hi Abhi,
Hope you are doing good.
Yes exactly, the macros are working in foreground/Interactively but not in the Background via Process chain. Let me send the details again.
Issue :
I am facing some problems while executing the Database alert macros in Background/Process Chain.
There are two macros for which the problem exists.
1.Excess Projected Inventory above Max
The logic here is, the alert should work for Only Fixed Lot size Procedure. But in Background the alerts are getting created for Lot for Lot and other Planning procedures..
If the Stock on hand (projected EA) > (Safety Stock (EA) + Full SOQ (EA)) then alert = "Projected inventory is XX% above MAX".
XX is the Percent above Max.
Note: SOQ => fixed lot size.
2.Excess Actual Days of Supply
The Logic here is, the alert should work for all Lot size Procedures except for "Fixed lot size". But in Background the alerts are getting created for the Fixed Lot size procedures too..
Actual Days Supply >=180 days. (current -> future buckets)
- For every receipt cell check the Actual Days Supply - if >= 180 days.
The macros are working perfectly as expected in Foreground/Interactively but the samething is not happening while executing the macro in Background/Process Chain.
I have tried running these macros in different sequences(Default/Start/Macro) but couldn't able to resolve the issue.
Thanks in Advance,
Jay. -
Background Processing, Selection Screens and Variants
Hi All,
I am having a little trouble Background Processing with Selection Screens and Variants.
When a user runs my report and selects the option of background processing, then they select a checkbox. Once this is checked, they should go and fill in details, press Execute and voila a background process is created. However what is happening is that when i execute it then it asks for a variant. I do not want this to happen. I want the values in the selection screens to be used as default. Here is my code for background processing
FORM START_BACKGROUND_PROCESSING.
CALL FUNCTION 'BP_JOBVARIANT_SCHEDULE'
EXPORTING
TITLE_NAME = 'End Customer Report '
JOB_NAME = 'customer_report'
PROG_NAME = 'ZSE_SD_SALES'
EXCEPTIONS
NO_SUCH_PROGRAM = 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.
ENDFORM. "START_BACKGROUND_PROCESSING
After the background process is started, all teh data is collated then written to the app server. this is the order
ELSEIF R2 EQ 'X' AND SY-BATCH EQ 'X'.
PERFORM INITIALIZE_DATA.
PERFORM SELECT_DATA.
PERFORM PROCESS_DATA.
PERFORM GET_END_CUSTOMER_DATA.
PERFORM WRITE_TO_APP_SERVER.
Any ideas? Points given to those who are helpfuldone myeslf
-
How run a report in background process ?
Hi Experts,
I wrote a code in which I am have multiple selection screens....means in first screen there will 3 radio buttons.
So, depending upon the radio button selected, the other selction screen will be displayed...
So, here i want to run a report in background process...But in menubar im not able to find 'program'.
So, please help me this to run my report in background process.. with any simple code...
Thanks,
Rocky.Hi,
Try to see this example and adapt it for your case:
constants : c_jobname like tbtcjob-jobname value 'ZRFC_CM_38',
c_jobclass like tbtcjob-jobclass value 'A',
c_x type c value 'X',
c_msgclass type arbgb value 'ZXXXSD',
c_error type bapi_mtype value 'E',
c_status type bapi_mtype value 'S',
c_msg1 type msgnr value '177',
c_msg2 type msgnr value '178'.
data : v_jobcount like tbtcjob-jobcount.
ranges:
r_auart for vbak-auart,
r_wbstk for vbuk-wbstk,
r_mtart for mara-mtart,
r_reswk for ekko-reswk,
r_vtweg for vbak-vtweg.
call function 'JOB_OPEN'
exporting
jobname = c_jobname
importing
jobcount = v_jobcount
exceptions
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
others = 4.
if sy-subrc = 0.
Assignment of Ranges
append lines of:
distribution_channel to r_vtweg,
order_type_range to r_auart,
status_range to r_wbstk,
material_type_range to r_mtart,
plant_range to r_reswk.
Submit program in background
submit z_beve_salesorder_list
with p_spart = division
with p_file = file_name
with p_land1 = country
with s_vtweg in r_vtweg
with s_auart in r_auart
with s_wbstk in r_wbstk
with s_mtart in r_mtart
with s_reswk in r_reswk
via job c_jobname
number v_jobcount
and return.
Close the Job
call function 'JOB_CLOSE'
exporting
jobcount = v_jobcount
jobname = c_jobname
strtimmed = c_x
exceptions
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
invalid_target = 8
others = 9.
if sy-subrc = 0.
Status Message
return-type = c_status.
message id c_msgclass
type c_status
number c_msg1
into return-message
with c_jobname
sy-datum
sy-uzeit.
else.
Error Message
return-type = c_error.
message id c_msgclass
type c_error
number c_msg2
into return-message
with c_jobname.
endif.
endif.
Regards. -
ATP Re-Run in background processing for sales order
Hello All,
In sales order i need to re run the ATP check for the quantity confirmation in background processing.
Scenario is :
I have created orders with order quantity 100.
while creating the order stock for the same material was only 20 so ultimately it will not confirmed the quantity.
After the some period i m increasing stock of same material by 120. Now, same order which i created before can be confirmed as i need only 100 quantity in that. but for the same I need to manually run the ATP again and then it will confirm the quantity.
instead of manually re run the ATP again i want to do this activity in background processing so that it will automatically confirmed the stock once inventory increased.
Is there any provision in sap to avoid this manual task with the help of background processing or any program?
Thanks and Regards,
RasikHi,
This can be achieved by rescheduling the orders .
<< Moderator message - Cut and paste response from http://help.sap.com/saphelp_470/helpdata/en/93/744c0c546011d1a7020000e829fd11/content.htm removed and points unassigned. Plagiarism is not allowed in SCN >>
You reach the Sales screen.
Select Environment ® Backorders ® Rescheduling ® Execute.
You can also simulate the backorders for rescheduling before confirming by selecting the simulateevaluate option.
Prerequisite for rescheduling the line items of the order is that at schedule line you should not flag the field fixed date and quantity field. Also for ATP you must have defined the scope of check with checking rule BO(i guess) for that particular plant in combination of checking group .
Hope this will help you.
Thanks and Regards,
Atulkumar Dagade
Edited by: Rob Burbank on Jan 24, 2012 10:16 AM -
Hi,
I am new to RAC , so i want to know how all additional background processes in RAC works ?
Enviornment : oracle 10g release 2 with RAC , OS : HP-ux 11iHi,
Read the following doc's:
http://download.oracle.com/docs/cd/B19306_01/rac.102/b14197/toc.htm
http://download.oracle.com/docs/cd/B19306_01/rac.102/b28759/toc.htm
Regards -
We want to build a non-stop background process under SGI IRIX OS environment,
which can access Oracle DB and transmits large volume data files to other machine.
so, we just want to know whether we can build such a program using Java language.
and also, if we can, will it impact other system processes and resources???Yes you can. As for the impact it depends on how are you going to build the application.
-
Background process taking very long time to complete.
Dear All,
Platform: HP UX
Version: 12.0.6
While time of shutting down the instance below background process taking very long time to complete.
what is below mention process? can i kill it? total 3 process i am getting while finding ps -ef|grep applpre(applepre is apps instance's owner)
applpre/apps/tech_st/10.1.3/appsutil/jdk/bin/IA64N/java -DCLIENT_PROCESSID=5457 -server -Xmx384m -XX:+UseSerialGC -Dor
Thanks in Advance,
Sandeep.Sandeep,
Please see (Note: 567551.1 - Configuring various JVM tuning parameters for Oracle E-Business suite 11i and R12).
You can safely kill those processes from the OS.
Thanks,
Hussein
Maybe you are looking for
-
While i am Doing an XMl publisher report in english and Italian Languages i am facing an issue with the Dot translation. For eg: 4.5 is translated to 4,5 in Italian.This creates a problem for me when i am doing summary on this column.So how should i
-
How do I remove an app from my Icloud backup?
I'm not even sure I'm asking the right question. I want to reinstall an app at the recommendation of my IT admin. When I delete it from my phone and tehn attempt to reinstall from the app store, it is coming from the cloud. I assume that's my icl
-
Error -10 while closing a Production Order with DI API
Hi, I've been trying to close some production orders using this code: Dim oProdOrder As SAPbobsCOM.ProductionOrders Try oProdOrder = Me.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductionOrders) If oProdOrde
-
SAP 2007 posting period problem
Hi , Ask for help please. I am trying to add the invoice into system for the customers who have 60 days terms, which leads the due date falls into 2010, however the system pops out error says: invoice is not allowed cause not permission date. Just wo
-
There appears to be a large influx of scamers/phishers on skype
Excuse me good gents of skype. As im sure many of you have been experiencing this as well, i believe that something should be done about this. Just today, i have been sent 5, bloody, frickin, 5 friend requests from those phishers/spamers. And for som