Saturday, February 7, 2009

SAP String Manipulations





I had a problem then with my code in ABAP when there was a requirement that will split the address of the vendor from a field string of 140 characters via BDC. From the field of 140 characters, i need to get the first 40 for first field (i.e. field1), then the next 60 characters are for the second field (i.e. field2), and the next field is of lenght 40 (i.e. field3).
Good to know that i have found a helpful Function Module in SAP to address my concern. For you guys doing ABAP, when you need to do string manipulations in a specified maximum number of characters that would not truncate any word, you can use the following FM ‘SWA_STRING_SPLIT’:
Hope guys this would help you also.
BSEO Elmer Magabili




Friday, February 6, 2009

UNIX command - count number of lines of text file





Here's the command to count the number of lines of text file in UNIX. [/home/username]wc -l anyfile.txt wc command above stands for word count. The switch -l means that it will count the number of lines in anyfile.txt text file. That's one of the basic commands in UNIX. I hope that this command could help some other UNIX users in the world. - BSEO Ben de Leon