Adding commas in quan variable of smartforms
hi experts,
In my smartforms,i have a variable temp_menge which is having value 1000000 but i want to get it displayed as 1,000,000.How to write the same.?????
Thanks,
Gaurav
Edited by: Gaurav Kumar on Feb 26, 2008 2:30 PM
Hi,
There might be 2 possibilities. One is data type. Symbols of the DEC, CURR, INT, and QUAN data types are normally formatted with the a thousands separator character. The T option allows you to omit this separator character.
Syntax:
&symbol(T)&
The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.
&EKPO-MENGE& -> 1,234.560
&EKPO-MENGE(T)& -> 1234.560
So one thing is change your data type to TYPE P or remove the (T) from your code. This should work.
Reward points if helps.
Regards,
JLN
Similar Messages
-
Hi,
i´m working with a smartform. In this smartform i get a subtotal of an amount field.
The question is that the result is OK but the output format is wrong (i get 1,000 instead of 1).
What should i do in order to get the right output format?
Best regards.Hi,
first of all thanks fo your help.
The problem was that i hadn´t defined the variable properly.
Here´s how i solved the problem:
in gobal data tab i´ve defined my variable thus
VARIABLE NAME TYPIFICATION REF. TYPE
GS_QTY LIKE GS_IT_GEN_BATCH-DLV_QTY
GS_QUAN_UNIT LIKE GS_IT_GEN_BATCH-SALES_UNIT
and in currency/quantity fields tab i´ve written:
FIELD NAME REFERENCE FIELD DATA TYPE
GS_QTY GS_IT_GEN_BATCH-SALES_UNIT QUAN
Best regards. -
How to dynamically replace variables in SMARTFORM texts based on item data?
Hi experts,
I'm currently designing a confirmation of order using Adobe PDF forms. The general layout with tables, pictures and texts was not big deal.
But one tiny bit doesn't work and I'm becoming more and more desperate about it.
We need various free texts for our pdf form. I created the texts using smartform texts. Some of these texts need to be slightly dynamic, so I added some dynamic fields in it.
For example:
"The material is currently out of stock.You can expect shipping around week &num_week&."
To replace the dynamic field &num_week& in my interface, I read that I have to name the dynamic field exactly like the corresponding field in my interface. In my case this would be now:
"The material is currently out of stock.You can expect shipping around week &SLS_PRT_COM-ITEM_DETAIL-ZZ_EXTRAFIELDS-ZZWEEKNUM&."
To see the text on my form, I added a text object with type 'text module' and the proper textname. Of course I'm able to insert text on my form, save and activate it without problems. But if I want to print the form, nothing happens as the print program exits with an error code.
After some hours I found out that this problem only occurs if I'm trying to replace the dynamic field with a field from the item table. Using a field from head details or globals like sy-mandt works like a charm.
So my question is: Is it possible to use item data to replace dynamic fields of a smartform text?
Greetings and thanks in advance!
AndréHi
Have a look at the links below:
LiveCycle ES2 * Adobe LiveCycle Designer ES2
Using floating field in Adobe Forms to display text paragraph with dynamic variables in between
After adding the floating field it will apeare in the hierarchy pallet above or bellow the text field.
Good luck
Shai. -
Problem with windows and variable in smartform
hi guru,
i create smartform for printing tax document and found problem.
1)
i create layout in form like this.
{Main Window}
<<<< Data to print
<<<< secondary Window
<<<< secondary Window
with many data in table, so this form will take 10 page up to print. i found and showed in every page.
in my solution *i want to display and on last page after {Main Window} Only*. how to resolve this.
2) follow to 1st question, can i place position of each window in dynamic? +like 's position is under {Main Window} 2 cm.+ instead of specific position left margin , upper margin *or should i create other page and place and .*
3) i create 2 variables (sum1 type p , sum2 type p ) for keep sum of tax in table that show in each page and write it at end of each page. i want to clear data in these 2 variables when system create new page and start to keep sum of value again. i create program line node under {Main Window} after but don't know which code or syntax to write.how to code this?
regards,
Kittisak.1) On the 'Conditions' tab of your WIndow3 & WIndow4 just click the check box
'Only After End of Main Window'. It will always be printed at the last after your main window is finished.
2) And if you don't want your window3 & window4 in a fixed place than instead of new windows do the same thing inside your main window creating a new template or anything as per your requirement and place it after your main table.
3) For clearing the fields, do it like this, in the program lines write the code below:
IF G_PAGE NE SFSY-PAGE. " declare g_page with initial value '0'
CLEAR field1.
CLEAR field2.
G_PAGE = SFSY-PAGE.
ENDIF.
With luck,
Pritam. -
I am working on adding metadata to my images. Many are works of my own or public domain art pieces. I need to be able to add an artist's name as Lastname, First, but that would result in two metadata bits. Is there a way to add in a comma as part of the tag?
Thanks,
AndacarAndacar62 wrote:
Lastname, First
Are you adding as keyword? If so, there is a preference for different separator. -
Hi all,
In our Smart forms we have fixed text of 10-12 lines , within which we have 1-2 variable data (dynamic).
Now for this in the smartform,we were thinking to use Standard text SO10 .
Another query is that if we define std texts in SO10 for different cases,we need to call these within the same smartform i.e. something like CASE structure in the SMARTFORM...Whats the best way to achive the above?
BR,
Disha.Hi Disha,
May be you can use some code like this:
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'ST'
language = sy-langu
name = <Standard text name>
object = 'TEXT'
TABLES
lines = it_lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc = 0.
LOOP AT it_lines INTO wa_lines.
IF wa_lines-tdline CS '<fdate>'.
REPLACE ALL OCCURRENCES OF '<fdate>' IN wa_lines-tdline WITH lv_create.
ENDIF.
IF sy-tabix = 1.
ls_bodypart-content_ascii = wa_lines-tdline.
ELSE.
IF wa_lines-tdformat NE '='.
CONCATENATE ls_bodypart-content_ascii cl_abap_char_utilities=>newline
wa_lines-tdline INTO ls_bodypart-content_ascii.
ELSE.
CONCATENATE ls_bodypart-content_ascii
wa_lines-tdline INTO ls_bodypart-content_ascii.
ENDIF.
ENDIF.
ENDLOOP.
Note: <fdata> is the dynamic variable declared in standard text(SO10).
BR,
Swagatika -
String variables in smartforms
Hi
I have one problem when displaying the text in smartform
i declared my variable as string type
in the smartform i get the item text from purchagse order ( it is about 300 characters) into this variable.
even though the lengh of the variable is showing 300,
but for visible it is displaying only 260 characters,
what is the reason for this the variable is in main area only.Hi
Smartforms can display only 255 characters by default.
If you want more then, you have to give the variable like this:
/: var1+0(255)
/:var1+255(255)..... so on..
Regards,
Vishwa. -
Syntax to keep adding 1 to a Variable
This is driving me nuts. I am trying to add 1 to my variable everytime it is moused over. I had the syntax correct at one point, but now I cannot for the life of me get it right.
So on frame 0 of my animation I have:
sym.setVariable("myVar", 0);//Sets Variable myVar to 0
On my mouseOver I am trying to get that value to be a ++ but my syntax is off.
I have tried this:
sym.setVariable("myVar" ++);//Adds 1 to the value of Variable myVar
Doesn't seem to work. I've tried it with a comma without quotes you name it. Wish I could find some documentation beyond this page for syntax:
http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.htmlI appreciate the help, but your code doesn't work for me. Also according to this page:
http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html
You should put "var" in front of variable names.
DO
var myVar = "This is scoped and should not conflict with other code.";
AVOID
myVar = "this is global and might conflict with other code in the page"; -
Trouble adding commas to string
I'm using a pretty standard function to add commas to a large
number (so that a number like 1000000 appears as 1,000,000). Below
is the actionscript I'm using.
When I define the variable debt as any number, the script
works perfectly. But if I define debt as a variable passed to the
movie from a PHP file, then the script puts the commas in the wrong
places (i.e., 10,000,00). Can anyone explain to me why this would
happen, and how to fix it?
var input = debt;
var inputString = input.toString();
var finalString = "$";
var count = 0;
var tempString = "";
for (var i = inputString.length-1; i>=0; i--) {
count++;
tempString += inputString.charAt(i);
if ((count%3 == 0) && (i - 1 >= 0)) {
tempString += ",";
for (var k = tempString.length; k>=0; k--) {
finalString += tempString.charAt(k);
return(finalString);I can see that this is cleaner than my script. However, the
comma problem continues...
quote:
Originally posted by:
LuigiL
Nope, coming from PHP your var is already a string. Omit the
toString()
var input = "1000000";
//var inputString = input.toString();
var finalString = "$";
var count = 0;
var tempString = "";
for (var i = input.length-1; i>=0; i--) {
count++;
tempString += input.charAt(i);
if ((count%3 == 0) && (i - 1 >= 0)) {
tempString += ",";
for (var k = tempString.length; k>=0; k--) {
finalString += tempString.charAt(k);
trace(finalString); -
Declare Variable in Smartforms from BT and EPF tables
Hi All,
I am developing a smartform to display the payslip of employees.
In my smartform I need to use fields from the BT table and EPF Table.
I need to declare variables for the same fields in smartform.
How can this be achieved.
Any pointers or suggestions would be helpful.
Thanks,
SaherHi
Please search with the search term smartforms and u will get many threads which will answer your question.
In general, in form interface of smartform we declare the tables whose values are passed from the print program.
IN global definitions, we declare the variables we use in the smartform.
Regards,
Vishwa. -
Current window variable in SmartForms
Hi,
what is syste variable to find the name of the current window in Smartforms,
regards,
venkat
Edited by: Alvaro Tejada Galindo on Feb 27, 2008 12:02 PMHi Venkat,
I think the system variable you are looking for is SFSY-WINDOWNAME!
Have a nice day! -
Adding Multiple Task Sequence Variables to Devices using C#
Hello,
I am hoping someone can help me with a small program I am writing for our company. We are writing a small program in C# to import computers to a particular imaging collection and we need 2 variables set. We have been able to create a single variable
using this guide: http://msdn.microsoft.com/en-us/library/jj218235.aspx
The problem is that when we write the 2nd variable, the first one is overwritten. It looks like that property is an array. I've been trying to find a way, either using the SCCM 2012 R2 SDK or just adding it via the standard System.Management
functionality.
I'm sure there is a way to do it, the Powershell CMDLets will add variables rather than overwrite. We are trying to avoid that due to some PowerShell restrictions.
Any help would be much appreciate, I'm sure the answer is not as difficult as I'm making it but I'm stuck as I am not really a programmer, but, like many of us, have to function as one at times.
Thanks!Certainly, here you are (I've removed some company-specific info and replaced it with generic info). I'll note - this code does work to add a variable to a device in SCCM. When adding multiple variables though, the first one is replaced. This code only seems
to work for adding 1 variable which is what is causing me the headache.
privatevoidAddVariable()
SmsNamedValuesDictionarynamedValues
=newSmsNamedValuesDictionary();
WqlConnectionManagerconnection
=newWqlConnectionManager(namedValues);
connection.Connect("SCCMSITESERVER");
try
// Get the computer settings.
// strResourceID is obtained via separate method “GETRESOURCEID()”
IResultObjectcomputerSettings
=null;
IResultObjectcomputerSettingsQuery
= connection.QueryProcessor.ExecuteQuery(
"Select * from SMS_MachineSettings where ResourceId = '"+strResourceID
+"'");
foreach(IResultObjectsettings
incomputerSettingsQuery)
computerSettings = settings;
if(computerSettings
== null) // It doesn't exist, so create it.
computerSettings = connection.CreateInstance(@"SMS_MachineSettings");
computerSettings["ResourceID"].StringValue
= strResourceID;
computerSettings["SourceSite"].StringValue
= "SITECODE";
computerSettings["LocaleID"].IntegerValue
= 1033;
computerSettings.Put();
computerSettings.Get();
// Create the computer variable.
List<IResultObject>computerVariables
= computerSettings.GetArrayItems("MachineVariables");
IResultObjectcomputerVariable
= connection.CreateEmbeddedObjectInstance("SMS_MachineVariable");
computerVariable["Name"].StringValue
= strVariableName;
computerVariable["Value"].StringValue
= strVariableValue;
computerVariable["IsMasked"].BooleanValue
= false;
// Add the computer variable to the computer settings.
computerVariables.Add(computerVariable);
computerSettings.SetArrayItems("MachineVariables",
computerVariables);
computerSettings.Put();
catch(SmsExceptione)
MessageBox.Show("Failed
to create computer variable: "+ e.Message);
connection.Close();
Thank you for your help -
How to add commas to number variables?
I need to turn my double variables into String variables and add commas where appropriate.
for example
1000
would be 1,000
is there a library for doing this or do I have to search the string for length, etc...Just initialize your app setting:
java.util.Locale.setDefault(java.util.Locale.ENGLISH);or choose any other locale to get the format you want. -
Adding messages to the Variable entry screen in web report
I need to add a message or note to the variable selection screen on a web report. I need this message or note to be displayed somewhere on the same screen with the variable list. I found something similar in BW Expert regarding pop-up messages, but this does not work with web templates. Does anyone know of a way to add a static (or dynamic) message to this initial screen of a web report?
In my clients place, they are ready to do the SAP Mod based on "CL_RSR_WWW_VARIABLE_SCREEN" to have a Alert Message which sort of based on different idea.
Does anyboay have an idea on where to make the change?
Thanx
Arun -
Adding Commit in version 10.1.3
I've been following the following workshop but I'm using 10.1.3.
http://www.oracle.com/technology/obe/obe9051jdev/ide1012/adfworkshop/buildingadfapplicationsworkshop.htm#t3s2
I've been trying to add a commit action
I can't find the UI Model tab mentioned in the section below. I've been told this has been removed and to use the PageDefs.
You also will need an action binding named 'Commit' that will be bound to the built-in commit operation of your UI model. To add the Action:
1. With sure.jsp active in the Visual Editor, click the UI Model tab of the Structure window.
2. Right-click the root node in the tree and choose Create Binding > Actions > Action from the context menu.
3. Select your data control (CustomersWSViewDataControl) in the Data Collection list.
4. Select Commit as the action using the Select an Action drop-list.
5. Click OK to continue
I have inserted a commit action in the PageDef bindings by right clicking and using 'insert inside bindings' but it doesn't seem to commit the row deletion as when I check in SQL developer afterwards, the data is still there. It shows it as deleted in the application, but it is still there in the database... what am I doing wrong?
Gus..Are there any 10.1.3 versions of this
http://www.oracle.com/technology/obe/obe9051jdev/ide1012/adfworkshop/buildingadfapplicationsworkshop.htm
workshop that explains PageDefs and findForward(PageLifecycleContext context) as opposed to UI Model and[b] findForward(DataActionContext actionContext)
Maybe you are looking for
-
Is there a way to block inappropiate search terms in Safari on an iphone or ipad?
I want to block certain search terms on the iphone and ipad that my son uses. Is it possible to do this in Safari on these devices?
-
Saving a folder (or exporting)
can anybody advice me as to how to export and or save a PROJECT with images in it that I need for a presentation in Keynote? I need to back this information up or export it in case of a problem and I'm not sure how to do this. Is there a good way to
-
I find myself in the same boat as those using these 1.25 Ghz eMac's, and getting very frustrated. I find this to be quite a puzzler, have tried all sensible propsects to bring this to a conclusion.Yes, it started with the appearence of "the unrepaira
-
Upgrade BI Content Level 0000 to 0008
Hi, I have posted this to BI with no responses so I'm posting here in hopes some Basis person might be able to help. We currently have BI Content BI_CONT 7.03 0000 (Level 0). I would like to have the latest Business Content Level for Statistics.
-
Almost perfect the third time around; space bar...
Here's my short MacBook Pro story. Got one, whine, sent back. They replaced it, got another one with a whine. This time they said they'd only repair it. I sent it for repair and they couldn't repair it so they replaced it. Third MacBook I get doesn't