0% found this document useful (0 votes)
74 views17 pages

Commission Agent Scenario PDF

This document discusses the functions and configuration of a commission agent in an SAP system. It includes: 1. Defining a partner determination procedure and assigning functions to commission agents. 2. Creating a condition type for commission discounts as a percentage. 3. Assigning a pricing procedure to apply commission discount conditions. 4. The code for routine 903 which applies commission discounts or surcharges to order prices based on the condition type. 5. Testing the order to cash process with a sales order, delivery, and invoices.

Uploaded by

Ranjit Warang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views17 pages

Commission Agent Scenario PDF

This document discusses the functions and configuration of a commission agent in an SAP system. It includes: 1. Defining a partner determination procedure and assigning functions to commission agents. 2. Creating a condition type for commission discounts as a percentage. 3. Assigning a pricing procedure to apply commission discount conditions. 4. The code for routine 903 which applies commission discounts or surcharges to order prices based on the condition type. 5. Testing the order to cash process with a sales order, delivery, and invoices.

Uploaded by

Ranjit Warang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

commission agent scenario

someone who sells a company's products and receives a part of the money paid for
the goods for doing this: Such business is conducted through commission agents who sell
to their families and friends.

PARTNER FUNCTIONS FOR THE COMission agent

Define partner determination procedure


Assign partner functions in the partner determination procedure

Partner determination procedure assignment


Account groups – Function assignment

2. condition type created –zcm1 condition agent

Condition Class A Discount or surcharge

Calculation Type A Percentage


3. pricing procedure assign commission agent

I had created add pricing procedure commission discount condition type (Zcm1 ,zcm2 ,zcm2 )

& we had created add some routine 903 based on partner functions condition type
4 .Routine 903 code
*\FORM FRM_KONDI_WERT_903.

FORM FRM_KONDI_WERT_903.

***ZCM1 % value devide equaly to both side and not more than 2% .

DATA:IT_KOMV TYPE STANDARD TABLE OF KOMV.

DATA:WA_KOMV TYPE KOMV.

DATA:IT_KONP TYPE STANDARD TABLE OF KONP.

DATA:WA_KONP TYPE KONP,TZCM1P TYPE KBETR.

DATA:TZCM1P1 TYPE KBETR,TZCM2P TYPE KBETR.

DATA:V_ZCM1P TYPE KBETR,V_ZCM2P TYPE KBETR.

DATA:V_ZPR0V TYPE KBETR VALUE '999.00'.

BREAK tbarekar.

IT_KOMV[] = XKOMV[].

READ TABLE IT_KOMV[] INTO WA_KOMV WITH KEY KSCHL = 'ZPR0'." KPOSN = XKOMV-KPOSN.

IF SY-SUBRC = 0.

if WA_KOMV-KBETR > V_ZPR0V.

MESSAGE E001(ZPR0) WITH 'Base Price value is more than 999'.

ENDIF.

ENDIF.

if sy-tcode = 'VA41' or sy-tcode = 'VA42'.

BREAK tbarekar.

CASE XKOMV-KSCHL.

CLEAR:WA_KONP. "Percentage base

SELECT SINGLE * FROM KONP INTO WA_KONP WHERE KNUMH = KONP-KNUMH AND KOPOS =
KONP-KOPOS AND KSCHL = 'ZCM1' .

WHEN 'ZCM1'.

XKOMV-KBETR = WA_KONP-KBETR."V_ZCM1P.

WHEN 'ZCM2'.
* if KOMV-KBETR > WA_KONP-KBETR.

* MESSAGE E001(ZCM2) WITH 'value is more than 2.00'.

* ENDIF.

*** CLEAR:WA_KOMV.

*** READ TABLE IT_KOMV[] INTO WA_KOMV WITH KEY KSCHL = 'ZCM1' KPOSN = XKOMV-
KPOSN.

*** IF SY-SUBRC = 0 and KOMV IS INITIAL."""14/1/2019

*** TZCM1P1 = ( WA_KOMV-KBETR * -1 ) / 10.

*** if TZCM1P1 GT '1.00'.

*** TZCM1P = ( '2.00' - TZCM1P1 ) * -1.

*** TZCM2P = TZCM1P * 10.

*** ELSEIF TZCM1P1 LE '1.00'.

*** TZCM1P = ( '2.00' - TZCM1P1 ) * -1.

*** TZCM2P = ( TZCM1P * 10 ) * -1.

*** endif.

*** V_ZCM1P = TZCM2P.

*** XKOMV-KBETR = V_ZCM1P."WA_KOMV-KBETR .

*** ENDIF.

WHEN 'ZCM3'.

CLEAR:WA_KONP. """Value base

SELECT SINGLE * FROM KONP INTO WA_KONP WHERE KNUMH = KONP-KNUMH AND KOPOS =
KONP-KOPOS AND KSCHL = 'ZCM3' .

XKOMV-KBETR = WA_KONP-KBETR."V_ZCM1P.

WHEN 'ZCM4'.

* if KOMV-KBETR > WA_KONP-KBETR.

* MESSAGE E001(ZCM4) WITH 'value is more than 2.00'.

* ENDIF.
**** CLEAR:WA_KOMV.

**** READ TABLE IT_KOMV[] INTO WA_KOMV WITH KEY KSCHL = 'ZCM3' KPOSN = XKOMV-
KPOSN.

**** IF SY-SUBRC = 0.

**** TZCM1P1 = ( WA_KOMV-KBETR * -1 )." / 10.

**** if TZCM1P1 GT '1.00'.

**** TZCM1P = ( '2.00' - TZCM1P1 ) * -1.

**** TZCM2P = TZCM1P * 1.

**** ELSEIF TZCM1P1 LE '1.00'.

**** TZCM1P = ( '2.00' - TZCM1P1 ) * -1.

**** TZCM2P = ( TZCM1P * 1 ) * -1.

**** endif.

**** V_ZCM1P = TZCM2P.

**** XKOMV-KBETR = V_ZCM1P."WA_KOMV-KBETR .

**** ENDIF.

ENDCASE.

ENDIF.

if KOMK-auart = 'ZOR' or KOMK-auart = 'ZORC' and ( sy-tcode = 'VA01' or sy-tcode = 'VA02' ) .

if XKOMV-ksteu <> 'D'.

CASE XKOMV-KSCHL.CLEAR:WA_KONP. "Percentage base

SELECT SINGLE * FROM KONP INTO WA_KONP WHERE KNUMH = KONP-KNUMH AND KOPOS =
KONP-KOPOS AND KSCHL = 'ZCM1' .

WHEN 'ZCM1'.

XKOMV-KBETR = WA_KONP-KBETR."V_ZCM1P.

WHEN 'ZCM2'.

* if KOMV-KBETR > WA_KONP-KBETR.

* MESSAGE E001(ZCM1) WITH 'value is more than 2.00'.


* ENDIF.

** CLEAR:WA_KOMV.

** READ TABLE IT_KOMV[] INTO WA_KOMV WITH KEY KSCHL = 'ZCM1' KPOSN = XKOMV-KPOSN.

** IF SY-SUBRC = 0 and KOMV IS INITIAL."""14/1/2019.

** TZCM1P1 = ( WA_KOMV-KBETR * -1 ) / 10.

** if TZCM1P1 GT '1.00'.

** TZCM1P = ( '2.00' - TZCM1P1 ) * -1.

** TZCM2P = TZCM1P * 10.

** ELSEIF TZCM1P1 LE '1.00'.

** TZCM1P = ( '2.00' - TZCM1P1 ) * -1.

** TZCM2P = ( TZCM1P * 10 ) * -1.

** endif.

** V_ZCM1P = TZCM2P.

** XKOMV-KBETR = V_ZCM1P."WA_KOMV-KBETR .

** ENDIF.

WHEN 'ZCM3'.

CLEAR:WA_KONP. """Value base

SELECT SINGLE * FROM KONP INTO WA_KONP WHERE KNUMH = KONP-KNUMH AND KOPOS =
KONP-KOPOS AND KSCHL = 'ZCM3' .

XKOMV-KBETR = WA_KONP-KBETR."V_ZCM1P.

WHEN 'ZCM4'.

* if KOMV-KBETR > WA_KONP-KBETR.

* MESSAGE E001(ZCM4) WITH 'value is more than 2.00'.

* ENDIF.

** CLEAR:WA_KOMV.

** READ TABLE IT_KOMV[] INTO WA_KOMV WITH KEY KSCHL = 'ZCM3' KPOSN = XKOMV-KPOSN.
** IF SY-SUBRC = 0.

** TZCM1P1 = ( WA_KOMV-KBETR * -1 )." / 10.

** if TZCM1P1 GT '1.00'.

** TZCM1P = ( '2.00' - TZCM1P1 ) * -1.

** TZCM2P = TZCM1P * 1.

** ELSEIF TZCM1P1 LE '1.00'.

** TZCM1P = ( '2.00' - TZCM1P1 ) * -1.

** TZCM2P = ( TZCM1P * 1 ) * -1.

** endif.

** V_ZCM1P = TZCM2P.

** XKOMV-KBETR = V_ZCM1P."WA_KOMV-KBETR .

** ENDIF.

ENDCASE.

ENDIF.

ENDIF.

*} REPLACE

*{ DELETE JSDK900831 2

*\BREAK-POINT.

*} DELETE
*} REPLACE

ENDFORM.

5 .test Otc process

A sales order
delivery
6.invoices

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy