‎2007 Jul 23 3:18 PM
I am new to SAPSCRIPT. What are these two lines below doing? They are in the text editor........Thank-You.
&KOMVD-KAWRT(12)&
&KOMVD-KAWRT(I12)&
‎2007 Jul 23 3:25 PM
&KOMVD-KAWRT(12)&
This will display value of field KOMVD-KAWRT upto 12 characters.
&KOMVD-KAWRT(I12)&
This will display value of field KOMVD-KAWRT upto 12 characters and the value is initial then nothing will be display means no zero.
‎2007 Jul 23 3:21 PM
Hi Tom,
&KOMVD-KAWRT(12)& brings the value stored in that particular field from that structure that is being used in the driver program.
Regards
Aneesh.
‎2007 Jul 23 3:22 PM
‎2007 Jul 23 3:26 PM
Hi Tom,
12 is the length of that field. I12 will help you to position the place where that field shows up on the script.
Regards
Aneesh.
‎2007 Jul 23 3:26 PM
(12) means that print only first 12 characters of the variable. Sometimes the place where the data to be printed might be limited. So to fit the value in the space available we can use the option. All formatting options are put in brackets. Anything you see in brackets after a variable within the '&" is formatting options provided by sap script editor.
Cheers
VJ
‎2007 Jul 23 3:27 PM
Hi,
The (12) specifies the field length u reserve in the script and (l12) specifies the same length for that particular field and prevents the field value to shift to next line, but pls check if its (112).
I hope u reward points.
regards,
Ameet
‎2007 Jul 23 3:24 PM
Tom,
&KOMVD-KAWRT(12)&
&KOMVD-KAWRT(I12)&
the above two are nothing but variables in the script, they are placed between ampersand symbols (&) coz, at run time, data wil be print at that place.
Regards,
Sujatha
‎2007 Jul 23 3:24 PM
Hi,
SAP SCRIPT uses variables to display the data from the driver program. The data is passed by using variables in between two '&'.
If we need any data to be printed in the form and if this data is not hardcoded then we need to pass this data from the print program to the sap script using variables. These variables are then placed in between two '&'. Once this is done during run time the value of the variable is printed on the form.
Hope this helps
Cheers
VJ
‎2007 Jul 23 3:25 PM
&KOMVD-KAWRT(12)&
This will display value of field KOMVD-KAWRT upto 12 characters.
&KOMVD-KAWRT(I12)&
This will display value of field KOMVD-KAWRT upto 12 characters and the value is initial then nothing will be display means no zero.
‎2007 Jul 23 3:25 PM
brings the values stored in the field kawrt from the table komvd.
regards,
srinivas
<b>*reward for useful answers*</b>
‎2007 Jul 23 3:33 PM
I would suggest you go though below link ... there are many formatting options available in sapscripts...
http://help.sap.com/saphelp_47x200/helpdata/en/d1/803411454211d189710000e8322d00/content.htm
‎2007 Jul 23 3:37 PM
Hi,
In the two lines KOMVD is a structure and KAWRT is a field of that particular structure and 12 is the size of that particular field. it brings the value of that particular field through driver program.
Reward points!!
Thanks & Regards,
Vasudeva Rao