on 07-29-2010 8:36 AM
Hi,
How Can I subtract the values in table level and display the value in corresponding column?
Ex:
If I have 4 fields in table in smartform, I want to subtract 2 and 3 values and display it in 4 fied column...
Regards,
Muralikrishna
Hi..
Now is it coming blank or 0.000? If it blank, it might be a space issue, then try using &VAR(C)& etc. else if it is 0.000 then plz check once if you have included the variable in output parameters of the code where you are calculating and the code is above the that particular text element or not.
Karthik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi..
1. Use &YOURVARiIABLE(C)& : this will compress blanks.
2. Check the linetype, if there there is sufficient space.
3. Try to hard code the text element as '1' just to check is it ever prints any value or not. If yes, then try to pass value '1' to the variable and see what happens.
I feel it could be an issue related to space, formatting etc. Do some trials and you'l get to know whats the problem.
Regards,
Karthik
Inside the loop ( Table loop ), before printing the value for4th field column ( Text ), create 'Program Lines' for subtracting the values.
To the Program lines, pass the values ( variables)of 2 and 3 as input parameter and value of 4 as output parameter.
Regards,
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Karthik,
Its not showing the out put...
my fields are LSMNG, ERFMG from MSEG table and I have taken one variable and defined as V_rejected type LSMNG
and did the code as V_rejected = v_lsmng - v_erfmg. I have taken lsmng and erfmg also variables.. Do I need any modifications ? Please let me know...
Thanks in Advance
Regards,
Murlaikrishna
Hi..
What is happening exactly? Are you not getting any output or in the output the particular field is blank?
If you are not at all getting any output, it may be because of Reference field error, which you can see if you have all exceptions of the FM called in place (not commented).
Else it could be some space related issue. Better if you could write a breakpoint where you are calculating the sum and try to analyze where is it exactly going wrong.
Regards,
Karthik
Hi Murali,
While you creating the variable at the Global defnition, just assign the currency in the same but in the Currency / Quantity field tab. Hope you have the currency which is used for the other variable - v_lsmng & v_erfmg, just assign the same over there.
If you have any issue, just let us know.
Regards,
Selva K.
Hi Karthik,
The values are collecting to the WA of the MSEG table and are displayed into table of smartform, but when I am doing the subtraction the values are not displayed in the variables...
VARIABLE REFERENCE FIELD DATA TYPE
V_LSMNG WA_MSEG-LSMEH QUAN
V_ERFMG WA_MSEG-ERFME QUAN
I have written the select statement in my Driver program i.e
SELECT SINGLE * INTO WA_MSEG FROM MSEG WHERE MBLNR IN S_MBLNR
AND MJAHR IN S_MJAHR.
still i am unble to get the values
Thanks in Advance
Regards,
Murali
Hi..
The variables used for calculating difference should be in Global Definitions -> Global data and the reference field should be mentioned in Currency/Quantity Fields tab.
The declared variables should be put in import/export parameters tab in the program lines you have created.
Hope it solves the issue.
Regards,
Karthik
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.