Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error in Get Tax data.

Former Member
0 Likes
585

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

1 ACCEPTED SOLUTION
Read only

former_member191735
Active Contributor
0 Likes
547

>

> 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').

>

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.

3 REPLIES 3
Read only

Former Member
0 Likes
547

1> FIRST check whether table IT_KONV contains data

2> If there is data in IT_KONV then..... check where where cluase in loop.

Read only

former_member191735
Active Contributor
0 Likes
548

>

> 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.

Read only

Former Member
0 Likes
547

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