Lenght of a filed?
is there a command which returns the lenght of a filed???????
i want to execute an err messege when the user enter lenght grater than 4
thanks
Hi Ami Bardogo,
Try this sample code:
Parameters:
p_string(10) type c.
Data:
w_strlen type i.
At selection-screen.
w_strlen = strlen( p_string ).
if w_strlen gt 4.
message 'Please enter string with length less than 4'.
endif.
Or else, Just make the input field as
Parameters:
p_string(4) type c.
Then no need to validate.
Regards,
Swapna.
Similar Messages
-
Hi Guru's,
I am working on a my Project which has milestone based billing, i have to create an sales order of value 2400 Crores against a single line item, but maximum value that can be entered in a sales value is 999.999.999 Crores only because of the lenght of the filed KBETR is 11.One way of doing this is tht i can can enter 25 line item of 999.999.999 Crores.But by doing so i am facing problem at the time of billing.
Is there any way by which i will be able to create single line item with 2400 Crores value.
Also can u suggest the config for milestone based billing for Enginnering & Construction industries .Plz suggestHi Abhijit,
The field amount ( KBETR) has a max length of 11
In the Item Conditions screen try using the field Condition Value ( KWERT) which has a max length of 13 ,
Here the limitation would be that the quantity to be used would be one,
Hope this helps,
Thanks
Prashant -
Is it possible to increase the lenght of filed NRRANGENR-NRIV??
Hello,
Is it possible by anyway to increase the lenght of this field??
ThanksNo it is not possible and dont even try for this
thanks
G. Lakshmipathi -
Hi,
I would like to Extend the files Sales org/Division/distribution upto 40 Char.
As per Standard SAP it has provided 20 char......
and Moreover and client wants 20 char in Customer master(All filed)
Regards
RajDear Raj
No not possible to change the standard fields length. If it is a zee field, then it is possible. Moreover as you are aware fields in SD will integrate with all other modules in many places and if you change in one place, it will not be copied in all other modules and this will definitely affect the performance and throw errors which you cannot find out the root cause.
Even if you try to change forcibly with the help of ABAPer, I doubt whether SAP will support in case you have any issues arising out of this.
thanks
G. Lakshmipathi -
The Google toolbar doesn't recognize a left mouse click when selecting a 'suggestion'. It's OK using the keyboard, however. I have filed a bug report with Google, but as this is an important extension thought you should know.
See also: http://forums.adobe.com/message/4662367#4662367
-Noel -
Not able to retrieve and insert the value to Home_country filed in MDM
Hi All,
I am new to the JAVA API,
I have creted one application in webdynpro using the JAVA API. I am able to search the data based on "Firstname" "Lastname" and "Email address".
I need to basically two functionalities
1) Search
2) Insertion of new records
*1) Search*__
But searching based on the Country is not able to do it.
we have two tables .
1) Country table> Contains all the list of the country codes and County name.
2) People table > Contains the country filed. So for this filed lookup table is country. also this country filed is drop down not have opton edit in the MDM.
I am sending the following used for searching the records based on the First Name and country.
But based on the first name it is working fine but Country it is giving some code like "R100" "R12". It is not givng the actual name of the country.
FieldSearchDimension sd1 = new FieldSearchDimension(fields[2].getId());
TextSearchConstraint sc1 = new TextSearchConstraint(First_Name,TextSearchConstraint.EQUALS);
sch.addSearchItem(sd1,sc1);
FieldSearchDimension sd4 = new FieldSearchDimension(fields[9].getId());
TextSearchConstraint sc4 = new TextSearchConstraint(Home_Country,TextSearchConstraint.EQUALS);
// TextSearchConstraint sc4 = new TextSearchConstraint("IN",TextSearchConstraint.EQUALS);
sch.addSearchItem(sd4,sc4);
cmd = new RetrieveLimitedRecordsCommand(connections);
cmd.setResultDefinition(rdPeople);
cmd.setSearch(sch);
cmd.setSession(sessionId);
try
cmd.execute();
catch(CommandException e)
e.printStackTrace();
recs = cmd.getRecords();
wdContext.nodeResult_Table().invalidate();
//retreiving the Data from the resultset
if(recs.getCount()!=0)
for(int i=0;i<recs.getCount();i++)
//First Name
IResult_TableElement resEle=wdContext.nodeResult_Table().createResult_TableElement();
if(!(recs.getRecord(i).getFieldValue(fields[0].getId()).isNull()))
//wdComponentAPI.getMessageManager().reportSuccess("Network Id-->"+recs.getRecord(i).getFieldValue(fields[0].getId()).toString());
resEle.setNetwork_ID(recs.getRecord(i).getFieldValue(fields[0].getId()).toString());
//Country
if(!(recs.getRecord(i).getFieldValue(fields[9].getId()).isNull()))
resEle.setDisplay_Name(recs.getRecord(i).getFieldValue(fields[9].getId()).toString());
wdContext.nodeResult_Table().addElement(i,resEle);
By the above field is not giving the respective country name is avilable. it is giving some value"R100" rather giving of India.
_ 2) For creating the record in the "people" table._
I am able to insert the data all the information "firstname" "Last name", "email" except "Country" entered by the user by using the following code.
//Insert
First_Name=wdContext.currentPersonal_DetailsElement().getAttributeAsText("First_Name");
Last_Name=wdContext.currentPersonal_DetailsElement().getAttributeAsText("Last_Name");
Middle_Name_or_Initial=wdContext.currentPersonal_DetailsElement().getAttributeAsText("Middle_Name_or_Initial");
Home_Country=wdContext.currentPersonal_DetailsElement().getAttributeAsText("Home_Country");
CreateRecordCommand createRecordCommand =new CreateRecordCommand(connections);
Record r1 = RecordFactory.createEmptyRecord(tables[0].getId());
try
// Retrieve Lookup Field Properties, when Field Properties is given as input.
// LookupFieldProperties lookupField = (LookupFieldProperties) fields[9];
//// Retrieve Lookup Field Properties, when Field Properties is given as input.
// LookupFieldProperties lookupFieldSer = (LookupFieldProperties) fieldProp;
// //setting the values for firstname and lastname
r1.setFieldValue(fields[0].getId(),new StringValue(Network_ID));
r1.setFieldValue(fields[2].getId(),new StringValue(First_Name));
r1.setFieldValue(fields[3].getId(),new StringValue(Last_Name));
r1.serFieldValue(FieldValue(fields[9].getId(), new Stringvalue(Home_country));
createRecordCommand.setSession(sessionId);
createRecordCommand.setRecord(r1);
try {
createRecordCommand.execute();
} catch (CommandException e2) {
Let me know what are the changes need to be done for inserting the country information in people table.Hi Greg,
Thanks for the reply,
Actually,I was doing the same thing what you suggested. I am sending the piece of code . Can look it it .Is any thing wrong.
//inserting the Country lookup filed to record object.
* if(Home_Country.length()!=0)*
* /when pass the int position number for the country by retreiving from the country table it is working fine. But we cannot depend on position. Because People table internally refering the other db table while inserting the country filed in the People table./ *
* r1.setFieldValue(fields[9].getId(),new LookupValue(new RecordId(12)));*
* //When i PAss the String to the following function i am getting the unsupportedFormat Exception *
* r1.setFieldValue(fields[9].getId(),new LookupValue(new RecordId("Australia")));*
InCountry . They have defined only two columns called.
1) ISO-2 Code
2) Country Name.
Sample data
ISO-2 Code | Country Name
US United StatesOf America
AU Australia
Ar Argentina
Like the above data we have 250 country names
So , I displaying all the country list in my interface and holding in the Array.
Ex: When the user chooses the Australia. When I pass directly as an "Australia" to
r1.setFieldValue(fields[9].getId(),new LookupValue(new RecordId("Australia"))). it is giving me error.
Then i try to pass the postion of the"Australia" in country table. Like if the Austrila is an 2 record. I am looping through my array and find the record position as "2".
I am passing as
r1.setFieldValue(fields[9].getId(),new LookupValue(new RecordId(2)));
It is inserting into the people database. But not an Australia. It is inserting as "Argentina".
When the record inserting in people table refering some table at the database level , that table called "A2i_16_TEXT" This contains three columns.
A2i_16_TEXT(columns)
1) Id
2) LangId
2) Field Id
4) TextField
Example Data
Id | LangId | Textfield
3 0 Australia
2 0 Argentina
4 0 United States Of America
As i am showing the above table for "Argentina" Id is "2". When i pass the 2 for inserting the country filed.Instead of inserting "Australia". It is inserting the "Argentina" by refering this table.
Through MDM API we are not able to access this " A2i_16_TEXT" table. Because it is maintaining at the db level to find the perticular id for the respective country before inserting in to the people table.
So kindly suggest me how to solve this problem. What i am doing in the code is correct or not.
Regards
Vijay -
Can not change user filed in CR Viewer
I am using Crystal Reports 2011 and i created a user field. i opened the report in CR viewer 2008 and the change filed is greyed out and the user can not change the field. I have tried saving the report with out a date saved in the report to see if viewer will prompt for a date but the report will not let me take it out now that it is set. i have checked options on the filed and it is set to editable. Is there something i am over looking? How can i get the user fields to work in crystal reports viewer?
thanks for helping.
viewer 2008 is the only thing i can find right now, i thought that might be the problem but i can not find a 2011 to download so i assumed they dont have it available yet.
the report does work in CR2011 but we can not get CR for everyone, and they are not going to use it, they only need viewer if it will work.
the parameter is a date field based off a database field.
thanks.
angel -
Dynamic Sorting on Multiple filed in Crystal report 2008
Hi
I am using Crystal report 2008 sp3 full build with hotfix 3.3 along with ASP.NET 2.0
I have implimented the multi filed sorting using the record sort export and setting the sort order in the report designer.
Now my requirement is such that i would like to have dynamic sorting on multiple fileds while report is displayed in the UI.
Means suppose i have a report with Customer region,name,city,rating,status etc.
Now by using the sort control i would like to have the functionality in such a way that if user
a) first sorts on the region then the records should be first sorted by region
b) then sorts on the city then the records should be sorted first by region then by city
c) now sorts on the rating then the records should be sorted first by region ,second by city and then by rating
Now other user may do
a) first sorts on the rating then the records should be first sorted by rating
b) then sorts on the status then the records should be sorted first by rating then by status
c) now user sorts on the region then the records should be sorted first by rating,second by status and then by region
and so on the sorting criteria changes from user to user through the UI.
Is there any way to achieve the dynamic kind of sorting with Crytsal report 2008 where we can set the order of the fileds at sorting in UI dynamically .The sorting order of the fields are not known at the time of design of the report and its completely depends on the user's need.
Please let me know if you require any information on the same.
Regards,
smithaHello,
Good Day!
Thanks for your answer.
Could you please explain me in detail how to achieve this functionality?
Do i need to create a static parameter?
I get my data set through the command option in crystal report.So i think i need to go by formula in the report.
i am just putting down the steps to follow.Please correct me if i am wrong.
step1 :Create s static parameter with the name SORT.
step2: create the formula as you have mentioned like
(IF {?Sort}='Vendor Number' THEN {Pr_Voucher_Status;1.Vendor_Key}& " "& {Pr_Voucher_Status;1.ap_remt_key}
& " " & {@date}
else
IF {?Sort}='Invoice Number' THEN {Pr_Voucher_Status;1.ap_vchr_invno}& " " & {Pr_Voucher_Status;1.Vendor_Key}&
" " &{@date}
else
IF {?Sort}='Invoice Amount' THEN {Pr_Voucher_Status;1.ap_vchr_amtc}& " " & {Pr_Voucher_Status;1.Vendor_Key}&
" " &{@date})
I could not understand what this formula is really doing .
Could you please tell me what the following names indicates? :
Pr_Voucher_Status :- Table/Command name ??
Vendor Number,Invoice Number etc.. :- ??
Vendor_Key,ap_vchr_invno,ap_vchr_amtc .. :- Filed names ??
use of 1.{} :- ??
step3: place the below formula in the page header to display the sort order
(if {?SORT}='Vendor Number' then "Vendor Number, Remit To, Invoice Date"
else if {?SORT}='Invoice Number' then "Invoice Number, Vendor Number, Invoice Date"
else if {?SORT}='Invoice Amount' then "Invoice Amount, Vendor Number, Invoice Date") .
Note:-My report does not have grouping.Do i need to have grouping?
in this case how the sort control will work ?
As i have mentioned in the first post the order of sorting is completely depends on the user's perspective .
The report is used by the whole organization ..
i mean the people with different roles like Manger,Team leads,modul leads,developers ,testers etc..
the usage of report varies according to the roles so the sort order also.
Regards,
smitha.
Edited by: smitha thomas on Mar 16, 2011 5:01 AM -
XI 3.0 E-Filing GB R/3 RFC configuration to XI
Hi
Please could anyone advise me on the following. I am currently in the process of implementing E-Filing GB in XI 3.0 and I am stuck on what the RFC configuration should be in the R/3 Business System for the XI 3.0 configuration of E-Filing . I have referred to the blog [/people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies |/people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies ] and I want to confirm whether the PI 7.1 RFC configuration in the R/3 system would be the same for XI 3.0 as there is no clear SAP documentation about this. We had previously been using Business Connector for E-Filing.
Many Thanks
RosieYes in PI 7.1 also the same is applicable.
As mentioned in blog -
Create RFC destination (TCP/IP) LCRSAPRFC and SAPSLDAPI for the SLD connection in R/3.
Same all settings u do. -
HOW CAN I SET AN ITEM LENGHT IN CODE !!!
hi
i want to set an item lenght by code!!!! and not by using " property palette". i want to use it in the pre-insert/update trigger . i tried to use "set_item_property" but i didnt find any parameter that can solve my problem.
Please help me it is very important .
thanks .i will try to explin myself i want to let the user to enter only 40 characters despite the fact that the text item can get up to 70 char ( the text item is based on DB column that is varchar2(70)) and i want to limit the user to 40 char because i take the item he updated or insered from the oracle DB and load it to another DB there the same column is in type varchar2(40) and i want to limit the user insted of substructing the string he is inserting.
-
URGENT HELP REQUIRED - E-filing for GB - IMG CONFIG
Hi
We are on ECC 6.0 and have just installed XI. I am trying to complete the SAP IMG Config, however there is limited documentation about this, particularly the constants and e-mail content.
Does anyone have any useful (ideally step by step) documentation on how to complete the customisation?
Your URGENT assistance is greatly appreciated.
Thanks
MichelleHi refer theses links
http://help.sap.com/saphelp_erp2005/helpdata/en/cd/5a0641f753f523e10000000a155106/frameset.htm
EOY2007 GB (E-Filing) -
How to create flat file with fixed lenght records
I need help to export an Oracle table to a flat file with fixed lenght and without columns separator.
the fixed length is the more important demand.
My table have 50 columns with varchar, date and number .
Date and number columns may be empty, null o with values.
Thanks a lot for any help.
[email protected]Hi,
You can use this trick:
SQL>desc t
Name Null? Type
NAME VARCHAR2(20)
SEX VARCHAR2(1)
SQL>SELECT LENGTH(LPAD(NAME,20,' ')||LPAD(SEX,1,' ')), LPAD(NAME,20,' ')||LPAD(SEX,1,' ') FROM T;
LENGTH(LPAD(NAME,20,'')||LPAD(SEX,1,'')) LPAD(NAME,20,'')||LPA
21 aF
21 BM
21 CF
21 DM
4 rows selected.
SQL>SELECT * FROM t;
NAME S
a F
B M
C F
D M
4 rows selected.Regards -
Difference between -1 and null in the targettype filed
Hi
Could anyone advise what is the difference between -1 and null in the targettype filed in marketing documents?
For example, in Sales Quotation - Rows (QUT1) table, I found for some open sales quotations, the field is null however the DB help file suggest the default value is -1 so I suppose it should be -1 for open documents.
Many thanks for your advisory.Hi, Qian!
I investigated that "-1" value appears in targettype field in Sales Quotation Rows (QUT1 table) when you Dublicate a Sales Quotation document (Ctrl + D). And NULL value appears when you create a new document without dublicating.
In case you want to equal these 2 "empty"-values using T-SQL, you can use ISNULL(targettype, -1) function - this will give you -1 for both the "empty"-values
HTH!
Message was edited by: Aleksey Kuznetsov -
Info package ABAP Routine to populate date from and To filed
Hello Experts,
I have requirement to populate the From and To dates with the: T-1 to T (Current Date u2013 1 to Current Run Date aka Sy-Datum) at info package level.I have written a code for this but see that From filed is not getting populated but TO filed is filled with current date.Can someone please tell me wats wrongwith my code?It is a delta info pacakage.
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = 'CPUDT'.
l_idx = sy-tabix.
l_t_range-sign = 'I'.
l_t_range-option = 'BT'.
l_t_range-low = sy-datum - 1.
l_t_range-High = sy-datum.
modify l_t_range index l_idx.
p_subrc = 0.
Thanks,Was able to tackle this using the following code.
data: l_idx like sy-tabix.
data: V_date type sy-datum.
v_date = sy-datum - 1.
read table l_t_range with key
fieldname = 'CPUDT'.
l_idx = sy-tabix.
l_t_range-sign = 'I'.
l_t_range-option = 'BT'.
l_t_range-low = v_date.
l_t_range-High = sy-datum.
modify l_t_range index l_idx.
p_subrc = 0.
Thanks,
I am closing this thread -
Copy values from a filed to another in different blocks in same table
Hi All,
How to copy value from a filed to another field in different blocks in same form ?
example if i change value in Field A of block 1 it should reflect in Field B block 2 and again if i change in Field B block 2 it should reflect in Field A of block 1.
values will change twice or thrice then it will not change. It is happening like that.
how to do this ?
RegardsSame table / different blocks
I guess, both blocks will be marked for update, and when your user presses commit, the same table will be updated twice!
Are you sure that this is what you want to do? Is the same record current in both blocks? If so, you better use 1 block (it can be spread over several canvases and windows) and synchronize the items with the "synchronize item" property.
Anyway: If you can't apply the synchronize-property bcos the items are in different blocks, you can synchronize with 2 when-validate-item triggers.
Wolfram
Maybe you are looking for
-
I rented two movies from iTunes using my iPad. They show us as purchased but will not run from there. I get a message saying I have 24hours to watch then it just goes back to iTunes. I looked in video app where they usually go and nothing is there. A
-
Is it possible to migrate the app from latest version to older version
Hi all, I have a adf application in jdeveloper 11.1.1.4.0.Due to some issues i have to do it in jdeveloper 11g release 2 (11.1.1.2.0).Is it possible to migrate the application from latest version to older version of jdev. Thanks.
-
PXIe-8101 Unable To Compile Code
Hello, My system is a PXIe-1065 chassis (I've also had the same issue in the PXIe-1082 chassis), PXIe-8101 controller with Windows 7 installed by NI, and the following instruments: DMM PXI-4071, Power Supply PXI-4110, DAQ PXIe-6356, Timing Card PXIe-
-
Outbound status to delete XML messages in PI
Hi, we are using a deletion process in PI wiith the pg RSXMB_DELETE_MESSAGES but the XML messages with a outbound status = 1 cannot be deleted. It seems that the pg SXMS_REFRESH_ADAPTER_STATUS permits to change the status to 6 but does not work for m
-
Connecting php with oracle9i database
i tried to connect to oracle 9i database after creating dsn name as studentphp with username admin and passwd admin by using the following command and i got the following error. pls suggest me some solution $link=odbc_connect("studentphp","admin","ad