01-11-2011 9:41 AM
Hi,
In Smartform Table..I created main area ( as TABLE) having columns
POSNR(CELL7), MATNR(CELL8), FKIMG(CELL9), VRKME(CELL10), UPRICE(CELL11), NETWR(CELL12)....
Here UPRICE--- Calculate this field as Unit price = Amount / Billed Qty.
For this....I created a Flow Logic at CELL11
CELL11(Right click)
CREATE---FLOW LOGIC -
PROGRAM LINE
Provided code:
UPRICE = WA-NETWR / WA-FKIMG.
Its showing the run time error
Reference field WA-NETWR unknown in form
what i have to do now for calculating UPRICE in this case...
<offer removed by moderator>
Thanks
Lohit
Edited by: Thomas Zloch on Jan 11, 2011 11:36 AM
01-11-2011 10:39 AM
Hi,
The workarea WA is the destination structure in TableArea declaration?
01-11-2011 10:55 AM
retreived the five column ( POSNR MATNR FKIMG VRKME NETWR ) values by providing code in GLOBAL SETTINGS -- INITIALISATION (TAB)
SELECT POSNR MATNR FKIMG VRKME NETWR INTO CORRESPONDING FIELDS OF TABLE
ITAB FROM VBRP WHERE VBELN EQ PVBELN.
And in MAIN AREA-----Table -
DATA (Tab) provided
Loop
Internal Table ITAB TO WA.
Created Text at each cell as
WA-POSNR(for Cell 7),
WA-MATNR (for Cell 8),
WA-FKIMG(for CELL9),
WA-VRKME(for Cell 10),
UPRICE(for Cell 11),
WA-NETWR(for Cell 12)
01-11-2011 10:45 AM
Hi Lohit,
Move the wa-NETWR Value to another field declared locally in the Progeam Logic and use the declared variable for calculation.
It happens for CURR / QUAN fields.
Thanks,
Preyansh
01-11-2011 1:11 PM
Hi Preyansh,
Thanks for the reply..
I declared locally in the Program Logic as below
DATA : PNETWR TYPE VBRP-NETWR,
PFKIMG TYPE VBRP-FKIMG.
PNETWR = WA-NETWR.
PFKIMG = WA-FKIMG.
UPRICE = PNETWR / PFKIMG.
Same error is coming...
Can u explain me clearly plz.. i dont know much about CURR / QUAN fields..
06-15-2011 6:16 AM
In Global Definition -> Currency/Quant. Fields put your WA-NETWR and define the field as quantity or currency
01-11-2011 10:55 AM
Hi,
The error is because of the NETWR is type of currency .
So you need to give a reference for this wa_netwr field.
For doing this you can give the reference as currency against wa_netwr in the table where you are looping this .
Hope this might be helpful to solve your issue
With Regards,
Sumodh.P