on 06-17-2009 12:39 PM
Hi guys,
I want to print variable w_result. I have form ZBT_RACUN, in form I write like this:
&w_result& , but instead of real value just 0.00 is printed
In driver program I have like this:
data: w_result type p decimals 2.
...................
w_result = gs_sales_i-mpv / gs_sales_i-kol.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'POZICIJE_I'
function = 'APPEND'
window = 'MAIN'.
...................
When I debugg w_result has correct value, but 0.00 is printed???
Do u have idea how to solve this?
Thanks,
Nihad
Edited by: nihad omerbegovic on Jun 17, 2009 1:40 PM
Hi,
Put a Debugging for Script and check teh variable w_result having data or not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nihad,
In sap script when u print the variable print it as command line
For Example :
/: &W_RESULT&
this would solve ur prob...
also do 1 thing...debug ur script...in SE71 put the script name...do activate debugger from menu.
and chk wat value the variable takes.
that wud give u a clear idea, wats going wrong and where.
All The Best
Regards,
Radhika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
In the driver program
DATA: w_result type char15.
w_result = gs_sales_i-mpv / gs_sales_i-kol.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'POZICIJE_I'
window = 'MAIN'.
In script
&W_RESULT(.2)&
Try this one. I think It will work.
Thanks
Sriiiiiiii(srikanth)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ninad,
yes you will need to declare the variable in the top include that you have to make it global.
Also,try giving Function as "SET" in the Call function.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'POZICIJE_I'
function = 'SET'
window = 'MAIN'.
Hope it helps,
Rashmi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nihad,
After getting the result in w_result pass to character field say w_result1 surely it will work ,in sap script we have to pass character field then only the Packed decimals format will print.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
all printing variables/internal tables in script should be declared globally in Driver Program.
check whether u r declaring it as globally or not in the program (data: w_result type p decimals 2.).
Hope it helps!!
Rgds,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please try to use ONLY upper case characters in forms.
i estimate that &W_RESULT& will work.
besides, did you make sure the driver program already got the data when you reach the point where to print this variable?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Just try this, it will work.
Take a character field say w_result1. use the statement write w_result to w_result1.
regards
Hari reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nihad,
Have you debug the script also. What code you have writtne in the form?
You have not wriiten the complete code of WRITE FORM including this line.
also mention the command line of script.
Code in driver program is ok. It might be some problem with script only.
Regds,
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.