More than 40 characters in SAP Variant Conditions for Quotation printouts - sap-erp

Currently we print the variant condition (description) with the limitation of 40 characters maximum in our Quotation documents. We are on SAP ECC.
Our sales department would like to print Quotation documents that allow descriptive texts of >40 characters. A sufficient length would be about 60 characters, ideally 70 characters.
What would be a good solution to maintain longer texts on variant conditions and print them on the form?
I have researched but somehow was not able to find a solution path.

Related

Filter only alphabetic values in tableau

I have column in tableau with following values:
1234
3456
6789
camp-1
camp-2
camp-3
I only want to show filter with values
camp-1
camp-2
camp-3
How can I only select the alphabetic values in filter in tableau?
Your example is not clear about what you want to include and what you want to exclude. To explain better, I took an elaborated example
Case-1 If you want to search/filter for digits at start, use this calculated field
REGEXP_MATCH([Field1], '^[0-9]')
Case-2 If you want to search for numbers anywhere, use this
REGEXP_MATCH([Field1], '(.*)[0-9]')
Case-3 If digits only are required
REGEXP_MATCH([Field1], '^[0-9]+$')
case-4 for alphabet at start use this
REGEXP_MATCH([Field1], '^[:alpha:]')
Results of all matches are shown below
Note Combining numbers anywhere AND alphabet at start you can filter out case1, case2 and case3 only.
Good Luck
If the Tableau column contains a mixture of numbers and text, the column will be a text column and all content will be considered as text. This reduces the problem to that of identifying specific rows that contain non-numeric values.
This requires some string manipulation and comparison. If you know that the structure of the content in those rows is predictable (eg the first character is always a letter when there are non numeric characters in the row) then a simple equation will filter on those rows:
if ascii(left([Text And Numbers],1) )>57 then 'text' else 'number' END
This exploits the observation that the ASCII decimal code for the digit 9 is 57 and most of the ASCII characters with higher codes are letters or punctuation (which is a fair assumption if nothing other than numbers, letters or punctuation are present in your data).
Obviously, if letters and numbers could appear anywhere in the string you need a more complex function but Tableau provides the option to use regular expressions which can code much more complex text analysis like is any alphabetic character present in a string (see this for some ideas of the appropriate regex expressions).

Filtering phone numbers REGEXP

I have a MySQL query to find 10 digit phone numbers that start with +1
SELECT blah
FROM table
WHERE phone REGEXP'^\\+[1]{1}[0-9]{10}$'
How can I filter this REGEXP further to only search certain 3 digit area codes? (ie. International 10 digit phone numbers who share US number format)
I tried using the IN clause ie. IN('+1809%','+1416%') but ended up with error in syntax
WHERE phone REGEXP'^\\+[1]{1}[0-9]{10}$' IN('+1809%','+1416%')
You may use a grouping construct with an alternation operator here, like
REGEXP '^\\+1(809|416)[0-9]{7}$'
^^^^^^^^^
Just subtract 3 from 10 to match the trailing digits. Note that in MySQL versions prior to 8.x, you cannot use non-capturing groups, you may only use capturing ones.
Also, [1]{1} pattern is equal to 1 because each pattern is matched exactly once by default (i.e. {1} is always redundant) and it makes littel sense to use a character class [...] with just one single symbol inside, it is meant for two or more, or to avoid escaping some symbols, but 1 does not have to be escaped as it is a word char, so the square brackets are totally redundant here.

What is the best data type for ISBN10 and ISBN13 in a MySQL datase

For an application I'm currently building I need a database to store books. The schema of the books table should contain the following attributes:
id, isbn10, isbn13, title, summary
What data types should I use for ISBN10 and ISBN13? My first thoughts where a biginteger but I've read some unsubstantiated comments that say I should use a varchar.
You'll want a CHAR/VARCHAR (CHAR is probably the best choice, as you know the length - 10 and 13 characters). Numeric types like INTEGER will remove leading zeroes in ISBNs like 0-684-84328-5.
ISBN numbers should be stored as strings, varchar(17) for instance.
You need 17 characters for ISBN13, 13 numbers plus the hyphens, and 13 characters for ISBN10, 10 numbers plus hyphens.
ISBN10
ISBN10 numbers, though called "numbers", may contain the letter X. The last number in an ISBN number is a check digit that spans from 0-10, and 10 is represented as X. Plus, they might begin with a double 0, such as 0062472100, and as a numeric format, it might get the leading 00 removed once stored.
84-7844-453-X is a valid ISBN10 number, in which 84 means Spain, 7844 is the publisher's number, 453 is the book number and X (i.e 10) is the control digit. If we remove the hyphens we mix publisher with book id. Is it really important? Depending on the use you'll give to that number. Bibliographic researchers (I've found myself in that situation) might need it for many reasons that I won't go into here, since it has nothing to do with storing data. I would advise against removing hyphens, but the truth is everyone does it.
ISBN13
ISBN13 faces the same issues regarding meaning, in that, with the hyphens you get 4 blocks of meaningful data, without them, language, publisher and book id would become lost.
Nevertheless, the control digit will only be 0-9, there will never be a letter. But should you feel tempted to only store isbn13 numbers (since ISBN10 can automatically and without fail be upgraded to ISBN13), and use int for that matter, you could run into some issues in the future. All ISBN13 numbers begin with 978 or 979, but in the future some 078 might could be added.
A light explanation about ISBN13
A deeper explanation of ISBN
numbers

What does the SSIS CODEPOINT value 26 represent

In one of the existing SSIS projects, I found a Condition Split with an expression of CODEPOINT(column)==26.
But I couldn't find what is the value "26" represents. When I searched the CODEPOINT for alphabet letters it starts from 65 and for 0-9 it starts from 45.
CODEPOINT Expresion merely states the following
Returns the Unicode code point of the leftmost character of a character expression
Exploring wikipedia turned up Unicode encodings
The first 128 Unicode code points, U+0000 to U+007F, used for the C0 Controls and Basic Latin characters and which correspond one-to-one to their ASCII-code equivalents
Sweet, putting that together and consulting the ASCII table allows me to determine that 26 is SUB/Substitute control character. Ctrl-Z for those really wanting to try this at home (and working under a Unix(tm) variant)

CsQuery : Finding Prices on a page

I am trying to scrape prices from any given URL. I am using CsQuery and for the life of me, I cannot figure out the best way to find all items on a page that might be a price. A bonus would be figuring out the most likely price by size / color of the test and how close it is to the top of the page. I was thinking maybe looking at a Regex solution, but I am not sure if that is the correct way to go with CsQuery.
Well, if a currency sign is present, You might do something like.
(?:\$|\£)(\d+(?!\d*,\d)|\d{1,3}((, ?)\d{3}?)?(\3\d{3}?){0,4})(\.\d{1,2})?(?=[^\d,]|, (?!\d{3,})|$)
(?:\$|\£) -- matches literal currency simbols. You can remove this
if you can't count on the presence of currency symbols,
but it's a great anchor if you can
(\d+ -- matches any number of digits
(?!\d*,\d) as long as not followed by comma digit
|
\d{1,3} -- otherwise matches betweein 1 and 3 digits
(
(, ?) -- looks for a comma followed by a possible space
captures as \3
\d{3}?) -- followed by 3 digits
? -- zero or one times
(\3 -- looks for the same pattern of comma with or without space
\d{3}? -- followed by 3 digits
){0,4}) -- between 0 and 4 times, more on that below
(\. -- literal period
\d{1,2} -- followed by one or two digits
)? -- zero or one times (so, optional)
(?=[^\d,]|, (?!\d{3,})|$)
Another thing you might do is to limit how many repetitions of comma groups there can be, it might help weed out high numbers that aren't likely prices. If you're not expecting anything over 999,999, you might do this (but if you're dealing with foreign currencies, inflation has made some astronomically high--a loaf of bread in Zimbabwe costs fifty million).
For easy reading, I'll show you how to limit the repetitions to 7
Change the 4, (the only 4 in the whole regex) to 6, (the number you want -1, because we look for 1 beforehand to establish comma pattern).
(?:\$|\£)(\d+(?!\d*,\d)|\d{1,3}((, ?)\d{3}?)?(\3\d{3}?){0,6})(\.\d{1,2})?(?=[^\d,]|, (?!\d{3,})|$)
You can see this in action at: https://regex101.com/r/oU2nW2/1