on 05-26-2011 5:19 AM
Hi guys,
I'm creating a smartform report. when i'm trying to get balance like --
SELECT *
FROM BSID
INTO TABLE IT2_BSID
WHERE KUNNR = WTAB-KUNNR AND ZUONR = WA_BSID-ZUONR.
LOOP AT IT2_BSID INTO WA2_BSID.
IF WA2_BSID-SHKZG EQ 'H'.
WA2_BSID-DMBTR = WA2_BSID-DMBTR * -1.
ENDIF.
DMBTR = DMBTR + WA2_BSID-DMBTR.
ENDLOOP.
i'm getting the wrong balance from this code. can someone tell me the problem of this code?
Thanks.
Moderator message : Duplicate post locked. Continue with [Balance error in BSID table|].
Edited by: Vinod Kumar on May 26, 2011 10:42 AM
Hi,
The code looks fine. Just check if you have cleared variables and refreshed tables.
Also,Figure out what difference are you getting.Try with less data in debugging.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i tried to clear and refresh, like this,
SELECT *
FROM BSID
INTO TABLE IT2_BSID
WHERE KUNNR = WTAB-KUNNR AND ZUONR = WA_BSID-ZUONR.
*BREAK-POINT.
LOOP AT IT2_BSID INTO WA2_BSID.
IF WA2_BSID-SHKZG EQ 'H'.
WA2_BSID-DMBTR = WA2_BSID-DMBTR * -1.
ENDIF.
DMBTR = DMBTR + WA2_BSID-DMBTR.
clear WA2_BSID-DMBTR.
refresh IT2_BSID.
MODIFY IT2_BSID FROM WA2_BSID.
ENDLOOP.
But still getting the same problem.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
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.