Smart Forms : problem with Float Variable
Hi Expert,
I have a probelm with Float variable. In my smart forms one fields of table QAMV contain value like 8.0000000000000000E+01.
I have to remove the exponent and display value like 80.
I have tried wa_qamv-sollwert(E10.4).. but it not working.
Can U suggest me some solution.
Regards
Swati.
Edited by: Swati Namdev on Apr 27, 2010 12:19 PM
Hi,
Please follow the steps.
1. In your smart form create a variable w_val ,, type,, associate type --> CHAR10
2. Now write a code, jsut above your node where u wud like to get this value... For this Create -> Flow Logic -> Program Lines.. Now you have editor..
3. In input parameters , put i_tab-QAMV.. and in output parameter put w_val... and Code like below
CALL FUNCTION 'MD_CONV_QUANTITY_FLOAT_TO_PACK'
EXPORTING
iv_menge = i_tab-qamv
IMPORTING
EV_MENGE = w_val.
4. Now grag and drop this w_val from global data field list...your this w_val will have the rounded value.. Pls try this and check.. It will work.
Regards,
Lokesh.
Edited by: Lokesh Tarey on Apr 27, 2010 9:28 AM
Similar Messages
-
Smart Form problem with address layout
Hello everyone,
I need your help please for a smart form problem. We need the address layout for great britain with street1, street2 etc. but currently street2 is alligned before street1.
We are using the FM ADDRESS_INTO_PRINTFORM (SAP standard address node) and according to the documenation the layout for GB is different as we see it currently.
We have checked the sold-to and all contact persons, they have as country GB and language EN maintained.
In customizing for address screen layout there is nothing chosen (tested to set up Europe, but did not change anything).
For the customizing 'specify my countries...' we have maintained GB as country with the address layout key 006, vehicle country key GB and language key EN.
For the described setting shouldn't there be designed the address in our smart forms according to 006? Anyhting in customizing we missed?
Thanks a lot for your answers.
TorstenHi,
Try to use line priority of FM, below is a brief of documentation. You can read it more in FM documentation:
Control Parameters
See also the parameter documentation.
ADDRESS_TYPE - Address type (from 3.0C)
There are three types of address:
Address type '1': addresses of firms or organizations; the address
structure which is used in most SAP applications as 'Address'.
Address type '2': address of a person
Address type '3': work address, usually the address of a contact person
in a company
The default value SPACE for the address type is handled like type '1',
and is needed for the upwards-compatibility of the function module.
Which parameters are used for which address type is explained in the
ADDRESS_TYPE parameter documentation.
The three character "address layout key" of the recipient country (LAND1) controls which of the available country-specific routines is used to format addresses for the country in question. This key is stored in field T005-ADDRS and is entered in Customizing under Global settings -> Set countries -> Define countries, on the detail screen under "Address layout key".
Keys for customer routines in the SAP enhancement SZAD0001 can be
maintained via the transaction SM30 (extended table maintenance),table
name T005A, in the customer name range, and be assigned in country customizing.
The address attributes are passed in the structures ADDRESS1 (type 1), ADDRESS2 (type 2), ADDRESS3 (type 3) or ADRSWA_IN (type SPACE).
NUMBER_OF_LINES (ADRSWA_IN-ANZZL)
The number of lines available for the address layout. If the number of
lines is not sufficient for the complete layout of an address, then
lines are consecutively suppressed according to the rules of the country in question. Use the parameter LINE_PRIORITY (ADRSWA_IN-PRIOR) overrules the standard sequence in which the output lines are to be suppressed.
LINE_PRIORITY (ADRSWA_IN-PRIOR)
If not equal to SPACE, this field overwrites the standard sequence in
which the lines are suppressed if the available number of lines ANZZL is
insufficient.
The standard sequence is defined as follows:
Type 1: 'AP43HRT7I86LC2BS5O' (GB: 'APRT4327I86CBS5LO')
Type 2: 'APHRT7I86LCBS5O' (GB: 'PRT7I86CBS5LO')
Type 3: 'APF43HR7I86TLC2BSND5O' (GB: 'APRT4327I86CBS5LNDIO')
where (if they occupy a line of their own):
A = Title
P = Mandatory empty line 1
F = Function of the contact person in the company
4 = Name 4
3 = Name 3
H = Different city
R = Region
T = District
L = Name of country
C = Postal code
T = District
7 = Street 3 (field STR_SUPPL2)
I = Street 5 (field LOCATION)
8 = Street 4 (field STR_SUPPL3)
6 = Street 2 (field STR_SUPPL1)
L = Country
C = Postal code
2 = Name 2
B = PO Box
S = Street or PO Box
5 = c/o name
N = Name (and title) of a person
D = Department
O = City
Which of these attributes are available for maintenance can vary. All
fields exist in Business Address Services.
STREET_HAS_PRIORITY (ADRSWA_IN-WAREN)
'X': Street has priority over PO Box (delivery address for example)
' ': PO Box has priority over street. This is the default value.
regards, -
Smart form problem with multiple pages & table problem
Hi experts,
I have a problem with my smart form with multiple pages
Situation: I have a smart form that ALWAYS has at least 2 pages. In one page the quotation, in the second page (basically this is the 3rd page as the 2nd page is optional) the terms and conditions. Sometimes however, when there are many items in the quotation more than 1 page is needed for the quotation.
The (optional) second page of a quotation has a different header than the first page of a quotation. So I made a second page with 2 secondary windows (where the header texts are in). The main window is after the secondary windows and has to finish the quotation.
The problem is that my headers of the second page are never printed, it stays a blank space. The table however does continue and is printed.
Another problem I have is that I have a table (with the quotations) with 6 columns. The first 2 columns are displayed correctly but once the 3rd column the columns are shown on a lign below.
Regards,
PJI would suggest another approach to this problem.
Use just one page. For the headers on the first page, use a secondary window and on the conditions tab, choose the additional event - Only on First Page.
For the different header on the second page, create another secondary window on the same page (probably even overlapping the first header on your layout). But in this one, on the conditions tab, choose the additional event - Not on First Page.
The table should flow as you would be using the Main window for this one.
As for columns, if they are too wide and wont fit in the same line, it would move to the next line. So you would have to re-adjust the line width and test.
Hope this resolves your problem.
Regards,
Ancy
Edited by: abapfreak on Oct 4, 2010 11:52 AM -
HI,
I am facing problem with formula variable with replacement path. my requirement is system date - posting date.
here i created 2 formula variable one is system date. second formula vaiable with replacement path is posting date. second formula vaiable not populating data. please help on that.
regards,
krisHi,
here is some idea.. here i have taken expample dates 1)notification creation date and 2) notification completion.
1st:in the query designer at key figure coloumn create
one local formula.in that local formula create formula
variable with replacement path.in that take reference character
notification completion.in the next tab take replace ment
as key.in the last tab select "date".
2nd: do the same thing for the notification creation date.
3 rd : create 3 rd local formula and do the substraction
for the first 2 local formulas.
4th:create codition on the difference which u have find with
on that condition u can create one user entry varibale.
5th:while u defining the query put these 2 dates,i,e
notification completion, notification creation date in the character block.
If not system will ignore the formula variable which u created in
above steps.
Hope this wil help u.
regards....KP -
I am new to Java Programming.
I have a line of code that works and does what is supposed to.
faceData.getProfile("Lisa").removeFriend("Curtis");
If I assign the strings to variables such as-
String name = "Lisa";
String fName = "Curtis";
and then plug those into the same line of code, it does not work
faceData.getProfile(name).removeFriend(fName);
What could be causing the problem?
I even added some lines to print out what is stored in the variables to verify that they are what they should be, but for some reason the variables do not work while putting the strings in quotes does. Any ideas?I guarantee that something about your assertions are incorrect. Those variables are either not equal to the values you claim, or something else is going on. But it's not a problem with string variables versus string constants.
Edit: My best guess in lack of a real example from you, is that the strings in question have non-printable characters in them, such as trailing spaces or line feeds. -
TPC 2012 - Problems with shared variable
Hi,
I tried to program simmilar thing to this one http://zone.ni.com/devzone/cda/tut/p/id/5548 on TPC 2012. But it doesn't work.I can see that both programs on my laptop and TPC are working(I've added an additional counter with display), but I cannot see any effect on TPC when I change the value of shared variable on my laptop. I use LabView 8.6 with Touch Panel Module. My question is what are the exact steps to run such application on TPC2012? Are they the same as for TPC 2006?
I've noticed following issues:
1.I cannot deploy the program from Project Manager(there is an information that maybe TPC Service is not started. - I've found such information about TPC Service http://digital.ni.com/public.nsf/allkb/DE177828D27A14A48625734E00768B66 but in fact I cannot find Start » All Programs»National Instruments » NI TPC Service » NI TPC Service Manager 1.0 Does it mean, that the TPC Service is not installed and the programm with shared varibles won't be working or can I start it somehow in another way? Do I need to have TPC service installed on TPC2012?
Until now, I've built the project and sent it through FTP to TPC(the folder was /TEMP) and then started it.
2.Ping works OK
Thank you in advance for any hints how to solve this problem.
MartinWell no problem, but I'm frustrated with this issue... I've tested many things and nothing. Just to help someone else as I in the future, these are my sources:
http://forums.ni.com/t5/LabVIEW/TPC-2012-Problems-with-shared-variable/m-p/1009631/highlight/false#M...
http://digital.ni.com/public.nsf/allkb/28536DE7E2D9E98B8625770B00738920?OpenDocument
http://zone.ni.com/reference/en-XX/help/372507B-01/lvtpcgsm/tpc_install_sharvar/
http://zone.ni.com/reference/en-XX/help/372507C-01/lvtpcgsm/tpc_install_sharvar/
http://digital.ni.com/public.nsf/allkb/23532363F4905EC28625727A00730B80?OpenDocument
http://forums.ni.com/t5/FieldPoint-Family/TPC-2006-Not-Listed-in-Targets-and-Devices/td-p/566325
http://forums.ni.com/t5/LabVIEW/MAX-can-t-detect-TPC-2106T/td-p/831524
http://zone.ni.com/devzone/cda/tut/p/id/5868
http://digital.ni.com/public.nsf/websearch/28B748B9697B79E18625725A00009066?OpenDocument
http://digital.ni.com/public.nsf/websearch/D1726990DCEB82E4862570F20069C57D?OpenDocument
http://digital.ni.com/public.nsf/allkb/3B469103BBDD4CE48625726000665B36
I hope find some hint..
Fabian León
Certified LabVIEW Associate Developer -
Problems with /tmp variable
Hi,
I'm writing a shell script and I seem to be having problems with a variable that is creates a directory in the /tmp directory. Essentially, there are several points where various parts of the script call out information that gets exported to that directory. My script is failing upon creation of this directory, is there any specific permissions on the /tmp directory in mac that would need to be set before something like this occurred?
Thanks!My script is failing upon creation of this directory
Maybe you could post your code, that way we can see how you're trying to create the directory and may be able to spot the problem. As it is we're working blind, and that's not easy. -
Problem with environment variables
JAVA_HOME = C:\JBuilder9\jdk1.4
Path = C:\oracle\product\10.1.0\Db_1\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin\client;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;.;C:\oracle1\product\10.1.0\Db_3\jdbc\lib\classes12.zip
When I run foo.java I get this error, which i believe is because of some kind
of problem with environment variables.
Exception in thread "main" java.lang.NoClassDefFoundError: OraThinI eliminated this path
C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin
just to check whether two paths of jdk bin folder is causing problem but I see no change.
Please helpI had solved it myself
I am a genious :P
Just do this
JAVA_HOME = C:\JBuilder9\jdk1.4
CLASSPATH = C:\oracle\product\10.1.0\Db_1\jdbc\lib\classes12.zip;.;%JAVA_HOME%\bin
PATH= C:\oracle\product\10.1.0\Db_1\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin\client;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;.;C:\oracle1\product\10.1.0\Db_3\jdbc\lib\classes12.zip;%JAVA_HOME%\bin -
Creating a pop window in smart forms runtime with text entry
Dear Experts,
I Need to Create a pop window ( in run time of smart forms ) in which the user can enter some text and that text needs to be populated in the smart forms ouput.
i know that I can write code inside smart forms to do it.
I dont know when where and what to done to achieve this functionality.
Can any of you help me out in this scenario.
WIth Thanks and Regards
Ravishankar Vembu.HI
Where u want to call this POPUP.
u can call the popup in INITIALIZATION tab and in PROGRAM LINES also.
eg.. create program lines--> call the FM
data: V_SVAL type sy-ucomm.
CALL FUNCTION 'ACE_POPUP_WITH_4_OPTIONS'
IMPORTING
ANSWER = V_SVAL.
when u call the smatform the popup will be displayed automatically
Please Close this thread.. when u r problem is solved. Reward if Helpful
Regards
Naresh Reddy K -
Smart forms print with EPSON LQ-2500
HI all,
I have a problem that my EPSON printer can not print all the lines of the table in Smart-forms. And always the same lines can not be printed. If I output the form with PDF Printer first, then, I print the PDF file with my printer, it would be quite well. So I think there should be sth. wrong with my programe or settings in SPAD. Is there someone can help me to solve this problem? Many thanks!Hi Anji and Ravi,
thank you for your reply; in Quality and PRD the character format "H" exists
and in effect the format of text type A is correct.
Also the angular brackets are correct <\>.
Regards. Paolo
Message was edited by:
Paolo Cavallini -
Purchased ColdFusion 10: Having problem with session variables
My Dept. has just bought CF10 and I'm finally updating my existing web app to CF10 from CF8. My First Problem with CF10 is using session variables.
When using the lower version of CF (since CF 4 to 8) I have never had any problem setting up session variables and getting or using these variables in other pages after a successful login but with CF 10 it seems setting session variables and using them in other pages are a major problems. I'm not sure where have I done wrong in the codes.
First I'm setting the session in my Application.cfc This way:
<cfcomponent displayname="Application" output="true">
<cfset THIS.Name ="MyNewApp"/>
<cfset THIS.ApplicationTimeout = CreateTimeSpan(0,0,20,0) />
<cfset THIS.SessionManagement ="YES"/>
<cfset THIS.SessionTimeout = CreateTimeSpan( 0, 0, 20, 0 ) />
<cfset THIS.SetClientCookies = false />
<cffunction name="OnApplicationStart" access="public" returntype="boolean" output="false">
<cfset application.Main_DSN = "TESTDB">
<cfreturn true />
</cffunction>
<cffunction name="onApplicationEnd" output="false">
<cfargument name="applicationScope" required="true">
</cffunction>
<cffunction name="OnSessionStart" access="public" returntype="void" output="false" hint="Fires when user session initializes.">
<cfset session.loggedin = "NO">
<cfset session.username = "">
<cfset session.userrights = "">
<cfset session.usergroup = "">
</cffunction>
</cfcomponent>
After login, user is validated and set values to those session.variables:
........user validation codes here......................
<cfif mylogin NEQ true>
<cflocation url="/login/login.cfm">
<cfabort
<cfelse>
<cfset session.loggedin="Yes">
<cfset session.username="#Trim(Form.username)#">
<CFSET qUserRights = LoginObj.getUserRights('#Trim(Form.username)#')>
<cfset session.userrights = qUserRights><!--- it's a query --->
<CFSET qUserGroup = LoginObj.getUserGroup('#Trim(Form.username)#')>
<cfloop query="qUserGroup">
<cfset session.usergroup = user_group>
<cfbreak>
</cfloop>
<!--- ****************** ???????????????????????????????????????????????????????????????????????????
When I do cfdump in at this level, I can see that all of these session variables have been assigned to their values.
But these session variables are not accessible from other pages. Other pages still show these session variable without its value.
So, when I use these cfdumps in the index.cfm it is shown as they're not yet assigned with any values ****************** --->
<cfdump var="#session.loggedin#">
<cfdump var="#session.username#">
<cfdump var="#session.userright#">
<cfdump var="#session.usergroup#">
</cfif>
In index.cfm, Before Login I got:
session.loggedin = NO
session.username = ["empty string"]
session.userrights = ["empty string"]
session.usergroup = ["empty string"]
After a successful Login:
session.loggedin = NO
session.username = ["empty string"]
session.userrights = ["empty string"]
session.usergroup = ["empty string"]
Have I done something wrong? These codes work on CF8. Please help.
I need to mentioned:
CF10 is in Linux and my web app is under https not http. But these session variables should be shared bentween http and https because some older application are still in http.On which page is the following code?
After login, user is validated and set values to those session.variables:
........user validation codes here......................
<cfif mylogin NEQ true>
<cflocation url="/login/login.cfm">
<cfabort
<cfelse>
<cfset session.loggedin="Yes">
<cfset session.username="#Trim(Form.username)#">
<CFSET qUserRights = LoginObj.getUserRights('#Trim(Form.username)#')>
<cfset session.userrights = qUserRights><!--- it's a query --->
<CFSET qUserGroup = LoginObj.getUserGroup('#Trim(Form.username)#')>
<cfloop query="qUserGroup">
<cfset session.usergroup = user_group>
<cfbreak>
</cfloop>
<!--- ****************** ???????????????????????????????????????????????????????????????????????????
When I do cfdump in at this level, I can see that all of these session variables have been assigned to their values.
But these session variables are not accessible from other pages. Other pages still show these session variable without its value.
So, when I use these cfdumps in the index.cfm it is shown as they're not yet assigned with any values ****************** --->
<cfdump var="#session.loggedin#">
<cfdump var="#session.username#">
<cfdump var="#session.userright#">
<cfdump var="#session.usergroup#">
</cfif> -
Hello All,
I have created a new smartform from scratch. I am reading in a structure that contains all my data. I just want to read the values and write out the new document.
In the form interface i have Itab1 type my-structure(name). Then in global definitions i have Itab2 type my-structure(name). then in my loop i have Itab1 into Itab2.
i get the error msg Itab1 is neither a table of defined as an internal table.
I then went into Global definitions - type and added statement types: itab1 like zprice_agreement.
I still get the error.
Does anyone have any suggestion.. need this ASAP, thanks ScottHi,
I think the problem is not in smart form. its in the declaration of internal table.
Check out the sample code.
report ztest no standard page heading.
data: begin of itab occurs 0,
field1(6) type c,
end of itab.
start-of-selection.
*data: itab1 like itab.
data : itab1 like itab occurs 0 with header line.
loop at itab1.
endloop.
If you uncomment the line in the code, it gives same error which you have specified.
Regards,
Sailaja. -
Problem with application-variables - CFLOCK?
Hi,
i have a problem with my application. It is a multi-user
application with 100 parallel-users and CFMX 7.
The problem wich occures is with application variables. These
are mainly structs wich get filled onApplicationStart(). The
problem is, that the variables suddenly disappear, they are empty.
I have read about CFLock and found out, that it is necesseary
to use cflock. And i found out, that onApplicationStart does
correct locking automatically. That is where i do not understand
the problem. The variables get intialized correctly and in further
they only get read-access. Why can they be corrupted?
My other question about that is, wheather i need cflock for
all Read-Access to Application and Session-Variables, even if there
happens no writing to the variables?
Best Regards,
Andreas> ?The element of position 2, of dimension 2, of an array
object used as part of
> an expression, cannot be found.?
> The array is in this case the struct.
Well, OK, that could be a problem. Arrays are not structs:
they are two
different things, are not interchangeable, and have
completely different
sets of functions to utilise them. You cannot treat a struct
as an array.
If CF is claiming your "struct" is an array, then it actually
*is* an
array, not a struct.
What's the line of code which is generating that error?
I suppose one could get this error if you have an array of
structs thus:
myArray
.key1
myArray.key2
(etc)
and you're trying to reference it with a numeric key rather
than by key
name, eg:
myArray
[n]
When n is an integer value, rather than a string (which
corresponds to the
name of the key).
> > Have you trapped the error, done a <cfdump>
of the application scope and
> > checked to see if it's the whole lot going awry, or
just some values?
> I have not used cfdump for it, because the server had to
be immediately
> restarted for our customers. But i think, that it is
not completely empty,
> because the index runs to pos2 of dimenstion2.
So does this not happen in your dev / testing environment?
> Will
> onApplicationStart() be called before? Or only if
onRequestStart() returns true?
I would ***-u-me that the application one would be called
before the
request one. It's pretty easy for you to test this though, I
should think?
(Sorry: for reasons beyond the scope of this conversation,
we're still
forced to use Application.cfm in our software, so I've only a
passing
knowledge of how Application.cfc works).
> Here is the code from onRequestStart()
> <cffunction name="onRequestStart"
returntype="boolean">
> <cfargument name="Requestedpage" required="yes" />
> <cfscript>
> var lFile = "/cargorent/Login.cfm";
> var iPosn = ListFindNoCase( lFile,
Arguments.Requestedpage );
> if( iPosn gt 0 )
> return true;
>
> if( NOT IsDefined( "session.user.Loginname" ) or
session.user.Loginname eq
> "" )
> {
> WriteOutput( "<p><p> The current user is no
longer valid, please log in
> again.</p></p>" & chr(10) & chr(13)
> WriteOutput( "<script
language=""javascript"">parent.location = ""
http://"
> & CGI.HTTP_HOST &
"/Login/Login.cfm"";</script>" );
> return false;
> }
>
> return true;
> </cfscript>
> </cffunction>
One thing I will say here is that I really think you should
be separating
your processing from your display. A function should do
processing. it
should pass that processing back to a CFM template which
should handle
whatever needs to be displayed on the browser. Although
that's nowt to do
with your current issue.
Adam -
Problem with hierarchy variable while displaying query in Portal
Hi,
I came up with an problem with a query in the portal. The problem is :
I have one query which is displayed in the portal. The Query has hierarchial selection criteria. I am executing the same query using analyzer. Its taking the variable from the selection and displaying it on the analyzer. I have used the option to " display the query on web " from the BEX query designer. From there its opening and displaying the results with the given selection criteria.
Where as when i open the query seperately in portal, its not displaying the results.
I came to know from one of my colleague that the porblem is with the Web item and the hierarchial variable declared in WAD was different from the variable declared in the BEX Query designer.
I never Worked with WAD. I tried finding out the variable definition. But i was unable to find out where the Hierarchial variable was defined.
Please help me out regarding the same.The problem is sovled.
Poornima. -
Problem with substitution variable
Hi All,
I am facing problem with usage of substitutiion variable. I have following code in my script
Edited by: Tarak on Mar 4, 2009 3:27 AMsorry I missed the script.
create table tempdata
(description varchar2(200))
TABLESPACE &tspacename
/Sqlplus is not asking for the value of tspacename.I am getting following error.
TABLESPACE &tspacename
ERROR at line 3:
ORA-02216: tablespace name expectedI am not sure what is wrong with SQLPLUS setting.Can anybody help?
Maybe you are looking for
-
Lightbox Gallery - TCN Widget not displaying live
Hi, I wonder if anyone could help with this please. I've downloaded the TCN Widget Lightbox Gallery and it works fine in preview mode but I can't get it to work properly live on the web. Whenever I click on a thumbnail, the large image does display b
-
Multiple Oracle Homes - Oracle Listener failes to start after installation
Just in case the listener fails to start after an oracle installation, please check the oracle ports in the listener.ora and tnsnames.ora, both of which are present in the following directory: ...\oracle\<SID>\<Ver>\NETWORK\ADMIN All installations sh
-
Character Mode ASCII Distribution
Hi, I have a distribution report, Character Mode, ASCII format, that I can run without any problems from Report Builder, but the output is wrapping after what appears to be 80 characters, how do I make this wider? I've set my Main Section -> Characte
-
Limit the rows in a report with expandable option?
HI There is a table in which 50 reords are there. 1 111 2 222 3 333 50 444 I want to show only first 2 records and for the rest i want to show an expandable '+' sign. 1 111 2 222 + XXX (will be some of the oters from 3-50)
-
Can you put back the letter index to make selection of the files easy?
I have well over 1000 pdf papers and it is tedious to scroll the list to find the right file to open. The old versions had a column on the right with letters which act as an index, but with the recent upgrade or downgrade, that has somehow disappear