IMG - View maintenance - How to define generic length of a field?
Hi there,
within a viewcluster I want to define one field length generic dependet of an entry within another view of the viewcluster.
Have anybody an idea how to solve this issue of generic field length?
Kind regards, Kathrin
Re: 2 or more update views same dynpro o screen
Similar Messages
-
How to restrict the length of input field
Hi,
How to restrict the length of input field. That is we should not be able to enter more thatn 10 charecters.
Regards,
H.V.SwathiHi swathi,
For this you have to create a simple data type. No need of writing a code.
Go to Dictionaries -> Local Dictionary -> Data Type - > Simple Type - > Right click and "Create Simple Type".
Here you should create a Simple type with String as built-in Type. Here you will also see the Length Constraints option.
Set the value of maximum length and minimum length. In your case set the value of maximum length to 10. At runtime this will not allow the user to enter more than 10 characters.
Now create an attribute and bind it to this newly created simple type. Bind the value of the input field with this particular attribute.
Regards
Manohar -
How to get the length of a field.
Hi all,
I m working on dynamic internal table.There is a need to get the length of a field, filled dynamically.How can we get it.
Thanks in advance.
Regards,
Swati gargSwati,
DATA: text(8) TYPE c,
len TYPE i.
DESCRIBE FIELD text LENGTH len IN CHARACTER MODE.
Field LEN contains the value 8.
================================
For ouput length :
DATA: float TYPE f,
out TYPE i,
len TYPE i.
DESCRIBE FIELD float LENGTH len OUTPUT-LENGTH out.
This example results in the field LEN containing the value 8, while the field OUT contains the value 22.
Don't forget to reward if useful..... -
How to get the length of a field value, not the length of DB's CHAR(20)
Hello.
I'm trying to handle a String from my DataBase and get its length:
String myName;
int i;
PreparedStatement sql = Conn.prepareStatement("SELECT NAME FROM MY_TABLE");
ResultSet results = sql.executeQuery();
results.next();
myName = results.getString("NAME");
i = myName.length();
out.println("The value is " + myName + " and the length is " + String.valueOf(i) );
I get:
" The value is Tom and the lengh is 20 "
20 is the length of the field (it's a CHAR (20) ), but I would like to get the length
of 'Tom'.
On other hand, I would like to detect if this value is 'Tom' or not, but trying with:
if (myName.equals("Tom")) {...}
or
if (myName == "Tom") {...}
There is no response.
Any experience?myName = results.getString("NAME");
if(myName!=null) myName = myName.trim(); //Take out trailing spaces
i = myName.length();Sudha -
How to check the length of a field symbol value
hi all,
i have a problem with string function, i have assined table fields to a field symbol in a loop i want check the length of the assigned fields symbol value in every loop . i have written like ,,,,,len = strlen( <fs>). then i am getting the length of the field label what i ahve assigned to fiels symbol not the field value lenght ,
please advise me on this,
thanks,
sreI think you're on the right track. This should work:
data: len type i.
data: begin of itab OCCURS 1,
a type string value '1',
b type string value '12',
c type string value '123',
end of itab.
FIELD-SYMBOLS: <fs> type ANY.
do 3 times.
assign component sy-index of STRUCTURE itab to <fs>.
len = strlen( <fs> ).
enddo. -
How to define generics in interfaces
I want to define an interface for Person, which has 2 attributes, 'Owner' and 'Access', but these attributes may be different types for different implementations of the interface. I have another interface that takes Person, so I have something like this:
public interface Person<O, A>
public abstract O getOwner();
public A getAccess();
public interface Entry
public void addPerson(Person<?, ?> person);
}I then have a base Entry implementation that does
import java.util.ArrayList;
import java.util.List;
public abstract class BaseEntry implements Entry
protected List<Person<?,?>> persons;
public void addPerson(Person<?, ?> person)
if (persons == null)
persons = new ArrayList<Person<?,?>>();
persons.add(person);
}and finally I have a concrete class that wants to use Entry and Person interfaces to do somthing like
public class RealEntry extends BaseEntry
private int personCount;
public void addPerson(Person<String, String> person)
super.addPerson(person);
personCount++;
}and I might have another implementation that does
public class ListEntry extends BaseEntry
public void addPerson(Person<String, List<String>> person)
super.addPerson(person);
}but the concrete implementations do not compile in Eclipse with the message
Name clash: The method addPerson(Person<String,String>) of type RealEntry has the same erasure as addPerson(Person<?,?>) of type BaseEntry but does not override it
I've read the generics tutorial, but it's not helped me. I'm not absolutely certain I should be using wildcards as opposed to generic method.
Anyone know what I'm doing wrong?
Thanks
AntonyHi Stefan, I see how your example breaks things, thanks.
My 'Entry' is a simple queue class. I compiles OK if I add the O, A to Entry and implementations, i.e.
public interface Entry<O, A>
public void addPerson(Person<O, A> person);
}but it seems strange (to me) that I have to define the O, A types for the Entry interface - it makes it cluttered. I thought it should be possible to have a generic Entry interface that takes a Person objects without having to tell Entry the subtypes of classes that make up the O and A inside Person.
I could be trying to do something impossible, but I something think it has to be possible as it seems such a common type of usage, i.e. I can have many classes that all define different types of Person implementations and can store them in Entry implementations. -
File Sender, Content Conversion - how to define variable length last field?
XI 3.0 SP17
With a File Sender communication channel, that uses Content Conversion - how do I define a 'variable length' last field?
The scenario - the input file has four fields, of which the first three are a known fixed length, and the last (fourth, trailing) field is variable in length.
Using a Message Protocol of 'File Content Conversion', how do I define that last variable length field (field name 'WOData' below) in the Content Conversion Parameters section?
My current parameters are:
Recordset Structure - Row,*
ignoreRecordsetName - true
Row.fieldFixedLengths - 1,12,5,99999
Row.fieldNames - WOType,WONum,WOLine,WOData
I've tried the following for 'Row.fieldFixedLengths' to no avail -
'1,12,5,*'
'1,12,5,0'
'1,12,5,'
'1,12,5'
The last two were grasping at straws )
The only thing I've got to work is specifying a 'large' value for the final field (99999 above).
In addition, does anyone know if specifying a large value (e.g. 99999) for the final trailing field will give rise to performance issues when the file is being processed?
In the help for "Converting File Content in a Sender Adapter", it states -
<Begin Quote>
NameA.fieldFixedLengths
If you make a specification here, the system expects a character string that contains the lengths of the structure columns as arguments separated by commas.
If you also specify a separator for the columns, you must not add its length to the length of the columns.
This entry is mandatory if you have not made an entry for NameA.fieldSeparator.
<End Quote>
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm<< note that fieldFixedLengths will not take any wildcard entries like *. So in these case it is ideal to provide a maximum char length. But note that while the file is being created that many spaces will be created in your file !!! >>
Hi Shabarish,
Yes, no wildcard is the conclusion I came to, hence my maximum )
The message size did not increase by any 'blank padding'. When I look in [Message Display Tool (Detail Display)] 'Audit Log for Message: X' -
2006-10-17 18:22:42 Success Channel X: Entire file content converted to XML format
2006-10-17 18:22:42 Success Send binary file "X" from FTP server "X", size 103290 bytes with QoS EO
2006-10-17 18:22:42 Success Application attempting to send an XI message asynchronously using connection AFW.
2006-10-17 18:22:42 Success Trying to put the message into the send queue.
2006-10-17 18:22:42 Success Message successfully put into the queue.
2006-10-17 18:22:42 Success The application sent the message asynchronously using connection AFW. Returning to application.
The input flat file in non-XML format was 92,132 bytes and the message payload into XI was 103,290 bytes.
My understanding is that trailing spaces are stripped from XML nodes. -
IMG - View maintenance - View suppress existing entries and do not save
Hi there,
within the customizing maintanence I wanted to change a view cluster with an existing view (within transaction /simgh). But after replacement of the vc with the view the view do not show any existing entries and do not save my new entries.
I already regenerate the whole view again, but the behavior do not change.
I also deleted the whole maintenance dialog and generated again, but the behavior do not change.
Now when I access the view, only a number of rows are changeable but empty (number of these entries = number of existing entries) and when I save a new entry, the whole line shift to the end, of empty changeable (open) lines and when I access the screen again, this entry is not saved and not displayed.
Have anybody an idea how to solve this?
Kind regards, Kathrin
Edited by: Kathrin Gossmann on Mar 12, 2009 1:28 PM
Edited by: Kathrin Gossmann on Mar 12, 2009 1:29 PMHi,
There is nothing called as basic list in web dynpro
There are 2 ways of displaying more than one record (internal table data) in either ALV or Table.
Using ALV you have an advantage of directly downloading onto excel.
You need to process success and error records separately into 2 internal table, show them in 2 ALVs differently with 2 messages, so that the users can directly download them on to excel file as ALV provides it.
If the user does not want the records (success or error) ones, if the user wants only a message with number of records uploaded/not uploaded then you do not require them to display it in ALV, you can just give them a message.
In this case you can hide the ALV and only display messages in a single view or based on radio button. 2 views or not required.
In the selection screen itself, you can show the number of records uploaded/not uploaded.
Hope this helps. -
How to define an itab including a field-symbols
*Please see below code, I define a field-symbols structure <wa>:
FIELD-SYMBOLS: <wa> TYPE ANY.
data: wa type ref to data.
create data wa type (p_table).
assign wa-> to <wa>.
My question is after <wa> get assigned, if I want to define a new internal table or structure which should include <wa>, like below:
data: begin of itab occurs 0.
include structure <wa>.
data: status type c.
data: end of itab.
But it doesn't work. How can I do that?
Thank you very much!Hi Yu,
Just check with this example, u will get a good idea.
PROGRAM ZMAIN.
DATA: BEGIN OF STR,
A VALUE 'a',
B VALUE 'b',
C VALUE 'c',
D VALUE 'd',
END OF STR,
CN(5) VALUE 'D'.
FIELD-SYMBOLS <FS> TYPE ANY.
DO 3 TIMES.
ASSIGN COMPONENT SY-INDEX OF
STRUCTURE STR TO <FS>.
IF SY-SUBRC <> 0. EXIT. ENDIF.
WRITE <FS>.
ENDDO.
ASSIGN COMPONENT CN OF STRUCTURE STR TO <FS>.
WRITE <FS>.
2.
TYPES: BEGIN OF comp,
f1 TYPE string,
f2 TYPE i,
END OF comp.
DATA: BEGIN OF stru,
k1 TYPE comp,
k2 TYPE comp,
k3 TYPE comp,
k4 TYPE comp,
END OF stru.
FIELD-SYMBOLS: TYPE comp.
ASSIGN stru-k1 TO RANGE stru.
DO 4 TIMES.
ASSIGN INCREMENT 1 TO .
ENDDO.
PROGRAM P1MAIN.
TABLES TRDIR.
DATA NAME(30) VALUE 'TFDIR-PNAME'.
FIELD-SYMBOLS <F> TYPE ANY.
MOVE 'XYZ_PROG' TO TRDIR-NAME.
PERFORM U IN PROGRAM P1SUB.
ASSIGN (NAME) TO <F>.
WRITE <F>.
CALL FUNCTION 'EXAMPLE'.
PROGRAM P1SUB.
TABLES TFDIR.
FORM U.
FIELD-SYMBOLS <F> TYPE ANY.
DATA NAME(30) VALUE 'TRDIR-NAME'.
ASSIGN TABLE FIELD (NAME) TO <F>.
WRITE <F>.
MOVE 'FCT_PROG' TO TFDIR-PNAME.
ENDFORM.
FUNCTION-POOL FUN1.
FUNCTION EXAMPLE.
DATA NAME(30) VALUE 'TRDIR-NAME'.
FIELD-SYMBOLS <F> TYPE ANY.
ASSIGN (NAME) TO <F>.
IF SY-SUBRC = 0.
WRITE <F>.
ELSE.
WRITE / 'TRDIR-NAME cannot be reached'.
ENDIF.
ENDFUNCTION.
PROGRAM P1MAIN.
TABLES TRDIR.
MOVE 'XYZ_PROG' TO TRDIR-NAME.
CALL FUNCTION 'EXAMPLE'.
FUNCTION-POOL FUN1.
FUNCTION EXAMPLE.
DATA NAME(30) VALUE 'TRDIR-NAME'.
FIELD-SYMBOLS <FS> TYPE ANY.
ASSIGN LOCAL COPY OF MAIN
TABLE FIELD (NAME) TO <FS>.
IF SY-SUBRC = 0.
WRITE <FS>.
ELSE.
WRITE / 'Cannot find TRDIR-NAME'.
ENDIF.
ENDFUNCTION.
Regards,
Kumar -
How to define the format for numeric field ?
Hello
I have Amount field and I would to define the format to be ( XX.XXX,000 )
How can I do this ??
I'm new in ADF and need your help ..
rgrds
Edited by: moh3li_pal on Mar 1, 2010 8:05 AMi have the same problem i try with pattern "###,###.##" but the application adf is the inverse "###.###,##" , this a bug or the pattern errornious.??Hi Joaquin. This is not a bug, although this is a little difficult to explain without face-to-face communication :D The confusing thing here is the difference between the 'special pattern characters' and actual output characters (which are chosen based on your locale).
If you check the Java DecimalFormat class (which provides the rules for formatting) you'll see the following:
Using , in the pattern = Grouping separator
Using . in the pattern = Decimal separator or monetary decimal separator
According to your locale, the grouping separator is '.' and the decimal separator is ','. So the pattern you have specified does dictate that you should get the result you have found.
You either need to change your locale settings (best option) or cheat by switching the , and . in your pattern. -
How to get generic delta using timestamp field
Hi All,
i have created a generic datasource using tables vbrp,vbrk.mara,marc,knvv.. to get the sales data for planning.Here i have document created date and time.So i'm concatinating these 2 date and time fields into timestamp which is of format yyyymmddhhmmss.Finally i'm using this timestamp to extract data .
So is it the right way to pull the data using timestamp and what is the timezone i need to specify as the servers are in india only.
or any other way to proceed.
Thanks
Rao.Hi Rao,
Delta based on timestamp based on generic datasource only works if any one of the tables contains timestamp field(not time and date fields separately).
I dont think by combining date & time fields will give you correct results.
Regarding time zone: Use SAP system time zone.
Srini -
How to define Length of char. and KF
During infoobject creation, how to define the length of char. and KF, is it related to master data text length ? Should we take other things into account? When we see one field in table, the length of the field was defined with 2, but its master data text length was more than 2, what's the reason for this things?
Edited by: hi ni on Apr 18, 2008 12:12 PMhi,
how to define the length of char. and KF, is it related to master data text length ?
ther business will have defined length and type for any characteristics. ex - Materail number may have lenth of max 15 and is Char type.
but for text max size is by default 40 chars.
Should we take other things into account?
get spec from client, that could be better and also consider the field used to map ur char/KF from source system.
Ramesh -
How to generate view maintenance
Hi Experts,
wat do u mean by view maintenance,
how to do view maintenance for function pool,
please let me know about this as soon as possible.
i have a big issue on this.
Thanks in advance
SrinivasHello Srinivasulu
Report RSVIMT_UC_VIEW_MAINT_GEN is used to unicode-enable already existing views. Thus, if you have the function pool (containing the views) run the report (transaction SA38) with your function group and a transport request. The report will display the views that need to be re-generated in order to become unicode-enabled. Execute the generation. The report will put the required objects into the transport request.
Please note that this report will NOT take care of any unicode errors in FORM includes in the function group that you have added (e.g. when you modify the views using time points).
To find out if your function group is completely unicode-enabled run transaction UCCHECK with your function group (probably you select here for the package).
Regards
Uwe -
How to change the lenth of existing field in sap standard table
Hi all,
can anybody help,my requirement is, how to change the length of existing field in sap standard table....
thanks in advance..Which field are you thinking of in particular? Are you wanting to increase or decrease the length?
Some fields are used so extensively that a change to their length will mean adjusting many tables, some of them potentially very large, and hence taking a long time to adjust.
Some standard SAP programs expect certain fields to be of specific lengths and won't work if the length is changed.
Some screens could cease to work.
If you decrease length, then you could lose data.
matt -
how to define a schema for fixed length consisting of multiple records of different types having header detail and footer at positions 22 and 23 namely having 10 for header ,20 for detail and 30 for footer.
here is the sample file
DDWTYBILL13092502572 1000000112\\NHLSFS\ORACLE\ORACLE\BILLING\VERIFY\ 2013/09/25 01:19:08 BILLEND
DDWTYBILL13092502572 2000000212PRIVATE PRIVATE STY5572142 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNM DIMPHANA,CN,CELESTE NERINA 09-JAN-1964 TYG A2 DR DU PREEZ 5602181 63301345 TB731543 Suspect TB ?CA, (L) EMPIEEM Ward A2 TYGERBERG HOSPITAL Z03.0 Z03.9 05-AUG-201305-AUG-201324-SEP-2013FEND 113.60
DDWTYBILL13092502572 2000000312PRIVATE PRIVATE STY5572149 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNM DIMPHANA,CN,CELESTE NERINA 09-JAN-1964 TYG A2 DR DU PREEZ 5602181 63301345 TB731548 Empyema BPF Ward A2 TYGERBERG HOSPITAL Z03.9 Z03.9 05-AUG-201305-AUG-201324-SEP-2013FEND 113.60
DDWTYBILL13092502572 2000000412PRIVATE PRIVATE STY5572351 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNM DIMPHANA,CN,CELESTE NERINA 09-JAN-1964 TYG A2 DR DU PREEZ 5602181 63301345 TB731584 Suspect TB ?EMPIEEM, ?CA Ward A2 TYGERBERG HOSPITAL Z03.0 Z03.9 05-AUG-201305-AUG-201324-SEP-2013FEND 113.60
DDWTYBILL13092502572 2000000512PRIVATE PRIVATE STY5572352 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNM DIMPHANA,CN,CELESTE NERINA 09-JAN-1964 TYG A2 DR DU PREEZ 5602181 63301345 TB731585 Suspect TB ?EMPIEEM, ?CA Ward A2 TYGERBERG HOSPITAL Z03.0 Z03.9 05-AUG-201305-AUG-201324-SEP-2013FEND 113.60
DDWTYBILL13092502572 2000000612MAJOR MAJOR STY5577530 010700 INV 12ZTYG000009 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNS ZOZI,S,SIYAMBONGA 27-MAR-2010 TYG D3 DR MAHOMED 5602181 113799662 TB731663 Lymphadenitis Ward D3 TYGERBERG HOSPITAL I88.9 Z03.9 H1 07-AUG-201307-AUG-201324-SEP-2013MEND 58.52
DDWTYBILL13092502572 2000000712MAJOR MAJOR STY5577537 010700 INV 12ZTYG000009 06-AUG-20130000010472 STY STY 1100611006MGIT 91 NNS DLAMINI,N,NTLANTLA 09-OCT-1976 TYG F1 DR WZESE 5602181 135524676 TB731666 Suspect TB Ward F1 TYGERBERG HOSPITAL Z03.0 Z03.9 H1 07-AUG-201314-AUG-201324-SEP-2013MEND 58.52
DDWTYBILL13092502572 30003034120000003032ENDYou can create an nXSD using Native Format Builder and use lookAhead attribute to read values at specific position and use that as the choice. You can find an example here
http://docs.oracle.com/cd/E11036_01/integrate.1013/b28994/nfb.htm#BGBBAJFD
Maybe you are looking for
-
Please help me It is drivng me crazy having all these contacts
-
Organizer will not open in PSE 8
I installed PSE version 8 in my new laptop two weeks ago. Everything was working fine until I uploaded some photos to be shared in Kodak Easy Share. They did not upload completely and I received a message asking if I would like to try again - or tr
-
Need replacement DVD writer for M70-191 .
My DVD writer on my M70-191 (a Ma****a UJ-8415) is refusing to recognise most CD's and fails when trying to burn DVD's, with various errors. Tried different types and different burning software. Reinstalled drivers, cleaned drive. No luck. So, I'm lo
-
I want to publish/share my Premiere Elements 11 video such that I can store it on Amazon S3 and then link to it in my blog, facebook, autoresponder. I know I DON"T want the Online settings because I am not directly uploading to YouTube, etc. There a
-
Is it possible to drag and drop files into flash?
Hi, Im making an upload control that will upload files from the user computer to the server Right now the user choose the files with the 'Browse for files dialog'. I want that the user will be able to drag and drop files to the control instead. Is it