BDC OKCODE - ME01 - Source list

Hello All,
I need to write a BDC to update the source list for the materials (master data ) with T-code ME01.
But ME01 is used both for create and change of the source list.
I am writing the following BDC for change,but it is not working.
CLEAR bdc_tab. REFRESH bdc_tab.
  PERFORM  dynpro USING:
*initial screen
     'X'  'SAPLMEOR'             '0200',
     ' '  'EORD-MATNR'           itab_eord-matnr,
     ' '  'EORD-WERKS'           itab_eord-werks,
     ' '  'BDC_OKCODE'           '/00'.
  PERFORM  dynpro USING:
     'X'  'SAPLMEOR'             '0205',
     ' '  'EORD-VDATU(1)'        from_date.
  PERFORM  dynpro USING:
     ' '  'EORD-BDATU(1)'        to_date,
     ' '  'EORD-LIFNR(1)'        itab_eord-lifnr,
     ' '  'EORD-EKORG(1)'        p_ekorg,
       ' '  'RM06W-FESKZ(1)'       '  ',
       ' '  'EORD-AUTET(1)'        '1',
       ' '  'BDC_OKCODE'           '=BU'.
  CALL TRANSACTION 'ME01' USING bdc_tab MODE bdc_mode UPDATE 'S'.
I am trying to change the existing source list for a part with above BDC code.
But it says "Source list for mat. 0403-000363 and plant V711 already being
processed".
Please guide me how should i change the existing source list with BDC ?
Thanks in advance,
Swati

Hi,
The error just means that someone is already editing source list for the  material 0403-000363. Close that and try executing the bdc.
Regards,
Vikranth

Similar Messages

  • BADI for ME01-Source lists

    Hello and happy new year!!
    We need to do some checks before a source list is updated using ME01 transaction code.
    Does anybody know if there is a badi for this purpose?
    Thank you in advance!
    MARTA

    Hii
    I also have similar kind of requirement,
    Need to do some vendor validation and issue a error message, when cliked on save bustton in ME01 tcode.
    Please let me know if any body knows suitable exit or BADi
    Thank you...!!!
    Regards,
    Nilesh

  • No effective source of supply despite valid source in Source List

    Hi,
    Can somebody help me why I can't assign source of supply in PR when I already have multiple valid vendors with info records maintained on the material? I'm using MPN material to maintain info record. I have checked all my master data with validity dates and they are all valid. Also, I noticed that there are no effective source displaying when I do simulation inside ME01 (Source List). Maybe that is one of the reason why I can't assign source of supply in PR.
    hoping for an immediate reply.
    Thanks,
    MM

    If it can't find ANY source and you definitely have FULL info records (I mean manually manitained with ME11 / 12) and you definitely have sources in the source list, then are these entries correct, are the date ranges valid, is the P org correct?
    This functionality WILL work if the data is set up correctly but there are lots of small elements of that data that could stop the system from determining a valid source.
    Try changing one of the entries in the source list (just the date for instance) just to see if there are any warning messages triggered.
    Steve B

  • BDC for ME01 to delete vendors in the source list

    Hi ABAP'ers,
                         I am trying to write a BDC program to delete a particular vendor from ME01 TCODE. My program runs well till deletion after i delete a record it is showing a pop up to confirm and on clicking yes the vendor is deleted. But the source list is not getting saved, or in other words the BDC flow stops after deletion, though i have handled save ok code in my BDC internal table. is there a solution for this.
    thanx $ regrds
    thrinath k

    Run in mode 'E' and fix whatever you have missed on your BDC.

  • BAPI or FM for Source List (ME01 TCode)

    Hello,
             I have a requirement to upload master data for Source List which is T-Code ME01. Now, as there is a Table Control in it, we are having trouble using LSMW because when there is more than 1 record for the given Material Plant Combination, it fails to handle the 2nd Record. There is a table Control in the T-Code ME01 in which if we go by the Recording in LSMW, we would have the 2nd Record overwrite the 1st Record when we actually try to upload the Data.
           So, is there a BAPI by which we can achieve this requirement? Please let me know.
    Thanks and Regards,
    Venkata Phani Prasad Konduri

    Hello Manjunath,
                                  I have neither used BDC or BAPI Method to upload SourceList but used the LSMW-IDOC method using;
    IDoc Type : SRCLST01
    Message Type : SRCLST
    Process Code : SRCL
    Inbound Posting Program : IDOC_INPUT_SRCLIST
                                 It worked fine for me. Try this out.
    Thank You,
    Venkata Phani Prasad K

  • How to maintain the source List if record already exist to maintain ME01

    Hi Folks,
    I've a BDC pgm for t-code ME01(Maitain Source list). which is for creating new contract before expirting one.  Here I am upload a TXT file which contains data like vendor, Plant, date(valid to-valid from), PurOrgn, Agreement ...
    But program is unable to manage the for updating the source list. The program also runs into a scenario where there are 2 Fixed, MRP Rel. lines with Overlapping Validity Period. 
    The program also does not return a proper error message informing the user there is a problem updating the Source List u2013 program simply tell. the user the program is unable to process the file.  When user tries to reprocess the upload file they are unable to do so since a Contract with the same conditions has already been created.
    points will be allocated for good solution
    Thanks in Advance,
    Venkat
    Edited by: venkat n on Oct 20, 2008 6:18 PM

    Hi
    Check out the link -
    http://wiki.sdn.sap.com/wiki/display/ABAP/StepstocreateasimpleLSMWusingbatchinput+recording
    lsmw for data migration for  xk01 transaction
    http://www.sap-img.com/general/lsmw-steps-for-data-migration.htm
    Regards
    Anand

  • BAPI or FM to load the source list i.e t-code ME01

    Hi all,
    is there any BAPI or FM to load the source list i.e t-code ME01
    Thanks

    Hi,
    Please check these FM.
    ME_MAINTAIN_SOURCE_LIST
    ME_POST_SOURCE_LIST    
    ME_GENERATE_SOURCE_LIST
    Regards,
    Ferry Lianto

  • BAPI for Source List Upload ( ME01 )

    Hi All..
    Is there any BAPI available for uploading source list for a material??
    Transaction involved - ME01.
    Thanks & Regards,
    Nidhi

    Hi,
    Try the below function module ME_UPDATE_SOURCES_OF_SUPPLY which is being used by standard transaction ME01.
    sample code
    REPORT ZTEST.
    DATA: BEGIN OF XORD OCCURS 50.
    INCLUDE STRUCTURE EORD.
    DATA: UPDKZ,
    END OF XORD,
    YORD type table of EORD with header line.
    clear xord.
    clear yord.
    xord-MATNR = '100-100'.
    xord-WERKS = '3000'.
    xord-ZEORD = '00001'.
    xord-ERDAT = '20080403'.
    xord-ERNAM = 'SAPDEV02'.
    xord-VDATU = '20080403'.
    xord-BDATU = '20100510'.
    xord-LIFNR = '0000001000'.
    xord-FLIFN = 'X'.
    xord-EKORG = '1000'.
    xord-UPDKZ = 'U'.
    append xord.
    move-corresponding xord to yord.
    append yord.
    CALL FUNCTION 'ME_UPDATE_SOURCES_OF_SUPPLY' IN UPDATE TASK
    EXPORTING
    I_CHANGEDOCUMENT = 'X'
    TABLES
    XEORD = XORD
    YEORD = YORD.
    COMMIT WORK.
    Cheers,
    vasavi.v

  • BDC OKCODE LIST

    Hai all,
    I need BDC OKCODE Value List.
    For example:
    OKCODE Value for NEW ENTRIES in table fields.
    PERFORM bdc_field       USING 'BDC_OKCODE' '=NPE'.
    Please give me the list of BDC OKCODE Value and function of like '=NPE'.
    Regards
    Naga

    Thanks, Andreas.
    Your reply is really helpful.
    But I still have a question:
    When coding using BDC OKCODE, some of those function codes require a "=" sign prefix, while others requires the '/' sign.
    Let's take a look at PA30, for example:
    PERFORM bdc_field USING 'BDC_OKCODE'  '=INS'. " for Create
    PERFORM bdc_field USING 'BDC_OKCODE'  '/E'.   " for Cancel
    I don't see this info in the Menu Painter (trans. SE41).
    How can I know, without recording using SHDB, what is the required prefix for each function code?
    Thanks,
    Isaac

  • Source list mass blocking of vendor

    dear all,
    ply give me transaction code for source list in which i can block vendors.
    i have created an LSMW tool also but it creates an double entry in the transaction ME01.
    we have even crated BDC but there also same error is occuring.
    so is there any other ways for doing mass changes
    regards
    amey

    One option is thru ME05 transaction, which is generate source list.
    You get a list, there you can filter (e.g. by vendor) and then set block indicator.
    Alternative, if you just want block the vendor, then use MK05 and block this vendor for procurement,
    And about your LSMW and BDC, you are just not hitting the existing source list records, hence you create new ones. You probably have to enhance the key. Lookup table EORD to see what you may need to hit an existing record.

  • BDC for ME01.

    Hi All,
         I need to write a BDC for Source list(ME01). Could anzbody suggest me how to do this.
    It should be definetely contain the field AUTET.
    Thanks.
    Pls explain more elaborately.

    Hi Shekar,
    Hi,
    See the sample attached code for ME51 using table control.
    similarly record the same for ME01 and copy the TC logic from this.
    REPORT zmm_pr_upload_mat
    NO STANDARD PAGE HEADING
    LINE-SIZE 255.
    Standard Include for Selection Screen
    INCLUDE bdcrecx1.
    Internal Table for Upload Data
    DATA: BEGIN OF i_pr OCCURS 0,
    Header Screen
    sno(3), " SNo
    bsart(004), " PR Type
    epstp(001), " Item Category
    knttp(001), " Account Assignment
    eeind(010), " Delivery Date
    lpein(001), " Category of Del Date
    werks(004), " Plant
    lgort(004), " Storage Location
    ekgrp(003), " Purchasing Group
    matkl(009), " Material Group
    bednr(010), " Tracking No
    afnam(012), " Requisitioner
    Item Details
    matnr(018), " Material No
    menge(017), " Quantity
    badat(010),
    frgdt(010),
    preis(014), " Valuation Price
    waers(005), " Currency
    peinh(005),
    wepos(001),
    repos(001),
    sakto(010), " GL Account
    kostl(010), " Cost Center
    bnfpo(005),
    END OF i_pr.
    Internal Table for header Data
    DATA: BEGIN OF it_header OCCURS 0,
    sno(3), " SNo
    bsart(004), " PR Type
    epstp(001), " Item Category
    knttp(001), " Account Assignment
    eeind(010), " Delivery Date
    werks(004), " Plant
    lgort(004), " Storage Location
    ekgrp(003), " Purchasing Group
    matkl(009), " Material Group
    bednr(010), " Tracking No
    afnam(012), " Requisitioner
    END OF it_header.
    Internal Table for Item Data
    DATA: BEGIN OF it_item OCCURS 0,
    sno(3), " SNo
    matnr(018), " Material No
    menge(017), " Quantity
    preis(014), " Valuation Price
    sakto(010), " GL Account
    kostl(010), " Cost Center
    END OF it_item.
    Data Variables & Constants
    CONSTANTS : c_x VALUE 'X'. " Flag
    DATA : v_l(2), " Counter
    v_rowno(5), " Row No
    v_2(2), " Counter
    v_rows LIKE sy-srows, " Rows in TC
    v_field(45). " String
    Parameters
    PARAMETERS: p_file LIKE ibipparms-path. " Filename
    At selection-screen on Value Request for file Name
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Get the F4 Values for the File
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    program_name = syst-cprog
    dynpro_number = syst-dynnr
    IMPORTING
    file_name = p_file.
    Start of Selection
    START-OF-SELECTION.
    Open the BDC Session
    PERFORM open_group.
    Upload the File into internal Table
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    filename = p_file
    filetype = 'DAT'
    TABLES
    data_tab = i_pr
    EXCEPTIONS
    conversion_error = 1
    invalid_table_width = 2
    invalid_type = 3
    no_batch = 4
    unknown_error = 5
    gui_refuse_filetransfer = 6
    OTHERS = 7.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    SORT i_pr BY sno.
    LOOP AT i_pr.
    MOVE-CORRESPONDING i_pr TO it_item.
    APPEND it_item.
    CLEAR it_item.
    AT END OF sno.
    READ TABLE i_pr INDEX sy-tabix.
    MOVE-CORRESPONDING i_pr TO it_header.
    APPEND it_header.
    CLEAR it_header.
    ENDAT.
    ENDLOOP.
    SORT it_header BY sno.
    SORT it_item BY sno.
    v_rows = sy-srows - 6.
    Upload the Data from Internal Table
    LOOP AT it_header.
    Header Data
    PERFORM bdc_dynpro USING 'SAPMM06B' '0100'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'EBAN-BEDNR'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'EBAN-BSART'
    it_header-bsart.
    PERFORM bdc_field USING 'RM06B-EPSTP'
    it_header-epstp.
    PERFORM bdc_field USING 'EBAN-KNTTP'
    it_header-knttp.
    PERFORM bdc_field USING 'RM06B-EEIND'
    it_header-eeind.
    PERFORM bdc_field USING 'RM06B-LPEIN'
    it_header-lpein.
    PERFORM bdc_field USING 'EBAN-WERKS'
    it_header-werks.
    PERFORM bdc_field USING 'EBAN-LGORT'
    it_header-lgort.
    PERFORM bdc_field USING 'EBAN-EKGRP'
    it_header-ekgrp.
    PERFORM bdc_field USING 'EBAN-MATKL'
    it_header-matkl.
    PERFORM bdc_field USING 'EBAN-BEDNR'
    it_header-bednr.
    PERFORM bdc_field USING 'EBAN-AFNAM'
    it_header-afnam.
    Item Details
    v_l = 0.
    To add no. of rows
    v_2 = 0 .
    As the screen is showing 13 rows defaulted to 130
    v_rowno = 130 .
    LOOP AT it_item WHERE sno = it_header-sno.
    v_l = v_l + 1.
    IF v_l = 14 .
    IF v_2 = 12 .
    v_2 = 12 .
    v_l = 2 .
    From second time onwards it is displaying 12 rows only
    v_rowno = v_rowno + 120 .
    PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RM06B-BNFPO'.
    PERFORM bdc_field USING 'RM06B-BNFPO'
    v_rowno.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    ELSE.
    V_2 initialized to 12 for second screen purpose
    v_2 = 12 .
    v_l = 2 .
    PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RM06B-BNFPO'.
    PERFORM bdc_field USING 'RM06B-BNFPO'
    v_rowno .
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    ENDIF.
    ENDIF.
    PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    CLEAR v_field.
    CONCATENATE 'EBAN-MATNR(' v_l ')' INTO v_field.
    PERFORM bdc_field USING v_field it_item-matnr.
    CLEAR v_field.
    CONCATENATE 'EBAN-MENGE(' v_l ')' INTO v_field.
    PERFORM bdc_field USING v_field it_item-menge.
    PERFORM bdc_dynpro USING 'SAPMM06B' '0102'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'EBAN-PREIS'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'EBAN-PREIS'
    it_item-preis.
    PERFORM bdc_dynpro USING 'SAPMM06B' '0505'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'EBKN-SAKTO'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTE'.
    PERFORM bdc_field USING 'EBKN-SAKTO'
    it_item-sakto.
    Cost Center
    PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'COBL-KOSTL'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTE'.
    PERFORM bdc_field USING 'COBL-KOSTL'
    it_item-kostl.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTE'.
    ENDLOOP.
    PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RM06B-BNFPO'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=BU'.
    Call The Transaction
    PERFORM bdc_transaction USING 'ME51'.
    ENDLOOP.
    Close the BDC Session
    PERFORM close_group.
    <b>reward if useful</b>
    <b>Regards,
    Jackie..</b>

  • Error when blocking a vendor in source list

    We are trying to block a vendor from the Source list (Tcode ME01), however this vendor was created in a different system and imported into our current system.
    The error message we receive states "Source list record created in a different system".  We are unable to save the change, so it is not a warning message, but an error.
    Any help would be appreciated.
    Thank you

    your source list records get created in a central system. if you delete an entry you create inconsistencies to your central system (and you may get this record back soon undeleted).
    Contact the guys who create the source list in this different system and let they maintain the block and distribute it to your system again with ALE.

  • What are the disadvantages of maintaining the source list?

    Hi,
    I understand that once source list is activated for plant in customizations, it has to be maintained for all the materials which are extended for the said plant, Is it true? Can I maintain only for selected materials?
    I also understand if it is maintained for material then, we can not create PO for other source for which it has not be maintained in source list.
    Thanks in advance,
    Satish

    hi
    There are no disadvantages if you maintain source list. Infact it helps lot of other functionalities other than purchasing. if you make source liost mandatory then it it required that for that particular material you need to have sourcelist  in Txn ME01.  You can have  list of vendors who are approved and put all of them in the source list for the material.  Yes you can always have independent sourcelist for a single material. Unless until you make it mandatory in customising there is no problem in PO creation. If you have made it mandatory  and you wish to create a PO for a new vendor who is not there in Source list then it is not possible to create a PO. However you can add the new vendor in the source list and go on creating the PO.
    Regards

  • Enhancement to bypass "Source not included in list despite source list req"

    Dear Experts,
    When the indicator source list requirement is maintained in the material master, the system will only allow creation of a purchase order if the source  is maintained in the source list (t-code ME01).  If its missing we will get an error message when creating or chaging PO with message :"Source not included in list despite source list req".
    Is there a enhancement through which we can influence the error message for PO's of type stock transfter order? I tried searching for one but couldn't find a appropriate one.
    Had look at ME_PROCESS_PO_CUST & ME_PROCESS_PO also but they were not much useful.
    Thank You.
    Best Regards,
    SP

    >
    User General wrote:
    > Hi thank you very much for your useful reply. My requirement is slightly different though.
    >
    > I have to avoid the error message not for entire plant but the plant and material number combination.Is there any customizing for achieving this.
    >
    > In this case if the same plant and material number is used but for different PO type like standard PO(type NB) it should still show an error message as standard.But if the PO type is stock transfer order(Y2UB)  then error message to be avoided.
    so what you actually want is: source list is obligatory for a combination of plant / purchase order type / material number.
    there's no customizing this.
    actually, i have difficulties in accepting your search for an exit/enhancement because the configuration of your system does not match your business process  = why do you want to avoid an error message in case of a STO scenario where the source list entry is missing?? either you have defined source lists obligatory on plant level - then see to it, that the source lists are maintained in the plant (you can mass generate it using ME05) or it is not ... in which case you will have to train your users accordingly ...
    please do not take offense - none is intended - but i wonder why one would make a thing mandatory, only to circumvent the obligation by (intransparent) programming.

  • Problem creating source list

    Hi
       We are on ECC 5.0 and in one of our ABAP programs create a PIR as a first step using ME11 BDC call and then go ahead to create a sourcelist for the material + plant and the vendor ( for which PIR was created in the first step ) .
    To create source list we use the following function modules ( fms )  in sequence
    ME_INITIALIZE_SOURCE_LIST
    ME_DIRECT_INPUT_SOURCE_LIST
    ME_POST_SOURCE_LIST_NEW
    What we observe is that - the ME_DIRECT_INPUT_SOURCE_LIST fm always raises an abort message - ' No PIR exists for the material and vendor ' even though PIR is created in the first step and we check for its existence before we call the fms for the source list. However if we introduce a wait for upto 15 seconds after the PIR has been created the sourcelist creation goes through.
    Any idea why the above is happening. Similar situations faced with source list creation - shared is appreciated. Correct answers helping me solve this problem will be promptly rewarded

    Hi Karthik,
    System takes some time to COMMIT all the work thats why it's happening.
    Keep the WAIT FOR UP TO <reasonale seconds value> SECONDS in your code.
    Regards,
    Atish

Maybe you are looking for

  • Demand for Partial Schedule line not showing in MD04?

    Hi All, An SO with around 1200 line items, having problem with one line item, ordered qty is 20. Shipped a partial line of 6qty.Schedule line was showing order qty of 20, confirmed qty 6 but no second schedule line for the balance of 14 and the deman

  • Computer acts as if option key is pressed.

    I will be working in illustrator and all of a sudden the computer acts like im holding the option key down when Im not.I have an external keyboard and its not a keyboard problem cause when i unplug the keyboard it doesnt fix it. it used to go away af

  • Advanced queue in Oracle9i Standard Edition One

    Hi, Is advanced queuing available in the Standard Edition One for 9i? Thanks, Gloria

  • Trouble setting emplID upon account creation using PeopleSoft UM connector

    I am working with the PeopleSoft User Management Connector 9.1.0. I have the connector installed and can provision accounts. However when I try to provision an account and set the EmplID at the same time I get the following: ERROR,2010-04-05 15:56:19

  • Workflow variant and Workflow

    Hi Dear,i have workflow variant assigned to company code,how do i find out which workflow task contained in that workflow variant? thanks in advance