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

Problem in Pricing procedure logic

Former Member
0 Likes
648

Hi,

In pricing procedure ,our functional team requires some logic inthere procedure .

1. Thay have condition type of ZBEA and ZBEE, If ZBEE is active that time ZBEA should be inactive.

For that i created a routine like below.

DATA: LV_XKOMV TYPE KOMV.

if xkomv-kschl = 'ZBEA' and xkomv-kbetr NE 0.

clear lv_xkomv.

READ TABLE XKOMV INTO LV_XKOMV

WITH KEY

KSCHL = 'ZBEE'.

IF sy-subrc = 0.

XKOMV-KINAK = 'X'.

MODIFY XKOMV TRANSPORTING KINAK WHERE KSCHL = 'ZBEA'.

ENDIF.

endif.

Now its making ZBEA inactive but its showing ZBEE as 2times. How to avoid this?

Can anyone please help this.

Point will be sure.

Mohana

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
584

Hi,

Try with this.

DATA: LV_XKOMV TYPE KOMV.

Data : flag(1) type c.

if xkomv-kschl = 'ZBEE' and xkomv-kbetr NE 0.

flag = 'X'.

endif.

If flag = 'X'.

if xkomv-kschl = 'ZBEA' and xkomv-kbetr NE 0.

clear lv_xkomv.

endif.

endif.

Hi,

In pricing procedure ,our functional team requires some logic inthere procedure .

1. Thay have condition type of ZBEA and ZBEE, If ZBEE is active that time ZBEA should be inactive.

For that i created a routine like below.

DATA: LV_XKOMV TYPE KOMV.

if xkomv-kschl = 'ZBEA' and xkomv-kbetr NE 0.

clear lv_xkomv.

READ TABLE XKOMV INTO LV_XKOMV

WITH KEY

KSCHL = 'ZBEE'.

IF sy-subrc = 0.

XKOMV-KINAK = 'X'.

MODIFY XKOMV TRANSPORTING KINAK WHERE KSCHL = 'ZBEA'.

ENDIF.

endif.

Now its making ZBEA inactive but its showing ZBEE as 2times. How to avoid this?

Can anyone please help this.

Point will be sure.

Mohana

2 REPLIES 2
Read only

Former Member
0 Likes
584

Hi

But where are you doing that?

U should insert an Alternative Formula Routine in pricing procedure for condition ZBEA:

READ TABLE XKOMV INTO LV_XKOMV WITH KEY KSCHL = 'ZBEE'.

IF SY-SUBRC = 0 AND LV_XKOMV-KINAK IS INITIAL AND LV_XKOMV-KBETR <> 0.

XKOMV-KINAK = 'A'.

ENDIF.

Max

Read only

Former Member
0 Likes
585

Hi,

Try with this.

DATA: LV_XKOMV TYPE KOMV.

Data : flag(1) type c.

if xkomv-kschl = 'ZBEE' and xkomv-kbetr NE 0.

flag = 'X'.

endif.

If flag = 'X'.

if xkomv-kschl = 'ZBEA' and xkomv-kbetr NE 0.

clear lv_xkomv.

endif.

endif.