Problem in Vendor creation

Hi,
  I am creating a vendor from a legacy file using a function
  IDOC_INPUT_CREDITOR.
  it is working fine if i use only one segment (E1LFA1M).
  But in my case i also have to save data into one field in 
  table LFB1 for which i have to fill one more segment
  (E1LFB1M).
  Now when i fill both the segments, i am unable to create
  vendor.
  Below is a sample code, please revert ASAP :
  REPORT  zvr001_vendor_create.
types ------------
     DATA l_input_method TYPE bdwfap_par-inputmethd.
     DATA l_header_data  TYPE bapi_incinv_create_header.
     DATA l_return TYPE bapiret2.
     DATA wa_lfa1 TYPE lfa1.
     DATA wa_bseg TYPE bseg.
     DATA wa_bkpf TYPE bkpf.
     DATA l_update TYPE bdwfap_par-updatetask.
internal tables   --------------
control records
     DATA: it_cntrl   TYPE TABLE OF edidc,
           wa_cntrl   LIKE LINE OF it_cntrl.
data records
     DATA: it_data    TYPE TABLE OF edidd,
           wa_data    LIKE LINE OF it_data,
           wa_e1lfa1m LIKE e1lfa1m,
           wa_e1lfb1m LIKE e1lfb1m.
status records
     DATA: it_status  TYPE TABLE OF bdidocstat,
           wa_status  LIKE LINE OF it_status.
return variables
     DATA: it_ret     TYPE TABLE OF bdwfretvar,
            wa_ret    LIKE LINE OF it_ret.
serialization
     DATA: it_serial  TYPE TABLE OF bdi_ser,
           wa_serial  LIKE LINE OF it_serial.
fill internal tables ( hardcoded for test purpose )     
1. control records
          wa_cntrl-doctyp = 'CREMAS03'.
          wa_cntrl-mestyp = 'CREMAS'.
          wa_cntrl-idoctp = 'CREMAS03'.
          APPEND wa_cntrl TO it_cntrl.
2. data records
          wa_data-segnam = 'E1LFA1M'.
          wa_e1lfa1m-lifnr = 'A007'.
          wa_e1lfa1m-ktokk = 'AMVG'.
          wa_e1lfa1m-name1 = 'name'.
          wa_e1lfa1m-stras = 'address1'.
          wa_e1lfa1m-ort02 = 'address2'.
          wa_e1lfa1m-ort01 = 'city'.
          wa_e1lfa1m-regio = 'pstlz'.
          wa_e1lfa1m-pstlz = '122200'.
          wa_e1lfa1m-land1 = 'IN'.
          wa_data-sdata  = wa_e1lfa1m.
          APPEND wa_data TO it_data.
          CLEAR wa_data.
          wa_data-segnam = 'E1LFB1M'.
          wa_e1lfb1m-lifnr = 'A007'.
          wa_e1lfb1m-bukrs = '1000'.
          wa_e1lfb1m-tlfns = 'Text001'.
          wa_data-sdata    = wa_e1lfb1m.
          APPEND wa_data TO it_data.
          CLEAR wa_data.
create vendor
        CALL FUNCTION 'IDOC_INPUT_CREDITOR'
           EXPORTING
             input_method                = 'N'
             mass_processing             = ' '
  PI_XK99_USED                = ' '
IMPORTING
  WORKFLOW_RESULT             =
  APPLICATION_VARIABLE        =
  in_update_task              = 'X'
  CALL_TRANSACTION_DONE       =
           TABLES
             idoc_contrl                 = it_cntrl
             idoc_data                   = it_data
             idoc_status                 = it_status
             return_variables            = it_ret
             serialization_info          = it_serial
           EXCEPTIONS
             wrong_function_called       = 1
             OTHERS                      = 2
       IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
Thanks
gaurav

maybe the bapi does a call transaction somewhere....set a breakpoint on call transaction and give it another go..if you can change the mode to 'a' you might be able to find the offending field.
Try include LKD02F01.
CALL TRANSACTION BLF00-TCODE USING FT
                               MODE    CALL_TRANSACTION_MODE
                               UPDATE  C_UPDATE_SYNC
                               MESSAGES INTO T_BDCMSGCOLL.

Similar Messages

  • Vendor Creation ,Partner role OA not allowed for Vendor of a/c group ZLOV

    Dear Freinds,
    I am facing problem of  Vendor creation , i am getting message  PARTNER ROLE OA NOT ALLOWED FOR VENDOR OF ACCOUNT  GROUP ZLOV.
    While creation of  Vendor in Partner function  i  could not  enter  partner number, system is not accepting any data, message is getting as above.due to which i could not create any vendor.
    Presently I am in process/ setting of  ERS functionality in MM,
    now all my Vendor creation is stuck up ,
    please help me how to solve the problem
    Regards
    Dilip

    Hi Dilip,
    Check first have you Define Permissible Partner Roles per Account Group..
    Check the path:
    SPRO-Materials Management-Purchasing-Partner Determination-Define Permissible Partner Roles per Account Group
    Here check whether OA is assigned with ZLOV or not...If no then click on new entries and enter partner function as OA and Vendor account group ZLOV...Save nd come out...
    Now proceed...Hope it helps..
    Utsav

  • Problem in Idoc creation in ME22N

    Hi All,
    We are facing a problem in Idoc creation in transaction ME22N.Our requirement is to trigger an output type and create a idoc everytime a change is made to a particular Purchase Order.
    Presently however,for some vendors,when we change the plant at the item level,an Idoc is not created(with a message that the changes are not relevant to create an Idoc).Any other change to the Purchase Order like changes in quantity or price,results in successful Idoc creation.
    We have also noticed that this happens only in the case of certain vendors.The Customer Info records and vendor data are all believed to be fine.
    Are any other config settings required to be maintained for this?
    Thanks in advance!
    Regards,
    Nejuma Iqbal

    Hi Nejuma,
    I don't think there is any problem with cofiguration settings.u r getting the idocs for some vendors .
    if iam not wrong u r giving LS in the tcode(we20).The method which u r using is change pointers.As u r using standard idoc all the settings will be done.
    Only settings u have to do is
    1>generate partner profiles(WE20)
    2>Distribute model view(BD64).
    REGARDS,
    Nagaraj

  • Need Sample Code for Vendor creation using JAVA API

    Hi,
    I have a scenario like Vendor creation using <b>Java API</b>.
    1.I have Vendors (Main) Table.
    2.I have <b>look up</b> tables like Account Group.
    3.Also <b>Qualifier table</b>(Phone numbers) too.
    Could you please give me the sample code which helps me to create Vendor records using Java API?
    <b>I need Code samples which should cover all of the above scenario.</b>
    <b>Marks will be given for the relevent answers.</b>
    Best Regards
    PK Devaraj

    Hi Devraj,
    I hope the below code might solve all your problem:-
    //Adding Qualified field
    //Creating empty record in Qualifed table 
    //Adding No Qualifiers
    Record qualified_record = RecordFactory.createEmptyRecord(new TableId(<TableId>));
    try {
    qualified_record.setFieldValue(new FieldId(<fieldId of NoQualifier), new StringValue(<StringValue>));//Adding No Qualifier
    catch (IllegalArgumentException e2) {
    // TODO Auto-generated catch block
    e2.printStackTrace();
    catch (MdmValueTypeException e2) {
    // TODO Auto-generated catch block
    e2.printStackTrace();
    //Creating Record in Qualified table
    CreateRecordCommand create_command = new CreateRecordCommand(connections);
    create_command.setSession(sessionId);
    create_command.setRecord(qualified_record);
    try
    create_command.execute();
    catch(Exception e)
    System.out.println(e.toString());
    RecordId record_id = create_command.getRecord().getId();
    //Adding the new record to Qualifed Lookup value and setting the Yes Qualifiers
    QualifiedLookupValue lookup_value = new QualifiedLookupValue();
    int link = lookup_value.createQualifiedLink(new QualifiedLinkValue(record_id));
    //Adding Yes Qualifiers
    lookup_value.setQualifierFieldValue(0 , new FieldId(<FieldID of Yes Qualifier>) , new StringValue(<StringValue>));
    //Now adding LookUP values
    //Fetch the RecordID of the value selected by user using the following function
    public RecordId getRecordID(ConnectionPool connections , String sessionID , String value , String Fieldid , String tableid)
    ResultDefinition rsd = new ResultDefinition(new TableId(tableid));
    rsd.addSelectField(new FieldId(Fieldid));
    StringValue [] val = new StringValue[1];
    val[0] = new StringValue(value);
    RetrieveRecordsByValueCommand val_command = new RetrieveRecordsByValueCommand(connections);
    val_command.setSession(sessionID);
    val_command.setResultDefinition(rsd);
    val_command.setFieldId(new FieldId(Fieldid));
    val_command.setFieldValues(val);
    try
         val_command.execute();
    catch(Exception e)
    RecordResultSet result_set = val_command.getRecords();
    RecordId id = null;
    if(result_set.getCount()>0)
         for(int i = 0 ; i < result_set.getCount() ; i++)
         id = result_set.getRecord(i).getId();     
    return id;
    //Finally creating the record in Main table
    com.sap.mdm.data.Record empty_record = RecordFactory.createEmptyRecord(new TableId("T1"));
    try {
         empty_record.setFieldValue(new FieldId(<FieldId of text field in Main table>),new StringValue(<StringValue>));
         empty_record.setFieldValue(new FieldId(<FieldId of lookup field in Main table>), new LookupValue(<RecordID of the value retrieved using the above getRecordID function>));
    empty_record.setFieldValue(new FieldId(<FieldId of Qualified field in Main table>), new QualifiedLookupValue(<lookup_value>));//QualifiedLookUp  value Retrieved above
    } catch (IllegalArgumentException e1) {
    // TODO Auto-generated catch block
         e1.printStackTrace();
    } catch (MdmValueTypeException e1) {
         // TODO Auto-generated catch block
         e1.printStackTrace();
    //Actually creating the record in Main table
    CreateRecordCommand create_main_command = new CreateRecordCommand(connections);
    create_main_command.setSession(sessionId);
    create_main_command.setRecord(empty_record);
    try
         create_main_command.execute();
    catch(Exception e)
         System.out.println(e.toString());
    Thanks
    Namrata

  • Vendor creation using bapi

    Hi experts,
    I am new to bapi concept I done vendor creation by using bdc and lsmw and now I want to create by using bapi can anyone send program code for creating so that I can go through it.
    thanks in advance,
    points will be rewarded,
    Srinivas.D

    hi
    I gone to the bapi function module for bapi_vendor_create etc but the problem their is no input parameters or tables so I am little bit of confused if any body has the code plz send me.
    Regards,
    SrinivasD

  • Vendor creation for different cities and different address in same city its

    hi all
                please go through my requirement bellow.
                    Problem of single Vendor with his presence in multiple cities. For e.g. a vendor ABC has office in Bangalore, Hyderabad and Chennai.
         Vendor is having multiple offices in a same city. For e.g. ABC may have 2-3 diff offices in Bangalore itself. Each of these offices may or may not be functionally similar
    Regards
    Ravi.

    yes i asked the same last week
    i got partner functions option,ok fine but for main vendor which partner roles i have to maitain in partner roles screen of vendor master
    ex:suppose my main vendor is 20000 and for my bangalore location i created one more vendor say20001,now in 20000 ,20001partner screens of vendor creation which functions i have to mention.
    Regards
    Ravi.

  • Vendor Creation Via OAWD using workflow

    Hi,
    We are currently using SAP Archvelink for attaching vendor invoices to FI docuemnt via FB60 and MIRO using a basic workflow function
    We want to be able to use the same process ie OAWD to be able to initiate the process of creating a vendor via XK01. The user woudl receive an authorised vendor creation PDF form that they woudl then attach to the vendor when cretaing
    I have tried to configure a new document type and have assigned to object type LFA1 in transaction SOA0. However, when I try to maintain the workflow parameters to link to transaction code XK01 in transaction OACA I get the following message
    Parameter TRANSACTIONCODE does not exist for method CREATE of object type LFA1
    I dont know what to do (or if it is possible) to enable the "CREATE" method for object type LFA1
    Thanks in advance

    I solved my own problem.
    I had to configure OAWS first then it allowed me to add create in SOA0
    Edited by: Tracee on Sep 14, 2010 7:43 AM

  • Duplicate vendor creation blocking in XK01 Transaction

    Hi all,
    I want to block the duplicate vendor creation in the vendor creation transaction
    XK01.If any solution kindly reply to this message.
    Jyoti

    hI
    So u can use the exit EXIT_SAPMF02D_001, here insert the code you need to check the duplicate vendor.
    Perhaps the problem you can have is this exit is triggered at the end only.
    U can try to use the BTE 1360 (it's to check the account group), but I believe here those fields are not filled yet.
    Max

  • From Vendor Creation to Payment of Supplier (New User Here)

    Hi,
    Can anyone here could help me find a link or any softcopy of document that will help me learn more about the process of vendor creation up to the payment of supplier process. Right now I'm using an Oracle Dev module so we can tests for ourselves how the system works. The problem is that we are all Newbie.
    Hoping that someone can help me here.
    Thanks,
    Ace

    echo "alias ls='ls --color=auto'" >> ~/.bashrc
    That will append the alias mentioned in post 2 to your .bashrc which is where aliases are stored (you should run this as user for user's bashrc and root for root's bashrc). You will need to logout or issue
    source ~/.bashrc
    to get it to work.
    For example I've aliased ls to ls -sh to give me file sizes
    edit: fixed typo
    Last edited by SS4 (2011-01-17 21:39:35)

  • Problem posting Vendor Master Data

    Hi,
    We are posting Vendor Master data from MDM to ECC. We have serialized ADRMAS and CREMAS so that ADRMAS is always posted first and then CREMAS. ADRMAS is always posted correctly but for some reason the link between ADRMAS and its following CREMAS is not getting established. Because of that CREMAS is failing.
    We have explored all possible workarounds but nothing is working. Please note that in ECC, the number ranges are set to external numbers. The number ranges in ECC start with leading zeros. We are sending vendor numbers in the same format with leading zeros. However, I have this gut feeling that these leading zeros are causing the problem but I am not sure.
    Another thing is that if we create a vendor in ECC and then send data from MDM to update it, we can successfully do that. It's just the new vendor creation that is causing problem.
    Please also note that we are using '005' as message function. I have also tried '009' but it's not working either.
    Any suggestion, solution, workaround will be highly appreciated.
    Thanks,
    TS

    Hi Michael,
    Yes, that's always the case. The <ADRMASxx>-<E1ADRMAS>-<OBJ_ID> and <CREMASxx>-<E1LFA1M>-<LIFNR> both are mapped to our vendor number.
    We are using ECC 6.0. I have tried distributing vendors with and without leading zeros but in either case it didn't work.
    Here's the error message that we get while posting CREMAS
    "Fill all required fields SAPMF02K 0111 ADDR1_DATA-DEFLT_COMM"
    Message no. F2282
    However, when we check the ADRMAS, we can see a value 'LET' against 'COMM_TYPE' field. It is not empty.
    Any help will be greatly appreciated.
    TS

  • Error in Vendor Creation

    Hi,
    In Vendor creation , while  selecting  the Country as United States ( US) in Vendor address the following error message is displayed
    "Communication error with the external tax system (VERTEX_MS0018)
    Message no. TAX_TXJCD864 "
    How to solve this issue?????
    Regards,

    Hi,
    Check the following entries.
    OBCO   : Check the schema TAXUSX  (VERTEX Standard Jurisdiction Code)
    OBCP   :  Select the costing sheet TAXUSX, check the tax jurisdiction codes
    IMG>Financial accounting new > Financial accounting Global settings > Tax on sales/puchases >basic settings > External tax calculation.
    Take FI consultant help make necessary settings.
    Regards,
    Chandra

  • Workflow for Vendor Creation through a portal.

    Hi All Workflow Experts,
                                         I have a scenario here.In my project  vendor is created through a portal.On submit button from portal the workflow is to be triggered.I have to design the workflow process.So can you please guide me through what all should i consider while i design this workflow?
    This is my first workflow assignment so if you explain in detail it will be a great help.
    I will just pen down what all scenarios i can think of:
    1.Start workflow after vendor creation or modification.
    2.Check whether approver are maintained in Org structure through  standard FMu2019s.
    3.Check If approvers are maintained ?
    4.If yes,approve or reject the vendor.
    5.If no,get the agents from the custom table who can take an action on this.
    This is what i can think of.
    Please guide me.
    Thanks in Advance,
    Saket.

    The corresponding BO related with the vendor creation or changing is LFA1 but this Business object doeanot have any events that are related to Create and Change , so try to create a ZLFA1 and add you own events or make use of delegation concept where you will create a delegation for LFA1.
    For your first isssue
    Start workflow after vendor creation or modification
    EXIT_SAPMF02K_001 Vendors: User Exit for Checks prior to Saving is the user exit where in you can call the workflow when ever you change or create , because this user exit will trigger when ever you try to save the vendor. so i think you can make use of this user exit
    For your second Issue
    Check whether approver are maintained in Org structure through standard FMu2019s.
    Make use of SWI_GET_USERS_OF_ORG_UNIT this fucntion mdoule to get the user of the ORG unit
    or you can create a Rule(for determining the agents dynamically) to find the approvers.

  • Problem regarding the creation of Table using CSS.

    Hi ,
    Here I have a Problem regarding the creation of Table using CSS.
    In My Application i have a table with multiple rows(Rows are Dynamically added to the table).First i am setting the table with the following properties:
    width:900px;
    height : auto,
    Overflow : visible,
    Max-height: : 200px.
    If I use above properties,I'm getting a table with 5 or 6 rows(height upto 200px).After that i am getting the Vertical ScrollBar.
    The problem is when a table has many columns, Vertical and Horizontal Scrolls are coming at the time of setting the table. The table height is not Increasing dynamically.
    How can i use "height" property in CSS? (I want the table height to be increased when the columns are more.)
    Thanks & Regards
    Madhavi

    Hey humble user. Errr I'm trying to understand what ur trying to do. U want to create a section of a region destructively from an existing region right? If so select the option convert to new region (opt-comm-R or selecting it by right clicking). Check your audio bin to make sure. Whats the "merge" function? Are u refering to the glue tool?

  • Function module for offline  vendor creation.

    Hi Xperts,
    I have searched all threads but i didn't find it, plz help me its urgent,
    Is there a Function Module or BAPI for vendor creation. The BAPI_VENDOR_CREATE works online. I am looking out for an offline. This is for avoiding the use of BDC that we are currently using.
    thanx in advance
    Regards,
    Naresh.

    Hey whats up xperts............

  • Employee vendor creation

    Hi ,matically
    how to create automatic vendor creation via PRAA.
    Is this prgm can run in back ground and will updat enewly hired employees automatically.
    GK

    Hi GK,
    Yes this can be done.
    Follow the steps mentioned in this doc - http://scn.sap.com/docs/DOC-27098
    Thanks
    Vipin

Maybe you are looking for

  • Discount calculated after tax added in Net price

    Hi, My client requirement for the discount to be calculated as follows. Net price:1000 Service Tax-120 Total-1120 5% Discount on 1120 - 56 How do i map this in MM pricing procedure Regards

  • Create a BPEM Case and link to a ISU Contact Record

    Hi All - I have a question, We would like to create a FOP to do the following 1. Create a BPEM case. 2. Create a ISU Contact for the BP using the method ISUCONTACT-CREATEFROMDATA The question is can this method be used to attach the BPEM Case to the

  • Printing reciepts in the cash journal

    Am getting an Error message "You selected variant SAP18 for program RFKORD80. This variant does not exist." when i want to print a receipt in the cash journal. However all settings have been maintained in FBCJC3. Can you please suggest any possible s

  • Display query on Web from Query Designer in BI 7.0

    Hi, I am trying to see my report in the web like how I do in BW 3.5. The sytem taking me to the Browser. But the page is not displayed. The normal cannot display HTML page. I think I need to configure BEx broadcaster for this. Can anyone help me on h

  • Two NICS presented to OS, possible to only present one ?

    B200-M1 blades and Menlo CNA. The SPs are using a dynamic vNIC templates with fabric A or B selected and F/O enabled. What we're witnessing is the OS will always be presented with two NIC's.  Depending on which Fabric A/B the SP is set to determins w