Formula to split a number
Hi,
I have a value in the field e.g. XXXYYYYZZZ coming from the R3. I just want to populate YYYY in the BW. What could be the right formula for this.
Note: XXXYYYYZZZ is a number. So, when I tried substring then a string value ABCD is populated in BW.
Kindly help. Thanks,
you can use the std formula LEFT (Length, String ). which would bring the first 4 chars of the string.
Similar Messages
-
Is it possible to split a number off family plan and start separate account?
is it possible to split a number off family plan and start separate account?
I was just coming to check how to do this.
I added my mom and step dad to my account now want them off. I pay the majority of the bill and it's getting expensive. Just found out my mom get's a big discount through her work. 26% of bill, $50 dollars off of Smartphones, plus her company will reimburse her $65 a month towards her bill. Can't believe I've been paying all this time. -
Queue SYSFAIL after message split "Whole number overflow on addition"
Hi,
I'm using a message mapping in PI 7.1 to split a message in several messages for each line of an invoice. It's a mapping 1 to 0..n. Everything went well since I had maximum 100 invoice lines to split (then 100 messages at the output of the mapping).
But since I have now messages with 200 invoice lines, everytime the queue is stopped in SYSFAIL status with a message "Whole number overflow on addition". But all messages are processed even if the queue is stopped.
ST22 gives me a COMPUTE_INT_PLUS_OVERFLOW in the method determin_message_size. It seams that PI doen't support a large message at output of a mapping. How can I split the message into multple messages at the outplut of a message mapping ?
Does anyone have a solution ?Hi,
I guess you can use the Message Packing feature.
See below the links to help you:
http://help.sap.com/saphelp_nwpi711/helpdata/en/46/7ef9124f176be3e10000000a155369/frameset.htm
http://help.sap.com/saphelp_nwpi711/helpdata/en/46/7a6e3469454b2be10000000a155369/frameset.htm
http://help.sap.com/saphelp_nwpi711/helpdata/en/46/79e8e13872275ae10000000a11466f/frameset.htm
Regards,
Caio Cagnani -
Formula variable to compute number of Months
Hi Guyz,
I have created a formula variable( Custom exit) to compute the number of months, and the field used is 0CALMONTH, below is the code, but am not getting the required value.
The scenario is : 0CALMONTH: if the range entered is 022010 042010
ZAVERAGE value should 2, but the value is showing as 0 , Please help .
When 'ZAVERAGE'.
clear l_s_range.
*call function 'MONTHS_BETWEEN_TWO_DATES '
if i_step = 2 .
data: yrd(2) ,
mmd(2).
Read table i_t_var_range into loc_t_var_range with key vnam = '0I_CALZ1'.
yrd = loc_t_var_range-high3(4) - loc_t_var_range-low3(4).
yrd = yrd * 12.
mmd = loc_t_var_range-high(2) - loc_t_var_range-low(2).
mmd = mmd + yrd.
if i_vnam = 'ZAVERAGE'.
*if sy-subrc = 0 .
. l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
l_s_range-low = mmd.
. append l_s_range to e_t_range.
ENDLOOP.
Regards,
RaviHi,
You need to have two variables created. One for entering the month ranges and other for storing the "number of months" value. Please refer to the link below for further details.
Derive Number of months from variable entry
I hope it helps.
Thanks.
Regards,
Samruddhi. -
Invoice split by number of delivery line items
Hi,
Can anyone assist in providing me with a solution to the problem of splitting invoices based on the number of delivery line items. I know there is an SAP restricting of 999 lines when posting to SAP.
Example:
If my delivery has 20 line items is there a way to split the invoice into two separate documents of 10 lines each?
Thanks
AnirudhHi,
Instead of splitting the Invoice on the basis of delivery line items, you can fix the maximum of lines allowed in the Invoice. So this will help you having multiple invoices from a delivery.
I don't know if this suits you.
There is routine number 6 which acomplishes this (Single Invoice Limited), where coding has been done on the basis of config. (Sales Org:Limit number of billing items TVKO-MAXBI).
This can be assigned at the item level (Copy control - Delivery to Billing, VTFL)
Instead you can create a seperate routine which initially checks the number number of line items in the reference delivery document and then creates an invoice with specific lines.
Hope this helps.
Regards,
Vivek -
Splitting a Number String without using split()
What is the better way of converting a number string where the numbers are seperated by a white space into an array without using the split() method or tocharArray e.g numberString = "12 13 14" numberArray[0] = 12, numberArray[1] = 13, etc
If you know the number of elements in the string, you can create a predefined fixed array. You can also search for empty spaces.
String text = "12 13 14";
int COUNT = 3;
public void doit() {
int[] arr = new int[COUNT];
int sub1 = 0;
int sub2 = 0;
for(int i=0; i<COUNT - 1; i++) {
sub2 = text.indexOf(" ", sub2 + 1);
arr[i] = Integer.parseInt(text.substring(sub1, sub2));
sub1 = sub2 + 1;
arr[COUNT - 1] = text.substring(sub1, text.length()); -
Hi,
Could anyone explain how to split a string at the first
number it comes to. The two halves can then be passed to a list or
an array.
I've got several variables such as "Mar16", "June13" etc
(dates) and I need to split it into "Mar" and "16" etc so I can
increment the date by one ie Mar16 to Mar17.
TIA,
SimonThere are many ways to do this sort of thing. Below is one
example using various CF string functions.
<cfset vDate = "Mar16">
<cfset vNumPos = ReFind("[0-9]", vDate)>
<cfset vMonth = Left(vDate, vNumPos-1)>
<cfset vDay = Mid(vDate, vNumPos, Len(vDate))>
<cfoutput>#vMonth#</cfoutput>
<cfoutput>#vDay#</cfoutput>
Phil -
Math problem, formula to change a number...
Hi, another question for adobe forums.
Ok, for example you have 10, how to convert it to 0 and also if the number wsa 9, convert it to 1, and if it was 8 it gets converted to 2.. and so on.. where if it was 0 it would then be 10 Is there a formula?
The 0 to 10, and 10 to 0 may not be possible but that's ok.
Thank you.hold on what a stupid mistake it is just minus the number from 10!!
-
Convert and split Hexa number into ASCII
Hai
How to convert Hexa number to equivalent ASCII number
i attached my VI
thanks
sk
I am using LabVIEW 7.1
Attachments:
HEX2ASCII.vi 31 KBIt really depends on what you want. For example you want to "split the hexa number 1A into 1 and A". Should the output be a string or another U8 number?
Attached are a few possibilities.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
HEX2ASCIImod.vi 51 KB -
Conditional Formula based on Print Number
Post Author: DigYerOwnHole
CA Forum: Formula
Hi,Does CR have a way to base formulae on the print copies?Here's my situation:Using Crystal to print off sales invoices. The invoices have to be printed three times. On the first copy the invoice has to state "Original", on the second copy the invoice has to state "Duplicate", and on the third copy the invoice has to state "Triplicate". In all other ways the rest of the report is identical.So, I'd really like a formula to handle this change in text based on the print copy, problem being I don't know if CR has a notion of 'Print Copy #' Aside from using pre-printed and collated stationery, the only method I've found is to create the three invoice reports and insert them as sub-reports to a main report. However, this method has given rise to some horrible pagination problems that I have been unable to resolve.I'm using CR11 ThanksDigsPost Author: DigYerOwnHole
CA Forum: Formula
Thanks. Guess I'll need to take a further look in to the pagination issues I currently have.Would be awesome if Crystal carried this type of functionality though. -
I have a date field which comes as "20070315" in the xml file.
While inserting to database i need to split it into 2007-03-15 format and then insert.
Can anyone suggest me , how to split this type of pattern.
thanks
AmarshiSo what have you tried so far? And where are you stuck?
db -
Splitting the number (urgent)
Hi
i have a urgent requirement i have a series of handling unit no's
ex: 17000000000044 in my list and i want to display it as 1/ 7/ 0044, can anyone help me
thanks.Hi,
If the first two characters should be split and the remaining should go after the /
then try this..
DATA: V_CHAR(20) VALUE '17000000000044'.
DATA: V_OUTPUT(20).
CONATENATE V_CHAR(1) '/' V_CHAR1(1) '/' V_CHAR2(20) '/'
INTO V_OUTPUT.
WRITE: / V_OUTPUT.
Thanks
Naren -
Bug – CR 2011 cross tab number decimal formula not executing
I have a formula to format the number of decimal points in both the column and row header values in a cross tab subreport. The formula does not appear to execute. If I display the data in a simple table format and use the same decimal formula the format is correct.
cross tab header, decimals not displayed correctly
Data when displayed in a simple table using the same formula, decimals are displayed correctlyHi Paul,
Here's another way:
Remove the formula you've used under 'Decimal' for the cells in the crosstab.
Right-click one of the cells > Format Field > Common tab > Click the formula button beside 'Display String' and use this code:
numbervar x := CurrentFieldValue;
numbervar ipart;
numbervar decpart;
ipart := int(x) ;
decpart := x - ipart;
if ipart > 0 then
totext(ipart,0)
else if decpart > 0 then
Replace(totext(decpart),"0","")
-Abhilash -
Custom Employee Number Generation Using Fast Formulas
Hi,
I have a requirement to generate custom employee numbers like "EMP100001". we have already created a business group with the setting of Employee number generation as Automatic. but we need to generate custom employee number as Format given above instead of automatic number generation.
I have created my own PL/SQL Package to generate custom employee number as per Person Type. Also created a Fast Formula Function with the following parameters -
Name = Get_Custom_Number
Data Type = Text
Class = External Funtion
Alias Name = NULL or what you want the alias to be
Description = Returns the next custom number value
Definition = CUSTOM_EMP_NUMBER_GENERATION.Get_Custom_Number (PL/SQL Function)
Proving the following Context usages and Parameters details to the Fast Formula Function -
Context usages:-
Number = 1
Context Name = BUSINESS_GROUP_ID
Data Type = Number
Parameters as defined in PL/SQL function
1 p_legislation_code Text Input Only
2 p_person_type Text Input Only
3 p_person_number Text Input Only
4 p_party_id Number Input Only
5 p_person_id Number Input Only
6 p_national_id Text Input Only
7 p_date_of_birth Date Input Only
Than i created a Fast Formula using the following navigation
Total Compensation > Basic > Write Formula
with following details -
Name = EMP_NUMBER_GENERATION
Type = Person Number Generation
Description = Returns next Employee number
and wrote my formula code.
When i created a Employee from Enter and Maintain People screen it is showing automatic number instead of my custom employee number.
I m not able to find where i m missing the logic or some parameters?
If anyone has come across such situation, please provide some pointers here.
Thanks
RenuWhat is the application release?
Please review these docs and see if it helps.
Is it Possible to Update Generate Employee Number Method From Automatic to Manual? [ID 393827.1]
Need To Change The Employee Numbering From Automatic To Manual [ID 291634.1]
Unable to Switch From Auto to Manual for Employee Number Generation in Shared Hr [ID 452044.1]
How to Prefix a Zero on Custom Employee Numbers [ID 822425.1]
How To Implement Custom Person Numbering Using FastFormula Based on User Person Type Instead of System Person Type [ID 372696.1]
Thanks,
Hussein -
I'm trying to split a number of cells into columns (only one column of cells selected at a time). It worked fine with 5 out of the 15 columns that I have, but now when I highlight a column's worth of cells and right click "split into columns" is grayed out. Why?
I changed the page size and made it huge in case that was limiting the overall table dimensions or anything like that, but it's still not working. Thanks!Does the ext directory have the php_oci8.dll? In the original steps the PHP dir is renamed. In the given php.in the extension_dir looks like it has been updated correctly. Since PHP distributes php_oci8.dll by default I reckon there would be a very good chance that the problem was somewhere else. Since this is an old thread I don't think we'll get much value from speculation.
-- cj
Maybe you are looking for
-
IPAD and UPdate to Airprint Printer question Help Please?
I have an HP 6500 printer that I utilize with my MacbookPro (from 2007) and it operates just fine wirelessly using WiFi at home. I did note though that my iPod cannot print to the printer as the printer IS NOT AIRPRINT equipped. MY QUESTION? I am co
-
Low resolution on booting screen
Hello guys, I need some assistance here, please. Since yesterday the booting screen (the gray one with the apple logo) is on 640x480 resolution. When the computer boots to the login screen the resolution is back to the native - 1440x900. I need assis
-
Can I store/retrieve a Word Document in a Database field?
What conditions should me met to store/retrieve a Word Document in an Oracle database field? May be many things will be necessary to consider but, could you give me some guides? Do yo know about some web site place that talks about it? Thank you in a
-
Keep getting error msg: iTunes has encountered a problem & needs to close.
My iPod and computer have worked fine for a year and now....iTunes won't connect. If I plug in my iPod I get this msg...if I click on iTunes, I get this msg. Uninstalled and reinstalled...same error. Help please! I want more music and I am such a com
-
I want to use RTTMON MIBS for ICMP Latency
Hi, I am using The Cisco 2811 Routers for Branch Officies and that use "ip sla" and EEM configuration for monitoring. I find OID match Name and Stirng list. is The following configuration true? What can I use digit instead of rttMonLatestJitterOperOW