2009 Nov 06 12:32 PM
Dear all,
I want three field in my Sales report like Jive, Jivp, Zivp. i coded my report with out error but out put null.
i disply respective code below .......
SELECT * FROM KONV
INTO TABLE IT_KONV
FOR ALL ENTRIES IN IT_VBaK
WHERE KNUMV = IT_VBaK-KNUMV
AND KSCHL IN ('JIVC','JIVP','ZIVP').
loop at it_konv where knumv = it_vbak-knumv.
if it_konv-kschl = 'JIVC'.
V_JIVC = V_JIVC + IT_KONV-KWERT.
elseif it_konv-kschl = 'JIVP'.
V_JIVP = V_JIVP + IT_KONV-KWERT.
ELSEIF it_konv-kschl = 'ZIVP'.
V_ZIVP = V_ZIVP + IT_KONV-KWERT.
ENDIF.
endloop.
Move v_jivc to itab-jivc.
Move v_jivp to itab-jivp.
Move v_zivp to itab-zivp.
MOVE it_vbap-netwr to itab-wot.
itab-jivc = v_jivc.
itab-jivp = v_jivp.
itab-zivp = v_zivp.
itab-wot = it_vbak-netwr.
append itab.
CLEAR:v_jivc,v_jivp,v_zivp.
in this code i am not able to enter in loop means where condition is false. so now what can i do for this logical error.
Please help me out as soon as possible.
Thanks
2009 Nov 06 2:48 PM
>
> Dear all,
>
> I want three field in my Sales report like Jive, Jivp, Zivp. i coded my report with out error but out put null.
>
> i disply respective code below .......
>
> SELECT * FROM KONV
> INTO TABLE IT_KONV
> FOR ALL ENTRIES IN IT_VBaK
> WHERE KNUMV = IT_VBaK-KNUMV
> AND KSCHL IN ('JIVC','JIVP','ZIVP').
>
Have a sy-subrc check after this statement.
One more what is it_vbak internal table? i mean, is it with header line? if yes, why dont you read or loop it first.
Put a break point and check the value of IT_VBAK-KNUMV.
> loop at it_konv where knumv = it_vbak-knumv.
> if it_konv-kschl = 'JIVC'.
> V_JIVC = V_JIVC + IT_KONV-KWERT.
> elseif it_konv-kschl = 'JIVP'.
> V_JIVP = V_JIVP + IT_KONV-KWERT.
> ELSEIF it_konv-kschl = 'ZIVP'.
> V_ZIVP = V_ZIVP + IT_KONV-KWERT.
> ENDIF.
> endloop.
>
> Move v_jivc to itab-jivc.
> Move v_jivp to itab-jivp.
> Move v_zivp to itab-zivp.
> MOVE it_vbap-netwr to itab-wot.
> * itab-jivc = v_jivc.
> * itab-jivp = v_jivp.
> * itab-zivp = v_zivp.
> * itab-wot = it_vbak-netwr.
> append itab.
> CLEAR:v_jivc,v_jivp,v_zivp.
>
>
> in this code i am not able to enter in loop means where condition is false. so now what can i do for this logical error.
That is the only possible mistake i can see in this code. Check the IT_VBAK-KNUMV first.
Dear all,
I want three field in my Sales report like Jive, Jivp, Zivp. i coded my report with out error but out put null.
i disply respective code below .......
SELECT * FROM KONV
INTO TABLE IT_KONV
FOR ALL ENTRIES IN IT_VBaK
WHERE KNUMV = IT_VBaK-KNUMV
AND KSCHL IN ('JIVC','JIVP','ZIVP').
loop at it_konv where knumv = it_vbak-knumv.
if it_konv-kschl = 'JIVC'.
V_JIVC = V_JIVC + IT_KONV-KWERT.
elseif it_konv-kschl = 'JIVP'.
V_JIVP = V_JIVP + IT_KONV-KWERT.
ELSEIF it_konv-kschl = 'ZIVP'.
V_ZIVP = V_ZIVP + IT_KONV-KWERT.
ENDIF.
endloop.
Move v_jivc to itab-jivc.
Move v_jivp to itab-jivp.
Move v_zivp to itab-zivp.
MOVE it_vbap-netwr to itab-wot.
itab-jivc = v_jivc.
itab-jivp = v_jivp.
itab-zivp = v_zivp.
itab-wot = it_vbak-netwr.
append itab.
CLEAR:v_jivc,v_jivp,v_zivp.
in this code i am not able to enter in loop means where condition is false. so now what can i do for this logical error.
Please help me out as soon as possible.
Thanks
2009 Nov 06 12:42 PM
1> FIRST check whether table IT_KONV contains data
2> If there is data in IT_KONV then..... check where where cluase in loop.
2009 Nov 06 2:48 PM
>
> Dear all,
>
> I want three field in my Sales report like Jive, Jivp, Zivp. i coded my report with out error but out put null.
>
> i disply respective code below .......
>
> SELECT * FROM KONV
> INTO TABLE IT_KONV
> FOR ALL ENTRIES IN IT_VBaK
> WHERE KNUMV = IT_VBaK-KNUMV
> AND KSCHL IN ('JIVC','JIVP','ZIVP').
>
Have a sy-subrc check after this statement.
One more what is it_vbak internal table? i mean, is it with header line? if yes, why dont you read or loop it first.
Put a break point and check the value of IT_VBAK-KNUMV.
> loop at it_konv where knumv = it_vbak-knumv.
> if it_konv-kschl = 'JIVC'.
> V_JIVC = V_JIVC + IT_KONV-KWERT.
> elseif it_konv-kschl = 'JIVP'.
> V_JIVP = V_JIVP + IT_KONV-KWERT.
> ELSEIF it_konv-kschl = 'ZIVP'.
> V_ZIVP = V_ZIVP + IT_KONV-KWERT.
> ENDIF.
> endloop.
>
> Move v_jivc to itab-jivc.
> Move v_jivp to itab-jivp.
> Move v_zivp to itab-zivp.
> MOVE it_vbap-netwr to itab-wot.
> * itab-jivc = v_jivc.
> * itab-jivp = v_jivp.
> * itab-zivp = v_zivp.
> * itab-wot = it_vbak-netwr.
> append itab.
> CLEAR:v_jivc,v_jivp,v_zivp.
>
>
> in this code i am not able to enter in loop means where condition is false. so now what can i do for this logical error.
That is the only possible mistake i can see in this code. Check the IT_VBAK-KNUMV first.
2009 Nov 06 3:06 PM
Hi Friend ,
Can you see this link , here also they have the same logic based on the vbak table data , they are picking Tax data for
Net Price
Approved Price
Price Variance
put this in screen find you will get th code SELECT SINGLE kbetr waers kpein
Link :[http://iorboaz.blogspot.com/2006/08/sap-abap-report-so-with-exceptional.html]
Regards
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |