Exit to insert customer number in PO

Hello all,
I have a sales order and I create a requisition / purchase order - make to order document with account assignment category E.
In the account assignment tab I have to insert the sales order number.
Do you know if it is possible, in that moment or when I save the document, to have the customer number (from sales order) - CMMDA-KUNNR (Customer in Delivery Address tab)  - filled automatically. This is because I want to have the customer address and not the plant address and if I change manually this field I have the customer address. However I want to have this process automatically.
Thanks in advance for any help.

if you want the vendor to deliver directly to a customer, then this is called  a third party process.
This process starts in SD - automatically a PR will be created, and the PR has already the customers adress within, once you convert the PR to a PO the delivery adress has the customers adress.
Using the correct process will save some time for programmers

Similar Messages

  • Exit to capture customer number in STO

    hi ,
      I need to capture the customer number and sales area at the item level (you can find it on the shipping tab) of an STO.
    is there any Exit where we can do this 
    Points will be rewarded.
    Cheers
    Snehi Chouhan

    Hi Snehi,
    Check this code in include LMEGUICI3 and main program
    SAPLMEGUI
    PERFORM get_shipping_data IN PROGRAM saplmepo
                                            USING    l_mepoitem-ebelp
                                            CHANGING l_mepo1331.
    Here shipping data is being populated to screen. Not sure of exit.
    Did u tried checking below exits also.
    EXIT_SAPMM06E_006
    EXIT_SAPMM06E_007
    EXIT_SAPMM06E_008
    EXIT_SAPMM06E_009
    EXIT_SAPMM06E_012
    EXIT_SAPMM06E_013
    EXIT_SAPMM06E_014
    EXIT_SAPMM06E_016
    EXIT_SAPMM06E_017
    EXIT_SAPMM06E_018
    I think one of these will servve ur requirement. IF i found some thing i will let u know.
    Thanks,
    Vinod.
    Edited by: Vinod Reddy Vemuru on Jun 17, 2008 5:43 PM

  • Service Limits in Purchase Requisitions: Where to Insert Custom Code?

    The issue is related to finding a place in SAP logic where a BADI, or, an
    enhancement can be implemented when inside transaction ME52N for a
    Service Limits type Purchase Requisition where K is the Account
    Assignment and B is the Item Category for a Service Limit Purchase
    requisition. Especially. or initially, at the point of navigation when
    going from (within the Limit Tab) and selecting the Account Assignment
    Icon to the right.
    By finding a good place to insert custom code in between these two tabs
    during navigation I am referring to (1)the actuality of the transaction
    breaking into this location, and,(2)a place where the global fields can
    be read and changed ie. GL Account Number, Material Group, etc.
    I have read, and reviewed several SAP Notes: 496082, 627072 and 551863.
    Failed Attempts:
    1)I have tried finding BADIs via breakpoints inside of
    CL_EXITHANDLER~GET_INSTANCE. None that are found are used and are not ofany help.
    2)I have attempted to use various user exits within the following SMODs,to name a few:
    MEREQ001 |Customers' Own Data in Purchase Requisition
    SAPLF0PR |Requests: Account Determination and Checks
    SAPMF02H |Function exit: G/L account master data
    V45E0002 |Data transfer in procurement elements (PRreq., assembly)
    WDFE0001 |Customer-Specific Determination of Requirements Data
    COZF0001 |Change purchase req. for externally processed operation
    COZF0002 |Change purchase req. for externally procured component
    3)I have implemented various custom enhancements inside of SAP Main
    Program SAPLMEREQ inside include LMEREQF09, and a few other LMEREQFXX.
    4) We previously used BADI 'ME_PROCESS_REQ_CUST' to satisfy a similar
    requirement, but is of no help for this request.
    Thank-You,

    Custom tags are different than udfs.  Let's stick with udfs.  Your location choices are:
    1.  If only one template is going to use it, you can put it in that template.  Otherwise,
    2. You can put it in a .cfm file and cfinclude that file whenever you want to call the function, or
    3. You can put it into a .cfc.
    A little while back, someone ran some tests and posted the results on one of these forums.  The gist of it was that Option 2 would run faster than Option 3.

  • Customer number not in the inspection lot for a make to order scenario

    Hi All,
    I know that standard SAP will get the Customer number into Insp. lot only for insp. types 10/11/12.  I am wondering if someone know a way to get the customer no. into insp. lot for insp. type 04 where the material is make-to-order scenario and the Production/Process order has the Sales order and customer no. without activating User-exit.  The quality users want to be able to see the customer no. in insp. lot without having them to go to process order. 
    It makes no sense to me why the customer no. is not brought into insp. lot when that is available in the Prod/process order, which can further be used to select the customer specific insp. plans for 04 insp. type Insp. lot without using Variant configuration.
    Any light on this topic is appreciated.
    Thanks.

    Hi Srikant,
    I guess.........
    Normally the inspection lot refers the triggering document that are the trigger cause for them.
    - Inspection type 01: - Purchase Order and GR material document.
    - Inspection type 03: - Pro. Order Number
    The same way...
    The inspection type 10\11\12 are purely related to the SD, and directly integrates QM and SD. Hence in the inspection lot for the inspection types directly integrated to SD, it will furnish the Sales order number \ Customer.
    But the inspection type 04 is purely have it's relation to Production process. So it will have the details related to integrations it has i.e. the "Pro. Order." Hence it integrates QM-PP, it have the data related to PP (Pro Order), not the SD's one.
    But I think one way you can achieve it,
    Assign the Customer number also to the inspection plan along with the Material. So I think at the time of assigning the inspection plan to the inspection lot, it will refer the Customer number also and will display the Customer number along with Task list Group\Group Counter, in the inspection specification screen in QA03/02
    Regards,
    Shyamal

  • Customer number to be populated as co pa characteristics in rev line item FB50

    Hi
    FB50
    Debit Customer
    Credit Revenue with profitability segment as cost object
    In profitability segment customer number has one of the characteristics.
    In this credit line above we need to populate the customer field (which is part of co pa characteristics)
    from debit line item as part of co pa characteristics.
    Is it possible. An earliest response would really be appreciated.
    Aparrajith

    Hi Aparajith
    You can write your Code in the exit COPA0005 on the similar lines as provided in the Note
    I have asked people to implement the note in similar occassions in SCN Forum and till date no one has said that this did not work..
    I would suggest ask your ABAP guys to debug and check the reason for not working.. Else, writ your own code
    Br. Ajay M

  • Update the FI document with the PO customer number

    Hi,
    Is it possible to update a header field or item line field of customer of the FI document with the PO customer number or sales document of PO (VBAK-VBELN) at the billing moment. I cannot do by standard substitution because the original field is not saved in the table BSEG or BKPF. 
    Thanks,
    Cecilia

    It can be done via substitution with exit.
    You can configure your exit and then ABAPer can define the code for that exit in the copy of the program RGGBS000 assigned to the substitution in view V_T80D (Transaction SM30)
    In ABAP code you can fetch the values from various tables.
    Regards,
    Gaurav

  • ACH format needs a new field - AR customer number

    Hi Gurus: The standard ACH format I am using via the Payment medium workbench does not have the customer number in it. The client wants the customer number on the ACH payment medium file that is sent to the bank.
    Can anyone please guide me on how to update this to the same ACH format? It needs to be just after the amount field...
    thanks so much
    Brian

    Dear grahul
    Check the enhancement SAPMF02D and the exits in it.
    Also check the BADI's
    CUSTOMER_ADDRSCR_CHG Change Address Screen in the Master Data Maintenance
    CUSTOMER_ADD_DATA Additional Data at Customers
    Check this link also
    Re: Screen exit for XD01
    Thanks&Regards
    Raghu.k

  • Select name1 frm kna1 table on basis of customer number

    hi below is my PAI code
    my requiremnt is to select name1 field from kna1 table where
    kan1-kunnr = t_ZCUST_EM_create-ship_to
    where to code it pls suggest and how it will be displayed in the screen 200 ie when user press enter the name1 should automatically populate and display on the screen...
    PROCESS AFTER INPUT.                                                                               
    MODULE CANCEL_200 AT EXIT-COMMAND.                                                                               
    LOOP WITH CONTROL TABLE_ZCUST_EM_CREATE ."AT T_AIMS_OPN_CREATE ." .".
       MODULE USER_COMMAND_0200.                                                                               
    CHAIN.                                                                               
    FIELD t_ZCUST_EM_create-ship_to .                                                                               
    MODULE set_field_validation ON CHAIN-REQUEST.

    hi anji
    here is my code i ahve written in PAI event but facing problem that whne i save entering the third firled in table zcustemal which has ship_to ship to name
    and email id, kunnr is matched against kna1 table and eror msg comes if the kunnr in not in kna1 table it is working ok
    now also name 1 is being populated in the field in the screen as per my code
    but problem is
    1) when just typing kunnr and email id ( and press save without enter the data for all three is saved ie kunnr name1 ( which is selected from table kna1) and e mail id
    2) but whne i press enter after entering kunnr number on screen and then enter email id an dsave email id is not saved only kunnr and name1 is saved pls suggest
    where should i code dont know pls suggest??????
    CODe in screen
    PROCESS BEFORE OUTPUT.
      LOOP   WITH CONTROL TABLE_ZCUST_EM_CREATE."AT T_ZCUST_EM_CREATE
        MODULE STATUS_0200.
      ENDLOOP.
    *Process after input
    PROCESS AFTER INPUT.
      MODULE CANCEL_200 AT EXIT-COMMAND.
      LOOP WITH CONTROL TABLE_ZCUST_EM_CREATE ."AT T_zcust_em_CREATE ." .".
        CHAIN.
          FIELD t_ZCUST_EM_create-ship_to .
          MODULE set_field_validation ON CHAIN-REQUEST.
        ENDCHAIN.
        MODULE USER_COMMAND_0200.
      ENDLOOP.
      module read_table_value_0200.
    <b>MODULE set_field_validation INPUT.</b>
    nv added for  three email id and ship_to name
      select single * from zcustemail   where ship_to eq
      t_zcust_em_create-ship_to
      and ship_to_name = t_zcust_em_create-ship_to_name
      and email_id = t_zcust_em_create-email_id.
      if sy-subrc eq 0.
        t_gui1-fcode = 'BACK'.
        append t_gui1.
        t_gui1-fcode = 'EXIT'.
        append t_gui1.
        t_gui1-fcode = 'SAVE'.
        append t_gui1.
        SET PF-STATUS 'AIMS_200' excluding t_gui1.
        message e001 with 'Record already Exists in Zcusteamil'(001).
      else.
    *nv
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
              EXPORTING
                 INPUT         = t_zcust_em_create-ship_to
              IMPORTING
                  OUTPUT       = t_zcust_em_create-ship_to.
         select single kunnr from kna1 into v_kunnr
         where kunnr = t_zcust_em_create-ship_to.
        if sy-subrc = 0.
           select single name1 from kna1 into t_zcust_em_create-ship_to_name
           where kunnr = t_zcust_em_create-ship_to.
          SET PF-STATUS 'AIMS_200'.
           else.
           message E001 with 'customer number does not exists'.
       endif.
    *nv
      endif.
    ENDMODULE.                 " set_field_validation  INPUT
    *Setting it for select/deselect entries
      move:t_zcust_em_create to t_zcust_em_create_sel.
      append t_zcust_em_create_sel.
      clear:t_zcust_em_create_sel.
    *Getting internal table t_zcust_em_create with control
      read table t_zcust_em_create
             with key ship_to = t_zcust_em_create-ship_to.
    *Getting internal table for create entries: screen-200
      if sy-subrc ne 0 and t_zcust_em_create-ship_to ne space .
        append  t_zcust_em_create     .
        move:t_zcust_em_create to t_zcust_em_create_tmp.
        append t_zcust_em_create_tmp .
        clear:t_zcust_em_create_tmp  ,
              t_zcust_em_create      .
      endif.
      clear:t_cols.
    *Getting the value of  w_fill_200.
      describe table t_zcust_em_create lines w_fill_200.

  • Wrong customer number in ORDERS IDoc

    Hello gurus,
    we are trying to send MM orders from one of our company codes to another one (same system, same client).
    The ORDERS IDoc is sent without error, but the we get an error message on the inbound side:
    VKORG, VTWEG, SPART cannot be determined for customer 0000569630, vendor 0020011961
    Message no. VG204
    Diagnosis
    No sales organization, distribution channel or division were sent to the IDOC. This data is necessary if a sales order is to be added automatically. If this data is unavailable, you cannot create a sales order document.
    Procedure
    If data on the sales organization, distribution channel and division have not been entered in the IDOC, it must be determined using a user exit defined in the program.
    The thing is, the customer does not have the number 569630 in our system! Still the number is in the E1EDKA1 AG segment in PARTN. The vendor number is correct.
    Where does this strange customer number come from?
    Cheers
    Alicia

    hi,
    you have three possibilities to determine the organizational data in SD
    during the EDI inbound process.
    The first possibility is to send these fields in the Idoc-Segment
    E1EDK14 (Qualifier 006 - division, Qualifier 007 - distribution chanel,
    Qualifier 008 - sales organization, Qualifier 010 - sales group,
    Qualifier 012 - ordertype,  Qualifier 016 - Sales office)
    The second possibility to determine is table EDSDC. In this table You
    can make table entries for sales organization, distribution chanel and
    division per customer and vendor. You need an sold-to party and a
    E1EDKA1 segment with an filled vendor in field E1EDKA1-LIFNR.
    (transaction VOE2). Please check these settings.
    The third possibility is to fill it in the IDOC_INPUT_ORDERS user-exits.
    For error analyis, see SAP note 380603
    kind regards
    Paul Quinn

  • Customer Master data creation with customized number range

    Dear all,
    Can somebody know how to create the customized number range for customers like first 2 digits represents Sales organization and next 2 digit should represent circle,next 2 distribution chaneel and last 4 digits shold be the running number.
    Looking for solution..
    Thanks & Regards,
    Murali.

    Hi,
    In your case you need to define as following
    Step No: 01.
    01.Sales Orgination with 0001 to 0099.
    02.Regions with 00 to 99.
    03.Distribustion Channel with 00 to 99
    Step No:02.
    Define PDP with the diffrent account groups defined for diffrent Sales Org, Regions & DC's.
    Step : No: 03.
    As per the above configs go to TCode for Number range for accounts groups in  XDN1. Say Example as
    XX--- From:1010100000 to: 1010109999. Note the possiable numbers are 0000 to 9999 only.
    10 is sales Org, 10 is Region & 10 is DC's.
    This is one of the way to do. The other way is to develo Z table and to use the user exit / new progarme to identify the requried number range with reference to Sales Org, Regions & DC's
    Hope this is fine with your requrment.
    Bye & enjoy SAP.
    Koganti.

  • Reg: Generating  custom number instead of system generated no in ME21n

    Hi Experts,
                      I need to know user exits or Badi to generate custom number instead of system generated number while saving p.o ME21n transaction.
    Regards,
    Vikram.S

    Vikram,
    Instead of doing it programatically , ypu can satisfy your requirement in configuration settings.
    check SPRO with the help of functional consultant.

  • Include Field Kunnr - Customer Number 1

    Dear Friends,
    I want to include field kunnr- Customer Number 1 in the standard program SAPMFDTA. the table is being used in the program, but not the field.
    Please suggest how to include the field kunnr in program SAPMFDTA.
    All the help will be greatly appreciated.
    Regards
    Sridhar

    Hi,
    Please check for the available enhancement spots, exits, etc available. Also search for the OSS notes if any to your requirement.
    Regards,
    Santhosh.

  • Changing Customer number using COPA derivation

    Hi,
    Have a requirement to change the Customer number during PGI and billing in Account CO-PA PSG. Is KEDR derivation good enough for this requirement in Account COPA or should COPA0001 to be explored? I read SAP note # 638097 and looks like, unless this is implemented, KEDR is not effective. Any suggestions or past experience?
    Thanks for your time.

    Hi
    In Acct Based COPA, the PSG is determined at the sale order itself and the same is carried on till PGI and Billing
    Note 1351257 explains how PSG is and can be determined at various stages..
    I think you will have to use some exit in the process either COPA001 or 005
    Also, the note mentioned by you seems relevant to open up the CUSTOMER field for modification
    Regards
    Ajay M

  • Customer number range

    Hi
    I have following requirment in customer number range,
    While doing conversion from legacy to SAP, Sold to number is 1234 and bill to number is  B1234, how can we do this, are there any user exit for this. let me know the solution please
    regards
    Satish

    Hi,
    suggestion -1
    I guess in standard SAP its not Possible,
    Actually the internal number are assigned through Number Range Objects defined through tcodes SNRO and SNUM.
    You have to change the number range assignments SNUM, but remember these number ranges defined are not transportable. They have to manually defined in each client/system.
    Check transaction VN01
    suggestion -2
    Even if I would not recommend that you implement such process, you can still have a look to BAdI CUSTOMER_ADD_DATA.
    There is a method to implement your own numbering.
    Regards,
    Raj

  • Problem with User exits when using custom fm

    Hi everybody,
    I am processing an IDoc using fm IDOC_INPUT_INVOIC_MRM. Nos I had to copy this to Z_...
    And this fm has a sun-routine that calls User-exits. When I am using the standard fm, the UEs are being checked for active and executing the logic in the UE. But when I am processing IDoc using Z_...fm, the system is checking if the UEs are active. Its also active and now the cursor is coming to CALL CUSTOMER-FUNCTION '014'. But here when I press F5 in Debug, the cursor moves to the next statement after this function call without executing the user- exits. I dont know why its not executing the UE.
    Is there any setting that I need to make?
    thanks in advance
    kris

    Hi Vamsi,
    User exits are specific to the object they are included in. So when you have a "CALL CUSTOMER-FUNCTION '011'" in IDOC_INPUT_INVOIC_MRM and when you have "CALL CUSTOMER-FUNCTION '011'" in your Z function module, they are two different things.
    The purpose of a user exit is that you can include your logic in there within the limits defined by the object and without repairing the system. If you copied it, then you don't need the user exit anymore, as that copied object is your custom object and you can incorporate anything you want within main source code itself. If you really thing you should have that user exit, then double click on the call function statement, the system will ask if you want to create the function module, say yes and proceed with the creation.
    But I don't see any reason why you will copy a standard IDOC function module(while you could have used a user exit in there) and still want to use the user exit functionality. Once you copied, it is your object and you don't need a user exit to insert code into your own object.
    Hope this is clear.
    Srinivas

Maybe you are looking for

  • Keep iPod displayed in iTunes

    Hi, I just got an iPod Nano. I'm using iTunes 6.0.5. My iPod Shuffle has an option to "keep this ipod in the source list" so I could edit the song list with the iPod disconnected, then reconnect it at a later time and have it update songs. I don't se

  • PROFIT CENTER FIELD NOT VISIBLE IN F-02

    I want to transfer one customer balance from one profit center to other profit center as it was posted wrongly.  I tried to post it through F-02 (since Through 9KE0 Fi Figures will not change).  <b>But I am unable to find the Profit Center Field in t

  • Problem calling Oracle function from Access 2007 / ADO

    Hopefully, I'm posting this in the correct forum. I'm also posting on an Access forum as I'm not entirely sure where the issue lies. I'm calling an Oracle function from Access 2007 using an ADO Command object. The function takes three input parameter

  • How to create a servlet to be called by a portlet in weblogic workshop

    Hey, In weblogic workshop 8.1.4, I created a portal application. In the portlet(Java portlet- JSR 168), I would like to call a Java Servlet. In the workshop, it seems there is no way to create a Java Servlet. Does anybody know how to create a Java Se

  • Time capsule Crash /Mounting Point / share not found

    I have a home network with Imac's, Appel Tv and use the Time Capsule (TC) as the router. Attached to the TC are several airport expresses. I use the TC as for time machine backups and attached is an axternal HD for media. All was working fine. For so