on 01-27-2010 3:37 PM
Hello All,
I have an invoice which is a Z** invoice and it was developed using SAPscript. The problem was that the form was not handling decimal places when printing the invoice. So I added few lines of code which works if there is only one line item and it prints the invoice using correct format and decimals places. But when I had second line item it is not printing the second line item. I have narrowed it down to the 'ELSE" statement. If I just use 'IF..ENDIF" it prints both line items. Here is my statement below.
/E ITEM_PRICE_ZD10
/: IF &KOMP-KMEIN& = 'TON'
Z1 ,,&VBDPR-MATNR(6CZ)&,,&VBDPR-ARKTX(38)&,,,,&KOMP-KMEIN&
= ,,,,,,&VBDPR-FKIMG(9.3)&,,,,&V_BASE(<12.4)&,,&V_EXTEND(<12.2)&
/: ELSE
M2 ,,&VBDPR-MATNR(6CZ)&,,&VBDPR-ARKTX(38)&,,,,&KOMP-KMEIN&
= ,,,,,,&VBDPR-FKIMG(6.0)&,,,,&V_BASE(<12.4)&,,&V_EXTEND(<12.2)&
/: END IF
Basically the invoice prints if it finds TON and uses 3 decimals places otherwise its in pounds and it rounds up the numbers. Please if someone can let me know if I am using the 'ELSE' statement correctly or not.
Thank you.
Found the solution. My ENDIF statement had a space between End and IF. Removed the space and the code is working correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.