Code modification to read fixed vendor (Urgent)

Hi All,
The below code is basically selecting the fixed vendor as per EORD table for a given material - plant combination. But the issue is for this combination, there can be different fixed vendors but during different times
eg:
Mtl  - A, Plant - 1000
Fixed vendor: Vendor1, From 1.1.2000 To 31.12.2003
Fixed vendor: Vendor2, From 1.1.2004 To 31.12.2007
Fixed vendor: Vendor3, From 1.1.2008 To 31.12.2010
So i want to add one more condition, which reads the system date & if the system date lies in-between 1.1.2000 to 31.12.2003, it selects vendor 1 or if the system date lies in between 1.1.2004 to 31.12.2007, then select vendor 2.
So how can i add this condition? The valid from field is EORD-VDATU & the valid to field is EORD-BDATU
Code:
CLEAR: Y_LIFNR, Y_FLIFN, WL_MATNR.
SELECT SINGLE LIFNR FLIFN MATNR FROM EORD INTO (Y_LIFNR, Y_FLIFN,
WL_MATNR)
   WHERE MATNR EQ MARC-MATNR
     AND WERKS EQ MARC-WERKS
     AND FLIFN NE ' '.
Hope my question is clear, await inputs
Vivek

Hi,
Check the below logic:
if sy-datum >= 1.1.2000 and sy-datum  <= 31.12.2003.
   vendor = vendor1.
elseif sy-datum >= 1.1.2004 and sy-datum  <= 31.12.2007.
   vendor = vendor2.
elseif sy-datum >= 1.1.2008 and sy-datum  <= 31.12.2010.
   vendor = vendor3.
endif.
CLEAR: Y_LIFNR, Y_FLIFN, WL_MATNR.
SELECT SINGLE LIFNR FLIFN MATNR FROM EORD INTO (Y_LIFNR, Y_FLIFN,
WL_MATNR)
WHERE MATNR EQ MARC-MATNR
AND WERKS EQ MARC-WERKS
AND FLIFN NE ' '.
and lifnr = vendor
AND VDATU >= SY-DATUM
AND BDATU <= sy-datum .

Similar Messages

  • Set up fixed vendor for PO help required -URGENT

    Hi ,
    can somebody walk me through the steps to step UP  a fixed vendor.
    I need to create a po with fixed vendor throgh transaction me59.
    PLS HELP

    Hi Manohar reddy,
    I am using BAPI_REQUISTION_CREATE to create a purvchase requistion.As soon as i am creating Purchase Requistion and i checked EBAN table with that requistion Number i found a value under fixed vendor column.
    as you mentioned two ways
    1)user profile parametrs -can you please tell me what is that and where should i go to check it.
    2)can you tell me the user exit for defaulting the vendor value.
    I have never done that please let me know.

  • Why Fixed vendor is read without Souce List on MD14?

    Dear Gurus,
    Hi,
    I am trying not to assign Fixed Vendor at MD14.
    I created one Purchase Info Record for the material without source list.
    And operated as below;
    1. Execute MRP and Planned Order created
    2. Convert Planned Order to Purchase Requisition
    3. Then, Fixed Vendor is read automatically from Purchase Info Record.
    When there are several purchase info record, Fixed Vendor is not assigned.
    And also when PR is created via MRP, Fixed Vendor is not assigned from one Purchase Info Rec.
    -> How can I avoid automatic assignment of Fixed Vendor for PR on MD14??
        Are some customization wrong??
    AK

    hi,
    As mentioned in the note 157830, your system is working as designed.
    There are however two possibilities to solve this issue :
    1) In transaction ME15, flag for deletion all the related info-records,
       so that no fixed vendor is found when converting the Planned Order
       into Requisition.
    2) Rewiew note 157830 which gives a solution for de-activating
       the automatic soutce determination when converting a Planned Order
       into a Requisition (in MD04 and MD14)
    Hope the information helps you.
    Best Regards,
    Arminda Jack

  • Code modification...urgent

    hi experts,
    i am new to enhancement and modifications.
    can anybody tell me
    1.is the term modification and code modification one and the       
       same?or different?if so,
    2.what is code modification?
    3.how do u do code modification?
    4.adv. and disadv. of code modifications?
    i appreciate if u provide links also.
    thanks in advance.

    Hi
    Explicit Enhancement Options
    There are two types of explicit enhancement options: Source code enhancements with source code plug-ins and BAdIs:
    •        Explicit enhancement options of the source code enhancement type allow you to insert source code plug-ins. These are lines of code that are executed if the source code enhancement option is inserted in the code with the Enhancement Point command. Source code enhancement options with the Enhancement Section command behave the same, except that the source code plug-in replaces the section in the original code. Therefore, you are not only able to enhance the original code, but can also flag specific code sections (as enhancement sections) so that other developers can replace these sections with other code without making modifications.
    •        Business Add-Ins (BAdIs) are “hangers” for object plug-ins. A BAdI definition comprises an interface with methods. BAdIs are enhanced by classes that implement the BAdI interface. If you instantiate a BAdI and then call its methods, you can, among other things, specify which method implementations are to be carried out on the basis of filter values. In other words, a BAdI method call is a dynamic method call with a specified interface, for which it is not determined until runtime which method implementations are to take place.
    In the case of source code enhancements, the definition and call coincide. You define BAdIs once in the BAdI Builder and can then call them at different points in the various compilation units.
    Implicit Enhancement Options 
    Implicit enhancement options are fixed points in compilation units – that is, points that remain intact even if the code is changed. This is important for the following reason: If the location of an enhancement is moved, you have to check manually after an upgrade whether the enhancement is still at the correct point and replace it if necessary. The following are implicit enhancement options at which enhancements can always be inserted:
    •        You can always insert source code plug-ins before the first and the after the last line of includes, methods, reports, and function modules.
    •        You can always add further optional parameters to function modules.
    •        For global classes, there are different permanent, implicit options for enhancements: You can insert additional attributes or methods, and you can add optional parameters to existing methods
    Customer-Specific Modification and Enhancement Possibilities
    Use
    The following documentation provides an overview of the customer-specific modification and enhancement possibilities in the IS-H System. Note that to implement enhancements, you require ABAP programming knowledge.
    Features
    The IS-H system provides the following technical possibilities for customer-specific modifications and enhancements
    Business Add-Ins (BAdIs)
       If default code (standard procedure defined by SAP) exists for the BAdI, please note it will be overwritten when you implement the BAdI. You can, if required, re-use the default code in your implementation.
    As of SAP NetWeaver 2004, the enhancement concept of the ABAP Workbench (Enhancement Framework) is available for BAdIs. Note that SAP Patient Management contains BAdIs that use the Enhancement Framework as well as the classic BAdIs.
    Customer Exits (transaction SMOD)
      If SAP delivers sample code for the customer exit, you can access it when implementing the exit by choosing Goto ® Sample Code. You can re-use the sample code using Copy&Paste
    User Exits from the IS-H Implementation Guide: Basic Settings ® Configuration/Systems/Events ® Display SAP User Exits.
      To implement the IS-H user exits, copy the function module delivered by SAP into a customer-specific function group. The name of the function module delivered by SAP is specified in the table you call in the IS-H Implementation Guide by choosing the path specified to the left here.
    Once you’ve copied the source code, you can modify this copy to meet your needs. Note that you must not modify the interface of your own function module.
    Now enter the name you’ve chosen for the function module in the customer table. You access this table by choosing Basic Settings ® Configuration/Systems/Events ® Configure Customer User Exits.
    If it is helpful rewards points.
    Regards
    Pratap.M

  • Changing preferred vendor to fixed vendor in SRM PO- no currency conversion

    Hi All,
    We are on SRM_SERVER 550, SP11, ECS scenario.
    Users create carts where they enter preferred vendor.
    After approval we found that the PO's were created only in "Held" Status.
    So we did a conversion of the preferred vendor (PF 39) to Fixed vendor (PF 19) during PO creation using BBP_DOC_CHANGE_BADI- BBP_PO_CHANGE.
    We also implemented BBP_GROUP_LOC_PO,GROUP_PO so that all items with same preferred vendor are grouped into a single PO.
    We observed that PO is now getting created in ordered status, where the preferred vendor is getting converted to fixed vendor as per our code change. But we also found a problem- that the line item price doesnt get converted to Vendor order currency after the Po is created. For ex: If line item price is 10 GBP and Vendor order currency is EUR, the line item price in the PO shows 10 EUR. The currency conversion fro GBP to EUR does not happen.
    This does not happen for catalog items/PO's where the cart comes with a fixed vendor (PF 19).
    So there surely seems to be something missing in our code for converting Preferred vendor to fixed vendor which is preventing/not converting the currency as well.
    Please find below the code we are using in DOC_CHANGE_BADI for PO, is there any step in this which is causing the currency conversion to be skipped?
    CONSTANTS:C_FIXED_VENDOR   TYPE BBP_PDS_PARTNER-PARTNER_FCT
                           VALUE '00000019',
               C_PREFERRED_VEND TYPE BBP_PDS_PARTNER-PARTNER_FCT
                           VALUE '00000039'.
       READ TABLE ET_PARTNER INTO LS_PARTNER WITH KEY
                             P_GUID      = IS_HEADER-GUID
                             PARTNER_FCT = C_FIXED_VENDOR.
       IF SY-SUBRC NE 0.
       READ TABLE ET_PARTNER INTO LS_PARTNER WITH KEY
                             P_GUID      = IS_HEADER-GUID
                             PARTNER_FCT = C_PREFERRED_VEND.
        IF SY-SUBRC EQ 0.
          CLEAR IDX.
          IDX = SY-TABIX.
          MOVE C_FIXED_VENDOR TO LS_PARTNER-PARTNER_FCT.
       MODIFY ET_PARTNER INDEX IDX FROM LS_PARTNER TRANSPORTING PARTNER_FCT.
       ENDIF.
       ENDIF.
    Regardas,
    Srivatsan

    there is nothing in your code which prevents the conversion between the two currencies,
    it can be the following reason
    1) system as standard is not performing the conversion.
    2) conversion factors are not maintained (or) conversion factors are maintained and the expiry date for the conversion factors has passed.

  • Fixed vendor on PR not copied to PO

    Hi,
    I have a third party process where the purchase requisition was automatically created with a fixed vendor which was picked up on PR because info record is maintained. No source list is maintained for this material.
    When the PO was auto-created for this PR, it was created for a different vendor (with an info record marked for deletion).  There is only 1 active info record for this material and it is for the vendor on the PR.
    I checked and there were no changes to the PR or the PO. So why wasn't my fixed vendor copied from the PR to the PO during automatic PO creation ?  And why would the PO chose an inactive info-record ?
    Thanks in advance !
    Alas

    I wasn't expecting you to answer my issue re: workflow. I was just informing you of the steps I have to take in case others stumble on this post. You really don't have to be rude, or even respond ! And just so you know - with workflow, the auto PO flags are not considered !
    Regardless- my client had custom code for how they select their vendors, regardless of the fixed vendor field on the PR. In that logic, they disregard the deletion flag of the purchase info record.

  • Currency to be defaulted from Fixed Vendor to PR

    In my case, currency comes into purchase requisition based on company code, and the request is to have it come in from the fixed vendor field. Example,  the vendoru2019s currency is EUR, but USD defaults into the field. . It is possible to change it in the requisition, but it would be preferred to have it automatically drop in the currency in the fixed vendoru2019s record.
    Any Idea?

    Hi,
    Normally during the creation of the PR , vendor will not be known unless the the source determination settings are done like OA or Info Record etc.
    since only material is entered there MMR currency will be taken for valuation.
    Regards,

  • Is it not possible to create a PR with Fixed vendor without an Info-record

    Hi,
    We have a requirement in which data necessary for PR(Purchase Requisition) creation ( replenishment orders ) comes from a legacy system and we use the BAPI -BAPI_REQUISITION_CREATE to create the PR's.
    The problem is when we try to create PR by using plant in the field fixed vendor present in Source of Supply tab, we are getting the error message, "Inforecord for Vendor xxx and material xxxx does not exist ". This message is due to the plant given in fixed vendor field and missing info records. And we always use only "plant" as fixed vendor.
    Is there any way to avoid the determination of info records based on fixed vendor?
    Thanks in Advance.
    Edited by: Dagny on Aug 28, 2009 3:01 PM
    Edited by: Dagny on Aug 28, 2009 4:30 PM
    Edited by: Dagny on Aug 31, 2009 11:09 AM

    Kurt Lang wrote:
    It is more than well known that Flash is not supported on the iPad or iPhone. Adobe officially threw in the towel even attempting to get a working player for mobile devices that one, doesn't chew up battery life; two, doesn't eat up so many system resources.
    The focus now is on Adobe AIR and HTML5. So don't expect to ever see Flash for the iPad.
    I don't understand the reply. This is the Power Mac forum. Is the real problem finding a PowerPC version of Flash and Adobe Reader? If so, Adobe dropped Flash support for PowerPC in February.
    http://lowendmac.com/ed/bashur/11db/powerpc-flash-support.html
    How evil is this? Well, Apple itself no longer supports PowerPC in its last two major OSs, 10.6 and 10.7. So the problem here is a very old Mac.
    There is an Adobe Reader for PowerPC.
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=5245
    Adobe kept putting out PowerPC updates longer than Apple did!
    Also, Adobe Reader is available for iOS, if that was part of the original question.

  • How to change Preferred Vendor to Fixed Vendor in SC - SRM-5.0

    SRM Experts,
    We are using SRM 5.0, ECC 6.0 and PI-7.0.
    We are using classic scenario in SRM. When user selects the vendor with Outline agreement in SOS tab then SC creates PO in backend system because it has Fixed Vendor otherwise SC creates PR in the backend system.
    We have a new requirement in SRM to create PO instead of PR in the backend system if Purchasing Org=5xxx and total value of SC is less than USD 5XXX and Vendor is a Preferred Vendor in the SC.
    Do I need to use the Check Document BADI to check the total value of the SC and to check whether it is a Preferred Vendor and then in the Change Document BADI, change the value from Preferred Vendor to the Fixed Vendor before SC is saved?
    OR someone has any other suggestions on this?
    Which BADI is called first Check Document or Change Document before saving the SC?
    Thanks in advance!
    MP

    Hi Atul/Disha,
    I sent you my code and problem in detail at your email address.
    Here is the requirement for Changing Preferred Vendor to Fixed Vendor. We are on SRM 5.0 and using classic scenario. I am new to SRM world. I also checked the note- 962474 in our system and it has been applied. We upgraded to SRM 5.0 in Oct-07.
    1.     My client has customization for sources of supply tab. It shows the vendor information in SOS tab based Product category, Plant and Purchasing group selected in the SC. If SC contains Vendor with Outline agreement then SC creates PO in the backend system. So in Change BADI logic for new enhancement of converting Preferred vendor into Fixed Vendor should not change anything in the SC using Outline agreement.
    2.     We have created Custom table-zsrm_fix_vend with fields, purchasing group, company code, currency and total value.
    3.     We need to convert the preferred vendor into fixed vendor
        if the SC’s 1st line item purchasing group = zsrm_fix_vend-ekorg and
                 SC’s 1st line item company code = zsrm_fix_vend-bukrs     and
               SC’s currency = zsrm_fix_vend-currency                   and
               SC’s Total value less than(<)zsrm_fix_vend-totalvalue.
    My testing results and problems…
    1.     When I create a new SC with less value than totalValue from the custom table, change document BADI is changing the preferred vendor into fixed vendor and it is creating PO in the backend system. So this is working as expected.
    2.     When I create a new SC with greater value than totalValue from the custom table, change document BADI is NOT changing the preferred vendor into fixed vendor and it is creating PR in the backend system. So this is working as expected.
    3.     When I use Outline agreement in the SC, it is creating PO in the backend so change BADI logic is not affecting this existing functionality which is good.
    4.     Problem - When I copy a new SC from existing SC with less value than totalValue from the custom table and then changing the amount with the greater value than the custom table, change document BADI is not changing the fixed vendor to the preferred vendor and when I click on sources of supply tab - it is giving me an error “Partner Function may not be Changed” and it exits me to main shopping cart screen.
    5.     Problem - When I copy a new SC from existing SC with greater value than totalValue from the custom table and then changing the amount with the lessser value than the custom table, change document BADI is not changing the preferred vendor to the fixed vendor and when I click on sources of supply tab - it is giving me an error “Partner Function may not be Changed” and it exits me to main shopping cart screen.
    6.     When I copy the SC with Outline Agreement and change the amount it works all the time it is not affected by the change document BADI which is good.
    Please help me to resolve this issue.
    Millions thanks to you!
    MP

  • Report MRP data - Fixed Vendor

    Hi All,
    I am trying to build a report by query, to display MRP data and related fixed vendor (if available).
    I tried joining the tables MARC, MAKT, EORD and LFA1, but did not get the output as desired. The report shows only the material with a source list.
    Please, could you help me to display all the records (with or without fixed vendor)? How can i use a outer join?
    Thanks in andvance.
    Antonio
    Edited by: Antonio Bruno on Jun 22, 2011 10:40 AM

    Can use the inner join directly in the infoset by add a table.

  • Change fixed vendor for me01 through bdc

    HI ALL,
    if in t-code me01 for a material  and plant we have some vendors out of which one is fixed vendor
    now i want how can i change my fixed vendor through bdc . because i want to change fixed vendor for
    large materials.
    currently my fixed vendor is 100496 here fixed vendor is X
    material        plant               valid form      valid to         vendor        Fix
    2000125     006     24.09.2009     31.12.9999     100496     X
    2000125     006     24.09.2009     31.12.9999     100497
    now i want to change my fixed vendor 100497.

    hi
    you can change through bdc. you may need to loop through the list of materials if the same changes need to updated.
    Cheers,
    Hakim

  • Fixed Vendor for Materials

    Is it possible to take the report like, for a specific vendor code, for which materials that vendor has marked as Fixed vendor.
    (I'm having only vendor code, by using that vendor code only i need to get the materials which this vendor as Fixed Vendor)
    Which transaction i can get that report.

    Dear Ian,
    Thanks for your reply.
    I want to take the report for the materials available with open purchase requestitions & purchased material codes from that vendor.
    Ex: A2B is a vendor code.
    I want to take the material codes having the above vendor is as fixed vendor.
    Please confirm.
    Thanks....Partheeban C

  • In the case of a fixed vendor, please enter info record

    Hello Experts
    When I make a Purchase Requisition allocated to a fixed asset and I also indicate the fixed vendor, the following error appears:
    "In the case of a fixed vendor, please enter info record"
    We are not maintaining info records. For material and service purchases, if I type the fixed vendor, the info records are generated automatically by the system and we do not care about them. But for fixed assets it does not allow me to save if I enter the fixed vendor. How can I make to be created automatically also for the fixed assets?
    Thanks in advance
    Best regards

    sure, SAP creates info records itself when you do a purchase order.
    but SAP does not create info records when you create a purchase requisition.
    if you want a fixed vendor in a purchase requisition, then you have to have an info record first.
    so you either enter a desired vendor for this first time and can use fixed vendor with the second ocurance, or the requisitioner asks purchasing to create the info record manually. or you create the PO without requisition for the first time.
    see OSS Note 63600 - Required vendor - fixed vendor for IW32
    it explains the reason for the error message and a workaround.

  • How to maintain the Fixed Vendor

    Hi,
    As I know Fixed Vendor always maintained in source list, but is there any other place we can maintain the fixed vendor.
    My PR is having 2 line items, non of them is maintained in source list but, one of them is automatically have fixed vendor number and info record when PR has generated by thrid party order.
    Regards,

    Check the steps below
    1) you have check the source list indicator in material master purchasing view
    2) than create the info record or contract
    3) create the source list with contract or if info record is created than it will be for info record
    4) make fix source in the source list
    5) in Me51N screen you will see the source ldetermination check box, this check box should be checked and you can defult that by personal setting
    6) now if oyu create the reqs you will see the sourcve as per source list
    BUT if you have checked the regular vendor check box in info record than your source list will not work
    see below
    Regular vendor                                                                               
    Specifies that the material is to be procured from this vendor at client 
         level, i.e. for the entire corporate group.                                                                               
    Use                                                                               
    If you set this indicator, the regular vendor is suggested as the only   
         source.                                                                               
    If you wish to work with the source determination facility for purchasing
         documents, it makes sense not to set the indicator so that the system    
         suggests all available sources, not just the regular vendor.                                                                               
    If you try to enter a different vendor than the regular vendor in the    
         source list or quota arrangement, the system will issue a warning        
         message.

  • Fixed Vendor

    Hello Friend
    We use SRM Server5.5 with classic scenario. (SP 07)
    Endusers want to change the source of supply.  So endusers delete the info-record and choose the preferred vendor.
    There is one info-record in MM.
    Even if enduser deletes the info-record in SRM, there are fixed vendor and info-record in PR document.
    But we don’t want fixed vendor data in PR document.
    I’m not sure which data is transferred to MM to determine the source.
    How to remove the fixed vendor in MM while creating PR in MM?
    Our scenario:
    1.     Create Shopping cart
    2.     After approval, PR will be created in MM.
    Thank you
    Best regards,
    SH

    Hi,
    In the backend, you can use the default values :
    1- Spro-> Materials Management->Purchasing->Environment Data->Define Default Values for Buyers->Settings for Default Values
    2- Here you can select a KEY DEFAULT VALUE (or create a new one) the go to the "source determination" tab
    3- Unflag "create requisition" : If the indicator is not set, the source determination process will only be implemented at the specific request of the user." thus no automatic determination will be processed byt he system
    4- Goto RFC user id (in ECC), select parameter tab and set EVO parameter with your key value "for example "01")
    Kind regards,
    Yann
    In this step, "you assign default values that you maintained in Customizing to a user by entering the key of the default value in the user master record under the parameter ID "EVO"."

Maybe you are looking for

  • Can I get rid of the black bar with the icons on f...

    When on cam with a friend the black bar with the cam, mic icons fills part of screen can I remove this and still get the box to type in

  • BPM multi-mapping

    Hi guys, I'm doing a multi-mapping in a BPM (I need the BPM for other validations). This multi-mapping is 1x2 and the messages are created based on payload fields(both are optional 0..1). the mapping is working fine, the problem is at the fork step,

  • Dividing Serial Data

    Hi. I have three sensors sending data over LabView through serial line. And I'm trying to have three displays on Front Panel to show those three sensor values. Each sensor sends 8bits of data serialy one after another. I am curious to know if there i

  • Open Text Invoice Management and Document Access

    Our client wants to implement/integrate the open text management in SAP ERP for a procure to pay project for AP. Can someone suggest a training course to learn about this integration? Please explain how the open text works with SAP and any good docum

  • Active data model problem

    Hi all! I have a problem working with ADF BC, i think it's caused by the Active Data Model. I have a jspx with an adf:table based on a a ViewObject ( with an underlaying EntityObject ) that queries for all employees that matches: attributeName = '0'