SAP Script Formatting Dec Values
Hello All,
I am printing some decimal data in my sap script(10,200.30).However this depends on user specific settings.If the user specific setting is changed (10.200,30) value appears different.Is there any command in Script through which i can control just as date (SET DATE MASK).
Please let me know.
Thanks in advcance.
Regards
Amruta
Hello Svetlin,
Thanks for the reply.
I have kept my user setting to 1.234,5.I have checked T005X table.The Decimal notation is 1,234.5 for the country which i have selected.
I have used the command .
However even after that i am still getting the same output(1.23,5)Is there any thing additional that needs to be done?
Regards
Amruta
Similar Messages
-
Hi Experts,
In a classical ABAP report we make use of
write:/20 'Text'.
to print text from the 20th column. Can we do something similar in a SAP Script Page Window. I have a box and lines drawn. Now I want the text to start exactly after the vertical line(column). Is there a way to do in SAP Script.
Regards
Abdullah.You can use Paragraph format in SE71 Transaction,
here you can able to see Tab position ,give first tab would be 20 char alignment would be Left or right.
If you need design the box ,then i am giving simple example below :
POSITION WINDOW
BOX WIDTH '74' CH HEIGHT '36.5' LN FRAME 10 TW
POSITION WINDOW
BOX WIDTH '74' CH HEIGHT '3.1' LN FRAME 10 TW INTENSITY 10
POSITION XORIGIN '0.9' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '3.0' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '5.0' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '7.2' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '8.3' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '9.5' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '12.0' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '14.5' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '17.0' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '19.7' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
Thanks
Seshu -
Problem with sap script formatting?
hi,
can anyone please tell me how do we reduce the fony size in sap script, actually i have used it with character format by giving font name as helve and size as 6 pt but its not reflecting , what can be the problem? or my procedure is wrong.please help me outok character format is the wrong thing
just use paragraph formats for that.
if you are insisting to use character formats you need to use the syntax as well.
e.G. if you have defined yourself a characterformat lets say 't' like tiny, thnen the syntax in your form will be:
SL | <t>you text</>.
if you are using paragraph formats it will be
SL | your text
but now you should edit the font properties of that paragraph format -
Sap script: Printing the values got from work area in a row
Hi ,
I need to print the values which I m getting from a work area like
A1 A2
A3 A4
and so on
but I m getting it as
A1
A2
A3
A4.
Any solutions to this will be highly appreciated.
Regards,
VivekDear vivek,
how is your work are structure - is it only with single field ?
In your script after the each value give an extended line comman "=" which will take first and second values for print and after the second value give "line feed" or "carriage return" command.
Hope this solves your problem
Thanks
venugopal
Reward accordingly -
Sap script symbol, how value is getting populated
We have a Delivery Note in which it says Total units = 56. But in debug I saw the symbol &UNIT(Z)& which is getting this value 56 on Devlivery.
I want to know from where this value is coming on layoutset? can any one please tell me....as this is not table field or custom variable that is coming from print program.
Thanks a lot.Hi,
I think through debugging only you can find the same.
In your script utilites activate debugger and your include set a break point in the open form and after reaching your include
in the debugging screen press f6 and find where your unit value is coming from.
In your script display check defination select here also you will find in which programs your form is triggered.
Your include is using in many program, if you know program then keep a break also in your program especially in write_form
function modules.
Thanks,
Phani. -
Reg: SAP Scripts abap program
Hi experts,
i have requirement in QM report i need to show some additional fields in print out ,
here i know the form name but i don't no from which program in SAP Script form fetching values can any one suggest how to find out programs for SAP script form.
i know inside of SAP script we can c perform action but in my case there is no perform action written in script,
they are directly using call function open form in pgm .
Regards
Srinivasan.R
Moderator Message: Please search for available information before posting.
Edited by: kishan P on Jun 3, 2011 11:41 AMHi,
Your question is not very clear....
but if you want to Spell out a Number (Amount in your case) you can use the function Module
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = (Amount to be printed)
CURRENCY = ' '
FILLER = ' '
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = (Amount in words)
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3
Reward if useful !!
Regards,
Gaurav -
Calculation of values in a dunning form (SAP Script)
Hi Experts!
I want to add values to a sum (dunning-amount + dunning-fee + interest) in a dunning form (SAP Script; Z150_DUNN_02).Therefore I'm using a subroutine (Z_FI_KX_DUNN_02_INTEREST) to summarize. Problem is the format of the output-field &Z_FAEBT&. It's not similar to field &MHNK-FAEBT& which was formerly printed (without calculation of interest and dunning-fees.
/: DEFINE &Z_FAEHW& := &MHNK-FAEHW&
/: DEFINE &Z_ZINHW& := &MHNK-ZINHW&
/: DEFINE &Z_MHNGH& := &MHNK-MHNGH&
/: DEFINE &Z_FAEBT& := &MHNK-FAEBT&
/: PERFORM ZFAEBT IN PROGRAM Z_FI_KX_DUNN_02_INTEREST
/: USING &Z_FAEHW&
/: USING &Z_ZINHW&
/: USING &Z_MHNGH&
/: CHANGING &Z_FAEBT&
/: ENDPERFORM
/: ENDIF
A3 &MHNK-WAERS& &Z_FAEBT(C)&
It would be fine to get a hint how to format the field &Z_FAEBT& correctly. Must be done in the subroutine Z_FI_KX_DUNN_02_INTEREST by a special WRITE-command? Is it possible to add these values only in the form?
Thanks for support!
Regards, Berndhi!
I defined the field like you said! After moving this field to a numeric field to add the different amounts the
following error occurred:
Runtime errors CONVT_NO_NUMBER
Exception CX_SY_CONVERSION_NO_NUMBER
Occurred on 16.06.2009 at 15:15:25
Unable to interpret " 1.316,59" as a number.
Definition:
FORM zfaebt TABLES in_par STRUCTURE itcsy
out_par STRUCTURE itcsy.
TABLES: mhnk.
DATA: z_faehw_num LIKE mhnk-faehw,
z_zinhw_num LIKE mhnk-zinhw,
z_mhngh_num LIKE mhnk-mhngh,
z_faebt_num LIKE mhnk-faebt.
DATA: z_faehw TYPE string,
z_zinhw TYPE string,
z_mhngh TYPE string,
z_faebt TYPE string.
statement:
READ TABLE in_par WITH KEY 'Z_FAEHW'.
CHECK sy-subrc = 0.
z_faehw = in_par-value.
z_faehw_num = z_faehw.
I suppose a type-conflict.
Regard, Bernd -
How to change the format in sap script
Hi,
I am working on a report which calls a sap script and i have to modify the script i.e. the values which are displaying in it. i had never worked on SAP SCRIPTS ,plzz provide me guidlines how to change the format of the data displayed in it.hi,
this will give you the whole idea about the scripts in SAP the t-code is SE71.
refer this link::
[SAP SCRIPTS|http://help.sap.com/saphelp_40b/helpdata/en/d6/0dc169494511d182b70000e829fbfe/applet.htm]
[WIKI|https://wiki.sdn.sap.com/wiki/display/ABAP/FormPrinting-SAPscript%2CSmartforms]
regards
sarves
Edited by: Sarves Sombhatla on Feb 20, 2009 1:38 PM -
Rounding off to a variable value to 4 decimal values in sap script ouput
Hi All,
I have a value getting displayed in sap script output as 235.6789 i want to Round off this variable value to 4 decimal values!
What is the formatting option need to be used & how!
Thanks in advance.
Thanks,
Deep.Hi,
1.In layout just call that variable, where you need like:
&variable(.4)&.
Just see these:
&symbol(Z)& Omit Leading Zeros
&symbol(S)& Omit Leading Sign
&symbol(<)& Display Leading Sign to the Left
&symbol(>)& Display Leading Sign to the Right
&symbol(C)& Compress Spaces
&symbol(.N)& Display upto N decimal places
&symbol(T)& Omit thousands separator
&symbol(R)& Right justified
&symbol(I)& Suppress output of the initial value
Regards,
If helpful reward with points(Don't forget). -
To convert Sap Script output to PDF format and send it via email.
Hi Friends,
Could any one please tell me, how to convert the Sap Script output to PDF format and send it via email. If any one have the code, kindly mail me to [email protected]
Thanks & Regards,
JohnPlese check this sample code from other thread.
REPORT zzz_jaytest .
Types Declaration
TYPES : BEGIN OF ty_pa0001,
pernr TYPE pa0001-pernr,
bukrs TYPE pa0001-bukrs,
werks TYPE pa0001-werks,
END OF ty_pa0001.
Internal Table Declaration
DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details
i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data
i_content_txt TYPE soli_tab, "Content
i_content_bin TYPE solix_tab, "Content
i_objhead TYPE soli_tab,
Work Area Declaration
w_pa0001 TYPE ty_pa0001, "For pa0001 Details
w_res TYPE itcpp, "SAPscript output
"parameters
w_otf TYPE itcoo, "For OTF
w_pdf TYPE solisti1, "For PDF
w_transfer_bin TYPE sx_boolean, "Content
w_options TYPE itcpo, "SAPscript output
"interface
Variable Declaration
v_len_in TYPE so_obj_len,
v_size TYPE i.
Constants Declaration
CONSTANTS : c_x TYPE c VALUE 'X', "X
c_locl(4) TYPE c VALUE 'LOCL', "Local Printer
c_otf TYPE sx_format VALUE 'OTF', "OTF
c_pdf TYPE sx_format VALUE 'PDF', "PDF
c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER
c_bin TYPE char10 VALUE 'BIN', "BIN
c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading
"File Name
c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name
START-OF-SELECTION.
Selecting the records from pa0001
SELECT pernr bukrs werks FROM pa0001
INTO TABLE i_pa0001 UP TO 10 ROWS.
Setting the options
w_options-tdcopies = 1 ."Number of copies
w_options-tdnoprev = c_x."No print preview
w_options-tdgetotf = c_x."Return of OTF table
w_options-tddest = c_locl."Spool: Output device
Opening the form
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = c_form
device = c_printer
language = sy-langu
OPTIONS = w_options
IMPORTING
RESULT = w_res.
LOOP AT i_pa0001 INTO w_pa0001.
Writting into the form
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'MAIN'
window = 'MAIN'.
ENDLOOP.
Closing the form
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = w_res
TABLES
otfdata = i_otf
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
codepage = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Converting OTF data to single line
LOOP AT i_otf INTO w_otf.
CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
INTO w_pdf.
APPEND w_pdf TO i_content_txt.
ENDLOOP.
Converting to PDF Format
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
format_src = c_otf
format_dst = c_pdf
devtype = c_printer
CHANGING
transfer_bin = w_transfer_bin
content_txt = i_content_txt
content_bin = i_content_bin
objhead = i_objhead
len = v_len_in
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
v_size = v_len_in.
Downloading the PDF File
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_size
filename = c_name
filetype = c_bin
TABLES
data_tab = i_content_bin.
The extension is put the it_mailpack-obj_name parameter of 'SO_NEW_DOCUMENT_ATT_SEND_API1'. -
Output Format for Amount in SAP Script PO
Hi,
In my Standard SAP Script PO Form 'MEDRUCK', all amount values are getting printed in the form 1.234.567,89 but I want them to be in the Form 1,234,567.89 .
For doing this I have gone in T-Code SU3 and set the default decimal notation as
X 1,234,567.89 .
I have also tried by giving the command
/: SET COUNTRY 'IN'
But still the amounts in the ouput format is coming in the same way 1.234.567,89 .
If anyone has faced similar situation, plz tell how to change the output format of amount in SAP Script.
Thanks and Regards,
Nitin GuptaI have tried using SU3 but it's not worknig. Is their any other method also of which maybe I am not aware of?
-
Formatting issue related to SAP Scripts
Hi All,
I have a formatting issue related to SAP Scripts.
Issue is i have a variable declared as:
<b>v_kbetr LIKE BSET-KBETR.</b>
I will fetch some value into this v_kbetr in SE38.
Then in SE71[Layout set] i have put it as &v_kbetr&
Now i have written code in SE71 as below:
IF &v_kbetr& EQ ' 0.00'
0
ELSE
&v_kbetr&
ENDIF
like wise i am displaying 2 fields with same condition.
now if value for v_kbetr is 6.75 then it is getting displayed as right aligned.
Otherwise 0 will be displayed as left aligned
Now what i want is &v_kbetr& to be left aligned if value present. though i have declred as &v_kbetr(L)& it is not working.
Is there any solution for this.
Thanks,
Kumar.Hi.
Symbol values other than numeric values are normally formatted left-justified.so define this variable other than Numeric.
If you write Field(L) this will only for output, -
Change the charcter format in sap script
hi experts,
i m working first time chaneg in sap script i don't know how to change the sap script charcter.plz any body help me how can i change in sap script charcter format..
thanks in advance
kamalHello Kamal,
PLZ is an character format with the length 8. In VBScript it is a string.
You can use e.g. the VBScript commands CLng(PLZ) to convert it into a number, FormatNumber to format the number or any other string command. What do you mean exactly with change character format? From ASCII to Unicode or from one character set to another, maybe from ISCII to TSCII?
Cheers
Stefan
Edited by: Stefan Schnell on Dec 19, 2011 4:04 PM -
How to print last page in sap script in ladscape format?
Hi all,
can any 1 tell me How to print last page in sap script in ladscape format?
Thanks In advance.
PravinHi Pravin Sherkar,
we can do this in SAP Scripts.
we need to create two pages, one of landscape and another of potrait.
now after filling the data at last we need to call the page which is of format landscape using START_FORM function module.
You can use condition &PAGE& = &FORMPAGES&.
Please check this link
Printing Portrait/Landscape in sapscript
Re: Landscape and potrait in same layout?
http://www.sap-img.com/ts013.htm
Best regards,
raam -
How can u pass value in SAP Script?& where?
Hi,
PASSING TABLE VALUES AS AN ARGUMENT TO SAPSCRIPT:
In the line editor, specify the table field arguments enclosed by '&' symbol as follows:
/E ELEMENT
&KNA1-KUNNR& ,, &KNA1-NAME1& ,, &KNA1-LAND1&
Save -> Activate.
In the Print Program, specify following code:
TABLES KNA1.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'ZSHABFORM1'
LANGUAGE = SY-LANGU.
SELECT * FROM KNA1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'ELEMENT'
WINDOW = 'MAIN'.
ENDSELECT.
CALL FUNCTION 'CLOSE_FORM'.
Save -> Activate -> Execute.
Regards,
Priya.
Maybe you are looking for
-
I have a WinTV USB 2 Hardware Encoding PVR from Hauppauge, and am trying to find the drivers or application to get it hooked up to my MacBook Pro (Just using OS X). I read something about the SageTV Beta working with it but I can't find it anywhere.
-
Blackberry in Germany(Ilmenau)
Hello, I am going to Technische Universitat Ilmenau in september. I was interested in purchasing a blackberry. I basically have a few requirements. One it should have BB OS 6.0,International calling scheme and also when i change my country,i
-
Apis for attaching profile options to a responsibility in oracle apps 11i
Hi, Appreciate your help. We are automating the process of creation responsibilities. 1. I have created new responsibility using the fnd_responsibility_pkg.load_row and responsibilities created successfully. 2. There are few profile options which wil
-
Difference bet SD_STO & MM_STO
Hai, as we all know, that we can transfer the stock by SD route (STO -del- PGI & GR) & MM route ( with diff movement types ) in both process material doc & accounting doc's will be generated. is there any specific reason to create STO process in SD r
-
Playing TV programs requiring Mime in Safari
I am trying to play a TV program from the Channel 4 website and the website says that I need have a plug-in. The exact text says: Safari can't find the Internet plug-in. The page "Catch Up" has content of MIME type "application/x-ms-wmp". Because you