Mv45afzz

hi all ,
i have one requirement ,
in  mv45afzz   ,   if there are 5 lineitems  (VBAP)  and  there are various partner functions  for each  line item
and based on some conditions if we are able to add partner function ' WE '  only to 2 line item out of 5 line items
now as we have added   WE  on 2 line items then we have to add same partner function to header also.
but the issue is if i am adding that partner function to header that it is reflecting in each of the items but i want it to reflect it in  only 2 items out 5 items , in which we have added WE based on some conditions
regards
rahul

Hi ,
This is SAP standard. When you apply a ship-to on the header, it is by default applied to the entire order. If you want to have different Ship-to on the item level, then you have to change it on the corresponding item only.
The entries created in db table vbpa will have one entry with posnr '000000' this is header level entry and applies to all the items.
But if another ship to is specified for a particular item, then an entry for that item is also created in vbpa.
example:
Client Sales Document Item     Part.funct. Customer 
001    0000000001     000000   AG          0000001
001    0000000001     000000   RE          0000001
001    0000000001     000000   RG          0000001
001    0000000001     000000   WE          0000001
001    0000000001     000020   WE          0000002  --> This implies that item 20 has different ship to than item 10.
So , an entry for each item where the partner differs from the header is created in db table vbpa.
Therefore technically what you want to achieve is not possible I think.
Br,
Advait

Similar Messages

  • Unable to add code in USEREXIT_SAVE_DOCUMENT_PREPARE in include MV45AFZZ

    Hi Experts,
    I need to add some custom codes in USEREXIT_SAVE_DOCUMENT_PREPARE
    -> I opened the include program MV45AFZZ in display mode
    -> Edit -> Enhancement operations -> Show implicit enhancement operations.
    On the status bar it displays an information "Creating of enhancement supported only for line length > 72" 
    inside form USEREXIT_SAVE_DOCUMENT_PREPARE I right clicked -> selected enhancement implementations -> create.
    and now I get the same message On the status bar "Creating of enhancement supported only for line length > 72"  .
    how do I add a piece of code here.
    I can't type in under USEREXIT_SAVE_DOCUMENT_PREPARE.
    Give a solutions experts.
    Regards,
    Ranjith N

    Hi ,
    I believe we need not use the enhancement framework in MV45AFZZ
    Go to SE38 -> MV45AFZZ -> change mode
    Keep the mouse on the user exit USEREXIT_SAVE_DOCUMENT_PREPARE
    On the tool bar click on "Insert" icon ->icon description: Insert Line Area
    ControlShiftF8....
    An editable area will be displayed with a
    *{   INSERT         &$&$&$&$                                          1
    *---> Write code here
    *}   INSERT
    Save and activate the code
    Hope it helps
    Regards
    Byju

  • Exit MV45AFZZ is not working as per our requirement

    Hi Friends,
    In the transaction 'VA02' based on the Sales Order type and the Delivery Block I want to change the Schedule line category in the Sales Order item. We used the exit MV45AFZZ (FORM USEREXIT_SAVE_DOCUMENT_PREPARE) and it changes the Schedule line category as per our requirement.
    The problem is that once the Sales Order is saved with the new Schedule line category it does not transfer the requirements to the Stock/Requirements List(Transaction MD04). But if we change the Schedule line category in Sales Order manually (without using the exit) then the requirements are transfered to the Stock/Requirements List which we can see against that Material in the Transaction MD04. Could you kindly help.
    Regards

    Hi Raju,
    The below code only triggers
    FORM USEREXIT_MOVE_FIELD_TO_VBKD.
    VBKD-zzfield = xxxx-zzfield2.
    ENDFORM.
    when there is some manual change done on the Schedule line. So the control of the program will not stop on this form. Kindly suggest.
    Regards
    Siddharth

  • How to make means of transport field as a mandatory field  in MV45AFZZ

    Hi All,
    I am new to User-Exits.
    In Sales Order creation I have got a requirement In such a way that based on Sold to and Shipto Party Combination of sales order
    I have to make Means of Transport Field as a Mandatory Field.
    I have gone through the Program MV45AFZZ.
    Please let me know how to do it .
    Regards.
    Rohit.

    Hi ,
    Write code in Save_Document_prepare In program MV45AFZZ.
    Constant :c_flag type c .
    if c_flag  eq space.
    IF VBAK-VSBED EQ '01' AND VBKD-TRATY IS INITIAL.
      MESSAGE E0001(SABAPDOCU) WITH 'Enter means of transport'.
    endif.
    c_flag   = 'X'.
    endif.
    Regards.
    Eshwar.

  • Does MV45AFZZ user exit trigger when CRM sales order is replicated into ECC

    Hi All,
    When a Sales order is created in CRM, it is replicated automatically using BDOCS from CRM into ECC.
    I have requirement to code the logic during the process, when sales order is replicated into ECC.
    So I need to know the BAPI which is actually triggered to create sales order in ECC, while replication takes place.
    If I could atleast know, if USEREXITS in MV45AFZZ would trigger or not, when CRM order is replicated into ECC, then I could determine, If I could code my logic in those user exits.
    Please help me on this.

    please check this link
    keremgomi=wordpress=com
    Rgds
    Raj

  • Help needed in Form userexit_save_document_prepare include MV45AFZZ

    Hi Experts,
    I need to check the values entered in table control under sales tab in VA01.
    If the item category for a material is 'TANN' it should save if not it should not save and display an error message and then it should alow the user to edit the table control values. 
    how do i achieve it in Form userexit_save_document_prepare include MV45AFZZ.
    this is what I have done. kindly check the logic and help me further.
    case sy-ucomm.
    when 'SICH'.          " On Save action
    if vbak-vtweg eq 'HA'.  " Check Distribution channel
      flg_dh = 'X'.         " Sets if DC is 'HA'.
    endif.
    if flg_dh eq 'X'.
      if vbap-pstyv eq 'TANN'.    " Check item category
        flg_itmc = 'X'.            " Set if item cat is 'TANN'.
      else.
      message 'SO could not be created Please enter brokerage material' type 'E'.
      endif.

    Hi,
    Please use the following:
    when 'SICH'.          " On Save action
    if vbak-vtweg eq 'HA'.  " Check Distribution channel
      flg_dh = 'X'.         " Sets if DC is 'HA'.
    endif.
    if flg_dh eq 'X'.
      if vbap-pstyv eq 'TANN'.    " Check item category
        flg_itmc = 'X'.            " Set if item cat is 'TANN'.
      else.
      message 'SO could not be created Please enter brokerage material' type 'E' display like 'E'.
      endif.
    endif.

  • Enhancement spot in MV45AFZZ.

    Hii All,
    I got a problem when i am writing enhancement spot in MV45AFZZ.
    I have added some new fields in 8459 sub-screen at item level in VA01 transaction
    some of those fields are mandatory for some materials
    Now if the user goes for a save with out entering those fields in addtional tab B, i am rising a error that field is not entered in Additional tab B.
    Now everything is fine i am able to trigger that error message by writing the error message in USEREXIT_SAVE_DOCUMENT. By writing a enhancement spot.
    whenever i trigger this error message if i go and enter the corresponding fields in Additional tab B at item level it is saying that the " Item SOME NO say 00010  does not exist "  and it is going out of the transaction with out saving the sales order .
    If i dont click the save button and going directly to that additional data tab and entering the corresponding field and going for save it is saving.
    I am getting the problem if i click the save button before entering those fields. wht could be the problem?
    please help me.
    Thanks ,
    Ravindra.

    Hii,
    @  Ankesh Saharan :
    If i change the error message to information or warning it will go for a save even though those mandatory fields are missing.
    @  TARAPADA DAN :
    I tried using the exit USEREXIT_SAVE_DOCUMENT_PREPARE.
    But the problem is based on the material number entered in the screen i am fetching part location type from MVKE. using that part location i am triggering error messages.
    when i try to refer the material number as VBAP-MATNR it is blank in the exit USEREXIT_SAVE_DOCUMENT_PREPARE. So i cant use this exit.
    any one please answer my question
    Thanks,
    Ravindra.

  • MV45AFZZ USEREXIT_SAVE_DOCUMENT not updating XVBEP

    Dear Experts,
    I am trying to save some data in the fields of Sales Order line item while saving using exit USEREXIT_SAVE_DOCUMENT.
    I am updating the table XVBEP with the changed fields, but its not getting updated in the SO line item after the SAVE operation is complete.
    I have debugged the code and found that the table XVBEP is getting cleared in the standard code.
    Plese help me find a solution.
    thanks,
    Jinson.

    >
    chandra Babu wrote:
    > Hi,
    >
    > use the user exit MV45AFZZ. USER_SAVE_DOCUMENT_PREPARE for updating the XVBEP..
    >
    > or still if not updating then you search for any Enhancement point which update the XVBEP.
    >
    > Thanks,
    > Chandra Babu.A
    Thankyou Chandra,
    I have tried USER_SAVE_DOCUMENT_PREPARE. But it does not work.
    Also tried using USEREXIT_MOVE_FIELD_TO_VBEP . But it did not call this exit at all.
    Do tell me if you have a solution.
    thanks,
    Jinson

  • Credit check status in MV45AFZZ

    Dear All expert,
    I want to do update a custom table in MV45AFZZ  when the order passed credit check.
    But I do not know , is there any indicator about the result of the credit check?
    I mean some field or table stored those kind of data.
    Many thanks in advance!

    Hi,
    We do have this data available. Check the field VBUK-CMGST(Overall status of credit checks).  You can directly use work area VBUK.
    Below are different statuses.
    space               Credit check was not executed/Status not set
    A     Credit check was executed, document OK
    B     Credit check was executed, document not OK
    C     Credit check was executed, document not OK, partial release
    D     Document released by credit representative
    There are different types of credit checks. Just search in table VBUK with "credit check". You can see different fields. But in your case, you need overall status i hope.
    Table VBUP gives you item level statuses.
    Thanks,
    Vinod.

  • Header Text in MV45AFZZ

    Hi,
    I have a requirement that I need to capture an order header text in user exit save document (in mv45afzz) and download that info in a file (This file contains shipment info which needs to the sent to carrier provider and it needs to be instant - that is immediately after order creation)
    In that user exit I tried function module read_text with name as 'XXXXXXXXXX' or by providing the order number but both doesn't get the result.  The header info is available in XTHEAD structure in that user exit.  For the text, I tried XTLINE / other TLINE internal tables, but I coundn't get a suitable table where I can get the text info.
    Pl let me know your ideas.
    Thanks,
    Krish

    Thanks Usha. 
    But I already tried STXL but it doesn't show up in exit_Save_document in MV45AFZZ.  The text is just a single line probably less than 30 char. 
    Thanks,
    Krish

  • Authorization object in MV45AFZZ not working

    Hi,
    I am using the aurhorization object C_CREC_WRK in the user exit MV45AFZZ in form USEREXIT_MOVE_FIELD_TO_VBAP to 
    restrict the user at plant level while creating the sales order. While doing so the authorization is not working correctly. I have maintained the appropriate aithorization for the user and plant in PFCG but still its not validating in the exit.
    But if I use the same object in se38 in a z program it work prefect. I am not getting where is the problrm is. is  there any
      restriction for the object in mv45afzz.
    Regards,
    Vaibhav B Gawali.

    When calling the script object that is embedded in the fragment you have to path specifically to that object. The scriptobjectName.method is not enough to find what you want. You would need FragmentName.ScriptObjectName.Method()
    I tried it here and it worked.
    You may want to use a script Fragment instead of using an embedded script object on a fragment. The script fragment would run in the form root context and would behave like you are expecting.

  • Buffer issue in MV45AFZZ

    Hello Experts,
    I am facing problem with the user exit MV45AFZZ. The exit functionality is working fine. However when I am hitting the back button from VA01 and and try to start creating the order fresh then my user exit is not being called. However when I exit completely out of the VA01 using either /nVA01 or /OVA01 the user exit is being called successfully. Could you please help me in fixing this issue for Back button?
    Regards
    Radha

    If you have problem using the Global Variables of the FG, you can use the  USEREXIT_REFRESH_DOCUMENT userexit of program MV45AFZA. This User exit would be called when the document is saved and all the variables are getting initialized. You can create a FM in your FG, clear all the variables in this Clear FM and call this FM in this User Exit to clear all the variables from your FG.
    Regards,
    Naimesh Patel

  • Pricing exit CRM_COND_COM_BADI for MV45AFZZ PERFORM XVBPA_LESEN

    ECC user exit MV45AFZZ has PERFORM XVBPA_LESEN that moves a the customer number of a partner function to a field.
          PERFORM XVBPA_LESEN(SAPFV45K) USING 'Y1' VBAP-POSNR SY-TABIX.
          MOVE XVBPA-KUNNR TO TKOMK-ZZKUNY1.
    Is there an existing perform in CRM similiar to XVBPA-LESEN?

    Hi Glenn,
    ZZKUNY1 is a custom field and obviously you got to do it yourself.
    Since you are already using ZZKUNY1 as a part of the field catalog, I assume it is used in a pricing condition. Make sure that the condition is available in CRM also.
    Also make sure that the field ZZKUNY1 is defined in the CRM field catalog in the header fields (TKOMK). If you have already created this, then well ad good. If not, you have to see that the ZZKUNY1 in CRM and R/3 must match in data type etc.
    Now implement the BAdI CRM_COND_COM_BADI and since this is a header field, add right kind of code in the method HEADER_COMMUNICATION_STRUCTURE
      DATA: ls_crmt_acs_h_com TYPE crmt_acs_h_com,
            lt_header_guid    TYPE crmt_object_guid_tab,
            lt_req_obj        TYPE crmt_object_name_tab,
    //      etc. Define rest of the structures
      ls_crmt_acs_h_com = cs_acs_h_com.
      APPEND ls_crmt_acs_h_com-header TO lt_header_guid.
      lv_guid = ls_crmt_acs_h_com-header.
      ls_req_obj =  gc_object_name-partner.
      INSERT ls_req_obj INTO TABLE lt_req_obj.
      CALL FUNCTION 'CRM_ORDER_READ_OW'
        EXPORTING
          it_header_guid       = lt_header_guid
          it_requested_objects = lt_req_obj
        IMPORTING
          et_partner           = lt_partner
        CHANGING
          cv_log_handle        = lv_log_handle.
      CHECK sy-subrc = 0.
    //Check your partner function type here
      READ TABLE lt_partner INTO ls_partner WITH KEY ref_guid = lv_guid
                                                     partner_fct = "0000001"
      IF sy-subrc = 0.
        lv_partner_guid  = ls_partner-bp_partner_guid.
        SELECT SINGLE partner INTO lv_customer FROM but000 WHERE partner_guid = lv_partner_guid.
    cs_acs_h_com-ZZKUNY1 = lv_customer
      ENDIF.

  • VBAP modify in MV45AFZZ

    Hi people! I need some help, please.
    I'm trying to duplicate line in VA01, with some changes, for this I'm using MV45AFZZ. I already tried in USEREXIT_SAVE_DOCUMENT and USEREXIT_SAVE_DOCUMENT_PREPARE, copying a new line to XVBAP, changing and appending, but doesn't  work, when save and see in the VA02, the Sales order apper with 1 line unchanged...
    somebody can help?
    Thanks in advance.

    You must have forgotten one of these (or both):
    XVBAP-UPDKZ = 'I'.
    APPEND XVBAP.
    Also pay attention to the line types, some items just can't be added in this way. Check with your SD consultant.
    And maybe try using Search once in a while:
    Re: Adding Line items to sales order on creation using User-Exit in VA01.

  • VBAP-ABDAT field updation in MV45AFZZ.

    Dear Gurus,
    we have a requirement , when we are changing the field VBAP-ABGRU through BAPI_SALESORDER_CHANGE  we should update sy-date in the VBAP-ABDAT.
    i have tried for the ABDAT field in the bapi item structure it is not there.
    i found the exit MV45AFZZ with exit: USEREXIT_MOVE_FIELD_TO_VBAP.
    can guide how insert the sydate in 'ABDAT' field if VBAP-ABGRU is changed is changed or filled with value thorough BAPI_SALESORDER_CHANGE.
    Regards,
    Abdul Rahim

    Hi Abdul,
    could you please check if the value of ABGRU has been changed by comparing VBAP and XVBAP?
    Also, check that you do this only when the sales document changes (t180-trtyp eq 'V').
    You can do this in userexit_move_field_to_vbap
    reg, bob

  • Monitor sales order deletion in MV45AFZZ

    Hi all,
    I've added code to userexit sales_doucment_save in MV45AFZZ. However, I have to check it in case of sales order deletion.
    Does anyone knows how to find that the sales order is to be deleted ?  In the exit itself I couldn't find any field to check that it's actualy deletion and not change.
    Thanks in advance,
    Shai E.

    You should use..
    exit..
    USEREXIT_DELETE_DOCUMENT  
    What are actually trying to achieve. Can you give more info..
    Rgds,
    Samir

Maybe you are looking for

  • HT4061 How can i retrive my iCloud password for my iPhone 5S

    I have created an iCloud account (different from Apple ID). i forget my password for my iCloud account. but with the same iCloud id and password i am able to login in icloud.com Please help me in either deleting my iCloud account or resetting my iClo

  • Network File sharing in SharePoint 2013 portal

    Hi Everyone I have a set of network folders(shared folder in some server) and want to make use of all this in SharePOint as a portal. So that i can eliminate the use of Network folder sharing concept. Bacially i need to know whether we have any OOB t

  • MacMini with Yosemite freezes on the login window

    Two of our MacMinis were frozen when we tried to wake them up from sleeping. Both Mac's have standard SW installion and original Apple HW. Usually the Mac has a good recovery of any files being open but on one a major document couldn't be recovered a

  • I lost my wi fi connection right after downloading the ios6 for my iPhone 4s

    I lost my wi fi connection right after downloading the ios6

  • Lightroom cc 2015 problems

    Hi there. To keep it short. I am trying both Photoshop and Lightroom. Updated lightroom to the new version with still 19 days to go, and now it does not open. I'm more than willing to buy the photographer monthly package. I just wanted to be sure tha