Consolidating multiple lines in a requisition into one line item on a PO
I am using project builder in sap, one requisition is creating for all activities on the project. The requisition of cable is spread over multiple activities. ie activity 1 may have 200m of cable (req item 10), activity 2 may have 400m of cable (req item 20). When the purchase order is created I would line line 10 and 20 consolidated on the PO so there is 1 line for 600m of cable. How is this possible.
You can consodilate Purchase requisitions lines into one PO. When you create PO just input Purchase requisition no along with line item and qty in PO item detail for PO first line item. It will close multiple lines in Pr's with one PO line item.
First create PO referring PR and then in PO item detail you can see purchase requisition and line item there you input second pr with line item and qty.
Similar Messages
-
Is it possible to deploy multiple sharepoint provider hosted apps into one azure website??
Rohit PasrijaI am faced with a similar requirement although the hosting environment for the provider hosted apps would be an IIS web server in our own infrastructure.
Would it be advisable to use a common IIS website to host multiple apps? The MVC web application which will provide functionality
for the apps is already in place which is why we are checking for options to use the same web project for multiple apps.
Can the web config file's clientID be shared by multiple apps? -
Convert multiple rows in a table into one row based on the primary key
I have 2 tables
CREATE TABLE Files (FileID int, fileName varchar(20))
insert into Files values (1,'F1')
insert into Files values (2,'F2')
insert into Files values (3,'F3')
CREATE TABLE Versions (FileID int, VersionNum varchar(10))
insert into Versions values (1, 'V1')
insert into Versions values (1, 'V2')
insert into Versions values (1, 'V3')
insert into Versions values (2, 'V1')
The two tables join using FileID. I want a listing of the fileName and the all corresponding versions on one line. There may not be a version for a file or there may be multiple versions for the file. The output I want is
F1, V1, v2, v3
F2, V1
F3
Any help would be appreciated.
lggardner,
If you want them as different columns, you can PIVOT. However, this requires to know the max numebr of versions that may be there (here I have done with 3). If you dont have that info, then you might have to resort to dynamic SQL..
;with cte
as
select f.fileid,f.fileName,ISNULL(v.VersionNum,'') as VersionNum,row_number() over(partition by f.fileid order by f.filename,v.versionnum) rownum from #files f
left join #versions v
on f.fileid=v.fileid
select fileid,fileName,ISNULL([1],'') as [1],ISNULL([2],'') as [2],ISNULL([3],'') as [3]
from
select * from cte
) tab
PIVOT
Max(VersionNum) for rownum in ([1],[2],[3])
) pvt
Thanks,
Jay
<If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'> -
Read multiple files and save all into one output file(AGAIN)
Hi, guys
I need your help for reading data from multiple files and save the results into one output file. When files are selected from file chooser, my program read the data line by line , do some calculations and save the result into the output. I made an array to store input files and it seems to be working fine, but when it comes to SaveFile() function, issues NullPointException message.
public class FileReduction1 extends JFrame implements ActionListener
// GUI definition and layout
/* ACTION PERFORMED */
public void actionPerformed(ActionEvent event) {
if (event.getActionCommand().equals("Open File")) getFileName();
/* OPEN THE FILE */
private void getFileName() {
// Display file dialog so user can select file to open
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
fileChooser.setMultiSelectionEnabled(true);
int result = fileChooser.showOpenDialog(this);
// If cancel button selected return
if (result == JFileChooser.CANCEL_OPTION) return;
if (result == JFileChooser.APPROVE_OPTION)
files = fileChooser.getSelectedFiles();
textArea.setText("");
if(files.length>0)
filelist="";
System.out.println("files length"+files.length);
for(int i=0;i<files.length;i++)
System.out.println(files.getName());
filelist+=files[i].getName()+" ,";
if (checkFileName(files[i]) )
openButton.setEnabled(true);
readButton.setEnabled(true);
textArea.append("file "+files[i].getName()+"is a proper file"+"\n");
readFile(files[i]);
textfield.setText(filelist);
else{JOptionPane.showMessageDialog(this,"Please select file(s)",
"Error 5: ",JOptionPane.ERROR_MESSAGE); }
// Obtain selected file
/* READ FILE */
private void readFile(File fileName_in) {
// Disable read button
readButton.setEnabled(false);
// Dimension data structure
getNumberOfLines(fileName_in);
data = new String[numLines][4];
// Read file
readTheFile(fileName_in);
// Rnable open button
openButton.setEnabled(true);
/* GET NUMBER OF LINES */
/* Get number of lines in file and prepare data structure. */
private void getNumberOfLines(File fileName_in) {
int counter = 0;
// Open the file
openFile(fileName_in);
// Loop through file incrementing counter
try {
String line = fileInput.readLine();
while (line != null) {
counter++;
System.out.println("(" + counter + ") " + line);
line = fileInput.readLine();
numLines = counter;
closeFile(fileName_in);
catch(IOException ioException) {
JOptionPane.showMessageDialog(this,"Error reading File",
"Error 5: ",JOptionPane.ERROR_MESSAGE);
closeFile(fileName_in);
System.exit(1);
/* READ FILE */
private void readTheFile(File fileName_in)
// Open the file
//int row=0;
int col=0;
openFile(fileName_in);
System.out.println("Read the file");
// Loop through file incrementing counter
try
String line = fileInput.readLine();
while (line != null)
boolean containsDoubles = false;
double temp;
String[] lineParts = line.split("\t");
try
for (col=0;col<lineParts.length;col++)
temp=Double.parseDouble(lineParts[col]);
data[row][col] = lineParts[col];
containsDoubles = true;
System.out.print("data["+row+"]["+col+"]="+lineParts[col]+" ");
} catch (Exception e) {row=0; col=0; temp=0.0;}
if (containsDoubles){ row++;}
System.out.println();
line = fileInput.readLine();
catch(IOException ioException)
JOptionPane.showMessageDialog(this,"Error reading File", "Error 5: ",JOptionPane.ERROR_MESSAGE);
closeFile(fileName_in);
System.exit(1);
//System.out.println("length"+data.length);
closeFile(fileName_in);
process(fileName_in);
/* CHECK FILE NAME */
/* Return flase if selected file is a directory, access is denied or is
not a file name. */
private boolean checkFileName(File fileName_in) {
if (fileName_in.exists()) {
if (fileName_in.canRead()) {
if (fileName_in.isFile()) return(true);
else JOptionPane.showMessageDialog(null,
"ERROR 3: File is a directory");
else JOptionPane.showMessageDialog(null,
"ERROR 2: Access denied");
else JOptionPane.showMessageDialog(null,
"ERROR 1: No such file!");
// Return
return(false);
/* OPEN FILE */
private void openFile(File fileName_in) {
try {
// Open file
FileReader file = new FileReader(fileName_in);
fileInput = new BufferedReader(file);
catch(IOException ioException) {
JOptionPane.showMessageDialog(this,"Error Opening File",
"Error 4: ",JOptionPane.ERROR_MESSAGE);
textArea.append("OPEN FILE\n---------\n");
textArea.append(fileName_in.getPath());
textArea.append("\n");
//System.out.println("File opened successfully");
/* CLOSE FILE */
private void closeFile(File fileName_in) {
if (fileInput != null) {
try {
fileInput.close();
catch (IOException ioException) {
JOptionPane.showMessageDialog(this,"Error Opening File",
"Error 4: ",JOptionPane.ERROR_MESSAGE);
System.out.println("File closed");
private void process(File fileName_in) {
//getNumberOfLines();
//data = new String[numLines][3];
// Read file
double temp,temp1;
//readTheFile();
//System.out.println("row:"+row);
//int number=data.length;
//System.out.println(number);
for (int i=0; i<row; i++)
temp=Double.parseDouble(data[i][1]);
sumx+=temp;
temp1=Double.parseDouble(data[i][3]);
sumy+=temp1;
multixy+=(temp*temp1);
square_x_sum+=(temp*temp);
square_y_sum+=(temp1*temp1);
//System.out.println("Sum(x)="+sumx);
double tempup=(row*multixy)-(sumx*sumy);
double tempdown=(row*square_x_sum)-(sumx*sumx);
slope=tempup/tempdown;
double tempbup=sumy-(slope*sumx);
intb=tempbup/row;
double tempside=(row*square_y_sum)-(sumy*sumy);
double cordown=Math.sqrt(tempdown*tempside);
corr=tempup/cordown;
r_sqrt=corr*corr;
textArea.append("Data for file"+ fileName_in.getName()+" have been processed successfully.");
textArea.append("\n");
textArea.append("Please enter output file name including extension.");
System.out.println("number"+row);
System.out.println("slope(m)="+slope);
System.out.println("intecept b="+intb);
System.out.println("correlation="+corr);
System.out.println("correlation="+r_sqrt);
saveFile();
private void saveFile()
textArea.append("SAVE FILE\n---------\n");
if (openFile1())
try {
outputToFile();
catch (IOException ioException) {
JOptionPane.showMessageDialog(this,"Error Writing to File",
"Error",JOptionPane.ERROR_MESSAGE);
private boolean openFile1 ()
// search for the file path
StringBuffer stringpath;
title=textfield1.getText().trim();
int temp=fileName_in.getName().length();
int temp_path=fileName_in.getPath().length();
int startd=(temp_path-temp);
stringpath=new StringBuffer(fileName_in.getPath());
stringpath.delete(startd, temp_path+1);
//System.out.println("file-path="+temp_path);
//System.out.println("length-file="+temp);
path=stringpath.toString();
fileName_out = new File(path, title);
//System.out.println(file_out.getName());
if (fileName_out==null || fileName_out.getName().equals(""))
JOptionPane.showMessageDialog(this,"Invalid File name",
"Invalid File name",JOptionPane.ERROR_MESSAGE);
return(false);
else
try
boolean created = fileName_out.createNewFile();
if(created)
fileOutput = new PrintWriter(new FileWriter(fileName_out));
fileOutput.println("File Name"+"\t"+"Slope(m)"+"\t"+"y-intercept(b)"+"\t"+"Coefficient(r)"+"\t"+"Correlation(R-Squared)");
return(true);
else
fileOutput = new PrintWriter(new FileWriter(fileName_out,true));
return(true);
catch (IOException exc)
JOptionPane.showMessageDialog(this,"Please enter the file name","Error",JOptionPane.ERROR_MESSAGE);
return(false);
private void outputToFile() throws IOException
// Initial output
textArea.append("File name = " + fileName_out + "\n");
// Test if data exists
if (data != null)
fileOutput.println(fileName_in.getName() +"\t"+ slope+"\t"+intb+"\t"+corr+"\t"+r_sqrt);
textArea.append("File output complete\n\n");
else
textArea.append("No data\n\n");
// End by closing file
initialcomp();
fileOutput.close();
private void initialcomp()
slope=0.0;
intb=0.0;
corr=0.0;
r_sqrt=0.0;
sumx=0.0; sumy=0.0; multixy=0.0; square_x_sum=0.0; square_y_sum=0.0;
for(int i=0;i<data.length;i++)
for(int j=0;j<data[i].length;j++)
data[i][j]=null;
/* MAIN METHOD */
public static void main(String[] args) throws IOException
// Create instance of class FileChooser
FileReduction1 newFile = new FileReduction1("File Reduction Program");
// Make window vissible
newFile.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
newFile.setSize(500,400);
newFile.setVisible(true);
Sorry about the long lines.
As you can see, all input files saved in array called files, however when OpenFile1() function is called, it take input (fileName_in) as a single file not an array. I'm assuming this causes the exception.
When there's muptiple inputs, program should take each file from getFileName() to outputToFile() sequentially.
Does anybody have an idea to solve this?
Thanks a lot!!you naming convention is confussing. you should follows Java naming convention..you have a getXXX but decalred the return type as "void"...get usully means to return something...
your code is doing too much..and hard to follows..
1. get the selected files
for each selected file
process the file and return the result
write out the result.
/** close the precious resource */
public void closeResource(Reader in){
if (in != null){
try{ in.close(); }
catch (Exception e){}
/** get the total number of line in a file */
public int getLineCount(File file) throws IOException{
BufferedReader in = null;
int lineCount = 0;
try{
in = new BufferedReader(new FileReader(file));
while ((in.readLine() != null)
lineCount++;
return lineCount;
finally{ closeResource (in); }
/** read the file */
public void processFile(File inFile, File outFile) throws IOException{
BufferedReader in = null;
StringBuffer result = new StringBuffer();
try{
in = new BufferedReader(new FileReader(inFile));
String line = null;
while ((in.readLine() != null){
.. do something with the line
result.append(....);
writeToFile(outFile, result.toString());
finally{ closeResource (in); }
public void writeToFile(File outFile, String result) throws IOException{
PrintWriter out = null;
try{
out = new PrintWriter(new FileWriter(outFile, true)); // true for appending to the end of the file
out.println(result);
finally{ if (out != null){ try{ out.close(); } catch (Exception e){} } }
} -
How to adjust splitted lines into one line in Text file?
Hi Guys,
I have a text file with 3 fields(comma separated): GLCode (Number), Desc1 (Char), Desc2(Char) and need to load it into BW.
My Text file looks like:
1011.00,"Mejor PC Infrastructure","This line is ok."
1012.00,"Telephone Equipment $","This line ends in next line.
1)Need to change the equipment immediately.
2)Take immediate action"
1013.00,"V1 Computer Server Infrastructure # Equip","For purchases
of components that make up the company's network, such as servers, hubs, routers etc."
1014.00,"Flash Drive","Need to provide all IT Developer"
This is how file looks like. Now I need the followings:
1. Need to remove the space and need to adjust the splitted line into one. Say here
line/record 2 is splitted into 3 lines and need to adjust in 1 line.
2. In Line 5 (Record 3) data splitted into 2 lines and need to make 1 line.
3. Need to remove bad characters.
Could someone help me please how to proceed ?
Regards,Not quite correct by my testing. Try:
$i=0
Get-Content .\test.txt | ForEach {
If ($i%2){
("$Keep $($_)").Trim()
}Else{
$keep=$_
}$i++
Good catch!
Boe Prox
Blog |
Twitter
PoshWSUS |
PoshPAIG | PoshChat |
PoshEventUI
PowerShell Deep Dives Book -
How do I convert/merge multiple files (word and PDF) into one PDF?
I have multiple word docs and PDF files that I need to merge into one file. How do I do that?
You should be able to do it in the image processor.
File > Scripts > Image Processor
If it doesn't have the options you want, then make an action using "Save for Web", then run the action on a batch of files using
File > automate > batch
Select your action from the dropdown menu. -
Merging multiples of the same photo into one
I remember reading a couple tutorials on how to do this weeks ago, but now i cannot seem to remember what to search for to find a tutorial on this.
I multiple photos, its the same location (tripod) with me in a different position in each frame. I want to merge each frame into one picture so in one picture there are multiples of myself in different positions.
thanks!You'll have to use File->Scripts->Load Files into Stack to load all the images into a single document, each on it's own layer, select all the layers and go to Edit->Auto-Align Layers. If all went well then you should be able to achieve your effect using a couple of simple layer masks
-
How to read multiple arguments separated with space in one line
How to modify the
public static void main (String[] args){
}so that it can read multiple arguments separated with space in a single line?
e.g.
java myprogram username password host
java myprogram2 ipaddress port
Thx.public static void main (String[] args){
int index = 0;
for(String arg : args) {
System.out.println("args["+(index++)+" = "+arg);
} -
Condense int declarations into one line
Anyway to condense the declarations below?
int counter = 0;
int streets = 0;
int schools = 0;
int people = 0;I was hoping for something like this but it doesnt work:
int counter, streets, schools, people = 0;It's better to keep them on separate lines anyway. Cleaner, easier to understand.
-
How to select ID into one line seperated by delimiter ','
Hi,
I have two tables, PROJECT and BUGS. One project has some bugs. I want to realize this,
PROJECT BUGS
2202 5853973,5853997,5856329
I wrote this PLSQL,
select b.PROJECT_ID, SYS_CONNECT_BY_PATH(b.BUG_ID, ',')
from BUGS b
where PROJECT_ID=2202
CONNECT BY PRIOR b.BUG_ID = b.PROJECT_ID
and following is the result,
2202 ,5853973
2202 ,5853997
2202 ,5856329
I need your help.
Best regards and thank you,
Qiang.This...?
sql>select * from bugs;
BUG PROJECT
586523 2202
586789 2202
585789 2202
sql>
select project, ltrim(max(sys_connect_by_path(bug,',')),',') bugs
from (select bug,project,row_number() over (order by bug) n
from bugs
where project = 2202)
group by project
start with n = 1
connect by prior n = n-1;
PROJECT BUGS
2202 585789,586523,586789
Message was edited by:
jeneesh -
Convert multiple rows of internal table into one row of internal table
Hi everyone,
I have an internal table of structure
Objid - Sobid
1 - A
1 - B
1 - C
1 - D
2 - a
2 - b
Now I have to show this in ALV format
Objid - Sobid1- Sobid2 -Sobid3 -Sobid4 -Sobid5
1 - A - B - C - D
2 - a - b
Kindly help me it's urgent.
byeHi sandip,
sorry i make a mistake. I have not seen that you will have it in ALV.
Try this an use itab1-txt in your alv:
DATA: BEGIN OF ITAB OCCURS 0,
OBJID(1),
DUMMY(1) VALUE '-',
SOBID(1),
END OF ITAB.
DATA: BEGIN OF ITAB1 OCCURS 0,
txt(20),
END OF ITAB1.
ITAB-OBJID = '1'. ITAB-SOBID = 'A'. APPEND ITAB.
ITAB-OBJID = '1'. ITAB-SOBID = 'B'. APPEND ITAB.
ITAB-OBJID = '1'. ITAB-SOBID = 'C'. APPEND ITAB.
ITAB-OBJID = '1'. ITAB-SOBID = 'D'. APPEND ITAB.
ITAB-OBJID = '2'. ITAB-SOBID = 'a'. APPEND ITAB.
ITAB-OBJID = '2'. ITAB-SOBID = 'b'. APPEND ITAB.
LOOP AT ITAB.
AT NEW OBJID.
if sy-tabix <> 1. append itab1. clear itab1. endif.
itab1-txt = ITAB-OBJID.
ENDAT.
AT NEW SOBID.
concatenate itab1-txt ITAB-DUMMY ITAB-SOBID into itab1-txt.
ENDAT.
ENDLOOP.
append itab1.
loop at itab1. write: / itab1-txt. endloop.
Regards, Dieter -
Multiple Text Boxes into One Text Box
I need multiple text boxes to populate into one text box. I've got it to work with....
a=a + "\n " + (this.getField("Other Current Illnesses 1").value)
However, if the field is blank, it gives me a blank line. What is the code if the box is "empty" to "skip" that text box?
Here is what I tried, but it takes everything away even if there is something in the textbox:
if (this.getField("Other Current Illnesses 1").value !==null) {a=a + ""} else
a=a + "\n " + (this.getField("Other Current Illnesses 6").value)
Any help?From the sample forms supplied with the Acrobat distribution CD, you can use the "fillin" function that can process up to 3 fields at one time and automatically adjust for null value fields and add an option separator string;
The document level function:
// Concatenate 3 strings with separators where needed
function fillin(s1, s2, s3, sep) {
Purpose: concatenate up to 3 strings with an optional separator
inputs:
s1: required input string text or empty string
s2: required input string text or empty string
s3: required input string text or empty string
sep: optional separator sting
returns:
sResult concatenated string
// variable to determine how to concatenate the strings
var test = 0; // all strings null
var sResult; // re slut string to return
// force any number string to a character string for input variables
s1 = s1.toString();
s2 = s2.toString();
s3 = s3.toString();
if(sep.toString() == undefined) sep = ''; // if sep is undefined force to null
assign a binary value for each string present
so the computed value of the strings will indicate which strings are present
when converted to a binary value
if (s1 != "") test += 1; // string 1 present add binary value: 001
if (s2 != "") test += 2; // string 2 present add binary value: 010
if (s3 != "") test += 4; // string 3 present add binary value: 100
/* return appropriate string combination based on
calculated test value as a binary value
switch (test.toString(2)) {
case "0": // no non-empty strings passed - binary 0
sResult = "";
break;
case "1": // only string 1 present - binary 1
sResult = s1;
break;
case "10": // only string 2 present - binary 10
sResult = s2;
break;
case "11": // string 1 and 2 present - binary 10 + 1
sResult = s1 + sep + s2;
break;
case "100": // only string 3 present - binary 100
sResult = s3;
break;
case "101": // string 1 and 3 - binary 100 + 001
sResult = s1 + sep + s3;
break;
case "110": // string 2 and 3 - binary 100 + 010
sResult = s2 + sep + s3;
break;
case "111": // all 3 strings - binary 100 + 010 + 001
sResult = s1 + sep + s2 + sep + s3;
break;
default: // any missed combinations
sResult = "";
break;
return sResult;
Then a custom calculation field for a full business phone number consisting of 4 fields could be:
// Business telephone number w/country code and extension
function doFullBusinessTelephoneVoice() {
var cc = this.getField("business.telephone.voice.countrycode"); // country code;
var ac = this.getField("business.telephone.voice.areacode"); // area code;
var nu = this.getField("business.telephone.voice.number"); // exhchange and phone number;
var ex = this.getField("business.telephone.voice.extension"); // internal extension number;
event.value = fillin(cc.value, ac.value, nu.value, "-"); // first 3 fields;
event.value = fillin(event.value, ex.value, "", "-"); // combined 3 fields and internal extension;
doFullBusinessTelephoneVoice();
It looks like a lot of code, but it is easy to insert document level scripts into t pdf so the actual coding is not that much. And if one hase multiple fields that requrie multiple input fields, the coding task is even less compared to working out each field. -
SC gets split into one PO per Line even when the vendor is the same.
Hello,
If I create a Shopping cart with multiple lines, it gets split into one PO per Line even when the vendor is the same.
What can I do to get the split per vendor?
SRM 4.0
Regards,
ShaiekHi,
Delivery address is also a split criteria
Kind regards,
Yann -
Is it possible to combine multiple IR into one Internal order?
Hi,
Is it possible to combine multiple internal requisitions into one internal order in OM? Thanks
Regards
LeoOracle Order Management provides one to one mapping between Order and (orig_sys_document_ref & Order source). You may need to go for custom solution to consolidate requisitions to create a single internal sales order.
-
Scanning multiple pages into one file using MAC
How do I scan multiple pages and save them into one file or document using a MacBook Pro laptop? My printer is an HP Photosmart 7520. When I use this printer and scan from my PC, it does allow me to scan multiple copies and save as one document by just adding pages as I scan. When I scan with my MacBook Pro, it scans each page, however, I don't get any option or choice to save as one document. It automatically saves each page as a separate document.
Try scanning from your Mac. Use Image Capture app in your Applications folder.
Click once on the scanner on the left side, then click on Show Details along the bottom. Along the right side you will see LOTS of options for scanning and saving.
One of those is Format, make the Format PDF. Just below that will be a check box allowing you to scan multiple pages to one file.
Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
I am employed by HP
Maybe you are looking for
-
Multiple ResultSets from the same connection occuring at the same time
Is it possible to have the following code? The issue is that you are iterating through two result sets created from the same connection at the same time. try { Connection conn=createConnection(); Statement s=conn.createStatement(); ResultSet rs=s.exe
-
Application runs only in one user account
Hello, While trying to install a Canon LiDE 200 scanner, I am experiencing this very odd problem: The "Setup" app on the install CD will only run in one of the two user accounts installed on my macbook (both are admins). In the other, the application
-
Confirmation popup in FPM OVP application controller?
Is it possible to make use of confirmation boxes within the application controller of an FPM-OVP? In my application there is a logout button in the global toolbar. The event is captured within the application controller of the FPM-OVP application, th
-
Unable to run Weblogic 8.1 on Linux RH4.0
Hi, I have downloaded the relevant WLS8.1 and ALDSP2.5 for RH4.0 linux machine. After installation, when i try to start the WLS8.1 server from ldplatform domain i get the following error: The WebLogic Server did not start up properly. java.lang.NoCla
-
Change in location of music in Photoshop Elements 12
I use windows 8.1 and when I try to add music to my slide shows I am told that the folder has moved (which I have not done). The music folder is not deleted. How do I get it point back to my music files? Suz