How to find length of a character variable in sap script
Hi,
I have stored a line of text in one variable. If the text exceeds more than 50 characters, the remaining characters will be printed in next line.
For this i have given code as :
<I>&S_BOL_SUMMARY-TXT(50)&</>
<I>&S_BOL_SUMMARY-TXT+50&</>
The problem is i have to print the second line only when the text exceeds more than 50 characters. So how can i give the condition for that?
Ezhil
Hi,
Try the following,
data: len type i.
len = strlen (S_BOL_SUMMARY-TXT ).
if len > 50.
&S_BOL_SUMMARY-TXT(50)&
&S_BOL_SUMMARY-TXT+50&
else.
&S_BOL_SUMMARY-TXT(50)&
endif.
Similar Messages
-
How to find the value of a variable in other program
How to find the value of a variable in other program say I am in a FM and this FM is being called in from other program and I want to know some of the variable details of the program from the FM itself. Imagine if this is a txn. and I need to know the details from some of the programs while executing the same transaction
Regards
VinHi Vinayak,
you will be having your first program values in internal table or some variables,
when you are calling the second program you wii use like this,
SUBMIT <Second Program Name> USING SELECTION-SCREEN '1000'
WITH s_emp(second program select-options) IN t_emp(first program variables)
WITH p_chk EQ t_chk
WITH p_r1 EQ t_r1
WITH p_month EQ t_month
WITH s_cust1 IN t_cust1
WITH p_r2 EQ t_r2
WITH s_cust2 IN t_cust2
WITH s_week IN t_week
AND RETURN.
you have pas like this to get your first program details. -
Hi
how to find length of a string.. i have a requirement that user cannot add more than 9 digits in a string.. i am new to WD Abap..
Regards,
PuneetHi,
You can use STRLEN command for your requirement.
First read your input field using code wizard.
Then using STRLEN command you can find the length of the Input field.
For Example :
Here input is your input field.
data : length type i.
length = strlen(input).
If length < 9.
raise error msg.
endif.
Edited by: Viji on Mar 26, 2008 11:30 AM -
HOW TO CREATE A VARIABLE IN SAP SCRIPT
HI ALL,
CAN ANYONE TELL ME HOW TO CREATE A VARIABLE IN SAP SCRIPT.
THANK YOU,
BYE
TAKE CARE.Hi Ravi,
You can use like this
A text in the editor contains the following DEFINE commands:
/: DEFINE &mysymbol& = 'xxx xxx xxxxx xxxx'
&mysymbol&
/: DEFINE &mysymbol& = 'yyyyy yyy yyyy'
/ &mysymbol&
The printed text appears -
How to find the program name of the created sap query ?
how to find the program name of the created sap query ?
Hi avinash,
Try in this way..
Go to SE16 and then go to table TSTC.
in that give program name as <b>*followed by your query name</b>
(for example *TESTQUERY)
and run , that will give progname======queryname.
this way you can find program name.
vijay -
How to find list of languages installed in the SAP system?
Hi All,
Please tell me, how to find list of languages installed in the SAP system?
Thanks and Regards,
Kumar.Hi Virgo Rhyme
Hope the following info will be helpful
3rd - SAP is the 3rd largest software company in the world
30,000 - Total number of people employed by SAP
5,400 - Number of programmers employed by SAP
$7.024 billion - FY03 Revenue
$1.077 million - FY03 Net Income
12,000 - Number of companies using SAP
79,800 - Number of SAP installations
12,000,000 - Number of people using SAP
120,000,000 - Total number of people in the 12,000 companies who are using SAP
28 - Number of languages supported by SAP
46 - Number of country-specific versions of SAP
22 - Number of industry-specific versions of SAP
1,000 - Number of pre-defined best practices contained in the SAP system
10,000 - Number of tables requiring configuration in a full SAP implementation
55,000 - Number of SAP experienced consultants worldwide
28 - Number of years ago SAP was started
Reward if helpful
Regards
Lakshman -
Character Strings in Sap Script
Hi,
how to create character strings in Sap Script?
thanks,
fractalHi,
Defining Character Formats Character formats in forms determine how text is formatted within paragraphs. They are a refined form of text layout.
1. Choose Goto  Character strings. This takes you to the request screen for standard attributes of character strings. 2. Choose Edit  Create element. A dialog box appears. 3. Enter a character tag and description. The character tag is created. The system sets all standard attributes to * . You can overwrite this setting. 4. Choose Attributes  Font to define the font attributes for the character format. Font attributes provide a more detailed definition. 5. Enter values in the input-enabled fields. The fields Bold, Italics, and Underlined are automatically displayed with * . You can overwrite this with your entry. 6. Repeat the definition of character tags and their standard and font attributes until all required character formats have been defined. 7. Save the character formats
for more info, check this link:
http://wiki.ittoolbox.com/index.php/HOWTO:Sap_script
regards,
keerthi. -
How to print the text in points wise in sap script
hi friends,
how to print the text in points wise in sap script.
ex: if suppose paragraph consists of 15 lines. then according to one sentence or one fullstop (.) it should give point 1. like that...
1. hai how ru.
2. what r u doing.
3.where r u.
like this i want numbering.. waiting for ur replys.
thanks,
kirandeclare a counter
data : cnt type char 4.
print :
cnt = cnt + 1.
&cnt& &text&
cnt = cnt + 1. and so on.
or.
if the data is in an internal table
loop at internal_table.
cnt = cnt + 1.
write form.
in script -&cnt& &text&
endloop.
Edited by: NIKHILKUMAR POOJARI on Nov 17, 2008 11:18 AM -
How to find out the repeated character in a string value?
Dear People,
I want to trace out the names where a character occured more than once.for ex, i need o/p as
ENAME
ALLEN
TURNER
ADAMS
In which all the above name consists of repeated characters.
I use Oracle 10g and i tried using REGEXP say for ex,
SELECT ENAME FROM EMP WHERE REGEXP_LIKE(ENAME,'L{2}');
ENAME
ALLEN
MILLERbut this works only for single character.how to specify condition for any character?.pls suggest me.
With Regards
VIDSHere is one way you can use from version 10 upwards:
SQL> with emp as
2 ( select 7369 empno, 'SMITH' ename, 'CLERK' job, 7902 mgr, date '1980-12-17' hiredate, 800 sal, NULL comm, 20 deptno from dual union all
3 select 7499, 'ALLEN', 'SALESMAN', 7698, date '1981-02-20', 1600, 300, 30 from dual union all
4 select 7521, 'WARD', 'SALESMAN', 7698, date '1981-02-22', 1250, 500, 30 from dual union all
5 select 7566, 'JONES', 'MANAGER', 7839, date '1981-04-02', 2975, NULL, 20 from dual union all
6 select 7654, 'MARTIN', 'SALESMAN', 7698, date '1981-09-28', 1250, 1400, 30 from dual union all
7 select 7698, 'BLAKE', 'MANAGER', 7839, date '1981-05-01', 2850, NULL, 30 from dual union all
8 select 7782, 'CLARK', 'MANAGER', 7839, date '1981-06-09', 2450, NULL, 10 from dual union all
9 select 7788, 'SCOTT', 'ANALYST', 7566, date '1982-12-09', 3000, NULL, 20 from dual union all
10 select 7839, 'KING', 'PRESIDENT', NULL, date '1981-11-17', 5000, NULL, 10 from dual union all
11 select 7844, 'TURNER', 'SALESMAN', 7698, date '1981-09-08', 1500, 0, 30 from dual union all
12 select 7876, 'ADAMS', 'CLERK', 7788, date '1983-01-12', 1100, NULL, 20 from dual union all
13 select 7900, 'JAMES', 'CLERK', 7698, date '1981-12-03', 950, NULL, 30 from dual union all
14 select 7902, 'FORD', 'ANALYST', 7566, date '1981-12-03', 3000, NULL, 20 from dual union all
15 select 7934, 'MILLER', 'CLERK', 7782, date '1982-01-23', 1300, NULL, 10 from dual
16 )
17 select ename
18 , e
19 , count(*)
20 from ( select ename
21 , e
22 from emp
23 model
24 return updated rows
25 partition by (ename)
26 dimension by (0 i)
27 measures (ename e)
28 ( e[for i from 1 to length(e[0]) increment 1] = substr(e[0],cv(i),1)
29 )
30 )
31 group by ename
32 , e
33 having count(*) > 1
34 /
ENAME E COUNT(*)
SCOTT T 2
MILLER L 2
ADAMS A 2
ALLEN L 2
TURNER R 2
5 rows selected.Regards,
Rob. -
How to find an extended ASCII character
Hi,
I have a problem while reading from a InputStream with a BufferedReader. I�m trying to find out if an extended ASCII character is within a String made with readline(), but it always says no. Example:
myString.indexOf('\u00D2')
While debugging, I see that the character is a '?'.
How can I find this extended ASCII character ('\u00D2') ? Is it an encoding matter?
Please help!!You are using a default character encoding when you use BufferedReader, so the text you read is probably translated to some other character in some cases (two or more bytes can sometime make up a new unicode character depending on the encoding).
You could try this:
BufferedReader br = new BufferedReader(new InputStreamReader(in, "IS0-8859-1"));where in is your InputStream. -
How to find out workflow in various releases of SAP
Hi Experts,
I would like to know as to how we can find out in which release of SAP was a given workflow introduced.
For eg. if we take WS04200009(WF for leave request). I want to know if this was incorporated in ECC 6.0 or ECC 5.0 or older versions.
Also if we take WS04200009, there is a list of related WF's to it.....i.e. WS12400005 and WS12400007(These are for leave request cancellation).
I would like to know similarly as to how to find out for a specific workflow, the list of related WF to it.
I would also like to know as to how we can find out what is the latest WF that SAP has incorporated in the given release.
Thanks in advance for all the help.Hello,
What do you mean by workflows "related" to another workflow? if you mean calls and called-by you can get it out of the underlying tables, is that what you want? Same for the latest version, but only in the current system, I wouldn't know how to do it for different SAP versions.
For a particular workflow you can see which other workflow(s) (and tasks) it calls in tx SWDM.
regards
Rick Bakker
hanabi technology -
How to find out whether a material code in SAP has any transaction history
Hi Guys,
I want to find out whether a material code in SAP has any transaction history or not. In other words, I want a list of all those materials, division-wise, which have not been subjected to any sort of transaction in SAP till date , i.e., lying unused.
Can any of you in help me out regarding this matter ?
Regards,
Anirbanhhi
go to se16
table MBEW and field LBKUM for total stock
from here u can conclude for the zero stock material
or try this
S_ALR_87012963 - Material Where-Used List
regards
kunal -
How to find Tables behind a Custom Query in SAP
Hi Gurus,
Can anyone please help me find tables behind a custom query in SAP.
Regards
AsHi
Check the name of the programm assigned to transaction, it should be like this:
AQZZ<user group>=======<query name>======
or
AQIC<user group>=======<query name>======
It depends of the query area is global or cross-client
So run SQ01, select the quey area, select the quey group and so your query: now you can see the infoset and then you see it by SQ02 transaction
Max -
Find total no of pages in a sap script
Hi,
How do i find the no of pages that is generated in SAP script, with out generating a spool.
thanks.Dear friend
new system symbols (note upper case) were therefore introduced:
&SAPSCRIPT-FORMPAGES&
Total page number based on the current output layout set:
&SAPSCRIPT-JOBPAGES&
Total page number based on all output layout sets created with the function modules OPEN_FORM, START_FORM .. ENDFORM, START_FORM .. END_FORM, ..., CLOSE_FORM
Examples:
Page &PAGE& of &SAPSCRIPT-FORMPAGES(C)&
Specifies the current page number and total page number. The additional specification (C) outputs the symbol in a compressed form, that is the leading blanks are omitted in the 4-character output (default).
Number of all output pages: &SAPSCRIPT-JOBPAGES(C)&
Outputs the total number of output pages. Caution: When using this symbol, all output pages must be held in the main storage so that the total page number can be inserted at the end of the output. Larger outputs can affect performance. -
Displaying variable in sap-script
Hi folks,
I need to pass a variable to an existing sap-script. But that window is not calling form the print program. It just called dynamically, which contains current date and time. In that window i need to pass the variabe. But the value to the variabel is coming from the print program. How can i pass this variable to the script now...pls help me.
Thanks,
Shyam.Hi
Create the window and pass these system symbols
&date&
&time&.
Regards,
Sravanthi
Maybe you are looking for
-
New Desktop, from A to Z
I'm fairly familiar with Linux, but am more accustomed to distros that come with a fancy GUI that has front ends for everything. So what I want to know, is how to install a good smoothe, easy to control and fairly simple to config LIGHT WEIGHT GUI. I
-
Problem in merge statement -ORA-27432 Step does not exist for chain
Hi I m getting ORA-27432 Step does not exist for chain error in merge statement.Please explain the same. MERGE INTO fos.pe_td_hdr_sd B USING ( SELECT ACTIVE, ADDUID, ADDUIDTIME,TDKEY FROM pe.pe_td_hdr WHERE (adduidtime lik
-
Emailed Purchase Orders not appearing in SCOT
Hi, I am trying to view the emailed output of Purchase Orders (via Shopping Cart approvals) to vendors , in our test system. Because it is out test system, and we do not want purchase orders sent to vendors from this system, we have turned the SMTP (
-
Hi all. The problem. Today I updated my Nexus 7010 sup1 from 6.1.4a to 6.2.8. I want did it in ISSU mode, but after impact check I got this: Compatibility check is done: Module bootable Impact Install-type Reason 1 yes non-dis
-
Problem with SQL Authenticator and SOA EM console.
Hi, In my project, i have a need to authenticate USERS from data base tables. To acheve this i defined SQL Authenticator, inside the weblogic admin console.But, problem is after this, when i login to EM console of SOA, then, in the home page, it is s