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

Pricing Routine in sd

Former Member
0 Likes
460

I have created a routine for pricing. But value in xkwert is not reflected on screen .

Problem

1)Value of xkwert is coming correct in debugging in routine .

But on screen value displayed is 0.00

2) If I hard code value of xkwert = 100 or 1000 . or hardcode value of wa_final to 1000 or 2000 , I get the output on screen .

*Program :

data : wa_final like xkomv-kwert,

wa_jivp like xkomv-kwert,

wa_znpp like xkomv-kwert.

data a type f. "temp for rate

data b type f. "temp for basic

read table xkomv with key stunr = 70 kschl = 'JIVP'.

if sy-subrc = 0.

a = xkomv-kbetr. "RATE in a

endif.

read table xkomv with key stunr = 110 kschl = 'ZNPP'.

if sy-subrc = 0.

b = xkomv-kwert. "basic in b

endif.

a = a / 100000 . "rate

b = b / 100 . "basic

*final value goes to wa_final

wa_final = a * b * 100 .

read table xkomv with key stunr = '070' kschl = 'JIVP'.

if sy-subrc = 0.

xkomv-kwert = wa_final.

modify xkomv transporting kwert where stunr = 70.

xkwert = wa_final.

*End of Program

Please Help me .

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
400

Instead of this

<b>xkwert = wa_final.</b>

Try with this

<b>xkomv-kwert = wa_final.</b>

Regards,

Naimesh Patel

I have created a routine for pricing. But value in xkwert is not reflected on screen .

Problem

1)Value of xkwert is coming correct in debugging in routine .

But on screen value displayed is 0.00

2) If I hard code value of xkwert = 100 or 1000 . or hardcode value of wa_final to 1000 or 2000 , I get the output on screen .

*Program :

data : wa_final like xkomv-kwert,

wa_jivp like xkomv-kwert,

wa_znpp like xkomv-kwert.

data a type f. "temp for rate

data b type f. "temp for basic

read table xkomv with key stunr = 70 kschl = 'JIVP'.

if sy-subrc = 0.

a = xkomv-kbetr. "RATE in a

endif.

read table xkomv with key stunr = 110 kschl = 'ZNPP'.

if sy-subrc = 0.

b = xkomv-kwert. "basic in b

endif.

a = a / 100000 . "rate

b = b / 100 . "basic

*final value goes to wa_final

wa_final = a * b * 100 .

read table xkomv with key stunr = '070' kschl = 'JIVP'.

if sy-subrc = 0.

xkomv-kwert = wa_final.

modify xkomv transporting kwert where stunr = 70.

xkwert = wa_final.

*End of Program

Please Help me .

1 REPLY 1
Read only

naimesh_patel
Active Contributor
0 Likes
401

Instead of this

<b>xkwert = wa_final.</b>

Try with this

<b>xkomv-kwert = wa_final.</b>

Regards,

Naimesh Patel