How to retrieve the vendor number during creation of Purchase Order?

Dear SAP experts,
For our Purchase Orders, during PO creation (t-code ME21 or ME21N) we want to achieve the following:-
1) default the delivery address to our plant A address if the vendor is local and
2) default the delivery address to our plant B address if the vendor is foreign.
At the moment, we are trying to use the user exit enhancement "MMDA0001" to achieve the above.
The problem is how to retrieve the vendor number from the screen so we could pass the vendor number to ZXM06U32 to check the ktokk field in LFA1 table in the whether the vendor is foreign or local.
Thank you in advance.
Regards,
Alex

u can do one thing, create 2 partner function, like 1 for local, and second for import vendor.
or make 2 batch  n activate vendor batch and make mandatory field from SPRO. 
then goto SHD0, and do one by one step. first time take 1st requirement and second time take second . like that make two variant .
i dont know how much it will be helpful. bt i want to suggest smth like that only.
or, go for ABAPER help
thanks
nisha

Similar Messages

  • How to create the Batch Automatically during creation of Production order

    Hi All,
    I wanted to create the Batch Automatically for the Specific order type during creation.
    Not for all order type so OPKP transction will not work for me.
    Please suggest any way or user exit any production order.
    Thanks,
    Amit Shah

    Hi All,
    Thanks for your inputs.  
      1. Why we want create the Batch Auto -
          For Std Production Order type we want to generate Batch Automatically.
          For Re-work Production Order type we don't want Batch Created Auto.
          If you have better solution please let me know.
    2.  Scheduling profile.
          I think I misunderstood your solution.
          You want to say that mainatin the Schd profile in the SPRO with repect to Sub Schdler.
          Already client is maintaining the Schd Profile in the Material Master.
           please correct me if i am wrong.
    Thanks,
    Amit Shah

  • I want to find out how to retrieve the serial number for my product. i can't find it in my email

    i want to find out how to retrieve the serial number for my product. i can't find it in my email

    Find your serial number quickly

  • How to get the document number for a ware house order.

    Hello gurus,
    how to get the document number for a ware house order. [if GI is posted refering that WH order] .. is there any report?
    Thanks in advance

    There are several options.  When you post a Goods Movement, you can use LB12 -display Transfer Requirement for material document or LB11 Display TR for material.
    Depending on how your system is set up you may have gotten a Transfer Order automcatically.  In this case you can look at LT24 - Transfer Order for material.

  • Retrieving the Change Texts per Line Item (Purchase Order) - Very urgent

    Hi,
    How do you retrieve the Change Texts per Line Item (Purchase Order).
    Table T166T does not list these values per line item.
    Please help. This is very urgent & important.
    Best Regards,
    John

    if you are lookin out for change of item texts ...
    then use the function module ... READ_TEXT.
    and 2 tables r used ... STXH and TLINE ....
    double click on item data ...
    goto PO TEXT tab ....
    double click on text ...
    from menu ...
    goto header ... u'll get 4 fields that u need to consider ...
    TDID
    TDOBJECT
    TDHEAD
    TDNAME
    ALL THESE U'LL FIND IN  STXH
    ITEM TEXT is stored in TLINE
    Edited by: anjali rana on Mar 5, 2008 4:55 AM

  • How to get the vendor number that was created using xk01..?

    Suppose i am creating a vendor with all the information by using a bdc program.
    In the same program if i want to go to the XK02 of that particular vendor that was created recently....how it possible..?
    Means how to get that particular vendor number that was created recently...?

    Hi...
    You Can Get the Vendor number after Calling the Transaction 'XK01' as below.
    <b>Declare a table for Collecting messages :</b>
    DATA: T_MSG TYPE TABLE OF BDCMSGCOLL,
              WA_MSG TYPE  BDCMSGCOLL.
    <b>Then Call Transaction Statment:</b>
    CALL TRANSACTION 'XK01'
               USING T_BDCDATA
               MODE 'N'
               MESSAGES INTO t_msg.
    if sy-subrc = 0.
      READ TABLE T_MSG INTO WA_MSG WITH MSGTYP = 'S'.
                                                                    MSGID = 'F2'
                                                                    MSGNR =  '175'.
    <b>Note: Bcoz the XK01 will issue this message</b>
      if sy-subrc = 0.
      write: / WA_MSG-MSGV1.  "This will contrain Vendor Number
    endif.
    endif.
    And you can also Try the Other method i.e. after the Call transaction statement
    <b> GET PARAMETER ID 'LIF' field V_LIFNR.
      WRITE:/ V_LIFNR.</b>
    Reward if Helpful.

  • How to display the Check number during manual check clearing - FEBAN

    Hi all experts,
    Hope you can help me on this one. We recently changed our house bank. Because of this change, when we try to post our bank statement, the checks issued from the old bank do not clear. However, when we try to manually clear them through FEBAN transaction, there is no reference to the check number. This becomes a problem, especially when we have about 150 open items for $100 each - we do not know which one to clear against. It is not practical to have to drill down into each document number to find the check number. Is there a way to bring in the check number in the FEBAN open items screen? Has any one else experienced this issue? Any comments / suggestions will be very helpful.
    Thanks,
    MJ

    Hi Chandra,
    I tried to add the field through O7R3 (your suggestion) as well as through O7F4. I still cannot see the check field displayed. I tried the FBL1N transaction as well - no check number field there either.
    Can you help me? Is there anything else in the config that could cause this?
    Thanks,
    MJ

  • How to obtain the IDOC number after creation

    Hello everyone,
    for our master data distribution via report RHALEINI (triggered via a custom report), we have some additional code in BAdI HRALE00OUTBOUND_IDOC, method IDOC_DATA_FOR_RECEIVER_MODIFY.
    Everything is working fine so far. Now I need to know the Idoc number after it was created to store it in a customer table together with some additional data. Since the Idoc was not yet created when we're in the method mentioned above, I have to put my coding somewhere else.
    Any that's exactly my question: Were could I put my coding? It needs to be executed after MASTER_DATA_DISTRIBUTE since this function creates the idoc in the database.
    I though about the following:
    - Since RHALEINI is called by a custom report, I might be able to read the idoc number from memory id COMM_HRMD_A (see RHALEINI, line 418).
    - Maybe BAdI IDOC_DATA_INSERT could be used for this purpose?
    What would be your approach for this?
    Thank you in advance.

    Hello Markus,
    EXPORT comm_control TO MEMORY ID 'COMM_HRMD_A'.
    This is a nice observation!
    Since RHALEINI is called by a custom report, I might be able to read the idoc number from memory id COMM_HRMD_A
    Are you SUBMIT'ting the report RHALEINI in the custom program? If yes, you can access the memory COMM_HRMD_A in your program. To verify this you can check in debug mode if the memory id is populated.
    I've checked the report RHALEINI & the internal table comm_control should contain the idoc number!
    Maybe BAdI IDOC_DATA_INSERT could be used for this purpose
    Only if the previous approach doesn't work out. Remember [K.I.S.S|http://en.wikipedia.org/wiki/KISS_principle]
    BR,
    Suhas

  • Profit Segment not activated during creation of purchase order item

    Hello,
    While I create a Purchase Order Item, in the account assignment tab, I may fill in at least a cost center or a cost center and an internal order.
    If I fill in only a cost center and key the enter buton, the profit segment is activated.
    If I fill in the cost center and the Internal Order at the same time and afterwards I key the enter button, the profit segment is not activated. I have to click on the Profit segment button and validate the profit segment manually.
    Could you tell me what the problem is?
    Thank you in advance
    Regards

    Hi
    That makes sense to me
    In any entry you can enter One REAL Object and more than one Stat Object...
    SInce you entered Cost Center in Option 1 - You were proposed with PSG and IO as the option
    Since you entered Cost center *** REAL IO in Option 2 - The system got what it wanted i.e. One REAL OBJECT.. hence, no more objects are proposed to you... However, you can manually enter PSG or WBS if allowed in your Field Status Group in FI
    br, Ajay M

  • SAP how to determine the account in Goods receipt for purchase order?

    We know when we make a Goods receipt for purchase order,we will use the account in GBB and BSX define in OBYC. But where can we find the rule? I mean why system can find the account in GBB and BSX , not the other TEcode?

    HI
    This is again based on the movement type which SAP has created a link internally.
    So if you see when a document is posted it basically derives the GL accounts based on the Movement type,Valuation class,valaution area and so on.
    Good luck
    Hari

  • How To Change The Patter generates during creation of Prog using SE38

    Dear Guru,
    I have Encountered an Issue.
    The Scenario Is like this :-
    As soon as we create a new prog using SE38 it automatically generates a standard pattern like below :
    *& Report  ZSR_TEST_05
    REPORT  ZSR_TEST_05.
    But the requirment is like this as soon as we create a new prog using SE38 it automatically it should generate the The Pattern like below :--
    *& Project            :
    *& Program Name       :
    *& Transaction Code   :
    *& Program Type       :
    *& Functional Domain  :
    *& Technical Coding   :
    *& Functional Guidance:
    *& Coding Review      :
    *& Spec. Review       :
    *& Program Description:
    REPORT  ZSR_TEST_05.
    After going through sdn documentation i have identified that using dynamic pattern we can create this and call that dynamic pattern using PATTERN button in ABAP editor.
    But the thing we require as soon as we generate the prog thr. SE38 atomatically all the details must generate before the report <report_name>.
    For achieving thins what i have to do ... please show me some path to achieve this
    Thanks & Regards
    Saifur Rahaman

    Hello Saifur
    Not sure if you can make SE38 to do what you want (yet it is likely). If you do not want to create lots of ABAP patterns why not define a simple ZTEMPLATE report containing the basic set of comments:
    *& Project            :
    *& Program Name       :
    *& Transaction Code   :
    *& Program Type       :
    *& Functional Domain  :
    *& Technical Coding   :
    *& Functional Guidance:
    *& Coding Review      :
    *& Spec. Review       :
    *& Program Description:
    REPORT  ZTEMPLATE.
    *& Initialize report
    INITIALIZATION.
    *& PBO of Selection-Screen
    AT SELECTION-SCREEN OUTPUT.
    *& PAI of Selection-Screen
    AT SELECTION-SCREEN.
    *& Begin of Main Program
    START-OF-SELECTION.
    *& End of Main Program
    END-OF-SELECTION.
    New reports are then created by copying your ZTEMPLATE template.
    Regards
      Uwe

  • Error during creation of Purchase Order for Sub-Contract

    Hi
    i am creating PO for Sub-contract, to check whether it copied the components or not, when i clicked components in material data tab: it says u201CMRP parameters for plant XXXX have not been maintained.
    Please guys help me out in this matter. Thanks in advance.
    Regards,
    Krishna

    Please post in the relevant forum.

  • User Exit to get Sales Order Number during creation

    Hi,
    I am looking for for an User Exit which provides Sales Order Number, during creation of Sales Order using transaction VA01.
    Please provide the Structure/Field Name.
    I tried USER_EXIT_SAVE_DOCUMENT. But, it seems it doesn't provide.Kindly help.

    Hi:
    Program : MV45AFZZ
    search for USEREXIT_NUMBER_RANGE.
    BR,
    Manthana

  • Change Production version during creation of Process Order COR1

    Hi,
    Scenario:
    Based on the entered Material, Plant and Order type system need to trigger a popup asking the user to select the Production Version. This should happen before clicking on SAVE button, so that all the values will be populated correctly based on the changed VERID.
    I did not find a user exit that enables to change the Production Version (VERID) value. So I thought of displaying the popup in the user exit EXIT_SAPLCOZF_003 which will be triggered before initial screen appears, export the selected value and pass it to a User Exit or BADI where VERID can be changed. But cannot find a user exit to do it.
    Please help me find a User Exit or BADI to change the Production Version during creation of Process Order using COR1 transaction before clicking on SAVE button.
    Thanks,
    Manoj.

    Hi Manoj,
    So - almost four years later - I saw your post and I saw myself in the very same situation as you did...
    I found a solution for those who wants to change the production version of the production order from the sales order creation: create an enhancement in the function module 'MD_VERSION_SELECTION' and you are good to go.

  • Set the final invoice flag for a purchase order

    I want to know how to set the final invoice flag for a purchase order.
    I tried BAPI_PO_CHANGE but it is giving me error.
    Help me.

    Hi,
    I think ur BW report shows the cleared Invoice no. The second invoice no. might not have been extracted to BW system. Check your order no. in Cube whether it has two invoice nos.
    Regards,
    Suman

Maybe you are looking for

  • ERROR while booting

    could any one be of assistance i cant boot my blackberry z3 it gives me this error www.bberror.com/bb10-0015

  • How long does the free service last?

    I am unclear as to how long my free CS Review account will be available? Can you clarify. Also, will my account be canceled afer a trial period and will my files all be deleted? It was hard to find this info in the documentation. Thanks for your help

  • PDF upload problems

    When I try and publish my Adobe Muse site as a temp site in Adobe Business Catalyst, it always gets hung up on my pdf I have as a linked file on my site.

  • Considering navigating away from DEs. Advice needed.

    I got a new netbook (an Asus 1001p) which I am taking with me while I go travelling throughout Europe this spring.  There is one problem, I absolutely hate the netbook interfaces for both KDE and GNOME. I also find them sluggish.  Consequently, I am

  • Problem with 2.6?

    I've been getting BSOD's in WinXP about once a day now, in the nvmcp.sys module.  It seemed to start happening after I flashed to 2.6.  Anyone else having similar problems?