Formating in scripts
Hi guru's,
please explain about the formating options L and LT specified in brackets (bold letters).
/* &it_tax_sumwa-CUST_DUTY(LT11.2)& CUUC1
= &it_tax_sumwa-CUST_DUTY(T11.2)&
(1) &SYMBOL(T)& :
This ensures that the thousand separator is not printed , so that the number 11,111,111 will be output as 11111111.
The command ADDRESSu2026ENDADDRES formats an address according to the postal standards of the country of destination which is defined in the parameter COUNTRY.
Syntax:
/: ADDRESS [DELIVERY] [TYPE t] [PARAGRAPH a][ PRIORITY p] [LINES l]
/: TITLE form of address
/: NAME name1[, name2[, name3[,name4]]]
/: PERSON name of natural person [TITLE form of address]
/: PERSONNUMBER number of the person
/: DEPARTMENT department
/: STREET strno HOUSE house number
/: POBOX pobox [CODE code]
/: POSTCODE postal code
/: CITY city1[,city2]
/: REGION district
/: COUNTRY recipient country
/: FORMCOUNTRY sender country
/: ENDADDRESS
Parameter PRIORITY defines which address lines may be omitted, if necessary. The possible values are as follows :
A Form of address
B Mandatory blank line 1
C Mandatory blank line 2
2 Name2
3 Name3
4 Name4
L Country name -->**********(2)
S Street line
O City line
reward points if helpful
Similar Messages
-
Use of "Next paragraph same page" check box in paragraph format of SCRIPT?
Hi Guys,
What is the use of "Next paragraph same page" check box in paragraph format of SCRIPT?
Don't Send me the F1 help ....i am not clear with that help it is quite confusing.
Provide example if possible.
Solutions will be rewarded.
Regards,
GURUHello.
You probably know the idea of PROTECT command. It makes that a paragraph wont break in two. If it fit's totaly in one page it will print in that page. If not, it will print totaly in the second page (won't break at the middle).
The checkbox you are asking, makes the same with two paragraphs. This means that if you have paragraphs A and B (A becomes first) and if paragraph A has that option, the next paragraph won't break, and appear in the second page. If paragraph A is in first page, paragraph B will print in first page too, or they will both print in second page.
Try it.
Best regards.
Valter Oliveira. -
Dear All,
I want to change date format in script text elements. Now the date format is MMDDYYYY. Now I want change it into DDMMYYYY. How I can change that.
Thanks and regards,
Krish....WRITE ONE Z PROGRAM .
EX. ZTEST
write the code below.
PROGRAM ZTEST.
form GET_NEWDATE tables in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
DATA : LV_NEWDATE TYPE D.
DATA : LV_OLDDATE LIKE OLDDATE,
data : gv_dd(2) type c,
gv_mm(2) type c,
gv_yy(4) type c.
data : date(8) type c.
gv_dd = LV_OLDDATE(+22).
gv_mm = LV_OLDDATE(2).
gv_yy = LV_DOC_DATE+4(4).
CONCATENATE gv_dd gv_mm gv_yy INTO date.
LV_NEWDATE = DATE.
read table OUT_tab index 1.
MOVE LV_NEWDATE TO OUT_TAB-VALUE.
CONDENSE OUT_TAB-VALUE.
MODIFY OUT_TAB INDEX 1.
ENDFORM.
write the code below in ur sapscript,
/:DEFINE &LV_NEWDATE&.
/:PERFORM GET_NEWDATE IN PROGRAM TEST
/:USING &LV_OLD_DATE&
/:CHANGING &LV_NEWDATE&.
PRINT &LV_NEWDATE&
ENDPERFORM. -
hi,
how to change the date format in script form.
thanks.try like this
/: SET DATE MASK = 'Foster City, MM.DD.YY'
&DATE& -> Foster City, 03.01.97
&DATE(Z)& -> Foster City, 3.1.97
/: SET DATE MASK = 'MMMM DD, YYYY'
&DATE& -> March 01, 1997
regards
Prabhu -
Paragraph format and character format in script
hi expects,
what is the difference between paragraph format and character format in script?Hi Rohit,
Paragraph formats control the formatting of paragraphs in SAPscript whereas Character formats are used for text formatting within paragraphs.
Character formats will have Standard attributes like Bold, Italic, Underline, Font family, Font size etc.
Paragraph formats will standard attributes of Character formats and in addition to this, they will margins, Indents, tabs, Alignments, Line spacing and delimeters.
Check this link for Paragraph formats
http://help.sap.com/saphelp_47x200/helpdata/en/d1/802e02454211d189710000e8322d00/content.htm
Check this link for Character formats
http://help.sap.com/saphelp_47x200/helpdata/en/d1/802e43454211d189710000e8322d00/content.htm
Thanks,
Vinay -
hi experts,
I want to print date in dd.mm.yyyy format in script.
I have used SET DATE MASK command in script...
But i am getting ddmmyyy format without any seperators.
plz tell me what can be done.
regards.
sminstead of date print date1.
write the above said code in driver program and write this variable in script.
regards.
santhosh reddy -
Have to Display Transfer orders in horizontal format in script outputlayout
Hi,
I had a problem, I have to display Transfer Orders in Horizontal format in Script Out put layout.
For this i need a logic for displaying in horizontal way..
Can you suggest anything ?
Thanks a lot .....Hi ,
Example think that each Transfer order have different values and this form is displaying all this details in single layout..
If I have different Transfer order in internal table it displaying in form as:
1) Transfer order 3) Transfer order
2) Transfer order 4) Transfer order
But i need the out put as given below..
1) Transfer order 2) Transfer order
3) Transfer order 4) Transfer order
So kindly suggest me....
thanking you.......... -
TAB in paragraph format for Script
hi,
i am doubt with the tabs for paragraph format in the script. how actually it work? i try to make change on the tab, but some time even i put a larger value, the space in the output will become smaller, can anyone explain to me how the tab actually work?
thanksThanks you very much.
but one more question, let say, if i have 3 tabs for an output.
HARLO,,MY,,WORLD,,!
any i configure the tabs as, 20, 30,15 all in CH
so after the "HARLO, it will have 20 CH of spacing, follow by "MY", 30 spacing, and 'MY" 15 spacing, end with "!"?
it this the way it works?
or it works in accumulate way, which include the text display as well?
i found in the forum, say that, it will fix the length of a field( if i display a field), even there is no any value in that field. so how does it work on this?
alot of question very thansk for the temper. -
PDF format of script output in irregular format
Hi All,
I am getting script output in OTF format in 'CLOSE_FORM'
of standard sales order script.
This,I am able to send in PDF format as mail attachment by using function module 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
But the alignment and format of data in the attachment doesn't exactly match with original script output.
Can anyone help me in this regard? Thanks in advance
- jawaharHi,
disregard my earlier mail.
fill itcpo structure and try
<b> itcpo-tdgetotf = 'X'.
xdevice = 'PRINTER'. </b>
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = TNAPR-FONAM
LANGUAGE = NAST-SPRAS
<b> OPTIONS = ITCPO</b>
ARCHIVE_INDEX = TOA_DARA
ARCHIVE_PARAMS = ARC_PARAMS
DEVICE = XDEVICE
DIALOG = ' '
IMPORTING
RESULT = ITCPP
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
FORMAT_SRC = 'OTF'
FORMAT_DST = 'PDF'
DEVTYPE = 'HPLJ5SI'
TABLES
CONTENT_IN = CONTENT_IN
CONTENT_OUT = CONTENT_OUT
EXCEPTIONS
ERR_CONV_FAILED = 1
OTHERS = 2.
OBJBIN[] = CONTENT_OUT[].
endif.
DOC_CHNG-OBJ_NAME = TEXT-003.
doc_chng-obj_descr = text-001.
CONCATENATE TEXT-002 VBDKR-VBELN "zinvoice14-vessel
INTO DOC_CHNG-OBJ_DESCR SEPARATED BY SPACE.
IF SY-SYSID NE 'S4P'.
CONCATENATE DOC_CHNG-OBJ_DESCR TEXT-004 INTO DOC_CHNG-OBJ_DESCR
SEPARATED BY SPACE.
ENDIF.
OBJTXT = 'This is an example of a Sapscript emailed out of SAP'.
APPEND OBJTXT.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
Fill the fields of the packing_list for the main document:
It is a text document
CLEAR OBJPACK-TRANSF_BIN.
The document needs no header (head_num = 0)
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
but it has a body
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
of type RAW
OBJPACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
Create the attachment (the list itself)
IF NAST-KSCHL NE 'ZSTT'.
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
Fill the fields of the packing_list for the attachment:
It is binary document
OBJPACK-TRANSF_BIN = 'X'.
we need no header
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
but a body
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
of type ALI
IF NAST-KSCHL NE 'ZSTT'.
OBJPACK-DOC_TYPE = 'PDF'.
OBJPACK-OBJ_NAME = 'Attachment'.
OBJPACK-OBJ_DESCR = 'PDF file'.
READ TABLE OBJBIN INDEX TAB_LINES.
DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJBIN ).
OBJPACK-DOC_SIZE = DOC_SIZE.
APPEND OBJPACK.
ENDIF.
get E-mail address
loop at t_tvbdkr. "S4DK966284
w_name = t_tvbdkr-tdname. "S4DK966284
W_NAME = VBDKR-TDNAME. "S4DK966284
IF NAST-KSCHL EQ 'ZLEE'." or nast-kschl eq 'ZPRE'.
PERFORM READ_TEXT USING W_NAME 'Z555' 'VBBK'.
ENDIF.
IF SY-SUBRC EQ 0.
DELETE TDLINES WHERE TDFORMAT EQ '/*'
OR TDLINE EQ SPACE.
LOOP AT TDLINES.
RECIPIENT_INT-ADDRESS = TDLINES-TDLINE.
RECLIST-RECEIVER = RECIPIENT_INT.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
ENDLOOP.
if sy-subrc eq 0. "S4DK966284
exit. "S4DK966284
endif. "S4DK966284
ENDIF.
endloop.
LOOP AT T_TVBDPR.
CHECK T_TVBDPR-TDNAME+0(10) = VBDKR-TDNAME. "S4DK966284
W_NAME = T_TVBDPR-TDNAME.
IF NAST-KSCHL EQ 'ZLEE'.
PERFORM READ_TEXT USING W_NAME 'Z558' 'VBBP'.
ENDIF.
IF SY-SUBRC EQ 0.
DELETE TDLINES WHERE TDFORMAT EQ '/*'
OR TDLINE EQ SPACE.
LOOP AT TDLINES.
RECIPIENT_INT-ADDRESS = TDLINES-TDLINE.
RECLIST-RECEIVER = RECIPIENT_INT.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
ENDLOOP.
if sy-subrc eq 0. "S4DK966284
exit. "S4DK966284
endif. "S4DK966284
ENDIF.
ENDLOOP.
SEND THE DOCUMENT BY CALLING THE SAPOFFICE API1 MODULE
FOR SENDING DOCUMENTS WITH ATTACHMENTS
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
IMPORTING
SENT_TO_ALL = SENT_TO_ALL
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
Regards
amole -
How to create a table format in Scripts
I need atabe format to display items in invoice created using scripts
Hi Vikrant,
Here you need to create different boxes in the SAP script in the window where you want the table to be created.
eg: BOX WIDTH 10 CH FRAME 10 TW
You can create a table in SAP scripts using the BOX commands.
Regards,
Shahu -
Hi ,
How can I change the date format in MAIN window.
I am ablt to used SET DATE MASK in all the windows, but in main window this option is not working.please suggest how to change the date format?
Regards,
Sri.for sap script u can change the date format in driver programm and store it into any variable and than write it in to sap script main window...
for example..
Suppose a date is given in the format 20050428 how to get the output in the format 28th Apr 2005.
FORM set_text_date.
DATA: month(9),
year(4),
date(2).
CASE p_frd+4(2).
WHEN '01'.
month = 'January'.
WHEN '02'.
month = 'February'.
WHEN '03'.
month = 'March'.
WHEN '04'.
month = 'April'.
WHEN '05'.
month = 'May'.
WHEN '06'.
month = 'June'.
WHEN '07'.
month = 'July'.
WHEN '08'.
month = 'August'.
WHEN '09'.
month = 'September'.
WHEN '10'.
month = 'October'.
WHEN '11'.
month = 'November'.
WHEN '12'.
month = 'December'.
WHEN OTHERS.
ENDCASE.
WRITE p_frd+0(4) TO year.
WRITE p_frd+6(2) TO date.
CONCATENATE month date ',' year INTO return_date SEPARATED BY space.
CONDENSE return_date.
ENDFORM. -
hi experts,
in scripts, in paragraph formats we have a tan called "outline".
can any one help me to know abt that. plz give me what is the purpose of it, n how to implement that one. i mean how to use it.
thanks in advance for ur responce.hi
good
The paragraph numbering and marking attributes are used to structure texts into chapters, subchapters, and sections. Numbering is carried out automatically by SAPscript.
You can create an outline with the entry options available:
Outline
Enter the name of the highest-level paragraph in an outline hierarchy here. The outline hierarchy is created by assigning this paragraph to all outline paragraphs.
Outline level
Enter the level in the outline hierarchy. The outline levels of the paragraphs are numbered upwards from 1; the highest outline level therefore has the outline number 1.
Number margin
Specify the space between numbering and window border. Note that your numbering may extend into the text area of the paragraph if the difference between the left margin and the number margin is not great enough to hold the numbering characters.
Left/right delimiter
Specify the character that precedes or follows the numbering.
Number chaining
Specify whether you want the paragraph numbering of the paragraph to be preceded by the numbering of all higher paragraphs in the hierarchy.
Example for number chaining
with without
3. 3.
3.1 1.
3.2 2.
3.2.1 1.
Character string
Specify the numbering format. The numbering can be assigned a different font or character format to the rest of the paragraph.
Numbering type
ARABIC
Arabic numerals: 1, 2, 3.
CHAR Fixed character: letter or numeral, entered in the field
LETTER Letters: A-Z
ROMAN Roman numerals: I, II, III, IV
Depending upon the numbering type that you select, the following attributes may also apply:
Fixed character
Define the fixed character to be used for numbering. You should only make an entry in the field Fixed character if you have specified CHAR as the numbering type. Fixed characters include + - and o .
Output length
Enter the number of characters for Arabic numerals.
Upper case
Specify for letters or Roman numerals.
check this link hope this will help you to solve your problem.
http://abapprogramming.blogspot.com/2007/11/sap-script-controls-2.html
thanks
mrutyun^ -
Data conversion into specified format using Script component in SSIS 2008
We have a field in the flat file source which is of the format 13399I , and it need to be type cast to the below format.
13399I = 1339.99
5950{ = 595.00
The sign field equals:
{=0
A=1
B=2
C=3
D=4
E=5
F=6
G=7
H=8
I=9
please let us know how to accomplish using script component in SSISYou can use the following in the script task.
1) Create a dictionary to hold the key-value pairs ({=0,A=1...).
2) Use a substring function to pull out all the string minus the last character.
3) Append the last character back after replacing the character with the respective value from the dictionary.
4) Convert the final string to int/decimal/numeric as per the destination.
Do keep in mind, the data you are referring to is in the COMP3 format. You can do some further research regarding how to convert COMP3 to decimal. There are many ways out there. I personally prefer to load the data into a table and us a lookup table
to do all this. But it's entirely by preference. -
Formatting Variable into Currency Format INSIDE script
Hello,
I was wondering if someone could give me insight on why I'm running into some problems.
So, in my script, I'm trying to display my [decimal]$Variable into currency format ( $x.xx )
By looking around online, I found two different ways;
"{0:C2}" -f $Variable will create the appropriate output in my open shell
$Variable.ToString("c") will also work in my shell.
Now my only problem is that despite numerous attempts and quadrouple checking that I typed it into the ISE properly, I can't for the life of me get it to display properly in my script.
I even just tried saving the output into a variable before I put it into my write-host line.
Does anyone know what the problem is?
Thanks, Phil$TaxPayable.ToString("c") | Set-Variable -Name $TaxInCurrency
$TotalCost.ToString("c") | Set-Variable -Name $TotalCostInCurrency
##########################Display the $TaxPayable and $TotalCost to the user###################################
Write-Host "The Tax for the Book is $TaxInCurrency, making the total cost $TotalCostInCurrency"
This is my latest attempt to make it work. Sorry about the initial lack of information
-
Clarification on character format in scripts
Hi
i have a standard from name j_1a_F007_cd_mem. in this form in the main window there is a statement like this <bd>j_1ai02_barcode in the third line. but in this form this <bd> character format has not declared any one. im surprising how this is working with out declaring. can any one please clarify this one how this is working. whether this character format is calling from some where.
Thanks in advance.
Rahul.hi,
U will find the Char format <BD> in char fomats along with Barcode format.
if u don't find them there then reimport the script from client 000 and see.
You can the find that in the Character formats radio button and there itself you can see the barcode option.
reward if helpful
regards,
sravanthi -
Re : page formats in scripts
Hi gurus,
In scripts multiple page formats are not avilable. what exactly it means. can any one pls give the explanation.
with regards
aru.Hi!
Multiple page format means landscape and portrait page in one form. This is not possible in SAPscripts.
Coming to SMARTFORMS this is possible, i.e first page output in portrait and second page output in landscape.
Regards
Tamá
Maybe you are looking for
-
Basically my iTunes playlists have gone missing. They were there yesterday and today I got a replacement iphone. I connected it to itunes and they were gone I was left with just 3 songs I had downloaded from the itunes store. I've read previous posts
-
24'' iMac (White) Nvidia drivers need updated for games
I have the Nvidia GeForce 7600 GT 256MB graphics card in my iMac. Apparently the GeForce 7 series drivers for Mac are really buggy, so some developers have blocked access to the games. First is Steam, which recently came out with a Mac version. I was
-
hi, i'm beginner in j2me... I was wondering how to call to other form(class) in the current form... For example, public class A extends MIDlet implements CommandListener public void commandAction(Command d,Displayable s) if (d==*OKCommand*) if press
-
<p>Guys,</p><p> I am completely new toHyperion. We are trying to replace an existing HYperion system atthe client side and was trying to understand the system. Can someone help me out with some technical docs that can give me anoverview of Hype
-
Problem Installing Snow Leopard...Please Help!!
Following the install instruction it said 45 minutes left...so I went on with my morning and came back to check on it and the screen was completely black. Nothing would wake the computer until I finally held the power button down then restarted. Now