Blocked stk to QI stk
Dear Experts
How to Move or Transfer the Stk in Blocked To Quality Inspection.
Bcoz i have Made a GRN & shift the Material in Quality Insecpetion, And after That i have DOne UD but with Reject material.
Now I want to cancel the GRN so Stk needs In the Quality Insepection again to cancellation of GRN.
Rgds
Pankaj Agarwal
While SAP does supply an OSS note for the reversals it is not supported by SAP and they do not recommend it.
Please see these help files concerning reversals in QM and see if you can resolve your issue with these first.
http://help.sap.com/saphelp_47x200/helpdata/en/d0/0babd6ea5011d1954a00a0c930e04c/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/d0/0babd6ea5011d1954a00a0c930e04c/frameset.htm
Craig
Similar Messages
-
Blocked stk to unrstrd stk- movement type?
Hi All,
What is the movement type for moving (transfer posting) from GR blocked stock to unrestricted stock?
Regards,
V Shi
migo> goods receipt
105 Release GR blocked stock for warehouse
regards
kunal -
Error posting FG from Q-stk to U-stk
Hello:
Who can help to solve this?
GR inspection from production order, result OK.
UD ok, but can not post finished goods into U-stk:
Error message below:
2 PC Incorrect posting to unrestr-use stock, error msg:
Do not post ' ' to a production order!
Thanks!What is a detailed description of the Error?
Check the MMBE stock whether ant Qty exists in QI stock -
LMMS "Mallets" Question - STK not installed correctly?
Not sure if I should go here, or to the LMMS folks, but when I'm using LMMS (which so far works correctly), I get an error when trying to use the "Mallets" instrument, saying:
"Missing Files" - Your Stk-installation seems to be incomplete. Please make sure the full Stk-package is installed!
I've verified that I'm up to date with Stk, 4.4.4-1 installed.
Based on my quick googling of the issue, it looks like that error is triggered if there are missing files. (Makes sense, given the box header).
Anyone have any thoughts on this?This question is old, but it seems the problem still exists, and can't be solved by the method pointed. Directory /usr/lib/stk/rawwaves does not even exist. /usr/share/stk/rawwaves also don't exist. I used "pacman -Ql stk" to see stk installed files and theres no folder named rawwaves anywhere. How can I solve this problem now?
-
Need to know the reference table incase of 105 (GR for Blocked STK)
Hi,
I have created one PO and then I have done two 103(GR into Bolcked STK) then after I have done a 105(GR for Blocked STK) against one of the 103.
My question is how could I identify for which 103 I have done 105. Is there any reference table-field where SAP actually stored the corresponding 103 material document number for that 105 material document. How could I link the 105 with the original 103.
Actually I need to show the original 103 number for 105 in FORM output through MB90.
please help me.The PO is same but I know for 103 and 105 there will be different material document number(MBLNR). But my question is as I have done a 105 against 103. How sap maintain in its table data that against which 103 it actually done 105. in which table it stores the reference data. There is no details in EKBE. Can you guys please do it in real time and check this and let me know.
-
Transfer QI stk to blocked stk with BAPI_GOODSMVT_CREATE (Error msg QA495)
Hy,
I would like to create an mass udpate stock program which transfer the QI stock to blocked (because shelf expiration date is passed).
So, i use the BAPI_GOODSMVT_CREATE with movement type 350.
But the following error message appears : "Change the inspection stock of material XXXXXXX to QM only"
Does anyone can suggest me an another solution ?
Thanks in advanceDear LudovicBento
You cannot run this FM as QM stock can be moved only by QA11 tcode. You may try to create a BDC to post the material
from Quality
Regards
Gajesh -
Shelf Life Expired Material will automatically be transferred to block stk
Hi,
We have purchased a material, RM u2013 XYZ, Qty u2013 5000 kg, Mfg date u2013 01.06.2010 and Expire date is 30.09.2011. The material was received on 25.06.2010. Presently the stock of material is lying as unrestricted type.
I want to know that when the shelf life of the material will be expired, the material will atomically be transferred to block stock. How do I configure the same?
Further, is there any standard alarming system as to know the shelf life of material is going to be expired?
Regards,
AmitThe problem is that the section of the program (QA07) that blocks the stock runs first. Therefor all "expired" stcok within the time frame specified is moved. When the program runs the section to create inspection lots, it will only take into consideration stock that is in unrestricted stock. Since the stocks have already been moved to blocked stock, there is no stock in unrestricted inventory and hence no inspection lots.
In your case, in the section "Batch status change when expiration date is reached" you need to untick the "Block batch" and remove and values iin "Initial run in days" in this section.
In the section above that tick on "Block batch at inspection date" and maintain a value in "Initial run in days".
This will have the effect of creating lots when the next inspection date falls within the window specified and will move the material to blocked stock on the inspection date.
Keep in mind that this is all working on the "Next Inspection Date" of the batch. Not the expiration date. So you should have a process to keep the next inspection date and the expriation date in sync.
To cover yourself and make sure that batches are blocked if the expriation date is reached, set up QA07 to run again immediately after the above job. In the varinat for this run, tick back on the "Block batch" and set a value in the "Initial run in days". This will then block any stocks missed in the inspection lot creation process above.
Also see the folowing threads which explain the deadline mointoring program. There is a lot of info on this process on the net.
http://sapfans.com/forums/viewtopic.php?f=27&t=334825&p=1016796&hilit=Deadline+monitoring#p1016796
http://sapfans.com/forums/viewtopic.php?f=27&t=250686&hilit=+deadline
FF -
Transfer Blocked stk to Quality stock & then post some quantity to sample
Hi all,
For one material, there is blocked stock. now user want , part of this stock to post to quality stock .
After the stock came to quality, they want to post some quantity to sample also. can anybody tell me
how i can achieve this ?
Thanks
pabiHello,
To post the stock from block stock to quality stock you can use movement type 349
Go to MB1B.
Enter movement type as 349, plant as per your setting and storage location.
Now press enter and enter the material and save. This will move stock from block stock to quality inpscetion stock
Now to issue stock for sampling you have to use movement type 331 in T-code MB1B
Br,
Tushar -
I have the following query. Execution is taking almost 12-16 hours during month end. Please help me to fine-tune the query.
We have stock table which get updated with latest balance quantity. The quantity should be arrived against stock aging. Receipt table (GRN_DTL) consists all the items receipt till date from 01-jan-2000
Aging range is 0-30, 31-60, 61-90, 91-180 and > 180
The query is :
CREATE OR REPLACE procedure stock_value_aging is
prd_cd varchar2(15);
cl_bal number;
phy_stk number;
p_AGE NUMBER(15);
p_YEAR_MONTH VARCHAR2(7);
p_STOCK_QTY NUMBER(15,2);
p_UNIT_RATE NUMBER;
p_FINAL_RATE NUMBER(15,2);
p_RANGE VARCHAR2(6);
p_TOTAL_VALUE NUMBER(20,2);
p_DOC_NO VARCHAR2(15);
p_DOC_DATE DATE;
p_DIVISION VARCHAR2(15);
p_ITEM_NAME VARCHAR2(50);
p_cum_accp number(20,2);
P_CAT_CODE VARCHAR2(5);
P_CAT_NAME VARCHAR2(20);
Cursor STK IS
Select prod_code,phy_stk_qty, ITEM_NAME, DIV_NAME, UNIT_PRICE, CAT_CODE, CAT_NAME from STOCK_DIV_VALUE_VIEW;
--where prod_code='S2402300';
Cursor c1 IS
SELECT A.GRd_NO,A.GRD_DATE, to_date(sysdate,'dd-mon-rr')-to_date(grd_date,'dd-mon-rr') days,
A.ACCP_QTY, C.RANGE
FROM GRN_DTL A,
RANGE_MASTER C
WHERE A.PROD_CODE=prd_cd
AND (to_date(sysdate,'dd-mon-rr')-to_date(grd_date,'dd-mon-rr') BETWEEN AGE1 AND AGE2)
AND GRD_DATE IS NOT NULL
ORDER BY GRd_dATE DESc;
Begin
DELETE AGE_STOCK_ANALYSIS;
COMMIT;
Open stk;
Loop
Fetch STK into prd_cd,phy_stk,P_ITEM_NAME, P_DIVISION, P_UNIT_RATE,P_CAT_CODE,P_CAT_NAME;
exit when stk%notfound;
Begin
Open C1;
Loop
FETCH C1 INTO P_DOC_NO, P_DOC_DATE, P_AGE, P_STOCK_QTY, P_RANGE;
EXIT WHEN phy_stk <= 0;
If phy_stk < p_stock_qty then
p_stock_qty := phy_stk;
End if;
Insert Into AGE_STOCK_ANALYSIS
values (prd_cd, p_age, nvl(p_stock_qty,0), nvl(p_UNIT_RATE,0),
nvl(p_stock_qty,0)*nvl(p_unit_rate,0),P_RANGE, p_doc_no, p_doc_date,
p_division, p_item_name, P_CAT_CODE,P_CAT_NAME);
phy_stk := phy_stk - p_stock_qty;
END LOOP;
Close C1;
Commit;
End;
end loop;
Close stk;
End;I do not see any relatio between the STK and C1 cursors. Are you running a cross product of the cursors?
Shouldn't C1 be a parameterised cursor in this case or? -
Hello,
I want to add a series to my chart of type line.
My first series is
select
'f?p=26010:101:'||:app_session||'::NO::P101_DATE:'||
decode(:P7_PERIOD_SW,'DD',to_char(stk.move_dt,'dd/mm/yyyy'),
'WW',to_char(stk.move_dt,'iw/yyyy'),
'MM',to_char(stk.move_dt,'mm/yyyy'),
stk.move_dt) link,
decode(:P7_PERIOD_SW,'DD',to_char(stk.move_dt,'dd/mm/yyyy'),
'WW',to_char(stk.move_dt,'iw/yyyy'),
'MM',to_char(stk.move_dt,'mm/yyyy'),
stk.move_dt) dt,
sum(nvl(stk.for_stock_qty,0)) Qty
from
atestjr_stocks stk
where
trunc(stk.move_dt) between trunc(to_date(:P7_from_dt,'dd/mm/yyyy')) and
trunc(to_date(:p7_to_dt,'dd/mm/yyyy')) and
( :p7_move_txt is null or INSTR( :p7_move_txt, stk.stock_move_typ)!= 0) and
( :p7_site_txt is null or INSTR( :p7_site_txt, stk.bp_site_id)!= 0)
group by
decode(:P7_PERIOD_SW,'DD',to_char(stk.move_dt,'dd/mm/yyyy'),
'WW',to_char(stk.move_dt,'iw/yyyy'),
'MM',to_char(stk.move_dt,'mm/yyyy'),
stk.move_dt)
order by
decode(:P7_PERIOD_SW,'DD',to_char(stk.move_dt,'dd/mm/yyyy'),
'WW',to_char(stk.move_dt,'iw/yyyy'),
'MM',to_char(stk.move_dt,'mm/yyyy'),
stk.move_dt)
My second series is
select
'f?p=26010:101:'||:app_session||'::NO::P101_DATE:'||
decode(:P7_PERIOD_SW,'DD',to_char(stk.move_dt,'dd/mm/yyyy'),
'WW',to_char(stk.move_dt,'iw/yyyy'),
'MM',to_char(stk.move_dt,'mm/yyyy'),
stk.move_dt) link,
decode(:P7_PERIOD_SW,'DD',to_char(stk.move_dt,'dd/mm/yyyy'),
'WW',to_char(stk.move_dt,'iw/yyyy'),
'MM',to_char(stk.move_dt,'mm/yyyy'),
stk.move_dt) dt,
sum(nvl(stk.unav_stock_qty,0)) qty
from
atestjr_stocks stk
where
trunc(stk.move_dt) between trunc(to_date(:P7_from_dt,'dd/mm/yyyy')) and
trunc(to_date(:p7_to_dt,'dd/mm/yyyy')) and
( :p7_move_txt is null or INSTR( :p7_move_txt, stk.stock_move_typ)!= 0) and
( :p7_site_txt is null or INSTR( :p7_site_txt, stk.bp_site_id)!= 0)
group by
decode(:P7_PERIOD_SW,'DD',to_char(stk.move_dt,'dd/mm/yyyy'),
'WW',to_char(stk.move_dt,'iw/yyyy'),
'MM',to_char(stk.move_dt,'mm/yyyy'),
stk.move_dt)
order by
decode(:P7_PERIOD_SW,'DD',to_char(stk.move_dt,'dd/mm/yyyy'),
'WW',to_char(stk.move_dt,'iw/yyyy'),
'MM',to_char(stk.move_dt,'mm/yyyy'),
stk.move_dt)
The first series work but when I tried to add the second, I see nothing in my graph.
Someone have an idea of the problem ?
Thanks in advanceI found my problem,
It's the order by, I just remove it and I see my two lines. -
Bulkloader script error in weblogicportal 10.3
Hi,
We are using same bulkloader scripts which we have used in 8.1 to deploy content in portal repository for 10.3.The script which is fine 8.1 is giving errors in 10.3.
This bulkloader scripts loadcontent.java.I am facing the following error.
java.rmi.RemoteException: EJB Exception:; nested exception is:
java.rmi.RemoteException: Error loading directory: /EMEA Exception: An error occurred while trying to find type name CM_FOLDER_BADGE.; nested exception is:
com.bea.content.NoSuchObjectClassException: An error occurred while trying to find type name CM_FOLDER_BADGE.
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
at com.bea.content.loader.internal.LoaderEJB_uex06l_EOImpl_1030_WLStub.loadDirectory(Unknown Source)
at com.bea.content.loader.bulk.BulkLoader.doLoad(BulkLoader.java:1018)
at com.bea.content.loader.bulk.BulkLoader.doLoad(BulkLoader.java:969)
at LoadContent.loadContent(LoadContent.java:361)
at LoadContent.run(LoadContent.java:451)
at LoadContent.main(LoadContent.java:470)
Caused by: java.rmi.RemoteException: Error loading directory: /EMEA Exception: An error occurred while trying to find type name CM_FOLDER_BADGE.; nested exception is:
com.bea.content.NoSuchObjectClassException: An error occurred while trying to find type name CM_FOLDER_BADGE.
at com.bea.content.loader.internal.LoaderBean.loadDirectory(LoaderBean.java:426)
at com.bea.content.loader.internal.LoaderEJB_uex06l_EOImpl.loadDirectory(LoaderEJB_uex06l_EOImpl.java:201)
at com.bea.content.loader.internal.LoaderEJB_uex06l_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:85)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: com.bea.content.NoSuchObjectClassException: An error occurred while trying to find type name CM_FOLDER_BADGE.
at com.bea.content.repo.internal.server.logic.TypeOpsLogic.findByName(TypeOpsLogic.java:290)
at com.bea.content.repo.internal.server.bean.TypeOpsBean.findByName(TypeOpsBean.java:225)
at com.bea.content.repo.internal.server.bean.RepoTypeOps_7sxbdu_ELOImpl.findByName(RepoTypeOps_7sxbdu_ELOImpl.java:1208)
at com.bea.content.repo.internal.client.common.Type.findByName(Type.java:189)
at com.bea.content.spi.internal.ExtendedObjectClassOpsImpl.getObjectClassWithName(ExtendedObjectClassOpsImpl.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.content.manager.internal.delegate.LatestInterfaceVersionWrapper.invoke(LatestInterfaceVersionWrapper.java:72)
at $Proxy61.getObjectClassWithName(Unknown Source)
at com.bea.content.manager.internal.delegate.LatestObjectClassOpsDelegate.getObjectClassWithName(LatestObjectClassOpsDelegate.java:69)
at com.bea.content.manager.internal.ObjectClassOpsImpl.getObjectClass(ObjectClassOpsImpl.java:224)
at com.bea.content.federated.internal.TypeManagerImpl.getType(TypeManagerImpl.java:207)
at com.bea.content.folder.internal.BeaFolderFactory.getDefaultFolder(BeaFolderFactory.java:145)
at com.bea.content.loader.internal.LoaderBean.loadDirectory(LoaderBean.java:414)
... 10 more.
I am sending the load contet.java class file also.we have this issue while invoking
* Copyright 2004 Interwoven Inc.
* All rights reserved.
* LoadContent.java
* This program is used to load content to a BEA Repository using
* BulkLoader. It is used to load either all the files in a directory
* or the list of file names specified in a file.
import com.bea.content.loader.bulk.BulkLoader;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.xml.sax.InputSource;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Element;
import org.w3c.dom.traversal.NodeIterator;
import org.apache.xpath.XPathAPI;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.FileReader;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.util.*;
public class LoadContent{
private String repository; // Repository name
private String application; // Portal application
private String adminUrl; // Portal application
private String userName; // Portal application
private String userPassword; // Portal application
private String configFileName = "";//new String("config.xml"); // Configuration file
private String deployedFilelistName; // File containing the list of deployed files.
private String contentDirPath; // Content directory having the directories to be loaded.
private String tmpStr;
private boolean loadAllFlag;
private DocumentBuilderFactory factory;
private DocumentBuilder parser;
private NodeIterator nodeIterator;
private HashMap dirNameHash, fileNameHash, dirDelNameHash, fileDelNameHash;
private List deployedFilelist,
deletedFilelist,
dirList,
fileDirList,
deletedDirList,
userArgsList; //List of arguments specified by user, that are passed to the BulkLoader constructor.
* Constructor
public LoadContent() throws Exception{
System.out.println("1: ");
factory = DocumentBuilderFactory.newInstance();
parser = factory.newDocumentBuilder();
* Process the arguments given by user and check for their proper usage
private void processArgs(String args[]) throws Exception{
System.out.println("2:Praveen ");
String usage = "Usage: java -classpath $CLASSPATH LoadContent [-verbose] [-config <config filepath>] -all|-file <deployed_filelist path> \n\n"+
"\tverbose - Turns on the -verbose option of BulkLoader\n"+
"\tconfig - Config file where the configuration details are stored\n"+
"\tall - load all the content in the content directories\n"+
"\tfile - file containing the list of files that are to be loaded into the repository\n";
loadAllFlag = false;
deployedFilelistName = new String();
userArgsList = new ArrayList();
boolean argError = false;
for (int i = 0; i < args.length; i++) {
if ("-all".equalsIgnoreCase(args)){
loadAllFlag = true;
} else if ("-file".equalsIgnoreCase(args[i])){
if (i + 1 < args.length){
deployedFilelistName = args[++i];
} else {
argError = true;
} else if ("-config".equalsIgnoreCase(args[i])){
if (i + 1 < args.length){
configFileName = args[++i];
} else {
argError = true;
} else {
userArgsList.add(args[i]);
if(argError || (loadAllFlag == false && deployedFilelistName.length() == 0) || (loadAllFlag != false && deployedFilelistName.length() != 0)){
System.out.println(usage);
System.exit(1);
* Process the configuration file to get the details required by the BulkLoader
* such as repository, application and the metadata mappings
private void initialSetup() throws Exception{
System.out.println("3:Praveen ");
FileInputStream fis = null;
try{
fis = new FileInputStream(configFileName);
}catch (FileNotFoundException fnfe ){
System.out.println("File :" + configFileName + " not found");
System.exit(1);
InputSource in = new InputSource(fis);
Document doc = parser.parse(in);
Node node = doc.getDocumentElement();
Node tmpNode = null;
Element elm = (Element) XPathAPI.selectSingleNode(node, "/bulkloader");
repository = elm.getAttribute("repository");
application = elm.getAttribute("application");
adminUrl = elm.getAttribute("url");
userName = elm.getAttribute("username");
userPassword = elm.getAttribute("password");
contentDirPath = XPathAPI.selectSingleNode(node, "/bulkloader/content/@dirPath").getNodeValue();
fis.close();
* Process the files in the directories represented by hierachyNodes and create a list
* of files to be loaded to the repository by filtering out the unwanted files
* (the ones that contain .iwmf.xml and .md.properties).
private void processDeployDirs() throws Exception{
System.out.println("4:Praveen ");
deployedFilelist = new ArrayList();
FileInputStream fis2 = null;
try{
fis2 = new FileInputStream(deployedFilelistName);
}catch (FileNotFoundException fnfe ){
System.out.println("File :" + deployedFilelistName + " not found");
System.exit(1);
InputSource in2 = new InputSource(fis2);
Document doc2 = parser.parse(in2);
String xpath = "//item";
dirList = new ArrayList();
fileDirList = new ArrayList();
deletedDirList = new ArrayList();
fileNameHash = new HashMap();
fileDelNameHash = new HashMap();
dirDelNameHash = new HashMap();
dirNameHash = new HashMap();
try {
// Get the matching elements
NodeList nodelist = org.apache.xpath.XPathAPI.selectNodeList(doc2, xpath);
System.out.println("5:Praveen ");
// Process the elements in the nodelist
for (int i=0; i<nodelist.getLength(); i++) {
// Get element
Element elem = (Element)nodelist.item(i);
String filePath = elem.getAttribute("path");
String fileType = elem.getAttribute("type");
String fileAction = elem.getAttribute("action");
String fileTarget = elem.getAttribute("trgDir");
fileTarget = fileTarget.substring(fileTarget.lastIndexOf("/") + 1);
if ("DIRECTORY".equals(fileType) && "DELETE".equals(fileAction)) {
dirDelNameHash.put(filePath, "/" + fileTarget);
} else if ("DIRECTORY".equals(fileType) && ("ADD".equals(fileAction) || "UPDATE".equals(fileAction))) {
dirNameHash.put(filePath, fileTarget);
} else if ("FILE".equals(fileType) && "DELETE".equals(fileAction)) {
fileDelNameHash.put(filePath, "/" + fileTarget);
} else if ("FILE".equals(fileType) && ("ADD".equals(fileAction) || "UPDATE".equals(fileAction))) {
fileNameHash.put(filePath, fileTarget);
if (!dirNameHash.isEmpty()){
Iterator iter = dirNameHash.keySet().iterator();
//ArrayList a = new ArrayList();
while (iter.hasNext()){
String tmp = iter.next().toString();
String path = dirNameHash.get(tmp).toString();
String tmp2 = path;
StringTokenizer stk = new StringTokenizer(tmp, "/");
while (stk.hasMoreTokens()){
tmp2 += "/" + stk.nextToken();
if ( !dirList.contains(new String (tmp2)) ) {
dirList.add(tmp2);
//dirList.addAll(a);
System.out.println("DIRECTORIES " + dirList.toString());
// even if it is a file name, process the path and chop it into directories
if (!fileNameHash.isEmpty()){
Iterator iter = fileNameHash.keySet().iterator();
//ArrayList a = new ArrayList();
while (iter.hasNext()){
String tmp = iter.next().toString();
String path = fileNameHash.get(tmp).toString();
String tmp2 = path;
//strip out the file name
tmp = tmp.substring(0,tmp.lastIndexOf("/"));
StringTokenizer stk = new StringTokenizer(tmp, "/");
while (stk.hasMoreTokens()){
tmp2 += "/" + stk.nextToken();
if ( !dirList.contains(new String (tmp2)) ) {
System.out.println("ADDING DIRECTORY " + tmp2 + " FROM FILE ");
dirList.add(tmp2);
//fileDirList.addAll(a);
if (!dirDelNameHash.isEmpty()){
Iterator iter = dirDelNameHash.keySet().iterator();
ArrayList a = new ArrayList();
while (iter.hasNext()){
String tmp = iter.next().toString();
String path = dirDelNameHash.get(tmp).toString();
String tmp2 = path;
//StringTokenizer stk = new StringTokenizer(tmp, "/");
//while (stk.hasMoreTokens()){
// tmp2 += "/" + stk.nextToken();
// if ( !dirList.contains(new String (tmp2)) ) {
//dirList.add(tmp2);
//deletedDirList.add(tmp2);
deletedDirList.add(tmp);
//for (int x=0; x < dirList.llength; x++)
System.out.println("DELETE DIRECTORIES " + deletedDirList.toString());
System.out.println("6:Praveen ");
Iterator itr = fileNameHash.keySet().iterator();
deployedFilelist = new ArrayList();
deletedFilelist = new ArrayList();
while(itr.hasNext()){
String nxtVal = itr.next().toString();
deployedFilelist.add(fileNameHash.get(nxtVal) + "/" + nxtVal);
System.out.println("FILES " + deployedFilelist.toString());
Iterator itr2 = fileDelNameHash.keySet().iterator();
while(itr2.hasNext()){
String nxtVal = itr2.next().toString();
deletedFilelist.add(fileDelNameHash.get(nxtVal) + "/"+ nxtVal);
System.out.println("DELETED FILES " + deletedFilelist.toString());
Iterator itr3 = dirDelNameHash.keySet().iterator();
while(itr3.hasNext()){
String nxtVal = itr3.next().toString();
deletedDirList.add(dirDelNameHash.get(nxtVal) + "/"+ nxtVal);
System.out.println("DELETED DIRECTORIES " + deletedDirList.toString());
} catch (javax.xml.transform.TransformerException e) {
e.printStackTrace();
System.exit(2);
* Process the file specified by the -file option and store them in a list of
* deployed files and deleted files.
* Load the content to the Repository
private void loadContent(){
// add all the fileList
// only if they are not already there
/** Taken care of in processDeployedFiles **
Iterator iterA = fileDirList.iterator();
while (iterA.hasNext() ) {
Object tmp = iterA.next();
if (! dirList.contains(tmp)){
dirList.add(tmp);
** End of Comment **/
//dirList.addAll(fileDirList);
dirList.addAll(deployedFilelist);
System.out.println("7:Praveen ");
String[] blArgs = null;
String depFilePath = new String();
String depDirPath = new String();
List blArgsList = new ArrayList(userArgsList);
/** Added by Jayant as our repo is filesystem repo **/
blArgsList.add("-filesystem");
/** End of Add by Jayant **/
blArgsList.add("-repository");
blArgsList.add(repository );
blArgsList.add("-url");
blArgsList.add(adminUrl);
blArgsList.add("-user");
blArgsList.add(userName);
blArgsList.add("-password");
blArgsList.add(userPassword);
blArgsList.add("-application");
blArgsList.add(application);
blArgsList.add("-d");
blArgsList.add(contentDirPath);
blArgsList.add("+recurse");
blArgsList.add("--");
System.out.println("8:Praveen ***************************************");
Iterator itr = dirList.iterator();
while (itr.hasNext()){
depFilePath = itr.next().toString();
blArgsList.add(depFilePath);
blArgs = new String[blArgsList.size()];
blArgsList.toArray(blArgs);
//System.out.println("blArgsList.size() " + blArgsList.size() );
System.out.println("9:Praveen ************");
try {
BulkLoader bulkLoader = new BulkLoader(blArgs);
System.out.println("10:Praveen ");
//List of files to be ignored
List _ignoreList = new ArrayList();
_ignoreList.add("*.md.properties");
_ignoreList.add("*.md.properties.iwold");
_ignoreList.add("*.md.properties.iwnew");
//_ignoreList.add("*"+iwmfExtn+"*");
bulkLoader.ignoreList = _ignoreList;
bulkLoader.validateArgs();
bulkLoader.doLoad();
System.out.println("10 AAA:Praveen ");
bulkLoader.finished();
System.out.println("10 BBB:Praveen ");
} catch (Exception e){
e.printStackTrace();
System.exit(8);
* Delete the specified content nodes from the Repository
* At present, BulkLoader does not support this functionality.
private void deleteContent(){
System.out.println("11:Praveen ");
// Get the list of files from deletedFilelist and remove them from the
// Repository.
//dirList.addAll(fileDirList);
String[] blArgs = null;
String depFilePath = new String();
String depDirPath = new String();
// add all the fileList
//deletedDirList.addAll(deletedFilelist);
deletedFilelist.addAll(deletedDirList);
List blArgsList = null;
Iterator itr = deletedFilelist.iterator();
while (itr.hasNext()){
blArgsList = new ArrayList(userArgsList);
/** Added by Jayant as our repo is filesystem repo **/
blArgsList.add("-filesystem");
System.out.println("12:Praveen ");
/** End of Add by Jayant **/
blArgsList.add("-repository");
blArgsList.add(repository);
blArgsList.add("-url");
blArgsList.add(adminUrl);
blArgsList.add("-user");
blArgsList.add(userName);
blArgsList.add("-password");
blArgsList.add(userPassword);
blArgsList.add("-application");
blArgsList.add(application);
blArgsList.add("-d");
blArgsList.add(contentDirPath);
blArgsList.add("+recurse");
blArgsList.add("-deletePath");
depFilePath = itr.next().toString();
blArgsList.add(depFilePath);
blArgs = new String[blArgsList.size()];
blArgsList.toArray(blArgs);
try {
System.out.println("13:Praveen ");
BulkLoader bulkLoader = new BulkLoader(blArgs);
//List of files to be ignored
List _ignoreList = new ArrayList();
_ignoreList.add("*.md.properties");
_ignoreList.add("*.md.properties.iwold");
_ignoreList.add("*.md.properties.iwnew");
//_ignoreList.add("*"+iwmfExtn+"*");
bulkLoader.ignoreList = _ignoreList;
bulkLoader.validateArgs();
bulkLoader.doDelete();
bulkLoader.finished();
} catch (com.bea.content.NoSuchNodeException ne){
ne.printStackTrace();
} catch (Exception e){
e.printStackTrace();
// System.exit(8);
* Point of control to other method calls.
private void run() throws Exception{
System.out.println("Begin: "+new Date(System.currentTimeMillis()));
initialSetup();
processDeployDirs();
//Load the content to the repository
if( dirList != null && dirList.size() >0){
loadContent();
//Delete the nodes from the repository
if( (deletedFilelist != null && deletedFilelist.size() >0) || (deletedDirList != null && deletedDirList.size() > 0) ){
deleteContent();
System.out.println("End: "+new Date(System.currentTimeMillis()));
* main method.
public static void main(String[] args) throws Exception{
try{
LoadContent lc = new LoadContent();
lc.processArgs(args);
lc.run();
} catch(Exception e){
e.printStackTrace();
System.exit(8);
Thanks & Regards
Kumarwe are facing the issue with the following method bulkLoader.doLoad(); which is working properly in 8.1 is giving error in 10.3.We are using the 10.3 bulkloader scripts but invoking the loadContent.java wwe are facing this issue.
-
hi i was wondering if anyone could help me, i keep getting 2 errors on the pop and push methods sayin it cannot find the variable.
package labwork1;
import java.util.*;
* @author me
public class Main
public Main() {
public static void main(String[] args)
Stack stk = new Stack();
public void help(String object)
if(object.startsWith("-")){
stk.pop();
else{
stk.push(object);
}ok i get that the scope of the stack is only in the
main method, how would i solve this, so that the push
and pop methods will work?Not sure what you are doing but:
Declare it in the class as an instance variable. -
Hi All,
I have written a query as belows: but I dont get the output as desired.
This is a with query - I need the query output in a single record so I have pivoted the first query spl. The second set of query stk gives me the stock.
My requirement is whnever there is a not matching mmg_id of 1st query with mmg5_id of 2nd query it should give the second record as follows
LOC_LOC_ID MMG_ID TP_TP_ID 'S10' 'O3' 'O7' 'O8' CN_STK_QTY CN_STK_VAL
1097 1610 20132123 207.5 62.08 7504 25.06 603 93027.5
1097 0024 20132123 -1 -15.99
{code}
Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.2.0
Connected as sizsupport
SQL>
SQL> WITH spl AS
2 (
3 SELECT * FROM
4 (SELECT '1097' loc_loc_id, '1610' mmg_id, '20132123' tp_tp_id, 'S10' measure_name,'207.5' val FROM dual UNION ALL
5 SELECT '1097' , '1610' , '20132123' , 'O3' measure_name, '62.08' FROM dual UNION ALL
6 SELECT '1097' , '1610' , '20132123' , 'O7' measure_name, '7504' FROM dual UNION ALL
7 SELECT '1097' , '1610' , '20132123' , 'O8' measure_name, '25.06' FROM dual )
8 pivot ( sum(val) FOR measure_name IN
9 ('S10','O3','O7','O8'))
10 ),
11 stk AS
12 (
13 SELECT '1097' loc_loc_id, '0024' mmg5_id, '20132123' tp_tp_id, '-1' cn_stk_qty, '-15.99' cn_stk_val FROM dual
14 UNION ALL
15 SELECT '1097' loc_loc_id, '1610' mmg5_id, '20132123' tp_tp_id, '603' cn_stk_qty, '93027.5' cn_stk_val FROM dual
16 )
17 SELECT spl.*,stk.cn_stk_qty,stk.cn_stk_val
18 FROM spl RIGHT OUTER JOIN stk
19 ON spl.loc_loc_id = stk.loc_loc_id
20 AND spl.tp_tp_id = stk.tp_tp_id
21 AND spl.mmg_id = stk.mmg5_id
22 ;
LOC_LOC_ID MMG_ID TP_TP_ID 'S10' 'O3' 'O7' 'O8' CN_STK_QTY CN_STK_VAL
1097 1610 20132123 207.5 62.08 7504 25.06 603 93027.5
-1 -15.99
SQL>
{code}Hi,
When there is no match between stk and spl, then all columns from spl will be NULL, but the values from stk will be available. Take the columns you need to display from stk, not from spl.
WITH spl AS
SELECT *
FROM raw_data
PIVOT ( SUM (val)
FOR measure_name IN ( 'S10' AS s10
, 'O3' AS p_03
, 'O7' AS p_07
, 'O8' AS p_08
SELECT stk.loc_loc_id
, stk.mmg5_id
, stk.tp_tp_id
, spl.s10
, spl.p_03
, spl.p_07
, spl.p_08
, stk.cn_stk_qty
, stk.cn_stk_val
FROM stk
LEFT OUTER JOIN spl ON spl.loc_loc_id = stk.loc_loc_id
AND spl.tp_tp_id = stk.tp_tp_id
AND spl.mmg_id = stk.mmg5_id
I gave the pivoted columns standard names, like s10 and p_03. You don't have to do that; you can use "'S10'" and "'P_03'" if you prefer. -
import java.util.*;
import java.text.SimpleDateFormat;
class Test{
public static void main(String[] args)throws Exception{
String Holidays_val = "1/25/207|SecondHolidayDay^2/01/2007|Anotherholiday^3/01/2017|newholiday^4/02/2007|someotherholiday^5/03/2007|Firstholiday^";
String date1="";
String holiday1="";
StringTokenizer str1 = new StringTokenizer(Holidays_val,"^");
Hashtable hs = new Hashtable();
Date dates[] =new Date[5];
int m=0;
while(str1.hasMoreTokens()){
String st1 = str1.nextToken();
StringTokenizer stk = new StringTokenizer(st1,"|");
while(stk.hasMoreTokens()){
date1 = stk.nextToken();
holiday1 = stk.nextToken();
dates[m] = new Date(date1);
m++;
hs.put(date1,holiday1);
Date temp = null;
for(int i=0;i<dates.length;i++){
for(int j=i+1;j<dates.length;j++){
if(dates.after(dates[j])){
temp = dates[j];
dates[j] = dates[i];
dates[i] = temp;
SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy");
Vector dates1 = new Vector();
for(int k=0;k<dates.length;k++){
dates1.addElement(dateFormat.format(dates[k]));
Iterator iter1 = dates1.iterator();
Vector finalVec = new Vector();
while(iter1.hasNext()){
String date = iter1.next().toString();
finalVec.addElement(date);
finalVec.addElement(hs.get(date));
System.out.println(date);// printing the date CORRECTLY
System.out.println(hs.get(date));//printing the corresponding holiday as NULL, when i place a hardcode date as hs.get("2/01/2007")---its printing the holiday name correctly.
//GETTING NULL IN THE ABOVE LINE OF CODE, i should get the corresponding holiday name of the given date
System.out.println(finalVec);
In the above code im taking the String Holidays_val, im separating the date and their corresponding holiday names, and then im sorting the dates and placing the dates and holidayname in a hashtable. finally im placing the date and its corresponding holiday in the vector, but the problem over here is im getting the null in case of corresponding holiday while putting in Hashtable.Is this a joke?
Why are you turning the strings into dates, and then back into strings again?.
Even if the strings at both ends of the process are identical, it's a strange thing to do.
You should key the hashtable off of the Date objects.
Other issues:
You're using a deprecated constructor for Date. Use java.text.SimpleDateFormat to parse the date string and get a Date object.
Drop that whole thing when you turn dates back into strings.
Why do you add things to arrays, and then put them into vectors? Just add the Date objects directly into a vector.
But better yet, don't use Vector. Use a more modern List implementation, like ArrayList. And use a HashMap rather than a Hashtable.
And write to interfaces; the types of variables should be List and Map, not Vector or Hashtable (or ArrayList or HashMap).
Don't do the sort yourself. Use java.util.Collections.sort.
And you don't really need a separate List and a Map. Just use a SortedMap.
You can do this whole thing in less than half the code, and it'll work better too. -
Why it gives an error , although the result is correct
Hello everybody,
here is my code, which i wrote in another way,
After th sucessful compiling it gives an error, but the results of execution is ok.
What is wrong?
import java.io.*;
import java.lang.*;
import java.util.*;
import java.awt.*;
public class ReadFkOut {
private static double[] ar;
private static double[] ar1;
ReadFkOut() {
ar=new double [6];
ar1=new double[6];
try {
FileReader file = new FileReader("bambam1.dat");
BufferedReader buff = new BufferedReader(file);
StreamTokenizer stk=new StreamTokenizer(buff);
stk.eolIsSignificant(false);
stk.parseNumbers();
int lineNumber=0;
stk.nextToken();
while(stk.ttype==stk.TT_NUMBER) {
ar[lineNumber]=(double)stk.nval;
stk.nextToken();
ar1[lineNumber]=(double)stk.nval;
lineNumber++;
buff.close();
catch (Exception e) {
System.out.println("Error - - " );
public double[] getValues() {
return ar;
public double[] getValues1() {
return ar1;
0.00000000 39.409
5.00000000 39.409
10.0000000 39.409 file bambam1.dat
15.00000000 39.409
20.00000000 39.409
25.0000000 39.409
main coimport java.io.*;
import java.lang.*;
import java.util.*;
import java.awt.*;
public class Galka {
ReadFkOut rf;
static double [] gallochka;
static double [] gallochka1;
public static void main(String[] args) {
ReadFkOut rf=new ReadFkOut();
gallochka=rf.getValues1();
gallochka1=rf.getValues();
System.out.println(gallochka[1]);
System.out.println(gallochka1[1]);import java.io.*;
import java.lang.*;
import java.util.*;
import java.awt.*;
public class ReadFkOut {
private static double[] ar;
private static double[] ar1;
ReadFkOut() {
ar=new double [6];
ar1=new double[6];
try {
FileReader file = new FileReader("bambam1.dat");
BufferedReader buff = new BufferedReader(file);
StreamTokenizer stk=new StreamTokenizer(buff);
stk.eolIsSignificant(false);
stk.parseNumbers();
int lineNumber=0;
stk.nextToken();
while(stk.ttype==stk.TT_NUMBER) {
ar[lineNumber]=(double)stk.nval;
stk.nextToken();
ar1[lineNumber]=(double)stk.nval;
lineNumber++;
buff.close();
catch (Exception e) {
System.out.println("Error - - " );
public double[] getValues() {
return ar;
public double[] getValues1() {
return ar1;
0.00000000 39.409
5.00000000 39.409
10.0000000 39.409 file bambam1.dat
15.00000000 39.409
20.00000000 39.409
25.0000000 39.409
main coimport java.io.*;
import java.lang.*;
import java.util.*;
import java.awt.*;
public class Galka {
ReadFkOut rf;
static double [] gallochka;
static double [] gallochka1;
public static void main(String[] args) {
ReadFkOut rf=new ReadFkOut();
gallochka=rf.getValues1();
gallochka1=rf.getValues();
System.out.println(gallochka[1]);
System.out.println(gallochka1[1]);
}The output is
Error --
5.0
39.409
Maybe you are looking for
-
How is it possible to have multiple styles for a single control
Hi , I have a CSS associated with my MXML File . Now how can i assign all these things to my TextInput ,for example by doing below , i can only assign font Size , how can i assign all these styles at a time to my TextInput <mx:Label name="UserName" w
-
I have a discover report which have 5 union all, and one of the select statement brings the information about the cr.type like 'MISC'from the table called ar.ar_cash_receipts_all cr. This query basically brings the information of amount_dr and amount
-
I cannot connect to the iTunes store
I'm on a Windows 7 comp and upgraded iTunes about a month ago and have not been able to connect to the iTunes store since. The little bar at the top says it is accessing the store but the store itself never comes up, it's just a blank screen. I've tr
-
OSB - How select variable used as request message in routing to buss. serv.
I' modelling a message flow for a proxy service. Depending on the content of the incoming request message, a branch (conditional) is selected. In this branch the message needs to be routed to a business service. This business service has a different
-
Using adjustment layers to only one layer
I know how to use an adjustment layer - it goes directly over the layer I'm editing and I'm able to edit the colour (such as hue etc). The trouble is, anything below that adjustment layer then gets affected. Is there any way I am able to make this ad