Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8419

Forwarding agent in Sales order Pricing

$
0
0

Dear all,

 

My client want to bring the freight paid to the forwarding agent  in the sales order.

i tried creating the access seq with vendor plant and customer . but the Vendor field was in yellow ! mark. so searched the SCN and found some helpful data  which was shared

 

 

I appended a structure KOMKAZ to add a Z-FIELD "ZAGENT" of type LIFNR.

 

The field is now available in field catalogue. I saved the condition records as required.

 

I populated this field ZAGENT in USER EXIT

 

USEREXIT_PRICING_PREPARE_TKOMK.

 

DATA: ws_agent type LIFNR.

 

      IF VBAK IS NOT INITIAL.

 

         SELECT SINGLE LIFNR FROM KNVP INTO ws_agent WHERE KUNNR = VBAK-KUNNR

                                     AND  VKORG = VBAK-VKORG

                                     AND  VTWEG = VBAK-VTWEG

                                     AND  SPART = VBAK-SPART

                                     AND  PARVW = 'LF'.

         IF SY-SUBRC = 0 AND ws_agent IS NOT INITIAL.

 

             TKOMK-ZAGENT = ws_agent.

 

         ENDIF.

 

      ENDIF.

 

This is how I was able to determine condition records in Sales document.

 

 

the same followed and the price i maintained in VK11 was picked up correctly.

 

 

but if i change the vendor in the SO the Price is showing still for the same old vendor the field is not updating.

 

found the reason is since picking from KNVP  even if i have two forwarding agent it is considering the only same old vendor.

 

Any input will be helpful

 

Regards


Viewing all articles
Browse latest Browse all 8419

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>