Validation of vendor

Hi,
  I have to validate is the vendor given is one time vendor or not.Have written the code as
CLEAR lfa1-lifnr.
  IF NOT s_lifnr[] IS INITIAL.
    SELECT SINGLE ktokk INTO gw_lfa1 FROM lfa1 WHERE lifnr IN s_lifnr.
    IF gw_lfa1 NE 'ZECS'.
      MESSAGE e000 WITH 'Specified vendor is not a onetime vendor'.
    ENDIF.
  ENDIF.
In this type of type if am giving a list of vendors if the first vendor is not reaching the criteria its throwing an error message and coming out.But i need to validate all the vendors and other process should be done for one time vendors alone.Please help me in changing the coding

Hello Saranya,
I dont understand this point:
i need to validate all the vendors and other process should be done for one time vendors alone
Please clarify, if you want to throw an error message if no ONE TIME vendors are available for the input provided. If so, you can try the code below:
IF NOT s_lifnr[] IS INITIAL.
SELECT lfa1 ktokk
INTO TABLE IT_LFA1
FROM lfa1 WHERE lifnr IN s_lifnr.
IF SY-SUBRC NE 0.
  MESSAGE e000 WITH 'No Valid Vendor exists for Input data'.
ELSE.
LOOP AT IT_LFA1 INTO WA_LFA1.
IF WA_LFA1-KTOKK = 'ZECS'.
  APPEND WA_LFA1 TO IT_ZECS. "IT_ZECS stores all one-time vendors
  CLEAR WA_LFA1. 
ENDIF.
ENDLOOP.
ENDIF.
IF IT_ZECS IS INITIAL.
MESSAGE e000 WITH 'No onetime vendor exists for Input data'.
ENDIF.
ENDIF.
Hope this helps.
BR,
Suhas

Similar Messages

  • Validation of vendor data during creation

    Dear all,
    I can create same vendor with two different addresses but same PAN no, by two different vendor codes. The system does not validate the PAN no. when creating a vendor ie. it does not check whether some one else has already been registered with same PAN number?
    How can we validate the PAN no of the vendor, during the creation of vendor master data?
    Regards.
    Milind

    Hi,
    This field can not be validated in Vendor Master because this is not stored in Vendor Master Tables (LFA1. LFB1, etc...). This is stored in Excise Table J_1IMOVEND-J_1IPANNO
    Table Name is J_1IMOVEND - Vendor Master Excise Additional Data

  • Validation of vendor material number in IDOC_INPUT_INVOIC_MRM

    Hi folks,
    Scenario: Inbound EDI vendor invoices received as IDOCs.
    I'm using Logistics Invoice Verification process code INVL to receive and post vendor invoices on to the ERP2004 release of R/3.
    I have purchasing info records setup with the vendor material number.
    When I process an inbound vendor invoice, I can put in a customer material number i.e. a material number existing in material master in E1EDP19-IDTNR with qualifier E1EDP19-QUALF = 001.  When I do this, R/3 checks that the material number is valid and refuses to post an invoice if the material number is invalid - this is good.
    This means that the EDI program parameters with the 'Check Material Number' enabled is working as expected.
    Now when I only have a vendor material number i.e. E1EDP19-QUALF = 002 an E1EDP19-IDTNR = vendor part number, R/3 posts the invoice even if the vendor part number is invalid - IDOC_INPUT_INVOIC_MRM does not seem to be validating the vendor part number.  The document posts whether I use a valid vendor part number or an invalid one - what am I missing?
    Satish

    I can answer by words of Axel Angeli - top level SAP R/3 consultant and R/3 cross-application development coach, the author of classic book "SAP R/3 Guide to EDI, ALE and Interfaces":
    "SAP R/3 delivers a serious of predefined EDI programs. Many project administrators see them as standards which should not be manipulated or modified. The truth is, that these IDoc processing functions are recommendations and example routines, which can be replaced by own routines in customizing."
    and
    "SAP R/3 is delivered with a series of predefined IDoc types and corresponding handler function modules.
    Some of the handler programs have been designed with user-exits where a developer can implement some data post-processing or add additional information to an IDoc.
    You must always see those programs as examples for IDoc handling. If the programs already do what you want, it is just fine. But you should never stick to those programs too long, if you need different data to be sent."
    So now you can feel free to customize
    Regards,
    Maxim.

  • Sales Order not Valid During Vendor Clearing

    Hi,
    When I'm clearing vendor open items (both normal & special GL transactions) i'm getting an error message "Sales Order not Valid". How do I correct this error?
    Thanks,
    Chaikaru

    Hi ,
    As you're saying that the order got saved already with confirmation, you can try re-doing the ATP check on the SO item. If the order item is not present in SCM, system will throw an error with the message "APO: Order Doesn't exist".
    You have mentioned that CCR did not detect the inconsistency, have you by any chance selected check box "use VBBE table"?
    You can try resending all the Sales Orders to SCM by running Initial Supply (report RIMODINI) for Sales Order Integration Model., monitor the queues in /SAPAPO/CQ. Alternatively, If you're using Inbound queues in SCM, you can only check SMQ2 in SCM and if you're using Outbound queues in ECC, check SMQ1 in ECC to monitor the queus.
    regards,
    Mohan

  • Validation for vendor for invoice Rs.20000

    H expert
    I would like to build a validation for one time vendor for which it should not allow invoice value for <20000
    How to do it. Please suggest me a  step by step config involved in this.Points will be rewarded.
    sk

    Better to write Validation :
    Prereqisit:
    BKPF-LIFNR>=1 AND BKPF-LIFNR<=100
    **Check**
    BSEG-WRBTR
    and Write any Message what you want then SAVE
    Go to OB28 and assign this validatin to our company code and active and SAVE
    I hope this validation useful for you
    If it will useful 4 u give rewards
    Regards
    TML

  • Validation for vendor master data creation

    Dear All,
    Can anybody suggest how to apply validation while creation of vendor master data. As this can not be done through GGB1 as it is ment for document level validation. Please suggest any user exit or badi or validation path for this.
    Thanks & Regards

    hi,
    the enhancement for vendor master is SAPMF02K, you can easily add your own check, pls. check in tcode SMOD!
    hope this helps
    ec
    >
    Srinivasa Maruvada wrote:
    > Hi
    >
    > Check TCode for validation OB28, for substitution OBBH
    > and also OKC9 which may helps you.
    > Cheers
    > Srinivas
    your post is rubbish, substitutions and validations are in use in document posting, not for master data creation. Even the OP told this, when he asked his question...

  • Validation of vendor number vs. Accounting Group

    Hello Experts,
    We are using ESO 5.1 with integration package, connected to an ERP 5.0 backend system.
    I've confirmed an issue when creating a vendor in ESO for publishing to ERP, as E-Sourcing does not validate the vendor number the user is assigning. System only checks if the Accounting group has a internal or external numbering.
    Has anyone encontered this issue before? Any standard solutions for this?
    If so, I'll appreciate if you can share how this issue was solved. Validation script? If so, can anybody share or give me some pointers on how to create it?
    Thanks!
    Regards,
    GG

    I can answer by words of Axel Angeli - top level SAP R/3 consultant and R/3 cross-application development coach, the author of classic book "SAP R/3 Guide to EDI, ALE and Interfaces":
    "SAP R/3 delivers a serious of predefined EDI programs. Many project administrators see them as standards which should not be manipulated or modified. The truth is, that these IDoc processing functions are recommendations and example routines, which can be replaced by own routines in customizing."
    and
    "SAP R/3 is delivered with a series of predefined IDoc types and corresponding handler function modules.
    Some of the handler programs have been designed with user-exits where a developer can implement some data post-processing or add additional information to an IDoc.
    You must always see those programs as examples for IDoc handling. If the programs already do what you want, it is just fine. But you should never stick to those programs too long, if you need different data to be sent."
    So now you can feel free to customize
    Regards,
    Maxim.

  • Idoc : Validation on Vendor and G/L account

    Hi Friends,
    We are having an Ext-Classic Scenario and doing Invoice without reference to PO ; once the invoice is created (w/o r.po) it will generate the Internal Number range ( 81xxx) and once it's approved it triggered the IDoc for ECC to generate the FI doc.51XXXX .
    Couple of records are getting stuck in Idoc in ECC with msg type BBPIV like for G/L account not ready for Tax code or vendor is not confirmed in ECC . Please let me know how to set the Validation on G/l Account / Vendor for Invoice without reference to PO.
    Which BADI can be used .
    Regards,
    Lalit

    Dear HARITH HAMDAN,
    I request you to kindly refer SAP Note 800294, which explains your question on Aging report to be run Back dated.
    Example:
    Today is the 12.12.2007, I need to see the ageing report for open
    customer receivables on 30.11.2007. Between the 30.11.2007 and
    12.12.2007 some of the then open invoices have been paid.
    Reports => Financials -> Ageing -> Customer Receivables Ageing
    Set 'Ageing Date' last date of the period, here 30.11.2007.
    Set 'Posting Date' from '01.01.2007' (= Start of fiscal year) to
    '30.11.2007'.
    Bring tab 'By Journal Postings' into the foreground.
    Tick boxes 'Display Customers with Zero Balance' and 'Consider
    Reconciliation Date'.
    Click on 'OK'.
    This setting will generate an ageing report showing all AR invoices
    posted between 01.01.07 to 30.11.07 that are not reconciled on
    30.11.2007.
    Regards,
    Raghu N
    SAP Business One Forums Team

  • Validating PO vendor with MIRO vendor

    Hi experts
    our client have some requirement
    when we are doing MIRO with reference to PO ... as PO vendor will take automatically for MIRO and also the system should not allow any vendor in MIRO other than PO vendor......
    But the system is allowing like ( it is accepting any vendor in MIRO). what needs to be done to achive like.
    whose job is this ( which consultant will do ).....??
    Thanks in advance
    Alex

    Dear Satya,
    Can you share how you have solved the above requirement, as i too have same requirement in my organization.
    Regards ,
    Nagabhushan

  • Vendor's master data validation

    Hi,
    I need to create a validation at vendor's master data. The validation that I need is regarding the IBAN is populated when vendor's bank data are informed. In other way, I want to ensure that IBAN is in the system when a vendor's bank data is informed.
    I have check the Function Module EXIT_SAPMF02K_001 in order to create a user exit, the tables are:
    T_LFBK     LIKE     LFBK
    T_LFB5     LIKE     LFB5
    T_LFZA     LIKE     LFZA
    T_LFBW     LIKE     LFBW
    T_LFAS     LIKE     LFAS
    T_LFAT     LIKE     LFAT
    T_LFLR     LIKE     LFLR
    T_LFM2     LIKE     LFM2
    T_WYT1     LIKE     WYT1
    T_WYT1T     LIKE     WYT1T
    T_WYT3     LIKE     WYT3
    Unfortunatelly I do not see TIBAN table, so I am afraid that i cannot validate that IBAN is place
    Does any body knows hoe to do this validation that i need
    cheers
    Rafa

    hi Rafa,
    there is a trick to do it from the exit. You have to define a field symbol and access the TIBAN structure through that:
    FIELD-SYMBOLS : <tiban> TYPE tiban.
    ASSIGN ('(SAPMF02K)TIBAN) TO <tiban>.
    Now you can check:
    IF <tiban> IS INITIAL...
    It is also possible (I did not check) that tiban is an internal table and not a structure, in this case you have to go:
    FIELD-SYMBOLS : <tiban> TYPE STANDARD TABLE.
    ASSIGN ('(SAPMF02K)TIBAN[]') TO <tiban>.
    I am also not sure that the screen name is SAPMF02K, pls check...
    hope this helps some
    ec

  • Vendor Master - Validity date table

    Hi ,
       Do we have table for maintaining the validity
       period of the Vendors.if so , help me out.
       or how the validity period is taken for the
       vendors.
    Thanks.

    This thread give you very good idea !!
    http://sap.ittoolbox.com/groups/technical-functional/sap-r3-acct/substitution-or-validation-on-vendor-master-data-518622#
    Thanks
    SK

  • Vendor Master Number validation

    Hi,
    I want to create  vendor master as  123456789A i.e first 9 digits is number and the last is the alphabet, this can be achieved with number range as 000000000A to199999999Z, but my problem is, even if I do not maintain the last unit as alphabet the system is allowing me to proceed i.e with all the 10 digits as numbers.
    My requirement is, if the last digit is not an alphabet then the system should give  me a error, kindly let me know how this can achieved.
    Thanks
    Suresh

    Hi,
    You can implement user-exit for validation of vendor master data: SAPMF02K.
    Regards,
    Eli

  • Validating vendors in PO item conditions of BAPI_PO_CREATE1

    Hai friends,
    BAPI_PO_CREATE1 is not validating the vendors of item level conditions(BAPIMEPOCOND-VENDOR_NO).
    But I have to validate those vendors existed in SAP or not. please help me.
    regards,
    Eswar.

    before passing the data to any screen using bdc(session method or call transaction) or bapi methods you need to validate the data from its check tables say you asked the vendors is not validating u should check the data from lfa1 table whether the vendors are available or not this is nothing but data clensing.
    and each record entered in the bapi function module should be fully data validated i.e the data should 99.99% save in the data base table of concerned tables like ekko,ekpo in this case ie. this is nothing but data prusing.
    write select statements to lfa1 table & delete the records if in flat file given there is no vendors matched to database tables before passing the vendors to bapi_po_create functionmodule

  • Error Validation In PO Creation

    Hi Gurus,
    I'm trying to create a PO in transaction ME21N. There are no validation on vendor and company code mapping, error message should occur. This error should come up upon PO creation since the vendor is not created for company code. How can I do this  and in what user exit will I include my code? Your help is much highly appreciated! Thanks in advance!

    hi
    after entering all the information in the PO just go for check option in the top...
    if there are any errors it displays....
    if vendor not created in Company code it has to display the error msg...
    otherwise u cant create PO
    Regards
    Smitha

  • Down payment to vendor

    hi experts,
    My requirement is  to pay 100% advance along with taxes against purchase order. after payment made by me, vendor has to supply the material. I have assign the payment term in Vendor master also.
    process will be the following.
    creation of purchase order ME21N.
    for Advance F-48
    goods receipt MIGO
    Invoice verification MIRO
    Clearing of advance F-54
    my problem is when i make the advance payment to vendor through F-48 against PO it is picking only PO base value instead of total value and showing information message "Order value will be exceeded", if i enter document is saving.
    my requirement is if the advance payment is more than PO value(including taxes), system will show the error message and it can't be save.
    For the above requirement is there any configuration?
    For the above requirement I did the following validation
    Prerequisites :Vendor >= '10001' AND Vendor <= '10010'
          BSEG-LIFNR >= '10001' AND BSEG-LIFNR <= '10010'
    Check: Payment Amnt = Purchasing Doc.
            BSEG-LIFNR >= '10001' AND BSEG-LIFNR <= '10010'
    Message type given :E
    It is working but Po value picking as base value instead of total value.
    can any one help me is there any soulution to pick up total PO value(including taxes)? or any alternative method?
    Is there any user Exists for this.
    kindly help me.
    usefull answers duely rewarded.
    thank in advance
    sai krishna
    Message was edited by:
            sai krishna

    Matter most Urgent

Maybe you are looking for