User exit for Dlvy Block at header for sales order for Companycode & materl

Hi all,
I have a requirement. I need to apply a Delivery Block for all sales orders which fall
In a particualr company code "999" and if they have any configurable material in the item level.
When a Sales Order is generated, during the process of generation, I should
Write a loigc such that, if the sales orders fall in a particlar company code
Say for '999' and if they have a configurable material at item level,
I have to trigger an ABAP Proxy that goes and fetches a Yes/No value from an
External system. Based on this Flag value I h ave to then apply a delivery block for
The order at header level.
So I assume, I should put a logic in some user exit that gets triggered before order is saved.
And in that user exit I have to check if the Company Code of that order is '999' and if it  has
Configurable product or not. If it satisfies the 2 conditions, I should, trigger this ABAP Proxy and
Based on the true/False value I have to set Delivery Block or do not set delivery block for the order
At header level.
So I think first I should figure  out following things.
1) user exit ..where I should put the code to check conditions and to apply delivery block.
2) write a proxy and trigger that proxy in this user exit.
Coming to first part, which user exit should I use to set delivery block for the order
At header level. And how will I check for company code and config product?
Which variables of the SAP stnd pgm store Company Code and Config product values so that
I can check those variables for that values?
Please suggest and help me with this.
Any help will be highly appreciated.
Regards,
Sam

1)go to the main program sapmv45a
include MV45AFZZ ->userexit_move_field_to_vbak
depending on ur conditions ...
keep a break-point in the form userexit_move_field_to_vbak ,and if it stops there Check for vbak-lifsk .
Write a condition to set the deliveryblock that is vbak-lifsk = 'xx'.
2)then regarding your second point ...what is the middle ware used to interact with legacy system
let me know

Similar Messages

  • User exit or badi to restrict PROO in Sales Order for certain sales organisation

    Hi SAP SD experts,
    I would like to know the User exit or badi to restrict PROO in Sales Order for certain sales organization. This can be done by making condition type as D but will affect all sales org and we to restrict for a certain sales org only.
    thanks,
    SG 

    Kindly  explained  how  you have  solved  others  may benefit..
    regards
    Arunkumar

  • Need a user exit to add custom partner function in sales order @ item level

    Hi,
    Need a user exit to add custom partner function in sales order at item level. Goto --> Item --> Partner.
    Thanks,
    Thiyagi

    HI Leo
      To add a condition price for a condition type, this has to be assigned in the <b>pricing procedure</b>. For each condition type in a pricing procedure, we will have <b>access sequences</b>. If we follow this approch, the price is automatically extracted basing on the access sequences when condition records are maintained. For this, no coding is required and everything can be done by configuration by Functional consultant.
       Naren is right to point out on the same.
      If you need to change the price for a particular condition which already exists, you can go by <b>pricing routines</b>. Go through transaction <b>VOFM</b> for the same. 
       I advice you to discuss with your functional consultant and understand the requirement and then go for modifying accordingly.
    Kind Regards
    Eswar

  • User exit to update the incompletion log in sales order for pricing error

    Hi experts,
    I have to check the some mandotory pricing conditions in sales order, if that conditions are not exist in sales order then i need to show the information message as well as i need to update it in incompletion log of sales order. (incopletion log we can see on menu bar 'EDIT' or ctrl+F8 on main screen of VA01). So that user can save the sales order but it will be in incomplete status.
    I have completed it upto showing the information message using user exit 'MV45AFZZ', but after this i don't know how to update it in incompletion log of sales order for pricing. I tried to update in tables VBUK-UVPRS, but i am not getting the desired result.
    Please anyone can tell me how to update it. In which user exit i can update the incompletion log.
    Thanks and Regards,
    Vicky.

    Hi Vinod,
    I am sending you my code please check it,
       if TKOMK-SPART = 10.
        if XKOMV is not INITIAL.
          clear v_JEXP.
        READ TABLE XKOMV with key kschl = 'JEXP'.
        if sy-subrc = 0.
          check XKOMV-kwert = 0.
          message i003(ZT) with 'Value should not be 0 for conditioin type JEXP'.
          v_JEXP = 'X'.
        else.
          message i003(ZT) with 'Maintain the mandatory Conditioin type JEXP'.
          v_JEXP = 'X'.
        endif.
        if v_JEXP = 'X'.
      XVBUV-MANDT = sy-mandt.
      XVBUV-POSNR = '000010'.
      XVBUV-TBNAM = 'VBAP'.
      XVBUV-FDNAM = 'PRSOK'.
      XVBUV-FEHGR = 20.
      XVBUV-STATG = '06'.
      XVBUV-FCODE = 'PKON'.
      XVBUV-SORTF = 9999.
      XVBUV-LFDNR = 0000.
      XVBUV-UPDKZ = 'I'.
      append XVBUV.
        endif.
    endif.
    endif.
    Please suggest something to solve this.
    Thanks and Regards,
    Vicky.

  • User exit - VA01 - Adding new line items while Sales Order Creation

    Hi All ,
    I have a requirement where : in VA01 , i have to add new line items using USER EXIT or BADI.
    The scenario is : we maintain Characteristics for Material. When we select a particular characteristics, Factor and length will be displayed in a Popup. we can specify the Factor and lenght.
    Here , if i specify Factor as 10 and lenght as 1000. the Material has to be cut / split into 10 items of 1000 mts each. and the ITEMs table control should get 10 ITEMS .
    How to add new items using User exit or Badi in VA01 while creating a sales order.
    i have identified the user exit . What code should be used to add new line items.
    kindly help me in solvng this.
    Waiting for your replies.
    Thanks in advance.
    Suki.

    hi
    wich user exit do you take for that ???

  • User Exit or BADI in APO to change sales order relevant data while CIF

    Hi Everyone,
    I require User exit or BADI at APO side to change customer field kunnr of sales order after it enters APO through CIF.
    My requirement is to replace KUNNR field with KDGRP field of sales order.
    The data will pass through CIF in APO.
    Is there any user exit or BADI for the same?
    Sample code will be of great help.
    Regards,
    Kashyap.

    Hi ,
    Resolved myself.
    customer exit APOCF010
    Regards,
    Kashyap

  • What user exit can add / delete lines on a sales order?

    Hi experts -
    We are going to be using a 3rd party to give us pricing, so we need to make a call for each line item to get prices.  This may give us free goods, so we will need to add / remove lines from a sales order.
    Any ideas what exit will allow us to do this?
    Thanks,
    Mark

    Hi,
    Try BAPI:
    BAPI_SALESORDER_CHANGE
    Regards,
    Gilberto Li

  • User Exit for Updating Delivery Plant at Item Level in Sales Order

    Hello Experts
    There is a requirement to determine the delivery plant for each item level and than update the items with newly determined plant.  There is a user exit MV45AFZZ routine FORM USEREXIT_MOVE_FIELD_TO_VBAP. to update the item level entries in Sales Order in VA01 or VA02. Is this the right place to do this?, if yes , do i need to perform any other standard logic (like re determine Shipping points , schedule lines ) for newly determined plant? If not , can you please suggest any other place , BADI or user exit to change the delivery plant of sales order.
    Thanks a lot....
    -Harkamal

    Best place is MV45AFZZ-USEREXIT_SAVE_DOCUMENT_PREPARE. Populates the values just before saving the document. You can have your own deriving logic. Make sure that peice of code is trigger only for Sales Order create or change (VA01/VA02).
    Are you kidding???  You do realize that this is AFTER all validations against configuration, ATP, pricing, etc. have been performed??!!!  Never, ever change a critical value like plant in the SAVE user exits...

  • User exit for sales order-Urgent

    How  Developed a User Exit, which will be triggered when a Sales Order is changed manually. This user exit will check the requested delivery date and update VBKD-BSARK field.
    Pls help me how to do it....
    Pts will be rewarded.....

    Hi,
    The following exits trigger during VA01 creation:
    EXIT_SAPMV45A_002 and
    EXIT_SAPMV45A_003
    Check this include MV45AFZZ also.
    Regards,
    Satish

  • User Exit for VA01 - Delivery Block

    Dear Friends
    I wanted to do a User Exit for VA01 which should set the Delivery Block = Credit Memo as default for a particular user.
    Can anyone give me the solution.
    REg
    S.K.Raj

    Hi Kamaraj,
    First of all u have to find out the perticular exit for make the changes, after that take one field TBTKZ which is flag for decit /credit memo. Based on the condition that flag set as 'X'. If that flag set as 'X' then populate the data.
    Here it ishow to find out the user exit.
    execute the following report and enter the t-code VA01 it will display all the exits. then search them by seeing coments..
    report zuserexit no standard page heading.          
    tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.          
             tables : tstct.          
    data : jtab like tadir occurs 0 with header line.          
    data : field1(30).          
    data : v_devclass like tadir-devclass.          
    parameters : p_tcode like tstc-tcode obligatory.          
    select single * from tstc where tcode eq p_tcode.          
    if sy-subrc eq 0.          
       select single * from tadir where pgmid = 'R3TR'          
                        and object = 'PROG'     
                        and obj_name = tstc-pgmna.     
       move : tadir-devclass to v_devclass.     
          if sy-subrc ne 0.     
             select single * from trdir where name = tstc-pgmna.     
             if trdir-subc eq 'F'.     
                select single * from tfdir where pname = tstc-pgmna.     
                select single * from enlfdir where funcname =     
                tfdir-funcname.     
                select single * from tadir where pgmid = 'R3TR'     
                                   and object = 'FUGR'     
                                   and obj_name eq enlfdir-area.     
                move : tadir-devclass to v_devclass.     
              endif.     
           endif.     
           select * from tadir into table jtab     
                         where pgmid = 'R3TR'     
                           and object = 'SMOD'     
                           and devclass = v_devclass.     
            select single * from tstct where sprsl eq sy-langu and     
                                             tcode eq p_tcode.     
            format color col_positive intensified off.     
            write:/(19) 'Transaction Code - ',     
                 20(20) p_tcode,     
                 45(50) tstct-ttext.     
                        skip.     
            if not jtab[] is initial.     
               write:/(95) sy-uline.     
               format color col_heading intensified on.     
               write:/1 sy-vline,     
                      2 'Exit Name',     
                     21 sy-vline ,     
                     22 'Description',     
                     95 sy-vline.     
               write:/(95) sy-uline.     
               loop at jtab.     
                  select single * from modsapt     
                         where sprsl = sy-langu and     
                                name = jtab-obj_name.     
                       format color col_normal intensified off.     
                       write:/1 sy-vline,     
                              2 jtab-obj_name hotspot on,     
                             21 sy-vline ,     
                             22 modsapt-modtext,     
                             95 sy-vline.     
               endloop.     
               write:/(95) sy-uline.     
               describe table jtab.     
               skip.     
               format color col_total intensified on.     
               write:/ 'No of Exits:' , sy-tfill.     
            else.     
               format color col_negative intensified on.     
               write:/(95) 'No User Exit exists'.     
            endif.     
          else.     
              format color col_negative intensified on.     
              write:/(95) 'Transaction Code Does Not Exist'.     
          endif.     
    at line-selection.     
       get cursor field field1.     
       check field1(4) eq 'JTAB'.     
       set parameter id 'MON' field sy-lisel+1(10).     
       call transaction 'SMOD' and skip first   screen.
    Hope this helps you..
    Regards,
    Kumar.

  • PPCO0007 User Exit for  Changing Header Fields During Order  (CO40)

    .. Hi !!!!
      I need your help or suggestions,
      I need to change the standar order  before to save, i found the user exit PPCO0007,
      i assign the new value for the order, but when finish the fuction, EXIT_SAPLCOZV_001, the new values are
      lost, and finally the system set the standard order.
        Someona know how can change the order and the the batch.
         Thanks
    Noemí Huerta

    Hi Noemi
    You can use the enchancement PPCO0007 (exit when the production order is saved).
    Use the function module EXIT_SAPLCOZV_001 (User Exit for Checking or Changing Header Fields During Order Save) to update the field priority starting the information in the material-customer info record.

  • User Exits for Purchase order Header Text Validation

    Hi Experts,
    I need user exit for validate a  Long text in Purchase order header data for a Particular Doc type.
    We are using 4.6 B so badi is not available .
    So pls tell me user exit for the same or any other method as i was unable to find user exit for this scenario.
    Note :  This valiadation should trigger whhile creating  PO.
    Warm Regards
    Santosh Kumar
    Edited by: Santosh L on Mar 19, 2010 9:58 AM

    i have used concept of global memory through call stack

  • User exit for updating delivery block of Sales order before Delivery

    Hi  Folks,
    Need to have an user exit for updating Delivery Block indicator for a Sales order Before creating its delivery
    I have got an exit in Program SAPMV45A
    MV50AFZ1
    FORM USEREXIT_REFRESH_DOCUMENT.
    that hits before processing the delivery block fro delivery (Correct me if i m wrong with this )
    Now i want now how to change the Delivery Block indicator of Sales order in that exit
    any FM available ?
    Thanks n regards
    Sonal...

    Hi  ,
    How did you solved this issue?
    I am having similar scenario in which while pressing the save button  delivery block should update if multiple schedule line exist.
    Tried by two different approaches in various user exit without any success.
    AFAIK we have two ways to achieve this functionality.
    1) Count the no of rows in vbep. If greater than 1 then multiple schedule line exist and we can assign the value to VBAK-LIFSK(delivery block) as per our requirement.
    This is not correct. If there are two line items both with single schedule line . This case total no lines in vbep will 2 and above condition will true which is incorrect.
    2) There is a indicator for multiple schedule line (VBAPD-EPMEH , xvbap-epmeh ) if it is check then multiple schedule line exist and we can assign the value to VBAK-LIFSK(delivery block) as per our requirement.
    If I write code in USEREXIT_SAVE_DOCUMENT_PREPARE.
    Multiple schedule line indicator is not populate so can not use 2nd approach.
    If I write code in  USEREXIT_SAVE_DOCUMENT it of no use as vbak is updated before reaching this user exit.
    If I write code in USEREXIT_MOVE_FIELD_TO_VBAK as this user exit is also called while pressing the enter key for this I have use
    the condition of fcode but it also fails in some condition.
    If fcode eq 'SICH'.
    Read table xvbap with key epmeh = 'X'.
    IF SY-SUBRC = 0.
    VBAK-LIFSK = '03'.
    Else.
    VBAK-LIFSK = ' '.
    Endif.
    Endif.
    Please help me to get the desired functionality working for all cases.
    1) One line item with multiple schedule line                                              
    2) Two line item with multiple schedule line                                             
    3) One line item having one schedule line and second one having multiple
    4)Two line item both with single schedule line.

  • Screen /user exit for additional screen on sales order header

    Hello sir's,
    can anybody help me for this query---
    Screen /user exit for additional screen on sales order header.
    exit name.
    Thanks in advance,
    Vikram

    Hi,
    SAP has provided screen modification. This you can do on "Additional data B" screen at both <b>header</b> and line iteam level.
    Additional <b>header data is on screen SAPMV45A 0309</b>, additional item data on screen SAPMV45A 0459. These screens contain the <b>Include screens SAPMV45A 8309 ( this is the screen exit at header  )</b> or SAPMV45A 8459 ( this is the screen exit at item ) as user exits. There few more exits you will have to code to get this screen works. The are,
    MV45AOZZ - PBO module of screen
    MV45AIZZ - PAI module of screen
    MV45ATZZ - Global data definition for user-exit.
    Check this link for more info regarding user-exit in sales docs.
    http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/frameset.htm
    We have alredy implemented this solution at line item level. Let me know if you have any question.
    Regards,
    RS

  • User exit for change PO (me22n) for  save header and item text.

    Hi Experts,
    I have a requirement to read the header texts/item text  at run time .
    please tell me is there any  save user exit for tc me22n .
    Thanks in Advance.
    Paresh

    Transaction Code - ME21N                    Create Purchase Order
    Exit Name           Description
    LMEDR001            Enhancements to print program
    LMELA002            Adopt batch no. from shipping notification when posting a GR
    LMELA010            Inbound shipping notification: Transfer item data from IDOC
    LMEQR001            User exit for source determination
    LMEXF001            Conditions in Purchasing Documents Without Invoice Receipt
    LWSUS001            Customer-Specific Source Determination in Retail
    M06B0001            Role determination for purchase requisition release
    M06B0002            Changes to comm. structure for purchase requisition release
    M06B0003            Number range and document number
    M06B0004            Number range and document number
    M06B0005            Changes to comm. structure for overall release of requisn.
    M06E0004            Changes to communication structure for release purch. doc.
    M06E0005            Role determination for release of purchasing documents
    ME590001            Grouping of requsitions for PO split in ME59
    MEETA001            Define schedule line type (backlog, immed. req., preview)
    MEFLD004            Determine earliest delivery date f. check w. GR (only PO)
    MELAB001            Gen. forecast delivery schedules: Transfer schedule implem.
    MEQUERY1            Enhancement to Document Overview ME21N/ME51N
    MEVME001            WE default quantity calc. and over/ underdelivery tolerance
    MM06E001            User exits for EDI inbound and outbound purchasing documents
    MM06E003            Number range and document number
    MM06E004            Control import data screens in purchase order
    MM06E005            Customer fields in purchasing document
    MM06E007            Change document for requisitions upon conversion into PO
    MM06E008            Monitoring of contr. target value in case of release orders
    MM06E009            Relevant texts for "Texts exist" indicator
    MM06E010            Field selection for vendor address
    MMAL0001            ALE source list distribution: Outbound processing
    MMAL0002            ALE source list distribution: Inbound processing
    MMAL0003            ALE purcasing info record distribution: Outbound processing
    MMAL0004            ALE purchasing info record distribution: Inbound processing
    MMDA0001            Default delivery addresses
    MMFAB001            User exit for generation of release order
    MRFLB001            Control Items for Contract Release Order
    AMPL0001            User subscreen for additional data on AMPL
    No of Exits:         35
    USER EXIT
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.sap-img.com/ab038.htm
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html
    Rewards if useful.........
    Minal

  • User exit for filling the payment block

    Hello,
    I need the user exit for popuating the payment block(RBKP-ZLSPR ) while posting the FI invoice thru MIRO.
    Any inputs would be of great help.
    Thanks!
    Praveena.

    Hi,
    Try with these userexits
                                                                                    Enhancement/ Business Add-in            Description                                                                               
    Enhancement                                                                               
    LMR1M001                                User exits in Logistics Invoice Verification                    
    LMR1M002                                Account grouping for GR/IR account maintenance                  
    LMR1M003                                Number assignment in Logistics Invoice Verification             
    LMR1M004                                Logistics Invoice Verification: item text for follow-on docs    
    LMR1M005                                Logistics Inv. Verification: Release Parked Doc. for Posting    
    LMR1M006                                Logistics Invoice Verification: Process XML Invoice             
    MRMH0001                                Logistics Invoice Verification: ERS procedure                   
    MRMH0002                                Logistics Invoice Verification: EDI inbound                     
    MRMH0003                                Logistics Invoice Verification: Revaluation/RAP                 
    MRMN0001                                Message output and creation: Logistics Invoice Verification                                                                               
    Business Add-in                                                                               
    INVOICE_UPDATE                          Business Add-In: Logistics Invoice Verification                                                                               
    Assign points if useful.

Maybe you are looking for

  • How to connect Apple TV to an older TV?

    I used to connect my iPad to the TV through a specific lead which had the red/yellow/white inputs (sorry - not sure of the technical term!) and that worked really well - when I lost my iPad and replaced with the newer version, this lead would no long

  • Nokia 500 and Belle Refresh: browser issues.

    Greetings. The Belle Refresh was indeed a welcome refresh for this low-to-midrange phone. However, there is a serious issue with the browser. With the update to Qt 4.8, you inherited QtWebKit, an amazing browser I know very well. In a desktop, it's f

  • 754 Ultra MS-6561 Windows crash and now sometimes doesn't POST

    Bought a new MSI motherboard and installed everything that's in my signature.  Everything is used except for the memory and the mobo.  The computer was running fine for a few weeks. No problems. Only recent installation is an old game: Independence W

  • Field in the selection screen as a select option with two default values

    Hi All, can anybody tell me how to put field in the selection screen with two defaul values. for ex:  selection screen the Account Group KNA1-KTOKD as a select option. The defeault value should be Y001 and Y005. please reply ASAP. Its urgent. Thanks

  • Opening Project First Time from Version Control.  RoboSource Node

    Four writers have upgraded successfully.  My fifth is having issues... She has Serena Dimensions SCC installed as well (another source control product - used by Applications, not the authors or Infra. Problem: When she is establishing the root path (