Charecters value display at IH01 T code for equipments
Dear pal
The client need the view of charecters and its value in IH01 T code for equipments. There we could select all others like Equipment name, make, ID no, location, cost center etc . Basically we have added some datas at equipments thro classifaction.
After that we want to see what are the charecters are assigned at equipment. But system is not helping. If we have like CL6BN, IL07, IE07 additionally @ IH01 (Class,charecters) that would be better for us.
But unable to do.Is it anything available in SAP std?
Thenna,
That functionality isnt available on the standard. The List edit transactios like IH06,IH08 do provide the ability to display the characteritic values associated to the objects.
You may have to create a custom transaction to accomplish the same or use the standard transactions and export and import the datasets between standard reports.
Hope this helps.
Narasimhan
Similar Messages
-
Display address omitted postal code for all countries in sapscript
Hi everyone
Does anyone know how to omit the postal code for all countries(eg. US ) when displaying address in sapscript form?
I want to avoid to display postal code even the country is US.
coz my firm doesn't want to show postal code.....
Also, how to use combination keys of PRIORITY parameter?
For example, if i want PRIORITY '1' 'S' 'L' 'N' 'C'
I cannot write like this as following....
/: ADDRESS DELIVERY PARAGRAPH AS <b>PRIORITY 1 S L N C</b> LINES 5
/: ADDRESSNUMBER &VBDKR-ADRNR_WE(K)&
/: FROMCOUNTRY &VBDKR-SLAND&
/: ENDADDRESSHi,
Bold text describes the usage of <b>Priority</b>.
ADDRESS: Formatting of addresses
The command ADDRESS - ENDADDRESS formats an address according to the postal standards of the
destination country defined in the parameter COUNTRY. The reference fields are described in the
structure ADRS. Both constants and symbols can be assigned to the parameters.
Syntax:
/: ADDRESS [DELIVERY] [PARAGRAPH a] [PRIORITY p] [LINES l]
/: TITLE title
/: NAME name1[,name2[,name3[,name4]]]
/: STREET street
/: POBOX PO box [CODE zip code]
/: POSTCODE zip code
/: CITY town1[,town2]
/: REGION region
/: COUNTRY country
/: FROMCOUNTRY from country
/: ENDADDRESS
Both formatting data and address data are given as parameters. Address data is formatted for output in accordance with the parameters COUNTRY, PRIORITY and LINES. If available, the P.O. box is used instead of the street as the default.
DELIVERY: Defines the street address. If this parameter is selected, the system prints the street address on the layout output instead of the P.O. box.
PARAGRAPH: Defines in which paragraph format the address is output. If the parameter is not defined, the address is output in the default paragraph format.
<b>PRIORITY: Defines which address lines can be omitted if necessary. You can enter a combination of the following values:
A form of address
P mandatory blank line 1
Q mandatory blank line 2
2 name2
3 name3
4 name4
L name of country
S line for the street
O line for the city
</b>
LINES: Defines how many lines are available for formatting the address. If all the address data cannot be formatted due to an insufficient number of lines, the data entered in the parameter PRIORITY is omitted. If the LINES specification is missing and this command is in a layout set window whose type is not MAIN, the lines available for the address layout are then calculated automatically by means of the current output line item and window size.
TITLE: Required form of address.
NAME: Up to four separate names, separated by commas, can be defined.
STREET: Street specification including address number.
POBOX: Post Office box number.
CODE: P.O. box Postal or ZIP code if it is different from the postal code of the city.
POSTCODE: Postal or ZIP code of the city.
CITY: Up to two place names can be defined.
REGION: Determines the administrative area.
COUNTRY: Specifies the country according to whose specific postal standards the address is formatted.
FROMCOUNTRY: Defines in which language the name of the destination country is formatted. In EC countries, only the international country identification letter is put before the postal code with a hyphen.
Example:
/: ADDRESS
/: TITLE Company
/: NAME Widget Technology, Inc., All Kind of Widgets
/: STREET 1005 Lido Lane
/: POBOX 2935 CODE 94400
/: POSTCODE 94404
/: CITY Foster City
/: REGION CA
/: COUNTRY USA
/: FROMCOUNTRY USA
/: ENDADDRESS
Generates the following address:
Company
Widget Technology, Inc.
All Kind of Widgets
PO box 2935
Foster City, CA 94400
If the supplement DELIVERY is specified for the command ADDRESS, then the street is entered instead of
the PO box.
Company
Widget Technology, Inc.
All Kind of Widgets
1005 Lido Lane
Foster City, CA 94404
Regards,
Sailaja.
Reward points if answer helps you. -
Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .
Hi Chhayank,
the problem is not the exported xls. If you have a look inside with Notepad or something like that, you will see that your leading zeros are exported correct.Excel-settings occurs this problem, it is all about how to open the document. If you use the import-assistant you will have no problems because there are options available how to handle the different columns.
Another solution might be to get familiar with ABAP2XLS-Project. I got in my mind, that there is a method implemented, that will help you solving this problem. But that is not a five minute job
~Florian -
How to display the source code for this friggin' file.
Below is a rather lengthy bit of code that provides the behavior and attributes of a web server for OpenCyc. I need to know if I can enter some java to have the HTML source code displayed in a separate text file whenever this class returns some resulting webpage. If you have any ideas it will be greatly appreciated.
-"Will code for foo."
package org.opencyc.webserver;
* Class WebServer is simple multithreaded HTTP server
* with CGI limited to a Cyc connection on default port 3600.
* <p>
import java.net.*;
import java.io.*;
import java.util.*;
import java.util.jar.*;
import java.text.*;
import org.opencyc.util.*;
public class WebServer extends Thread {
* Singleton WebServer instance.
public static WebServer current;
* Default HTTP port.
protected static int DEFAULT_PORT = 80;
* Default Cyc base port.
protected static int DEFAULT_CYC_PORT = 3600;
* Default directory to serve files from on non-Windows OS.
protected static String DEFAULT_DIR = "/";
* Default directory to serve files from on Windows.
//protected static String DEFAULT_WIN_DIR = "C:\\";
protected static String DEFAULT_WIN_DIR = "k:\\opencyc\\run\\httpd\\htdocs";
* File cache capacity.
protected static final int CACHE_CAPACITY = 100;
* File cache to improve file serving performance.
protected static Hashtable fileCache = new Hashtable(CACHE_CAPACITY);
* Number of files served from this web server.
protected static long nbrFilesServed = 0;
* Number of files served from this web server that were found in the cache.
protected static long nbrCacheHits = 0;
* Server socket for accepting connections.
protected ServerSocket server;
* Directories to serve files from.
protected ArrayList dirs;
* Map from String (jar root) to JarFile[] (jar class path).
protected HashMap map;
* Webserver HTTP port.
protected int port;
* Cyc HTML host.
protected String cycHost = "localhost";
* Cyc HTML port.
protected int cycPort;
* Expand jar tress.
protected boolean trees;
* Requests flag.
protected boolean traceRequests;
* Constructs a WebServer object.
* @param port the port to use
* @param directories the directory to serve files from
* @param trees true if files within jar files should be served up
* @param traceRequests true if client's request text should be logged.
* @exception IOException if the listening socket cannot be opened, or problem opening jar files.
public WebServer() throws IOException {
getProperties();
server = new ServerSocket(port);
processDirectories();
* Class Task processes a single HTTP request.
protected class Task extends Thread {
* Socket for the incoming request.
protected Socket sock;
* Client socket to the Cyc KB HTML server.
protected Socket cycHtmlSocket;
* Output tcp stream.
protected DataOutputStream out;
* Contains the file request path for a not-found error message.
protected String notFoundPath;
* Contains the first line of a request message.
protected String methodLine;
* Contains the body of a POST method.
protected String bodyLine;
* Constructs a Task object.
* @param sock the socket assigned for this request.
public Task(Socket sock) {
this.sock = sock;
* Processes the HTTP request.
public void run() {
if (traceRequests)
Log.current.println("connection accepted from " + sock.getInetAddress());
notFoundPath = "";
try {
out = new DataOutputStream(sock.getOutputStream());
try {
getBytes();
catch (Exception e) {
Log.current.println("file not found: " + notFoundPath);
try {
out.writeBytes("HTTP/1.1 404 Not Found\r\n");
out.writeBytes("Server: Cyc WebServer\r\n");
out.writeBytes("Connection: close\r\n");
out.writeBytes("Content-Type: text/html\r\n\r\n");
out.writeBytes("<HTML><HEAD>\n");
out.writeBytes("<TITLE>404 Not Found</TITLE>\n");
out.writeBytes("</HEAD><BODY>\n");
out.writeBytes("<H1>404 - Not Found</H1>\n");
out.writeBytes("</BODY></HTML>");
out.flush();
catch (SocketException se) {
catch (Exception e) {
Log.current.printStackTrace(e);
finally {
try {
sock.close();
catch (IOException e) {
* Reads the HTTP request and obtains the response.
* @exception IOException when HTTP request has an invalid format.
private void getBytes() throws IOException {
// Below logic is complex because web browsers do not close the
// socket after sending the request, so must parse message to find
// the end.
BufferedReader in = new BufferedReader(new InputStreamReader(sock.getInputStream()));
ArrayList inBytes = new ArrayList(200);
int ch = 0;
boolean postMethod;
methodLine = in.readLine();
//if (traceRequests)
// Log.current.println("methodLine=" + methodLine);
bodyLine = "";
if (methodLine.startsWith("POST /"))
postMethod = true;
else
postMethod = false;
//if (traceRequests)
// Log.current.println("postMethod=" + postMethod);
int ch1 = -1;
int ch2 = -1;
int ch3 = -1;
int ch4 = -1;
// Read the HTTP request headers.
while (true) {
ch = in.read();
inBytes.add(new Integer(ch));
ch1 = ch2;
ch2 = ch3;
ch3 = ch4;
ch4 = ch;
if (ch1 == '\r' && ch2 == '\n' && ch3 == '\r' && ch4 == '\n')
break;
if ((! postMethod) &&
(! in.ready()) &&
ch1 == -1 &&
ch2 == -1 &&
ch3 == '\r' &&
ch4 == '\n') {
inBytes.add(new Integer('\r'));
inBytes.add(new Integer('\n'));
break;
byte[] byteArray = new byte[inBytes.size()];
for (int i = 0; i < inBytes.size(); i++) {
Integer ich = (Integer) inBytes.get(i);
byteArray[i] = ich.byteValue();
String headers = new String(byteArray);
if (postMethod) {
String lcHeaders = headers.toLowerCase();
int i = lcHeaders.indexOf("content-length: ");
String contentLength = lcHeaders.substring(i + 16);
int j = contentLength.indexOf("\r\n");
contentLength = contentLength.substring(0, j);
int bodyLen = (new Integer(contentLength)).intValue();
for (int k = 0; k < bodyLen; k++) {
bodyLine = bodyLine + (new Character((char) in.read())).toString();
String line = methodLine + "\r\n" + headers + bodyLine;
if (traceRequests)
Log.current.println(line);
if (postMethod)
processHttpPost();
else
if (line.startsWith("GET /"))
processHttpGet(line.substring(4));
else {
Log.current.println("Invalid request = " + line);
throw new IOException();
* Processes an HTTP GET method.
* @param httpGetPath the path of the file to get.
* @exception IOException if the file is not found.
private void processHttpGet(String httpGetPath) throws IOException {
int i = httpGetPath.indexOf(' ');
if (i > 0)
httpGetPath = httpGetPath.substring(0, i);
Log.current.println(methodLine + " from " + sock.getInetAddress().getHostName());
i = httpGetPath.indexOf("cg?");
if (i > 0) {
cycHtmlRequest(httpGetPath.substring(i + 3));
return;
notFoundPath = httpGetPath;
i = httpGetPath.indexOf('/');
if (i < 0 || map == null) {
if (map == null || httpGetPath.endsWith(".jar")) {
for (int j = 0; j < dirs.size(); j++) {
String dir = (String) dirs.get(j);
String nativePath = dir + httpGetPath;
nativePath = nativePath.replace('/', File.separatorChar);
if (fileCache.containsKey(nativePath)) {
writeDataBytes((byte[]) fileCache.get(nativePath));
Log.current.println("...cached");
nbrCacheHits++;
nbrFilesServed++;
return;
try {
File f = new File(nativePath);
byte[] fileBytes = getBytes(new FileInputStream(f), f.length());
writeDataBytes(fileBytes);
if (fileCache.size() >= CACHE_CAPACITY)
fileCache.clear();
fileCache.put(nativePath, fileBytes);
Log.current.println("...from " + nativePath);
nbrFilesServed++;
return;
catch (IOException e) {
throw new IOException();
String jar = httpGetPath.substring(0, i);
httpGetPath = httpGetPath.substring(i + 1);
JarFile[] jfs = (JarFile[]) map.get(jar);
if (jfs == null)
throw new IOException();
for (i = 0; i < jfs.length; i++) {
JarEntry je = jfs.getJarEntry(httpGetPath);
if (je == null)
continue;
writeDataBytes(getBytes(jfs[i].getInputStream(je), je.getSize()));
nbrFilesServed++;
return;
throw new IOException();
* Processes an HTTP POST method.
* @exception IOException if the file is not found.
private void processHttpPost() throws IOException {
Log.current.println("POST " + bodyLine + " from " + sock.getInetAddress().getHostName());
cycHtmlRequest(bodyLine);
* Reads the specified number of bytes and always close the stream.
* @param in the file to be read for subsequent downloading.
* @param length the number of bytes to read from the file.
* @return An array of bytes from the file.
* @exception IOException if an error occurs when processing the file.
private byte[] getBytes(InputStream in, long length) throws IOException {
DataInputStream din = new DataInputStream(in);
byte[] bytes = new byte[ (int) length];
try {
din.readFully(bytes);
finally {
din.close();
return bytes;
* Sends the HTML request to Cyc.
* @param cycPath the portion of the URL which is given to the Cyc HTML server.
private void cycHtmlRequest(String cycPath) {
String request = sock.getInetAddress().getHostName() + "&" + cycPath + "#";
System.out.println("request=" + request);
ArrayList bytes = new ArrayList(10000);
try {
cycHtmlSocket = new Socket(cycHost, cycPort);
System.out.println("cycHost=" + cycHost + " cycPort=" + cycPort);
BufferedReader cycIn = new BufferedReader(new InputStreamReader(cycHtmlSocket.getInputStream()));
PrintWriter cycOut = new PrintWriter(cycHtmlSocket.getOutputStream(), true);
cycOut.println(request);
cycOut.flush();
int ch = 0;
while (ch >= 0) {
ch = cycIn.read();
bytes.add(new Integer(ch));
catch (Exception e) {
Log.current.printStackTrace(e);
byte[] byteArray = new byte[bytes.size()];
for (int i = 0; i < bytes.size() - 1; i++) {
Integer ich = (Integer) bytes.get(i);
byteArray[i] = ich.byteValue();
try {
writeTextBytes(byteArray);
catch (Exception e) {
Log.current.println(e.getMessage());
* Responds to the HTTP client with data content from the requested URL.
* @param bytes the array of bytes from the URL.
* @exception IOException if there is an error writing to the HTTP client.
public void writeDataBytes(byte[] bytes) throws IOException {
out.writeBytes("HTTP/1.1 200 OK\r\n");
out.writeBytes("Server: Cyc WebServer\r\n");
out.writeBytes("Connection: close\r\n");
out.writeBytes("Content-Length: " + bytes.length + "\r\n");
String prefix = (new String(bytes)).toLowerCase();
if (prefix.indexOf("<html>") > -1)
out.writeBytes("Content-Type: text/html\r\n\r\n");
else
out.writeBytes("Content-Type: application/java\r\n\r\n");
out.write(bytes);
out.flush();
* Respond to the HTTP client with text content from the requested URL.
* @param bytes the array of bytes from the URL.
* @exception IOException if there is an error writing to the HTTP client.
public void writeTextBytes(byte[] bytes) throws IOException {
out.writeBytes("HTTP/1.1 200 OK\r\n");
out.writeBytes("Server: Cyc WebServer\r\n");
out.writeBytes("Connection: close\r\n");
out.writeBytes("Content-Length: " + bytes.length + "\r\n");
out.writeBytes("Content-Type: text/html\r\n\r\n");
out.write(bytes);
out.flush();
* Gets properties governing the web server's behavior.
private void getProperties() {
port = DEFAULT_PORT;
String portProperty = System.getProperty("org.opencyc.webserver.port", "");
if (! portProperty.equalsIgnoreCase(""))
port = (new Integer(portProperty)).intValue();
Log.current.println("Listening on port " + port);
cycPort = DEFAULT_CYC_PORT;
String cycPortProperty = System.getProperty("org.opencyc.webserver.cycPort", "");
if (! cycPortProperty.equalsIgnoreCase(""))
cycPort = (new Integer(cycPortProperty)).intValue();
Log.current.println("Cyc connections directed to port " + cycPort);
String dirsProperty = System.getProperty("org.opencyc.webserver.dirs", "");
dirs = new ArrayList(3);
StringTokenizer st = new StringTokenizer(dirsProperty, ";", false);
while (st.hasMoreTokens()) {
String dir = st.nextToken();
dirs.add(dir);
trees = false;
String treesProperty = System.getProperty("org.opencyc.webserver.trees", "");
if (! treesProperty.equalsIgnoreCase(""))
trees = true;
traceRequests = false;
String traceRequestsProperty = System.getProperty("org.opencyc.webserver.traceRequests", "");
if (! traceRequestsProperty.equalsIgnoreCase("")) {
traceRequests = true;
Log.current.println("tracing requests");
* Adds transitive Class-Path jars to jfs.
* @param jar the jar file
* @param jfs the list of jar files to serve.
* @param dir the jar file directory.
* @exception IOException if an I/O error has occurred with the jar file.
private void addJar(String jar, ArrayList jfs, String dir) throws IOException {
Log.current.println("Serving jar files from: " + dir + jar);
JarFile jf = new JarFile(dir + jar);
jfs.add(jf);
Manifest man = jf.getManifest();
if (man == null)
return;
Attributes attrs = man.getMainAttributes();
if (attrs == null)
return;
String val = attrs.getValue(Attributes.Name.CLASS_PATH);
if (val == null)
return;
dir = dir + jar.substring(0, jar.lastIndexOf(File.separatorChar) + 1);
StringTokenizer st = new StringTokenizer(val);
while (st.hasMoreTokens()) {
addJar(st.nextToken().replace('/', File.separatorChar), jfs, dir);
* Administrative accessor method that obtains list of directories from which files are served.
public ArrayList getDirs() {
return dirs;
* Administrative method that updates the list of directories from which files are served.
public synchronized void setDirs(ArrayList dirs) throws IOException {
this.dirs = dirs;
fileCache.clear();
processDirectories();
* Administrative accessor method that obtains number of files served.
* @return The number of files served.
public long getNbrFilesServed() {
return nbrFilesServed;
* Administrative accessor method that obtains number of files served from cache.
* @return The number of files served from the cache.
public long getNbrCacheHits() {
return nbrCacheHits;
* Administrative method that clears the file cache.
public synchronized void clearFileCache() {
Log.current.println("Clearing file cache");
fileCache.clear();
nbrFilesServed = 0;
nbrCacheHits = 0;
* Processes the directories from which files are served, expanding jar trees if
* directed.
* @exception IOException if problem occurs while processing the jar files.
private void processDirectories() throws IOException {
if (dirs.size() == 0)
if (File.separatorChar == '\\')
dirs.add(DEFAULT_WIN_DIR);
else
dirs.add(DEFAULT_DIR);
Iterator directories = dirs.iterator();
while (directories.hasNext())
Log.current.println("Serving from " + directories.next());
if (trees) {
map = new HashMap();
for (int j = 0; j < dirs.size(); j++) {
String dir = (String) dirs.get(j);
String[] files = new File(dir).list();
for (int i = 0; i < files.length; i++) {
String jar = files[i];
if (!jar.endsWith(".jar"))
continue;
ArrayList jfs = new ArrayList(1);
addJar(jar, jfs, dir);
map.put(jar.substring(0, jar.length() - 4), jfs.toArray(new JarFile[jfs.size()]));
* Provides the command line interface for creating an HTTP server.
* The properties are:
* <pre>
* org.opencyc.webserver.port=<HTTP listening port>
* </pre>
* which defaults to 80.
* <pre>
* org.opencyc.webserver.cycPort=<Cyc connection port>
* </pre>
* which defaults to 3600.
* <pre>
* org.opencyc.webserver.dirs=<path>;<path> ... ;<path>
* </pre>
* with the argument enclosed in quotes if any path contains an
* embedded space.
* The default directory on Windows is C:
* and the default on other systems is / the default
* can be overridden with this property. By default, all files
* under this directory (including all subdirectories) are served
* up via HTTP. If the pathname of a file is <var>path</var> relative
* to the top-level directory, then the file can be downloaded using
* the URL
* <pre>
* http://<var>host</var>:<var>port</var>/<var>path</var>
* </pre>
* Caching of file contents is performed.
* <pre>
* org.opencyc.util.log=all
* </pre>
* If the all value is given, then all attempts to download files
* are output.
* <pre>
* org.opencyc.webserver.traceRequests
* </pre>
* If this property has any value, then the client HTTP requests are
* output.<p>
* <pre>
* org.opencyc.webserver.trees
* </pre>
* This property can be used to serve up individual files stored
* within jar files in addition to the files that are served up by
* default. If the property has any value, the server finds all jar files
* in the top-level directory (not in subdirectories). For each
* jar file, if the name of the jar file is <var>name</var>.jar, then any
* individual file named <var>file</var> within that jar file (or within
* the jar or zip files referenced transitively in the Class-Path manifest
* attribute, can be downloaded using a URL of the form:
* <pre>
* http://<var>host</var>:<var>port</var>/<var>name</var>/<var>file</var>
* </pre>
* When this property has any value, an open file descriptor and cached
* information are held for each jar file, for the life of the process.
* @param args an unused array of command line arguments.
public static void main(String[] args) {
Log.makeLog();
System.out.println("OpenCyc Web Server");
try {
// Launch thread to accept HTTP connections.
current = new WebServer();
current.start();
catch (IOException e) {
e.printStackTrace();
* Just keep looping, spawning a new thread for each incoming request.
public void run() {
try {
while (true) {
// Launch thread to process one HTTP request.
new Task(server.accept()).start();
catch (IOException e) {
e.printStackTrace();JLundan,
I want to thank you for responding to the thread I started on the forum at java.sun.com. Your solution to my problem of needing to print the code of the html pages that the file I included generates was just what I was looking for. However, I have some further questions to ask, if you don't mind. To clarify my task I should say that your rephrasing of the problem is accurate: "You wan't to display the contents of the HTML file that the web server produces in response of client's request?"
Yes, this is what I need to do, but also it needs to display the source code of that html file that the server produces in response to the client's request. Also, in this case, I am the client requesting that the server return some html file, and I'm not sure where the server is. But the webserver.java file that I shared on the forum is on my local machine. I was wondering if I could modify this webserver.java file at my home so that any html file the server returns to me would automatically display the source code. This is a school project of mine and I am stuck on this one thing here.
Further, where would I put the "foo.html" file so it can be written to?
FileOuputStream fos = new FileOutputStream("foo.html");
fos.write(bytes);
fos.close();
Thanks so much for your help. I look forward to your response, at your convenience.
Regards -
Display a message in a For Loop with field value
Hello All,
pls,i wanna display a message in a For Loop with field value the code is:
FOR Q1 IN GET_SUM_EXP_QUANTITY LOOP .
INSERT INTO PLN_PLAN_DISTRIBUTION_WAY
(FIN_YEAR_CODE , MONTH_CODE , MATERIAL_CODE , DISTRIBUTION_WAY , EXPECTED_QUANTITY , GROUP_CODE)
VALUES (:PLN_PLAN.FIN_YEAR_CODE , TO_CHAR(V_FROM_DATE,'MM') , Q1.MATERIAL_CODE , 1 , V_MONTHLY_QTY , Q1.GROUP_CODE);
MESSAGE(':PLN_PLAN.FIN_YEAR_CODE'||:PLN_PLAN.FIN_YEAR_CODE ||' '||'V_FROM_DATE = '||TO_CHAR(V_FROM_DATE,'MM'), 'Q1.MATERIAL_CODE'||' '|| Q1.MATERIAL_CODE||' '||'DISTRIBUTION_WAY'||' = 1'||'EXPECTED_QUANTITY'||' = '|| V_MONTHLY_QTY||'GROUP_CODE'|| ' '|| Q1.GROUP_CODE);
FORMS_DDL('COMMIT');
How 2 display a message with the value:
Q1.MATERIAL_CODE
Q1.GROUP_CODE
message(Q1.MATERIAL_CODE)
gave me numeric or value error on run time when pressed on button
Regards,
Abdetu..Thanks 4 reply..
again they r in a For Loop as mentioned above...
INSERT INTO PLN_PLAN_DISTRIBUTION_WAY
(FIN_YEAR_CODE , MONTH_CODE , MATERIAL_CODE , DISTRIBUTION_WAY , EXPECTED_QUANTITY , GROUP_CODE)
VALUES (:PLN_PLAN.FIN_YEAR_CODE , V_REPAIR_MONTH , Q1.MATERIAL_CODE , 1 , V_REPAIR_Qty , Q1.GROUP_CODE);
FORMS_DDL('COMMIT');
The fields in bold r required to be displayed for testing puposes..
this gives me numeric or value error in runtime..
Best regards,
Abdetu.. -
Document Summary, wrong values displayed for not persistent prompt
Some prompt values displayed on the document summary portion of the document properties area are displaying incorrect values.
It looks like non persistent prompts are showing the value of the prompt listed just before the non_persistent prompt, instead of the value entered by the user.
eg: persistent prompt 'enter code', user enters 1234
non persistent prompt 'enter date', users enters 1/2/2008
display in document summary:
code - 1234
date - 1234
Is this a known issue with Webi? I imagine it is not an issue with the report, but if so, please let me know if there is something I can do to correct it.
Thanks!HI Nilanjan,
Thanks for your suggestions but i do not have any data in Apshell to test if it is being displayed correct or not.
Please advice me further.
Regards, -
VB code for executing pl/sql procedure, and displaying TABLE OUT parameter
Does anybody have any sample VB code (using OO4O) for executing a PL/SQL stored procedure, and then displaying (in Excel preferably) the following OUT parameters from the procedure:
(1) variable(s) of TYPE PL/SQL RECORD
(2) variable of TYPE PL/SQL TABLE defined as TABLE%ROWTYPE
(3) n variables of TYPE PL/SQL TABLE'S defined as table.column%TYPE;
Thanks.Here is what we use to bring in arrays of data from plsql. Here will be some sample vba code and plsql.
What the plsql need to run in an array of input dates and an array of ids to lookup for the dates (also needs the number of values in the arrray.
vba code...
Sub Bull()
Dim oDoc As Object
Dim oTable As Object
Dim oCell As Object
Dim ArrCtr As Integer
Dim iCount As Integer 'Counter
Dim DataDynaset As Object 'Dynaset for retrieved values
Dim DischDataDynaset As Object 'Dynaset for retrieved values
Dim TWDataDynaset As Object 'Dynaset for retrieved values
Dim PDDataDynaset As Object 'Dynaset for previous day retrieved values
Dim MSTssCodes As Variant ' TS Codes Array
Dim NumRows As Integer 'Number of rows in the table
Dim NumColumns As Integer 'Number of columns in the table
Dim NumArrayVals As Integer 'Number of array values (actual number - 1)
OraLogin
NumRows = 83
NumColumns = 11
'One less than number because we start at 0
'NumArrayVals = 5
NumArrayVals = 117
ReDim DateArr(NumArrayVals)
MSTssCodes = Array(3398, 3406, 3391, 3385, 3413, 3378, _
2254, 2254, 2254, _
3398, 3406, 3391, 3385, 3413, _
3460, 3455, 3450, 3447, 3505, 3444, 2254, 2254, _
4974, 2803, 4735, 4719, 2837)
****** NOW THIS WILL GET READY TO SEND TO PLSQLGetData MSTssCodes, DateArr, DataDynaset, NumArrayVals + 1
.... more suff in the sub
Sub GetData(Tssids, DateArray, TmpDataDynaset, NumRetVals)
'Retrieves data from the Oracle database
Dim I As Integer 'Counter
Dim TssidDynaset As Object 'Temporary array for Tssids
Dim DateDynaset As Object 'Temporary array for dates
OraDatabase.Parameters.addTable "TSCODES", 1, 68, NumRetVals, 0
OraDatabase.Parameters("TSCODES").ServerType = ORATYPE_UINT
OraDatabase.Parameters.addTable "DATES", 1, 12, NumRetVals, 0
OraDatabase.Parameters("DATES").ServerType = ORATYPE_DATE
OraDatabase.Parameters.addTable "VALS", 3, 2, NumRetVals, 0
OraDatabase.Parameters("VALS").ServerType = ORATYPE_NUMBER
OraDatabase.Parameters.Add "NUM_VALS", NumRetVals, 3
OraDatabase.Parameters("NUM_VALS").ServerType = ORATYPE_NUMBER
OraDatabase.Parameters.Add "ERR_NUM", 0, 2
OraDatabase.Parameters("ERR_NUM").ServerType = ORATYPE_NUMBER
Set TssidDynaset = OraDatabase.Parameters("TSCODES")
Set DateDynaset = OraDatabase.Parameters("DATES")
'Fill the arrays
For I = 0 To NumRetVals - 1
TssidDynaset.Put_Value Tssids(I), I
DateDynaset.Put_Value DateArray(I), I
Next I
OraDatabase.DbExecuteSQL ("Begin DBCALLS.SELECT_VALUES (:TSCODES, :DATES, :VALS, :NUM_VALS, :ERR_NUM); End;")
If OraDatabase.LastServerErr <> 0 Or OraDatabase.LastServerErrText <> "" Then
MsgBox "Error Getting Data"
End If
Set TmpDataDynaset = OraDatabase.Parameters("VALS")
'MsgBox (OraDatabase.Parameters("NUM_VALS") & " " & OraDatabase.Parameters("ERR_NUM"))
OraDatabase.Parameters.Remove "TSCODES"
OraDatabase.Parameters.Remove "DATES"
OraDatabase.Parameters.Remove "VALS"
OraDatabase.Parameters.Remove "NUM_VALS"
OraDatabase.Parameters.Remove "ERR_NUM"
End Sub
Now here is the plsql called from the DBCALL package......
--Select time series values for give ts_codes.
PROCEDURE select_values (
ts_codes IN IntArrayTyp,
dates IN DateArrayTyp,
vals IN OUT NumArrayTypIB,
--quality IN OUT RawArrayTyp,
num_vals IN INTEGER,
err_num OUT INTEGER) IS
BEGIN
--initialize variables
err_num := 0;
FOR i IN 1..num_vals LOOP
BEGIN
SELECT value INTO vals(i)
FROM table_name
WHERE ts_code = ts_codes(i)
AND date_time = dates(i);
EXCEPTION
WHEN OTHERS THEN
--dbms_output.put_line (ts_codes(i) || ' ' || SQLCODE);
vals(i) := -1.0;
err_num := SQLCODE;
END;
END LOOP;
EXCEPTION
WHEN OTHERS THEN
--dbms_output.put_line (tssid || ' ' || SQLCODE);
err_num := SQLCODE;
END select_values; -
Htmldb_item displays the value of items as HTML code
I have created an SQL Query(Updateable Report) with 1 edit column. I am trying to display the data and to do Multi-row updates using HTMLDB.Item.
The data displays as HTML code when I define the element as a "Text Field".
The data displays fine when I define the element as a "Standard Report Column", but then I can't edit it.
Here is the code I use in my Sql Query:
Select x.seq_no, x.tpc_note
from
(select HTMLDB_ITEM.HIDDEN(1,CONSULTANT_NO) consultant_no,
HTMLDB_ITEM.TEXT(2,SEQ_NO) Seq_no,
HTMLDB_ITEM.TEXT(3,TPC_NOTE,4,75) Tpc_note
from wb_tpc_consultant_notes
where company = v('p1_company') and
consultant_no = v('p1_consultant_no')
union all
select HTMLDB_ITEM.HIDDEN(1,null) consultant_no,
HTMLDB_ITEM.TEXT(2,((select max(seq_no)
from wb_tpc_consultant_notes where
company = v('p1_company') and
consultant_no = v('p1_consultant_no')) + nvl(:p2_rows,1))) Seq_no,
HTMLDB_ITEM.TEXT(3,null,4,75) Tpc_note
from all_objects where rownum < nvl(:P2_ROWS, 2)) x
order by 1
Any ideas on what I am doing wrong? I cannot find any documentation on using the Htmldb_item API.
Thanks
DebbieYes. I have done that. When I set it to Standard Report Column it displays fine.
Then when I type in changes and click the apply changes button, it always goes back to the original value.
Here is the code behind the apply changes button:
For i in 1..htmldb_application.g_f01.count loop
if htmldb_application.g_f01(i) is not null then
update wb_tpc_consultant_notes
set tpc_note = htmldb_application.g_f03(i)
where company = v('p1_company') and
consultant_no = v('p1_consultant_no') and
seq_no = htmldb_application.g_f02(i);
else
if htmldb_application.g_f01(i) is null then
insert into wb_tpc_consultant_notes
(company,
consultant_no,
seq_no,
tpc_note)
values
(v('p1_company'),
v('p1_consultant_no'),
htmldb_application.g_f02(i),
htmldb_application.g_f03(i));
end if;
Debbie -
Values not getting displayed in the selection screen for Hierarchies?
Hi All,
Our system was upgraded from BW 3.1 to 2004s. The quality system displayes values when query result is filtered for a hierarchy infoobject but the production system does not display any values and sometimes throws an error 'The operation failed because of a server error. See system logs.' There is no changes done for hierarchies in both the systems.
Please let me know if anyone has had similar problems.
Thanks,
KrishnaHi All,
Our system was upgraded from BW 3.1 to 2004s. The quality system displayes values when query result is filtered for a hierarchy infoobject but the production system does not display any values and sometimes throws an error 'The operation failed because of a server error. See system logs.' There is no changes done for hierarchies in both the systems.
Please let me know if anyone has had similar problems.
Thanks,
Krishna -
How to display the 'language code' for language dependent 'Short text' ?
Hi,
I am new to BW.
Can somebody help me with the following issue?
I have an attribute 'Material category description' and I chose short text exists and made it language dependent. I had loaded the master data successfully.
Now I want to know how to check the 'language code' for this material category description. When I display the data, will the language code display by defalult?
I had checked the text table using SE11
It displays the following fields over there.
/BIC/TS1_MCT_DS [ /BIC/TS1(InfoObject name) ]
LANGU
TXTSH
I appreciate your help!
Thank you
SekharDinesh,
I went to RSD1 -> info-object -> Master Data/text tab. It shows my language selections there (Short text selected, language time dependent etc.) with everything grayed out.
In SE16, I could display the data in the following format.
/BIC/ST_PRID TXTSH TXTMD
P01 umbrella rainyday
P02 tent waterproof
etc.
I want to see the 'language code' as one of the columns in this table.
Can you help me do that?
Thank you,
Sekhar -
T.Code for checking the total value of a material
Hi Experts,
Can anybody tel me the T.code for checking the total value of a material which is procured in a specified period?
Thanks in advance
ChannaRefer Tcode ME80FN click on Change Veiw & select Purchase Order History with this you can get PO-GRN-INVOICE Qty & Value details
Last button on Application tool Bar it is in line of filter, total etc icons
Also check below reports :
MC$G - PURCHIS: Material PurchVal Selection
MC$0 - PURCHIS: PurchGrp PurchVal Selection
MC$< - PURCHIS: MatGrp PurchVal Selection
MC$4 - PURCHIS: Vendor PurchVal Selection -
Tax code not displaying in me2j - Need Report for PO tax codes
Dear Guru's,
For Trading materials, while creating PO, we are inserting Tax codes in "Invoicing Tab". But the same(TAX CODE) is not displaying in ME2J report.
But For service materials, we are entering tax codes in the "Services Tab" and it is displaying in the report ME2J.
Kindly tell me a report where we can see the taxcodes for PO.
Regards,
deepaSir,
I did that already, but no code is displaying in that "Tax code Column" for Trading materials.
But tax code has been entered while creating PO in "Invoicing Tab" as "V0" for example.. V0 is not displaying in ME2J Report.
Pls. reply
Edited by: deepa rani on Jun 4, 2008 2:54 PM -
MIGO t code for Material Slip field , i want to add F4 values
Hai in MIGO t code for Material Slip field , i want to add F4 values, cna u give me details procedure.
thanks in advanceCreate a search help via SE11. The help documents should walk you through the process. When you get to a point where you need more information - post another question.
I haven't added a search help for the material slip field, but someone else might have. -
SQL Command code for multiple value string parameter
Hi,
I'm using crystal 2008 and there is a check box for multiple value SQL Command I need some help in writing the SQL Command code for oracle (or sql server) for a multiple value STRING parameter.
Thanks in advance,
MarilynI could be wrong here, but I do not believe you can pass a multiple valued parameter to an SQL Command data source. How I have gotten around this in the past is to put the "real" report into a subreport. In the main report, create a formula field (basic syntax):
formula = join({?parameter}, "|")
Then, use this to pass the selected values to the subreport's parameter (call it {?sr-parm}). The SQL Command in the subreport can then use that (MS SQL):
select *
from table
where charindex(table.field, '{?sr-parm}') > 0
HTH,
Carl -
Table decimal value display is incorrect for a particular user
Hi,
In my VC table value display is showing like .00. Before decimal point values are not coming. I have put disply as 2 decimal. It is hapanning for a particular user. Other users are getting right value. Even we logged on different machine also. please suggest me.
Regards
RamaHi,
what is the user's language in his profile and what is the formate of the your field chcek it in the properties of it.
Regards,
Govindu
Maybe you are looking for
-
Upgrade from XI 3.0 (SP17) to PI 7.0 (SP12): Best Practices
Hi mates, I've a few questions regarding the upgrade to PI 7.0. If the upgrade process is done in phased manner i.e. DEV, QA, PRD in that order over a period of 3 weeks, How do we handle the transports from DEV->QA->PRD when DEV is 7.0 and QA & PRD o
-
I updated my ipod touch 4th gen to ios 5 and lost all my photos. how can i get it back? i'm using windows 7. help please? thanks!
-
Meaningful error handling with Sax Parsers (Apache Xerces)
Hello All, I am using the Apache Xerces Parser 2.6.2 to parse some XML documents with a W3C XML Schema document. My schema has a lot of rules enforced on the different elements and I was looking at some way to get userfriendly/meaningful prescriptive
-
Oracle on DHCP enabled servers
Hello: I installed Oracle on my home machine which is DHCP enabled. The installation said that I have to add Microsoft Loopback adapter. I did it and the installation was successful. But when I rebooted by machine, I could no longer connect to the in
-
Help - Password reset on a MacBook after installing OS X Mountain Lion
I recently purchased OS X Mountian Lion for my old MacBook. I learned that my password no longer workerd. How can I reset my notebook password? I have not been able to even use Lion. I want to purchase a MacBook Pro... but thought I would try a softw