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

User Exit for Pricing-need Help

Former Member
0 Likes
637

Dear ABAPers

I created a user exit for pricing where I am comparing a condition type (manually entered(ZD01)) to another condition type(YD01). If the entered value is more than the other condition type than pricing should not be updated.

RATE = 0.

IF KOMP-ZZVBTYP = 'C'.

IF KOMP-PRSFD = 'X' OR

KOMP-PRSFD = 'A'.

IF KOMV-KSCHL = 'ZD01'.

LOOP AT XKOMV WHERE KSCHL EQ 'YD01'.

KOMP-KZWI2 = ( XKOMV-KBETR / 10 ).

ENDLOOP.

RATE = KOMV-KBETR / 10.

IF ( RATE <> 0 ) AND ( RATE < KOMP-KZWI2 ).

MESSAGE W991. "Maximum Allowed Discount Has Exceeded !!!!

CLEAR KOMV-KBETR.

CLEAR KOMV-KWERT.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

It is giving me the message but it is also updating the pricing. I want not to be updated. So in place of modify screen i need to reset pricing procedure.

I need a function module or a abap key word which can reset the pricing procedure.

Thanks in Advance.

regards,

MAM

Dear ABAPers

I created a user exit for pricing where I am comparing a condition type (manually entered(ZD01)) to another condition type(YD01). If the entered value is more than the other condition type than pricing should not be updated.

RATE = 0.

IF KOMP-ZZVBTYP = 'C'.

IF KOMP-PRSFD = 'X' OR

KOMP-PRSFD = 'A'.

IF KOMV-KSCHL = 'ZD01'.

LOOP AT XKOMV WHERE KSCHL EQ 'YD01'.

KOMP-KZWI2 = ( XKOMV-KBETR / 10 ).

ENDLOOP.

RATE = KOMV-KBETR / 10.

IF ( RATE <> 0 ) AND ( RATE < KOMP-KZWI2 ).

MESSAGE W991. "Maximum Allowed Discount Has Exceeded !!!!

CLEAR KOMV-KBETR.

CLEAR KOMV-KWERT.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

It is giving me the message but it is also updating the pricing. I want not to be updated. So in place of modify screen i need to reset pricing procedure.

I need a function module or a abap key word which can reset the pricing procedure.

Thanks in Advance.

regards,

MAM

2 REPLIES 2
Read only

Former Member
0 Likes
478

Hi,

Which user-exit you have implemented for this?

Also, <b>why you have a statement MODIFY SCREEN?</b> Do you have this code in PBO module of any screen. Also, MODIFY SCREEN statement should be only within LOOP AT SCREEN ....... ENDLOOP statement. This statement is wrong.

See, what SAP says about MODIFY screen command here:

*----


MODIFY SCREEN.

<b>Effect

-


</b>

Changes the attributes belonging to the current screenfield whilst processing with LOOP ATSCREEN ... ENDLOOP.

The attributes of all fields of a screen are stored in the systemtable SCREEN. This can be edited line by lineusing LOOP AT SCREEN ... ENDLOOP. Changes to the properties ofthe attributes of the current screen field (= current line in thesystem table SCREEN) can be put into effect using MODIFYSCREEN.

<b>Note

-


</b>

This statement should be used only within a LOOP ATSCREEN ... ENDLOOP loop at PBO time aspart of the process logic of a screen.

*----


Let me know your exact requirement and what you have done so far to achieve this.

Regards,

RS

Read only

Former Member
0 Likes
478

OK. I donot want to use modify screen, and I want to use some function module or any other abap keyword to reset pricing procedure. that means i want zd01 not take any effect. that is net value should again be equal to PR00.

Thanks for your help.

Regards,

MAM