SMARTFORMS field in STRING format
Hi!
<b>Is there limitations when using data type STRING in connection with SMARTFORMS?</b>
I'm trying to send a text field (581 digit long) into an XML file.
It is declarated: AVVTEXT <i>(text field, can be 0-2004 digit)</i> data type <b>STRING</b>.
The field is cut of at digit 256-259.
Regards Christina
u can pass string but the limitation in SAP is 255....So, if it is more than 255 then u need to split the string into 2 lines and so..on...u need to split at every 355 characters.
Similar Messages
-
Ok, I understand about numeric string formating (NumberFormat). But what I need help with is string formatting.
For example, I'm working on an app with fixed-length records. Let's take a name field. I need the string "John Doe" formatted to a 40-character field, right-justified. Can someone point me to a class or a URL with information on this.
Sorry for asking such an elementary question.Ok, I understand about numeric string formating
(NumberFormat). But what I need help with is string
formatting.
For example, I'm working on an app with fixed-length
records. Let's take a name field. I need the string
"John Doe" formatted to a 40-character field,
right-justified. Can someone point me to a class or a
URL with information on this.In the JDK I found nothing, but in the jakarta-Projekt of apache.org:
http://jakarta.apache.org/commons/lang.html
There is a class called StringUtils.
You only have to write:
String rightJustified = StringUtils.rightPad("John Doe", 40);
If you don't find something in the JDK look at Jakarta. They have a lot of useful stuff. -
How to convert BLOB data into string format.
Hi,
I have problem while converting blob data into string format.
for example,
Select dbms_lob.substr(c.shape.Get_wkb(),4000,1) from geotable c
will get me the first 4000 byte of BLOB .
When i using SQL as i did above,the max length is 4000, but i can get 32K using plsql as below:
declare
my_var CLOB;
BEGIN
for x in (Select X from T)
loop
my_var:=dbms_lob.substr(x.X,32767,1)
end loop
return my_var;
I comfortably convert 32k BLOB field to string.
My problem is how to convert blob to varchar having size more than 32K.
Please help me to resolve this,
Thanx in advance for the support,
NileshNilesh,
. . . .The result of get_wkb() will not be human readable (all values are encoded into some binary format).
SELECT utl_raw.cast_to_varchar2(tbl.geometry.get_wkt()) from FeatureTable tbl;
-- resulting string:
☺AW(⌂özßHAA
Å\(÷. . . .You may also want to have a look at { dbms_lob | http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i1015792 } "The DBMS_LOB package provides subprograms to operate on BLOBs, CLOBs, NCLOBs, BFILEs, and temporary LOBs."
Regards,
Noel -
hi,
I HAVE A TABLE IN WHICH ONE FIELD SAY F1 IS OF TYPE STRING
I HAVE CREATED AN ALV REPORT IN WHICH THIS FIELD F1 IS editable
when i press save button it ads the new row in the database
the Problem lies here is that the output length is viewed only to lenght of 15 infact outlen of fieldcatalog is set to 30
and i could only ad 30 character at max infact of being a type string
how can i add data in the table through alv with lenght more than 256 characters(1) How do you build the transparent table with type string field. This type is not allowed in transparent table.
Do you mean CHAR (til 255) or LCHR type (<a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCDWBDIC/BCDWBDIC.pdf">BC - ABAP Dictionary</a>)
<i><b>STRING</b>: Character string with variable length This type can only be used in types (data
elements, structures, table types) and domains. It cannot be used in database tables. In ABAP, this type is implemented as a reference to a storage area of variable size.
<b>CHAR</b>: Character string. Fields of type CHAR may have a maximum length of only 255 in tables. If longer character fields are to be used in tables, you must choose data type LCHR. There are no restrictions on the length of such fields in structures.
<b>LCHR</b>: Character string of any length, but with a minimum of 256 characters. Fields of this type must be located at the end of transparent tables and must be preceded by a length field of type INT2. If there is an INSERT or UPDATE in ABAP programs, this length field must be filled with the length actually required. A fields of this type cannot be used in the WHERE condition of a SELECT statement.</i>
(2) Use of long text (in fact that's your need ?) in ALV
<i>1. Declare the internal and the external length of the field to the ALV Grid Control.
For fields with DDIC reference, the ALV Grid Control automatically uses the internal and the external length.
For fields without DDIC reference, you must specify the internal length using field INTLEN and the external length using field DD_OUTLEN of the field catalog (see Parameters for Fields Without DDIC Reference).
2. Specify the conversion exit using field EDIT_MASK of the field catalog (see Formatting Column Contents).
3. Pass the field catalog with method</i>
If you really need long text, you may declare an output length of say 80 in the ALV grid, and provide an icon to edit a very-long text (via a popup screen with a container and a use of class cl_gui_textedit for example)
Regards -
Needed smartform to determine page format automatically.
Hi
I have a reqirement to print the smartform output in Letter format paper for one company code and it should print it in A4 size paper for rest of the company codes.
I am using R/3 4.6c
I tried with this code
data: lx_sf_header(31) type c,
field-symbols: <fs_header> type SSFFORMHD.
if company_code = 'XXXX'.
CONCATENATE '(' sy-repid ')%HEADER' into lx_sf_header.
assign (lx_sf_header) to <fs_header>.
<fs_header>-PAGEFORMAT = 'LETTER'.
endif.
but I am getting short dump & this logic is working fine in ECC.
Please help me regarding this.......
Thanks in advance
Kiran.
Edited by: kiran Pasala on Sep 30, 2008 4:44 PMDuplicate post.
Needed smartform to determine page format automatically. -
Convert structure into single field in string in unicode system .
Hi all
i need to convert whole structure in single fields which is string format
plese refer this code .....this is structure which i want to use in concatenate statement
statement is
CONCATENATE EXPORTSTRING HFTP_ZSD_RKFR CR_LF INTO EXPORTSTRING.
where data are ...
EXPORTSTRING type xstring
CR_LF type x
structure HFTP_ZSD_RKFR having follwing fields
MANDT MANDT CLNT 3 0
VBELN_VL VBELN_VL CHAR 10 0
LFDNUM LFDNUM NUMC 3 0
VKORG VKORG CHAR 4 0
VSTEL VSTEL CHAR 4 0
VSBED VSBED CHAR 2 0
KUNAG KUNAG CHAR 10 0
KUNWE KUNWE CHAR 10 0
SPDNR SPDNR CHAR 10 0
LFDAT LFDAT DATS 8 0
LFUHR LFUHR TIMS 6 0
WADAT WADAT DATS 8 0
TRAID TRAID CHAR 20 0
ROUTE ROUTE CHAR 6 0
WERKS WERKS_D CHAR 4 0
MATNR MATNR CHAR 18 0
LFIMG LFIMG QUAN 13 3
MEINS MEINS UNIT 3 0
ANZPK ANZPK NUMC 5 0
ANZPK ANZPK NUMC 5
KBETR KBETR CURR 11
KPEIN KPEIN DEC 5
KMEIN KMEIN UNIT 3
KWAER KWAER CUKY 5
KWERT KWERT CURR 13
BELNR BELNR_FI CHAR 10
GJAHR GJAHR NUMC 4
MWSKZ MWSKZ CHAR 2
SAKNR SAKNR CHAR 10
BUKRS BUKRS CHAR 4
BUDAT BUDAT DATS 8
KOSTL KOSTL CHAR 10
AUFNR AUFNR CHAR 12
PRCTR PRCTR CHAR 10
BRGEW BRGEW QUAN 13
GEWEI GEWEI UNIT 3
XBILL ZSD_XBILL CHAR 1
XPARK ZSD_XPARK CHAR 1
XPARK ZSD_XPARK CHAR 1
XBLNR XBLNR CHAR 16
KHERK ZSD_KHERK CHAR 1
LIFEX LIFEX CHAR 35
SDABW SDABW CHAR 4
KBETR_MAUT KBETR CURR 11
KPEIN_MAUT KPEIN DEC 5
KMEIN_MAUT KMEIN UNIT 3
KWERT_MAUT KWERT CURR 13
KBETR_OEL KBETR CURR 11
KPEIN_OEL KPEIN DEC 5
KMEIN_OEL KMEIN UNIT 3
KWERT_OEL KWERT CURR 13
KBETR_PAL KBETR CURR 11
KPEIN_PAL KPEIN DEC 5
KMEIN_PAL KMEIN UNIT 3
KWERT_PAL KWERT CURR 13
KBETR_VAT KBETR CURR 11
KPEIN_VAT KPEIN DEC 5
KPEIN_VAT KPEIN DEC 5
KMEIN_VAT KMEIN UNIT 3
KWERT_VAT KWERT CURR 13
BLDAT BLDAT DATS 8
MWS_BETRG WRBTR CURR 13
KURSF KURSF DEC 9
UVK06 CHAR 1I have used this FM
SAP_CONVERT_TO_TXT_FORMAT
There's also a method in cl_abap_char_utilities to convert a structure to a C container, look for it, I only have 4.6C here and that class is only in ECC -
Need to Download Smartform Data from OTF format to CSV file
Hi,
I need to download smartform data from OTF format to CSV file. Is there any Function module to download Smartform data from
OTF format to CSV file.
Regards,
Selvapriya S.Not that I know of. There is a lot of data in the OTF file besides the field values you are printing (formats, headers. positions, fonts, etc).
You might be able to use the CONVERT_OTF function module and take the default format of 'ASCII'. Once it is converted to an ASCII data format, you might be able to write some ABAP code to strip off the extraneous data and parse the fields you need. -
Need to convert the binary data in blob field to readable format
Hi,
We need to convert the Binary data in the BLOB field to readable format and need to display it in Oracle Apps Environment,does anybody come across the similar requirement.
please advise, thanks in advance.
Regards,
Babu.You could use standard Attachments functionality here ... if the blob is not in FND_LOBS, insert into FND_LOBS, fnd_attached_documents etc to enable viewing via "Attachments" to the entity the blob is related to.
Gareth -
How to check the current time with a Stored time in string format
Hi All
I would like to compare the system time with an existing time values which is allready there in String format..
i mean i would like to check if the SysTime is inbetween 6:30 and 14:00
I accomplished this in Oracle ..
Select 'Y' from dual where to_date(to_char(sysdate,'HH24:MI '),'HH24:MI') between to_date('06:30','HH24:MI') and to_date('14:00','HH24:MI')
But instead of checking the DB each and every time , the perfomance would be better if we can do this in our java code..
Could some one provide me with a code to accomplish the above scenario..
Thanks in advance..,.,import java.util.Calendar;
Calendar rightNow = Calendar.getInstance(); // gets the current date and time to millisec
Calendar earlyTime = Calendar.getInstance().set(Calendar.HOUR_OF_DAY, 6).set(Calendar.MINUTE, 30);
Calendar lateTime = Calendar.getInstance().set(Calendar.HOUR_OF_DAY, 8).set(Calendar.MINUTE, 0);
if (rightNow.compareTo(earlyTime)> 0 && rightNow.compareTo(lateTime) < 0){
// do something
}Try this. -
How to read from a xml file(in String format) using a java program
hi friends
i have a string , which is xml format. i want read the values and display it.can any one suggest how to read a xml file of string format using a javaprogram
thanksfinal DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
final InputStream documentStream = new ByteArrayInputStream(documentXMLSourceString.getBytes("utf-8"));
final Document document = db.parse(documentStream); -
Convert a date in String format to a Date
Hi,
How can I convert a date in String format to a Date object?
I have tried:
import java.text.*;
import java.io.*;
import java.util.Date;
import java.util.Locale;
import java.sql.*;
public class casa {
public static Connection con = null;
public static Statement s = null;
public static String sql = null;
public static String mydate = "01.01.2001";
/** Creates a new instance of casa */
public casa() {
public static void main(String[] args) throws SQLException{
try {
DateFormat shortFormat = DateFormat.getDateInstance(DateFormat.SHORT);
Date date = shortFormat.parse(mydate);
//Open Database
con = getConnection();
s = con.createStatement();
sql = "select date1 from table1 where date1 <= '"+date+"'";
ResultSet rs = s.executeQuery(sql);
while(rs.next()){
String aba = rs.getString("datum");
System.out.println("New Datum = "+aba);
} catch (Exception ex ) {
ex.printStackTrace();
closeConnection(s, con);
//Connection
private static Connection getConnection() {
Connection con = null;
String user ="aouzi";
String passe ="aouzi";
String url = "jdbc:db2:EjbTest";
try {
//Datenbanktreiber laden
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
//Verbindung herstellen
con = DriverManager.getConnection(url,user,passe);
}catch(ClassNotFoundException e){
} catch(SQLException e){}
return con;
//close Connection
private static void closeConnection(Statement s, Connection con) {
try {
s.close();
} catch (SQLException e) {}
try {
con.close();
} catch (SQLException e) {}
I'm getting the following errors:
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0180N
The syntax of the representation of a date/time of day value as character sequence is false. .SQLSTATE=22007I'm pretty sure it won't understand what date.toString() returns. If you know what format the database understands, you do it like this:
SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yy"); // e.g. 18-Apr-02
String datestring = sdf.parse(date);
and use that instead of date in your sql string. Some databases understands it if you do
"to_date('18-Apr-02')"
so you could include that in your sql string as well..
You could also try to make it a java.sql.Date and hope your jdbc driver knows how to convert it to a string that the database understands if you don't know the format:
con = getConnection();
PreparedStatement ps = con.prepareStatement("select date1 from table1 where date1 <= ?");
ps.setDate(new java.sql.Date(date.getTime()));
ResultSet rs = s.executeQuery(sql); -
I have a problem in converting smartform output to pdf format.
Hi,
While converting the smartform output to pdf format.
It is showing this error.
otf end command // missing in otf data.
I have used this function.
Assigning the OTFDATA to OTF Structure table
CLEAR gt_otf.
gt_otf[] = gs_otfdata-otfdata[].
Convert the OTF DATA to SAP Script Text lines
CLEAR gt_pdf_tab.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = gv_bin_filesize
TABLES
otf = gt_otf
lines = gt_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Please help me in this regard. Thanks in advance.Hi ,
I am getting this exception "err_conv_not_possible"
CALL FUNCTION f_name " '/1BCDWB/SF00000092'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = st_control_parameters
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = st_output_options
USER_SETTINGS = 'X'
ZST_TEXTSYMBOLS = ZST_TEXTSYMBOLS
wa_kna1 = wa_kna1
wa_claim_header = wa_claim_header
IMPORTING
DOCUMENT_OUTPUT_INFO = st_document_output_info
JOB_OUTPUT_INFO = st_job_output_info
JOB_OUTPUT_OPTIONS = st_job_output_options
TABLES
IT_CLAIM_VERSION = IT_CLAIM_VERSION
IT_CLAIM_ITEM = IT_CLAIM_ITEM
IT_CLAIM_PARTNER = IT_CLAIM_PARTNER
IT_FINAL = IT_FINAL
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
USE_OTF_MC_CMD = 'X'
ARCHIVE_INDEX =
IMPORTING
BIN_FILESIZE = v_bin_filesize
TABLES
OTF = st_job_output_info-OTFDATA[]
DOCTAB_ARCHIVE = it_docs
LINES = it_lines
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
HERE when i tried to debug it i got SY-SUBRC = 1.
Please help me in this regard. Thanks in advance. -
All fields with !Format event blank when printing
A client asked for assistance creating a new shipping label template with Adobe Output Designer 5.5, a program I've not used before. I had no problem creating the layout, and slapping the necessary fields on there (they had a few other templates I was able to use as examples). When I use Test Presentment from within Output Designer, the results look great - all the data fields and barcodes show up fine. When actually printing a label from Prophet 21, all the fields with !Format events defined are completely missing. I copied many of these !Formats from existing templates and adjusted them slightly to match the new label format, so I'm not sure why all those fields in the new template end up blank. I haven't made any changes to the default template preamble, which I've included below. What simple detail am I overlooking that's needed to make this work? Like I said, this is not a program I have much familiarity with, and a couple hours of experimenting and searching the web have proved fruitless.
JFPREAMBLE:
^comment ************************************************************************************
^comment * NOTE. Because the custom properties JFPREAMBLE_n
^comment * will be overwritten when you compile you should
^comment * apply your preamble overrides to the JFPREAMBLE
^comment * custom property following the reference to the
^comment * ^FILE DOCVAR:JFPREAMBLE_1 DICTIONARY below.
^comment ************************************************************************************
^FILE DOCVAR:JFPREAMBLE_1 DICTIONARY
^comment * Preamble overrides...
JFPREAMBLE_1:
^inline on
^comment ***************************************************************************************
^comment * NOTE. The JFPREAMBLE_n custom properties will be overwritten
^comment * when you compile the form.
^comment *
^comment * Preamble changes should be made to the JFPREAMBLE
^comment * custom property.
^comment ***************************************************************************************
^define group:PO_NUMBER_COMBO!Format @("K@CUSTOMER_PO_NUMBER.")
^define group:ITEM_ID_COMBO!Format @("P@ORDERED_AS_SCRIPT.")
^define group:SUPPLIER_CODE_COMBO!Format @("1456")
^define group:LOT_CD_COMBO!Format @("T@LOT_CD.")
^define group:SERIAL_COMBO1!Format @("S@PICK_TICKET_NO.@Line_Number.")
^define group:UNIT_QTY_ON_LABEL_COMBO!Format @("Q@USER_DEFINED_QTY_PER_LABEL.")
^define group:SERIAL_COMBO2!Format @("@PICK_TICKET_NO.@Line_Number.")
^define group:SUPPLIER_SERIAL_COMBO1!Format @("1456@PICK_TICKET_NO.@Line_Number.")
^define group:SUPPLIER_SERIAL_COMBO2!Format @("3S1456@PICK_TICKET_NO.@Line_Number.")
^comment
^comment **************************************************************************
^comment * End of Adobe Output Designer generated preamble.
^comment **************************************************************************Hi David,
Please send me your ifd and a sample data file so that I can investigate what is happening (log files etc.)
cheers
Chris
[email protected] -
Problem in java.lang.String.format()
Dear Experts,
I tried to display a double value with leading spaces with the following statements:
double val = 123456789.987654321;
System.out.println( String.format("%17.2f", val));They worked in void main(), but didn't in a method of a class. The following error message was found while compiling:
init:
deps-jar:
Compiling 1 source file to C:\JavaProject\ALC-EJB\build\jar
C:\JavaProject\ALC-EJB\src\java\escis\creditControl\BalanceRecord.java:61: cannot find symbol
symbol : method format(java.lang.String,double)
location: class java.lang.String
System.out.println( String.format("%17.2f", val));
1 error
C:\JavaProject\ALC-EJB\nbproject\build-impl.xml:223: The following error occurred while executing this line:
C:\JavaProject\ALC-EJB\nbproject\build-impl.xml:109: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 2 seconds)I've read the mentioned file (build-impl.xml) but still got no idea what happened.
Line 109:
<javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">Line 223:
<ejbjarproject2:javac>I'm using NetBeans IDE 4.1. Could you please give me a hand? Thank you very muchNot sure if this has got anything to do with it, but
the format() method was added to String in Java 5.0.
Maybe you are using an older version in that second
case?You're right. It works when I've changed it from 1.4 (default) to 1.5. Thank you very much. -
Convert HH:mm:ss String format.
Hi,
I have a formula in webI to display Milliseconds to HH:mm:ss and is in String format.
Is there a way to convert to date or number format?.
Also, how to calculate average of Max and Min time?.
Thanks,
JothiHi Jyothi,
To take a average time do following-
1) Convert Min Time and Max Time into Seconds.
MaxSec=ToNumber(Substr([MaxTime];1;2))*60*60+ToNumber(Substr([MaxTime];4;2))*60+ToNumber(Substr([MaxTime];7;2))
MinSec=ToNumber(Substr([MinTime];1;2))*60*60+ToNumber(Substr([MinTime];4;2))*60+ToNumber(Substr([MinTime];7;2))
2) calculate approximate Avg seconds-
AvgSec=([MaxSec]+[MinSec])/2
3) Convert AvgSec in to hh:mm:ss.
AvgTime=Floor([AvgSec]/3600 )+":"+Floor(Mod([AvgSec];3600)/60)+":"+Mod(Mod([AvgSec];3600);60)
Hope this help.
Thanks,
Anuj
Maybe you are looking for
-
Folder redirection to a new location is not working
Currently in SCM we have all Windows 8 users Documents and Desktop redirected to a users home folder in a Netapp share. We are planning on moving them to a Windows File Server. As a test I moved my home folder in AD to the new share. But SCM is st
-
How to create a Folder Tree in Exchange Server from a Java progarm.
hi all, I am using Microsoft Exchange Server 2000. I have a requirement of creating the following things from a Java program. 1) Creating a Folder Tree 2) Creating a Mailbox Store 3) Creating a Public Store 4) Creating a Recipient Policy 5) Creating
-
Look for e-recruiting install guide
I cannot find the install guide for e-recruiting at SMP. I see that ehp3 for ERP has e-recruiting. Is ehp3 the only way to have e-recruiting? Thanks!
-
Hello, Last december I purchased Photoshop CS6 from a reseller and I use this on my main OS (Win7 x64). I have an old Photoshop CS2 installer with the product key (which now doesn't work as the activation server has been disabled). Can I use this old
-
I noticed recently that the junk mail I "Bounce" goes to the trash. What is this about??? Does that mean it's not bounced but rather sent to the trash?