Batch program
HI,
A batch program is needed.This batch program will be scheduled as a batch job.
It should query table say 'A' depending on two mandatory and one optional parameter.There is only one primary key in table 'A 'and it is an optional parameter.This query would give a list of say all sales orders(optional paramter).Using this list of sales orders, I would then need to query another table say 'B' where sales order is a primary key along with material number.Now for sales order S and material M1 I need to update a certain field in' B'.For same sales order S and material M2 I need to update a certain field in 'B'.Also I need to update a field in table C where there are four key fields and sales order and material are two fields.The business rules for update need to be taken from a config table.
How can I ?
(A) Do the process in the backgroung as a say BDC /batch input without end user intervention
(B)Create a new config table and maintain the rules there.I know the rules.
Thanks for your help in advance !!
Hi,
you could update the tables directly - but then you / the batch report would be fully responsible for the correct business logic, not only the additional customer requirements, but also all standard logic -> usually a task to big.
Instead it's easier, safer, recommended to use standard interface to update tables (as long as we don't speak about append fields.
In your case BAPI_SALESORDER_CHANGE might give you the possibility to change the values - but you didn't describe the fields / tables good enough for a good help. Also call transaction would follow the business rules (when you add the customer logic with user-exit or field-exit...).
I hope I got your problem, your description was a little bit ... around some corners?
Regards,
Christian
Similar Messages
-
Using Sap Batch Program - RFBIBL00
Hi,
I have gone through the forum in trying to understand the standard sap batch program, but still unable to do so.
I have a requirement where I need to use standard sap batch program RFBIBL00
I need to use T.code: F-22 for processing
I have a posting text file to upload. Please explain me how to use the standard sap batch program.
I know there are 3 structures BGR00, BBKPF and BBSEG which needs to be populated before calling the program RFBIBL00
Please explain me in detail.
Appreciate all the help from your end.
MadanThis is a brief guideline from memory, so you will have to modify it to fit your exact requirements.
1. Initialise the work areas, can be done by
perform init_strukturen_erzeugen(rfbibli0) using '/'
2. Fill your batch structure BGR00 and append to output file data itab
3. Load your data from text file, and loop around it
4. Fill your header structure BBKPF per document, append to output file itab
5. Fill your lines itab BBSEG per document line, append to output file itab
6. Repeat 4 & 5 for each document in text file.
7. Create temporary output file on App server using contents of output file itab
8. Submit rfbibl00 program using output file name
9. Delete the temporary file (good practice)
Hope that helps for starters -
Use of Standard Batch Programs - RFBIBL00 and RFBIBL01
Dear All,
I am facing issues while using the standard batch program
RFBIBL00 which in turn triggers RFBIBL01 for creating batch session.
I understand that there are 3 structures BGR00, BBKPF and BBSEG which needs to be populated.
I also understand that this program reads data from file on application server.
I want to understand whether the above batch program can be used for
1. To Create Batch Session ?
2. To Call Transaction ?
Please explain the steps in detail, for both these processes.
I am calling transaction F-22 to post invoices.
Please exlpain in detail on how to go about this.
Warm Regards'
MadanHi,
Thank you for the information.
I have already populated the strucutres BGR00 and BBKPF.
I am facing issues while populating data for BBSEG.(item leve data)
Can u pls tell me how exactly i can populate these structures and where exactly to do so ?
Please explain me the process of populating the header and item level data structures.
Appreciate all the help from your end.
Once again thanks for ur time and information.
Madan -
Hello All,
We have a requirement to build up a batch program that will display the unapproved opportunities to the user in a list. Each line in this list shall be a URL, clicking on which will open up the opportunity details.
The user will have an option to select opportunities and then mass approve them.
Can anyone guide me as to how can this be achieved in SAP CRM PCUI portal.
Thanks.
Regards
PriyankaHi Priyanka,
I'm not sure if your requirement is to create a new PCUI application or to create a report which could be run when needed.
If it's for a new PCUI application, the URL can't be displayed using standard feature of Object Link Navigation (OLN) which would redirect the user to the embedded object link. For mass approval also, there's a standard functionality available in 5.0 for Mass Changes. Kindly refer to PCUI Cookbook for more detail.
I hope it helps.
Cheers,
Gyan. -
GUI_UPLOAD FM in a batch program
Is is possible to use FM GUI_UPLOAD in a batch program? I am thinking about a program that will grab, one by one, every csv file in a particular directory and processing them (entering orders). How would one use this FM in a batch process?
Regards,
DavisGenerally considered impossible, but apparently not. Please see:
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2">Comunication to Presentation Server in Background Mode</a>
But I've never heard of anyone actually implementing this, so I don't know if it really works.
Rob -
Hi :
I want to create a batch program using call transaction for process order COR1.
I need an example for this, by creating a recording " shbd " using COR1.
Thanks.
Raghi,
Go to SHDB transaction.
Enter New Recording nameand Transaction Name as 'COR1', start new Recording
You will get the First Screen: with Material No, Production Plant, Planning Plant,
PO type etc, Enter the Mandatory fields, enter you will get the second screen , again enter the Mandatory fields in that SAVE the recording.
Then go to PROGRAM in the Menu.It will create a Program automatically.
Then You have to modify that program littlebit as per your requirements, similar to a common BDC program.
Hope this helps.
Regards,
Anji -
Batch program to replicate DataSources in process chains
Hi everybody,
I am looking for a batch program to replicate DataSoruces in a BW 3.5 system. I would like to use this program at the beginning of process chains, in order to avoid any potential problems from transports into productive environment.
I found the following program already but it seems not to work: RSAOS_METADATA_UPLOAD_BATCH
thanks in advance for any help
UlrichHi John
thanks for the hint. Of course you are right. I would expect to have also a transport in BW. It happend unfortunately several times, that not only the involved DataSource got inactivated in our complex data model, but also other ones.
That's why I look simply for the program that replicates DataSources. I tried already with tracing in via SM30 - unfortunately no useful results
regards,
Ulrich -
Java batch program with wakeup
I am interested in developing a batch java program which will hopefully perform the following I need to know how to get started with a timed-event.
Application description:
I would like the java batch program to wakeup at 7:00 am each morning and read a database and fire an email with the resultset of the database query. I can handle the database query portion. I am looking for a solution for the wakeup at 7:00 am and the email.
Any direction would be helpfull.Look up java.util.Timer, and java.util.TimerTask. It does exactly what you need in terms of a batch event running at 7:00am every morning. Alternatively, you can do it up as a simple program, and create a cron job.
As for e-mail, JavaMail isn't really that difficult. Look it up :) -
How to run batch programs using SUBMIT command without any interaction need
Hello ABAP gurus,
I have created a batch program in SE38 which calls many other SE38 Programs (Reports).
I have used the command SUBMIT to call the sub programs. There are about 15 sub programs that this main batch program is calling.
It works fine, but after calling each subprogram it stops and I have to manually click on 'Back Button' in green on the sap screen to run the next program in the list. Like this I have to do 15 times to run all the programs in the batch.
Is there a way to avoid this manual intervention and make the program run all the sub programs on its own.
Your feedback will be highly appreciated.
Thanks
RamThanks Sampath for the response.
Yes I am using the option "AND RETURN". So it is coming out of each sub program, and it is at this stage it waits for me to click on 'backward green arrow' to continue to the next.
Here is the code I have used
SUBMIT Z_AS_BI_F0005_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_DIVISION_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_COMPANY_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_CUSTOMER_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_BRANCH_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_BUS_UNIT_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_ADDRESS_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_CUSTOMER_GROUP_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_GROUP_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_PMT_TERMS_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_REGION_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_TERRITORY_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
Any other suggestions or feedback will be appreciated.
Tks
Ram -
Hi There,
We're currently investigating compiling our Batch Runs for
better performance. I'd be very interested to know how
other people are handling their batch programs. Our
server operating system is NT 4., and our forte version
is v 2.0f.
We decided on the following for non-compiled partitions,
1. A seperate deployed application for each batch program.
- batch sequencing can then be controlled by our
scheduler
- there isn't the hassle of having to redeploy
a monolithic application each time a small change is
required or a adhoc/once off batch program is
written
2. User visible service objects.
- This is so that the server partitions don't remain
active after the program has run, and hence using
all that memory.
3. Configured each batch application as a Client.
- Hence making use of user visible service objects
- everything is in one partition
In order to test our batch programs compiled we are in a bit
of a dilema.
1. We can't configure our batch programs as clients any more
because one can't compile a client partition.
2. We'd then need to configure as a server. However one can't
have a startmethod for a server partition, so how does one
kick off the batch program.
3. One could possible try and kick off the batch program in
a service object init() method, but how can one guarentee
that the other SO's are initialised.
4. So one needs a client partition to kick off the method
on the server partition, which will then run the contents
of the batch program.
5. However that means that the SO in the server partition
would have to be environment visible in order for the client
partition to be able to reference it, and in so doing we'd be
in the position of still having the server partition online
when the application finishes, and at 15 or so batch programs
this adds up to a lot of memory.
Anyone any thoughts on this ? How are other people configuring
their batch programs ?
- CarlHi,
Did you check this:
http://help.sap.com/saphelp_bw30b/helpdata/en/69/c2501a4ba111d189750000e8322d00/frameset.htm
Eddy -
Regrading pra module a online report/batch program upgraded from 4.7 to 6.0
hi all ,
i have problem here in pra module i have report rogram /batch program in check input header/detail and reversal/copy . i have make two copys of checkinput line item and onecopy i have reverse using bdcDear All your customization will be transfrred to SPAU and SPDD after the upgrde the first pain area that you have to see manually that which customization you want to keep and which you want to set back to standard:
There will be four kinds of things in SPAU and SPDD customization and abap programs
In Schemas if you have change any standard Schema than be careful try to make the Z copy and Keep the Schema As its is when you will select Via SPAU keep it than Transport request numbers will be start generating do note than as you have to apply them in Quality.
there are so many other things if you require please tell me your personal email address i will send you small document related to Upgrade of HR
Regards
Syed -
Do you have any problem in KE21N batch programs
Hi,
Do you have any problem in KE21N batch programs?
Thanks.
deniz.No, but look at OSS [Note 897659 - Error KE 093 when running batch input sessions|https://service.sap.com/sap/support/notes/897659] or give more informations.
Regards -
Is there any script or batch program that can pick a xml file...
Hi,
Is there any script or batch program that can pick a .xml file from a folder and place it in a different folder on the same directory periodically without using an XI interface.
Thanks,
npHi Nadini,
Please refer below link for how to sechdule a batch file.
[Schedule Batch File-How to?|http://www.tech-archive.net/Archive/WinXP/microsoft.public.windowsxp.general/2006-04/msg01349.html]
And please refer below links for how to write a batch file and other one as batch file commands.
http://www.wikihow.com/Write-a-Batch-File
http://www.aumha.org/a/batches.php
these two links was a click away in google :).
regards
Aashish Sinha -
Hi,
I would like to run a batch program from a java class. plz advise me how to do it. Thanks in advancehi ,
I tried this exact piece of code for running a bat file but it didn't work, only exes worked!!!
I got:
Exceptionjava.io.IOException: CreateProcess: c:\WINNT\system32\RemoteSend.bat error=2
Any suggestions why this happens!!!!
noha -
Hi :
I had created a bdc program using call transcation.When i execute in mode 'A',im selecting a record from my ALV list and creating a process order.
but when i execute in mode 'N', it says "no records are seelcted', since im not selecting any record from the ALV .
My recording did not show any field for selecting the record in the batch program, how can i select a particular record from ALV list and execute it mode N'.
Thx .
RahHello,
do you want to process all entries of your alv list or only one entry? How do you know in background task which entry you want to process ?
You can check for batch mode (sy-batch = 'X') and display the alv only in online version. for background task you loop over your alv output table to fill your bdc structure and then process call transaction.
regards sven
Maybe you are looking for
-
I was struggling with creating an account without a credit card at first and then someone on here suggested I create my account through the actual website and I log onto the website without any trouble and onto Game Center, just nowhere else. It says
-
HTML report refuses to be opened
When I'm under "User" or "Guest" login on WinXP sp2 (FAT32), HTML report refuses to be opened with "Open HTML Report in browser.vi" in IE (the same story with the OPERA, forinst). When I'm under "Administrator", it's OK. How can I work it out? Thanks
-
Wrting data to a file in specific positions
Hi, i have written a program that reads from one text file, grabs certain data and I will write that data out to a new fie. I am successfully doing the write, but how do I tell it to write the different data in specific positions in that new file. Ri
-
hi everybody, i get error when i try to import application ORA-20001: GET_BLOCK Error. ORA-20001: GET_STMT error. ORA-20001: Execution of the statement was unsuccessful. ORA-06550: line 6, column 41: PLS-00103: Encountered the symbol &quot;PK&
-
Turned on home sharing on two computers, but shared library isn't coming up.
Two computers have home sharing turned on with the same apple user name and id, but the library can't be viewed by the 2nd computer. Any ideas?