Repetation of batch no avoid
*Hi friends,*
*Here i am using ext no range for batch managment.but here i don't want same no should be repeat for any next batch.*
*For ex-: 999 batch no is used for 1 one material while movements, that should not be used in any future batch. system shows some error in case of repetation of used no.*
Regards
Amit
Hi Amit
You have to use the user exit to achieve this.
The following are the 2 user exits available, use the suitable one for your requirement.
In the function module exit EXIT_SAPLV01Z_003, an external number range XY is determined, against which the batch numbers are checked.
In the function module exit EXIT_SAPLV01Z_004, the batch number entered is checked against your own rules.
Regards
Bala
Similar Messages
-
Best practice for creating a bulk of new instances
Hi,
My customer has a requirement to create a bulk of 30,000 new instances by scanning a database table (an export from a billing system) which contains a list of a call center tasks (interactive) to be performed. They will be executed throughout the month.
What is the best way to do it? If the answer is "this is a worst practice" that's a good answer too, but the question is how do I provide a solution to their needs.
When the process was executed as is we ran into the maximum limit of 1,000. Configuring the automatic item queue removed the 1,000 limit exception but caused JTA timeout and other exceptions against the engine database.
It seems to me that some sort of division into bulks of a few hundred instances should be the way to do it instead of just exploding the engine with so many instances. Am I right? If so, how would be the best way to code it? If not, any other suggestions?
Any recommendations would be highly appreciated.
Thanks,
~ronenHi,
Know how you feel.
Others are sure to have other ideas, but here are a thoughts:
1) You might also want to consider only creating 995 in a single transactional boundary at a time. Once 995 have been created, end the transaction so it will commit. You could then fire another transaction that creates another 995. Keep doing this in separate transactions until all have been created. Sure you know many ways you could keep track of where each group of 995 ended and where your next group of 995 should begin, but a common technique is to keep track of the last row processed in a separate database.
2) Sure you've thought of this, but consider running this from a Global Automatic that is scheduled to run at a time when everyone's gone home. The last thing you want is to get complaints from the end users about performance. Their interaction will be degraded and your creations will take longer.
3) If you can, be especially conservative about your instance size when creating instances in a batch. Avoid adding attachments and binary variables as they are being created (both of these can potentially be huge). Get rid of the incoming argument variables that you do not need right away in the process. Many times you can look up the additional information downstream when needed later in the process.
4) Note what is happening immediately downstream of your Begin activity in the process. If for example, you have more than one automatic activity that immediately follow the Begin, consider either turning all the automatic activities it a procedure (one transaction) or set your process to "Greedy" execution. If you have a Multiple activity immediately after the Begin, you might be creating 10x the number of instances (e.g. your Multiple's logic creates 10 copies). If the is the case, you might want to throttle back the number of instances created in one transaction even further.
Hope this helps,
Dan -
How use PGP encription with Java
Hello,
Someone knows or have worked using in Java PGP
encription ?
I need to work with this, but, i need to know if exits
*.jar for PGP in order to use in my Java code.
Any help is greatly appreciated.
-Angelhere by is my code
import java.sql.*;
import java.io.*;
import java.lang.Object;
import java.util.*;
import javax.naming.*;
////////Encyption Process
///////Track Pgp Message
/////return the status val to main
class e4p_PgpEncryption
private String userid="";//"[email protected]"
private String fileName;// file to be encrypted
private String filePath; // file path for the file to be encrypted
private Runtime rt;
private Process processCmd;
private String batchId;//id from bachfile_details table
private String processFile; // file name after taking care of space
private String successString; // the string to be checked for success
private int fileNotFoundErr; // if file not exit for encryption
private int fileExistErr;
private int ioExceptionErr;
private String pgpReturnMsg; // net message from encryption process
private int fileEncrytionFlag; // decide the encryption
private int unableToAdduserid; // if key file can not be added in public key ring
private int keyNotSigned; // if public key is not signed key
private int pgpDbConnectionError;
private int databaseUpdationErr;
private int directoryErr;
private String errMsg;
private int encryptedFile=0;
private String keyErrString;// string for matching error message
private int keyErrFlag; // if no matching key found
private int userIdNotmention; // if user id is not mentained or null user id
private String rec_id=""; // rec id from edi_misc
e4p_PgpEncryption()
public void setInitialValues(String ffName,String ffPath,String batidd,String publickeyy,String recid )
int i=0;
pgpReturnMsg="";
encryptedFile=0;
errMsg="";
fileName=ffName;
filePath=ffPath;
batchId=batidd;
userid=publickeyy;
rec_id=recid;
processFile="";
successString="";
keyErrString="";
public void setFlagValues()
fileNotFoundErr=0;
fileExistErr=0;
ioExceptionErr=0;
fileEncrytionFlag=0;
pgpDbConnectionError=0;
databaseUpdationErr=0;
directoryErr=0;
keyErrFlag=0;
userIdNotmention=0;
unableToAdduserid=0;
keyNotSigned=0;
* update the file status after encryption in batchfiles_detail table
public void updateDataBase()
int dbstat=0;
//checkConnection();
int filestat=2;
int row =1;//tmp set
try
if(e4p_ConfigurationLoader.conn.isClosed()==true)
Exception ee=new Exception();
dbstat=e4p_DatabaseConnectionChecker.invokeDBChecker(this,0,ee);
if(dbstat==1 && e4p_ConfigurationLoader.mainlSentFlag==0)
else
Statement stmt = e4p_ConfigurationLoader.conn.createStatement();
// row=stmt.executeUpdate("update batchfile_details SET batch_filename='"+newName+"' where batch_id='"+batchIdd+"'");//Mod cl_id='"+cl_idd+"' and srv_id='"+service_idd+"' and
row=stmt.executeUpdate("update batchfile_details SET file_status='"+filestat+"' where batch_id='"+batchId+"'");//Mod cl_id='"+cl_idd+"' and srv_id='"+service_idd+"' and
if(row==0)
databaseUpdationErr=1;
else
databaseUpdationErr=0;
stmt.close();
catch (Exception E)
databaseUpdationErr=1;
// String mailSubject="Error:e4p_Database connection error";
// String mailContent="error in connection to e4p_Database after reestablishing connection Message: "+E.getMessage();
// e4p_MailSender.send(mailSubject,mailContent);
// E.printStackTrace();
dbstat=e4p_DatabaseConnectionChecker.invokeDBChecker(this,0,E);
* method used to compose the response from pgp encryption process
public void pgpMessaging(String message)
if(ioExceptionErr==1)
pgpReturnMsg="-13"+"Encryption Error: IO Exception occured";
else
if(fileNotFoundErr==1)
pgpReturnMsg="-14"+fileName+" Encryption Error: File/path does not exist";
String mailSubject="Error:File not found for decryption";
String mailContent=processFile+"does not exits for Encryption process";
e4p_MailSender.send(mailSubject,mailContent);
///file or path is incorrect
else
if(pgpDbConnectionError==1)
pgpReturnMsg="-15"+"Pgp e4p_Database connection error";
else
if(databaseUpdationErr==1)
pgpReturnMsg="-16"+"Error while updating dataBase in Pgp";
else
if(fileEncrytionFlag==1)
pgpReturnMsg="1"+fileName+" Encrypted SuccessFully;";
else
if(directoryErr==1)
pgpReturnMsg="-17 "+filePath+" Directory is not valid";
String mailSubject="Error:Directory does not exist";
String mailContent="Directory: "+filePath+ " is not a valid Directory";
e4p_MailSender.send(mailSubject,mailContent);
else
if(keyErrFlag==1)
pgpReturnMsg="-18 "+keyErrString;
String mailSubject="Error:Public key not Matching";
String mailContent=keyErrString +" for encrypting file "+processFile;
e4p_MailSender.send(mailSubject,mailContent);
else
if(userIdNotmention==1)
pgpReturnMsg="-19"+" user id not mentioned or null userid";
else
if(unableToAdduserid==1)
pgpReturnMsg="-20"+message;
else
if(keyNotSigned==1)
pgpReturnMsg="-21"+userid+ " is not signed key id";
String mailSubject="Error: "+userid+ " is not signed id";;
String mailContent=userid+ " is not signed id unable to encrypt file "+processFile;
e4p_MailSender.send(mailSubject,mailContent);
* success string for checking the response from pgp
public void makeSuccessString()
successString="Transport armor file:"+" "+processFile+".asc";//this is the string used to indicate
System.out.println("Print success string:"+successString);
//successfull completion
* message for checking the error
public void makePublicErrorString()
keyErrString="Cannot find the public key matching userid '"+userid+"'";
* used for composing filename used for encryption process with caring space problem
public void setNamePath()
processFile=filePath+ "/" + fileName;
makeSuccessString();
System.out.println("Path:"+processFile);
char cc='"';
StringBuffer ss=new StringBuffer("");
ss.append(cc);
ss.append(processFile);
ss.append(cc);
processFile=ss.toString();
* ///actually encypting the file and track success message from Pgp
* execute the pgp from command line
public void doEncryption()
//System.out.println("inside doEncryption");
rt=Runtime.getRuntime();
String makePgpString="";
//batch mode avoid the process hanging
// command="pgp +pubring=public key ring path +batchmode -ea file to be encrypt user id for encrption"
makePgpString="pgp +pubring="+e4p_ConfigurationLoader.pubringPath+" +batchmode -ea "+processFile+" "+userid;//imposed error
// makePgpString="cd";
String ls_str="";
BufferedReader buffer;
try
processCmd=rt.exec(makePgpString);
buffer=new BufferedReader(new InputStreamReader(processCmd.getInputStream()));
ls_str = buffer.readLine();
int countLine=0;
System.out.println("Start printl=ing;");
while (ls_str!= null)
System.out.println(ls_str);
countLine++;
//System.out.println(ls_str);
if(ls_str.equals(successString)) //check the success string is found
///successtring is encyption completed message
//System.out.println("The total count lines are:"+countLine);
fileEncrytionFlag=1; // sucess flag
//System.out.println("File encrypted successfully: Flag is"+fileEncrytionFlag);
if(ls_str.equals(keyErrString))
keyErrFlag=1;
ls_str = buffer.readLine();
if(countLine==4) // count line for file not found message
///pgp subprocess string contains 4 lines
//System.out.println("File path not found");
fileNotFoundErr=1;
if(countLine>=15) // count line for key not signed message
keyNotSigned=1;
buffer.close();
processCmd.destroy();
System.out.println("********The total count lines are:"+countLine);
catch(Exception e)
e.printStackTrace();
ioExceptionErr=1;
* check the file is already in encrypted format if there then delete
public void checkFileExist()
int len=0;
//System.out.println("checking files:"+fileName[no]);
String checkFilename=fileName+".asc";// check the encryption format file
int i=0;
File checkfile[];
//System.out.println("file Path"+filePath[no]);
File dir=new File(filePath);
if(dir.isDirectory()==true)
checkfile=dir.listFiles();
len=checkfile.length;
String tmpname="";
for(i=0;i<len;i++)
tmpname=checkfile.getName().toString();
if(checkFilename.equals(tmpname))
fileExistErr=1;
if(checkfile[i].delete()){ System.out.println(tmpname +" deleted");}
//delete the file
break;
else
directoryErr=1;
* update the new user id added in the keyring to edi_misc table
public void updateUserid()
int dbstat=0;
//checkConnection();
try
if(e4p_ConfigurationLoader.conn.isClosed()==true)
Exception ee=new Exception();
dbstat=e4p_DatabaseConnectionChecker.invokeDBChecker(this,0,ee);
if(dbstat==1 && e4p_ConfigurationLoader.mainlSentFlag==0)
else
String keepnull="";
Statement stmt = e4p_ConfigurationLoader.conn.createStatement();
stmt.executeUpdate("update edi_misc SET enc_id='"+userid+"',enc_publickeypath='"+keepnull+"' where rec_id='"+rec_id+"' ");
stmt.close();
catch(Exception ee)
// String mailSubject="Error:e4p_Database connection error";
// String mailContent="error in connection to e4p_Database after reestablishing connection Message: "+ee.getMessage();
// e4p_MailSender.send(mailSubject,mailContent);
dbstat=e4p_DatabaseConnectionChecker.invokeDBChecker(this,0,ee);
public void checkConnection()
try
if(e4p_ConfigurationLoader.conn.isClosed()==true)
e4p_ConfigurationLoader.setDataBaseConnection();
}catch(Exception ee){ e4p_ConfigurationLoader.setDataBaseConnection();}
* pgp encryption process entry point
* call encryption process
* synchronize the message
public String pgpEncryptionStarter(String fName,String fPath,String batid,String publickey,String importPath,String reccid)
setInitialValues(fName,fPath,batid,publickey,reccid);
//import key calling facility
e4p_PgpkeyImport pgpImport=new e4p_PgpkeyImport();
String response=pgpImport.keyImportStarter(importPath);
//check the response and get the public key
if(response.charAt(0)!='1')
String colectRes=response.substring(2,response.length());
unableToAdduserid=1;
pgpMessaging(colectRes);
else
response=response.substring(1,response.length());
int indexval=response.indexOf("$"); // read the user id pass from pgp import
if(indexval==-1)
else
String extractid=response.substring(indexval+2,response.length()-1);
userid=extractid;
updateUserid();
setFlagValues();
if(filePath.startsWith("/")==false)
filePath=e4p_ConfigurationLoader.relative_path+"/"+filePath;
//filePath="/"+filePath;
else
filePath=e4p_ConfigurationLoader.relative_path+filePath;
checkFileExist(); // check the file exist for encryption
if(directoryErr==0)
setNamePath();//no error reporting
// makeSuccessString();//no error reporting
makePublicErrorString();
if(userid.equals("") || userid==null)
userIdNotmention=1;
pgpMessaging("");
else
char cc='"';
StringBuffer ss=new StringBuffer("");
ss.append(cc);
ss.append(userid);
ss.append(cc);
userid=ss.toString();
doEncryption();// error reporting file not found/ioexception/encryption flag
else
pgpMessaging("");
if(fileNotFoundErr==1)
pgpMessaging("");
if(ioExceptionErr==1)
pgpMessaging("");
if(keyErrFlag==1)
pgpMessaging("");
if(keyNotSigned==1)
pgpMessaging("");
if(fileEncrytionFlag==1)
pgpMessaging("");
updateDataBase();//update file name from txt to .asc file
//error reporting updation error
if(databaseUpdationErr==1)
pgpMessaging("");
System.out.println("Pgp message :"+pgpReturnMsg);
return pgpReturnMsg; -
Why is every tech website claiming that the gingerbread release is past the soak stage and available for OTA update to all starting today , and people are saying they have gotten the update already today, but I still see no download???
I even saw a page from the motorola website with a statement saying that the soak test was a success and that it was being released officially starting 11:59 last night.Wildman wrote:
They usually send updates in batches to avoid the network being overloaded with to many downloads. You may have to give it a few days.
Ooooohhh.... is that how it works?
bc I see this page... http://www.motorola.com/staticfiles/Support/US-EN/Mobile%20Phones/A955/Verizon/RN_DROID%202_Gingerbread_4.5.601.A955.pdf
and I get excited....
then I see this page... http://support.vzw.com/system_update/droid_2.html
and I get frustrated.
It's like a cruel joke and I dont know who to believe!!!! LOL -
Avoid duplicate batch (batch managment)
dear all,
We are facing problem related to batch managment .we are using manual batch entry .we don't want to make duplicate entry of same batch (which have already assign to material) against any material.what is solution to avoid duplicate batch entry.
can u tell me the settings and any user exit in which we can avoid the duplicate batch.
regardsHi hema,
in our scenario user manually enter batch of raw material in MIGO when we do good recipte in MIGO againts purchase order we enter batch manually.but we need that a batch which has already assign to raw material can not be assign again .if user enter the previous batch then system gives a error that batch has already exist.
may be u know the prob -
How can I avoid using rollback segment for batch updates.
I am currently trying to avoid associating a large amount of space for rollback segment as this gets filled up only during the nightly batch updates. All that space will never be used during the day. Hence want to know if there is any way of avoiding the use of rollback segment at the session level.
RajeshNo, but what you can do is create a large rollback segment to use with your batch job, at the start of your batch job bring the segment online, then use set transaction to use that rollback segment, when the batch job is finished and committed, you can then bring the rollback segment offline.
If you are really pressed for space, as an alternate plan, you could actually create the large segment before the batch job and drop it after. -
OS X Yosemite 10.10.2, Macbook Air,
Finder batch file rename function. I have multiple files I want to rename, that have a date in their name in the mm/dd/yy format. The slashes seem to freak out the batch rename function and it won't work. I took out the slashes and worked fine. Any workarounds that would help me avoid manually changing each name? I should point out that I want to leave most of the name intact just change the first word in each name. Also the files I'm working with are in PDF format.That's a comment in the file. It has no effect at all.
-
Hi,
I am running Data-Driven test on different machines with different input values in .CSV file in batch mode.we are facing following problem:
Test not considering modified values in .CSV file until we recompile the test.
Is there any way to avoid this dependency of compilation after updating .CSV file???
Regards,
Nagasree.Assuming the CSV is part of the Visual Studio solution. Open the properties panel for the CSV file from solution explorer. Set "Copy to output directory" to "Copy if newer" or to "Copy always". Some documents recommend
"Copy if newer" but I prefer "Copy always" as occasionally a file was not copied as I expected. The difference between the two copy methods is a little disk space and a little time, but disks are normally big and the time to copy is normally
small. Any savings are, in my opinion, far outweighed by being sure that the file will be copied correctly.
See also
http://stackoverflow.com/questions/23469100/how-to-run-a-test-many-times-with-data-read-from-csv-file-data-driving/25742114#25742114
Regards
Adrian -
How to avoid data repetation when using select statements with innerjoin
how to avoid data repetation when using select statements with innerjoin.
thanks in advance,
satheeshyou can use a query like this...
SELECT DISTINCT
frg~prc_group1 "Product Group 1
frg~prc_group2 "Product Group 2
frg~prc_group3 "Product Group 3
frg~prc_group4 "Product Group 4
frg~prc_group5 "Product Group 5
prc~product_id "Product ID
txt~short_text "Product Description
UP TO 10 ROWS
INTO TABLE l_i_data
FROM
Joining CRMM_PR_SALESG and
COMM_PR_FRG_ROD
crmm_pr_salesg AS frg
INNER JOIN comm_pr_frg_rod AS prd
ON frgfrg_guid = prdfragment_guid
Joining COMM_PRODUCT and
COMM_PR_FRG_ROD
INNER JOIN comm_product AS prc
ON prdproduct_guid = prcproduct_guid
Joining COMM_PRSHTEXT and
COMM_PR_FRG_ROD
INNER JOIN comm_prshtext AS txt
ON prdproduct_guid = txtproduct_guid
WHERE frg~prc_group1 IN r_zprc_group1
AND frg~prc_group2 IN r_zprc_group2
AND frg~prc_group3 IN r_zprc_group3
AND frg~prc_group4 IN r_zprc_group4
AND frg~prc_group5 IN r_zprc_group5.
reward it it helps
Edited by: Apan Kumar Motilal on Jun 24, 2008 1:57 PM -
How to avoid the repeting question for autorisation of my computer (only for movies)
Hallo,
Does anyone know how to avoid the repeting question for autorisation of my computer?
This happens only for movies that I bought.
Hopefully someone can help me out.
thx,
FrederiqueOpen itunes, Click Itunes, Check For updates
-
Looking to repete serial numbers in batch automation
Hello,
I hope this is the correct forum to post my question to. Basically I'd like to have the save as serial numbers repete in my batch automation, so appending the files with 1-9 and then starting back at one. I thought I'd be able to accomplish this using a 1-digit serial, however if I batch process more than nine images it forces a second digit in the serial. I'm dealing with a large image bank that I need to sort, so this would be a huge time saver. Thanks!
JPGYou didn't get back about your contact sheet process… Anyhows I had a spare 15 mins this morning and heres how I would look at doing this… You may be able to do this too…? A script you can run in the ESTK as is or it could be added to a menu item if you wanted… With you images loaded in active bridge window… This should sort to Nth number of collections… These are just arrays of file aliases so nothing is actually moved yet… You can trash the collections too if you dont like them… If it does what you want you can select all the files of each collection and use the output panel to create contact sheets… or drag to move/copy the files on your system…
#target Bridge
collectionsNth();
function collectionsNth() {
var i, j, doc, count, colls, files, num;
doc = app.document;
count = doc.visibleThumbnailsLength;
files = doc.visibleThumbnails;
num = prompt( 'Please enter a number to split' , '5' );
colls = addCollections( num );
j = 0;
for ( i = 0; i < count; i++ ) {
app.addCollectionMember( colls[j], files[i] );
j++;
if ( j == num ) { j = 0 }; // This looks rubbish Im sure theres a neater way to do this…
function addCollections( n ) {
var i, colls;
colls = Array();
for ( i = 0; i < n; i++ ) {
colls.push( app.createCollection( 'Sort Nth ' + ( i + 1 ) ) );
return colls; -
Avoid to submit same batch input via F.19
Dear Guru,
I am trying to reclassify GR/IR during month-end closing via F.19. I can see a job in SM35 to create account post to reclassify GR/IR after posting in F.19. However, after post the documents, I run F.19 again. The system allow and create same SM35 job by same selection criteria.
Is there any way to avoid the F.19 to create same SM35 job more than once.
Thanks
JustinDear Viswa,
Thanks a lot.
Firstly, I created one job RFWERE00 with some parameters. Then excute the first job, posting assets and liability.
Then, using the same parameters in the first job, i can create succesfully another job via RFWERE00. This another new second job, I can excute it, causing double posting of asset and liability.
Is there any way to avoid to create second job via RFWERE00 using same parameter to cause double posting?
Thanks
Justin -
How to avoid batch numbers without stock in standard searchhelp?
Hi Experts,
Is there any choice to limit search help values for batch number only to batches, which have stock? I don't want to see batches, which have zero stock.
Thanks®ards,
Jirkayes u can enhance the search help in se11.
-
How do i avoid repeted values in a report.
how do i avoid repeated values in a report. for example..
DEPTID EMPLID NAME
10 101 aaaaaa
10 166 bbbbb
10 176 ggggg
10 145 iiiiiiiii
20 234 zzzzzz
20 285 ddddd
20 266 uuuuu
but I want see the report as below.
DEPTID EMPLID NAME
10 101 aaaaaa
166 bbbbb
176 ggggg
145 iiiiiiiii
20 234 zzzzzz
285 ddddd
266 uuuuu
Thanks in advanceI apologize for jumping in here, but I had this problem in the past and Marc Sewtz had indicated there is a fix slated for APEX 3.0 timeframe.
Here's a couple of links if you are interested:
Re: Break Formatting Region and effect on other regions
report error: ORA-01403: no data found when SUM columns
The second link contains the workaround I used.
Again, sorry for interjecting, but I thought it might be a bit helpful,
Mark -
Batch processing in Quark 7 - how to avoid "missing font" interrruptions?
I have a time scheduled applescript which opens a folder of quark files, does some processing using a quark extension, closes each file and moves it to a separate location.
Problem is I get these "Filename uses fonts not installed in your system" dialog boxes with certain files which means I have to manually intervene and click the "Continue" button.
Is there any way of specifying in Applescript - ignore the missing fonts and continue processing the files?
Many thanks in advance!Managed to get the answer on the Quark Applescript forum. For anyone else who encounters the same problem the line
use doc prefs yes remap fonts no do auto picture import no without reflow
used with the open quark document command should get rid of dialogs like this.
Maybe you are looking for
-
Can I use an external mic such as the Tascam iM2 while using FaceTime?
HHi all. I want to improve my audio quality while using FaceTime with a small group. I can't seem to make the Tascam iM2 to work. does FaceTime support external mics? I'm using it on an iPad 2 using iOS 8. thanks much fletch
-
Problem with Gradient Layer and second layer with opaque object
I opened a new document with a white background. I then used the gradient tool under the paint bucket to make a blue sky fading to white. I then created a second layer to put a sun in with diffuse edges, so as to not have just a round yellow ball. Pr
-
Multiple Videos in an Encore Project
Hi there, I am trying in the last week multiple ways of make a Dvd Project with multiple videos. I already have made 2 menus with 6 chapters each the problem is having 12 videos there without having the error "Size Exceed". I read several articles an
-
How many query possible in 1 second at Sql Server ?
Hello I have 30,000 records. Table have 10 columns. Columns have indexes if column at where condition. And select question will give 20-30 records as result. (select column1, column2,...... column10 from table where columnSecondID=2I. I will use host
-
In info spoke customer details generating in two lines
Hi All, In Info spoke after file trigerring job background, file creating in AL11 but in that file for each customer details generating in two lines. Eg: Correct reocrd : 1212|dsfsdfd|ddf|fdf||dfsdf Error record: 1212|dsfsdfd