2008 Sep 19 9:35 AM
Hi ,
I have cash discount field in my script. I don't want to print that field ,if the value of that field is 0.
I tried giving the condition as
if ®ud-sknto& <> '0'
then print.
endif.
but it is not working.
I tried declaring another variable of same type and made the value as 0.
g_sknto = 0. (type regud-sknto)
if ®ud-sknto& <> g_sknto
then print.
endif.
this is also not woking..
what is the problem? i am not able to identify...any help please..
Thanks,
Omkaram.
Hi ,
I have cash discount field in my script. I don't want to print that field ,if the value of that field is 0.
I tried giving the condition as
if ®ud-sknto& <> '0'
then print.
endif.
but it is not working.
I tried declaring another variable of same type and made the value as 0.
g_sknto = 0. (type regud-sknto)
if ®ud-sknto& <> g_sknto
then print.
endif.
this is also not woking..
what is the problem? i am not able to identify...any help please..
Thanks,
Omkaram.
2008 Sep 19 9:37 AM
Use command line:
/: if ®ud-sknto& = ' 0 '":/ is must
then print.
endif.
2008 Sep 19 9:40 AM
thanks for reply...
Condition i am giving ....
by mistake i did n't type that one in post..sorry for that
2008 Sep 19 9:42 AM
than check whether its ghaving ur desired value or not .... chck in debugging
or print both the variable before the if condition ... and check those values ...
2008 Sep 19 9:44 AM
I checked both values in debugging....
both the values are correct...still IF condition is failing...
2008 Sep 19 9:49 AM
Try this way
/: IF ®UD-SKNTO& EQ 0 " 0 without single quotes
P1 then print.
/:ENDIF.
Edited by: Bala Krishna on Sep 19, 2008 2:20 PM
2008 Sep 19 9:38 AM
hi,
the condition was missing:
IF ®ud-sknto& NE '0'you can also try this, the (I) will suppress the initial value:
®ud-sknto(I)&
hope this helps
ec
2008 Sep 19 9:38 AM
hi ,
If works in script ....
in ur code u r missing operator .... is it same in ur code ... if it is so it ll not work ....
2008 Sep 19 9:39 AM
Hi,
Give the condition Uperators like-
= EQ ,< LT,> GT,<= LE ,>= GE, NE, etc
2008 Sep 19 9:41 AM
2008 Sep 19 9:43 AM
Use the Following logic:
IF ®ud-sknto(I)& NE '0'
** DO ur processing
ENID.
Hope That Helps
Anirban M.
2008 Sep 19 9:43 AM
Hi Omkaram,
Why are u not putting "=" in script
Use this code in script
if ®ud-sknto& EQ '0'
then print.
endif.
Hope this helps!
Regards,
Prashant
2008 Sep 19 10:03 AM
Hi ..
Firstly try in this way once..
/: if not ®ud-sknto& is initial.
D then print.
/: endif.
Have u tried using Perform and Endform,,
*WRite In Script
/: PERFORM Print_Val ZPROGRAM USING ®ud-sknto&
/: CHANGING &V_SKNTO&
/: ENDPERFORM
*In ZPROGRAM
FORM Print_Val tbl_input structure itcsy "structure
tbl_output structure itcsy.
data: V_SKNTO type REGUD-SKNTO.
Get Value from Script
read table tbl_input with key 'REGUD-SKNTO'.
check sy-subrc = 0.
v_sknto = tbl_input-value.
*check how its getting read in debugging mode.
if not v_skno initial.
tbl_output-value = v_sknto.
modify tbl_output.
else.
clear v_sknto.
endif.
ENDFORM.
Edited by: Suneel Kumar Gopisetty on Sep 19, 2008 5:04 PM
2008 Sep 19 10:04 AM
Hi Omkaram,
check your code as i think this code should work fine and hope you are doing it in main window:
/: IF ®UD-SKNTO& EQ '0'
P1 ®UD-SKNTO&
/: ENDIFWith luck,
Pritam.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |