on 03-27-2008 10:18 AM
hi,
IF ( &STAX3& = '4.00' OR &STAX3& = '12.50' )
XXXXXX,, ,,&text3& &STAX1&% ,,,, &TOT_STAX1(C.0)&
XXXXXX,, ,,&text3& &STAX2&% ,,,, &TOT_STAX2(C.0)&
,,,,&text51&,,,,&tot_tcost&
,,,,,,,,&TOT_FINAL(C.0)&
ELSE
XXXXXX,, ,,&text3& &STAX&% ,,,, &TOT_STAX(C.0)&
,,,,&text51&,,,,&tot_tcost&
,,,,,,,,&TOT_FINAL(C.0)&
ENDIF
i am using this code.
i have one doubt in if statment we can use this syntax
IF ( &STAX3& = '4.00' OR &STAX3& = '12.50' )
this is correct or not.
if i use this code if statment is not excuting.
pls clarify my doubt.
Hi Venkat,
Usually we'll write all the logical ABAP statements in Subroutine pool, instead of writing them in the script form directly.
Use PERFORM statement in the script form as shown below & write the code u want in that....
/: PERFORM GET_MERCANTIL IN PROGRAM cust_invoice
/: USING &RKWA-BUKRS&
/: USING &RKWA-LIFNR&
/: USING &BKPF-GJAHR&
/: CHANGING &V_MERCANTIL&
/: ENDPERFORM
GT Insc.Reg.Mercantil &V_MERCANTIL&
GT is the paragraph format.
Go to SE38 & create the program,cust_invoice ( called as Subroutine pool ) & write the FORMs in that....
U can use the normal ABAP coding in that....
Hope this will work.
Try this out & let me know if there are any issues.
Reward points, if useful.
Pavan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
The syntax is correct and it should work ... Please check what value you are getting in debug mode ..
Regards,
Santosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
IF is a control command used in sap scripts.
the syntax is
/: IF (condition)
.....
/: ELSE
.....
/: ENDIF
This command will controll the the sapscript documents. These are used in sapscript text editors.
Reward.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
/: IF ( &STAX3& EQ &STAX4& OR &STAX3& EQ &STAX5& )
I4 XXXXXX,, ,,&text3& &STAX1&% ,,,, &TOT_STAX1(C.0)&
I4 XXXXXX,, ,,&text3& &STAX2&% ,,,, &TOT_STAX2(C.0)&
/* ,,,,&text51&,,,,&tot_tcost&
I4 ,,,,,,,,&TOT_FINAL(C.0)&
/: ELSE
I4 XXXXXX,, ,,&text3& &STAX&% ,,,, &TOT_STAX(C.0)&
/* ,,,,&text51&,,,,&tot_tcost&
I4 ,,,,,,,,&TOT_FINAL(C.0)&
/: ENDIF
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.