Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SAPSCRIPT Beginner

Former Member
0 Kudos

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)&

1 ACCEPTED SOLUTION

Former Member
0 Kudos

&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.

11 REPLIES 11

Former Member
0 Kudos

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.

0 Kudos

What does the (12) do and the (I12) do? Thanks.

0 Kudos

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.

0 Kudos

(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

0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

&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.

Former Member
0 Kudos

brings the values stored in the field kawrt from the table komvd.

regards,

srinivas

<b>*reward for useful answers*</b>

Pawan_Kesari
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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