Custom screen for vendor master xk01

Hi Experts,
   Any one suggest how to add custom screen with custom fields to transaction XK01. Also i want to display this screen by clicking on some custom button. so that user can enter the custom values and should capable to store this information on custom table.
XK01->vendor details with check box General choosed->Press enter->click on the custom button-> custom screen will display ->provide the values->save this details to custom table.
Thanks in advance.

Look at BAdi : VENDOR_ADD_DATA and VENDOR_ADD_DATA_CS.
Expected result :
Regards,
Raymond

Similar Messages

  • Data not Updated in Custom Screen fields-Vendor Master

    Hello,
    I have created a custom screen in vendor master transaction and also implemented the two BADI's below.
    Business Add-In: Processing Master Data Enhancements
    (CUSTOMER_ADD_DATA/VENDOR_ADD_DATA)
    Passed the Custom Program and Screen No in the method GET_TAXI_SCREEN
    Business Add-In: Customer Subscreens
    (CUSTOMER_ADD_DATA_CS/VENDOR_ADD_DATA_CS)
    activate it with the BADI Processing Master Data Enhancements with method CHECK_ADD_ON_ACTIVE.
    I also created a new screen and used few fields from LFA1 (Append structure fields) such that the fields on the screen are : LFA1-ZZFIELD1 etc...
    Now the issue is the screen is displayed, but the data entered on the screen is not updated on the table LFA1 or data from the table is not displayed on the custom screen.
    Am i missing something?
    Regards,
    Shiva

    Solved this problem.
    I built the query against InfoCube and not the characteristic itself. That's why I can't see the update.
    Thanks.

  • Change Pointers for Vendor Master

    Hi All,
    I have to activate change pointers for Vendor Master data. I have some doubts regarding the same.
    1. An Idoc will be generated for newly created vendor, right?
    2. If I extend the vendor master IDOC, where should I write code to extract the values of newly added fields?
    3. If I create a custom IDOC for vendor master, what is the procedure to configure this in the change pointers for Vendor Master?
    Thanks & Best Regards,
    Kumar.

    >
    Sivapuram Phani Kumar wrote:
    > Hi All,
    >
    > I have to activate change pointers for Vendor Master data. I have some doubts regarding the same.
    >
    > 1. An Idoc will be generated for newly created vendor, right?
    > 2. If I extend the vendor master IDOC, where should I write code to extract the values of newly added fields?
    > 3. If I create a custom IDOC for vendor master, what is the procedure to configure this in the change pointers for Vendor Master?
    >
    > Thanks & Best Regards,
    > Kumar.
    Hi,
    1. Afer doing all the settings required to create change pointers (BD61, BD50, BD52), the idocs will be created when u run the report RBDMIDOC or execute transaction BD21.if any changes happen in master data
    like new vendor is created or vendor data is changed, then only change pointers will be created and on executing the aforesaid report, idocs will be generated.
    Also idocs can be generated by replicating vendor data through transaction BD14 or any other custom transaction.
    2. When you add custom segments to basic type, you have to write code in suitable user exits.
    Identify suitable user exit to populate data in custom segments and write the code in oubound side.
    Identify suitable user exit to populate the values in custom segments to database table, this code is to be written in inbound side.
    Regards
    Vinod

  • Vendor Master (XK01) Screen Exit

    Hi,
    Can you please help me how to add extra screen fields to standard screen i.e.,vendor master (XK01) screen.
    Is there any screen exit for XK01 ? OR
    Is there any BADI'S for XK01 screen exit ?
    Bye
    Praveen.

    I am looking for a way to use the Vendor Maintenance Program SAPMF02K (XK01/XK02/XK03) to update custom LFM2 fields.
    Since there are multiple LFM2 plant(WERKS) Records for a Vendor/Purchasing Org, How can the screen be configured to narrow in on the desired LFM2 record to update? 
    Goal-Have the additional field appear on the SAPMF02K vendor plant purchasing data screen (330) or as separate button on the alternative data plant screen (341).
    Presently I can prompt for the plant and update the existing record, however this is not useful in view mode as the plant field is read only. It also does not look/feel like SAP's XK0x transactions.
    Following SAP Note 580266 I was able to use VENDOR_ADD_DATA and VENDOR_ADD_DATA_CS use the custom screen.

  • LSMW for Vendor Master (t-code XK01)

    Hi guys,
    I'm creating a LSMW for Vendor Master (t-code XK01) using direct input but the following error message appears:
    In the step "Create batch input session", I get the following error:
    FB012 Session 1 : Special character for 'empty field' is /
    FB007 Session 1 session name VENDOR was opened
    FB112 Trans. 1 : No transaction code was transferred
    FB016 ... Last header record ...
    FB014 ... BLF00-STYPE 1
    FB014 ... BLF00-TCODE /
    FB014 ... BLF00-LIFNR DETES998
    FB014 ... BLF00-BUKRS /
    FB014 ... BLF00-EKORG /
    FB014 ... BLF00-KTOKK 0001
    FB013 ....Editing was terminated
    I mapped the TCODE filed using xk01 and the same error still displays; in the first step I select Object 0040, method 0002 and the program is RFBIKR00, is this correct?
    Some of the fields are stored ina different table; How can I mapped this fileds?
    Any you can provide will be great......

    Hi,
    Are you getting this error immediatly or later half?
    1. This could be with same Vendor number which would be existing in the system.
    2. Data inconsistencies.
    What are the flat files that you have is it a single file or more than one?
    Thanks,
    Prashanth

  • I want IDOC for Vendor master updation ( XK01 &XK02 )

    Hi
    I want to do LSMW in IDOC method for this vendor updation.
    So I want IDOC for Vendor master updation ( XK01 & XK02 ).
    I want to do both create vendor and change also.
    Regards,
    Ravi
    Edited by: kandukuri ravi on Dec 1, 2008 2:56 PM

    Hi,
        For Vendor Master using IDoc's for LSMW,Use Message Type = CREMAS and Basic Type = CREMAS05.
    For Basic type 01,02,03...05 are versions which includes more fields in basic type so better use latest version.
    Hope it will help you.
    Regards,
    Sudhakar Reddy.A

  • Working on IDOC OUTBOUND FOR Vendor Master and Customer Master

    Hi Group,
    I need to create IDOC's for Vendor master and customer master using ALE. Whenever they create vendor/customer or changes to vendor/customer should create IDOC's.
    Can anyone please help me out how to proceed? I know that we can use CREMAS/DEBMAS and CREMAS04/CREMAS...But I would like to know how to use those.
    Thank-You,
    Venky

    Hi Sai,
    Welcome to group.
    Related to CREMAS/DEBMAS, for your situation, you can use the change pointers.  With this, when ever there is an change/create, it will create an entry in CDHDR & CDPOS and based on that it will create the IDOCs for these.
    Activate the change pointers for these message types and run the application RBDMIDOC periodically (whenever you want).  This application will create the IDOCs based on your entries.
    To activate the change pointers, the TCODEs are
    BD50 Checking change pointer is activated for Message Type
    BD52 Checking which fields are configured change pointer to create.  (please make sure, an entry will exist in BDCP table)
    I hope you know the remaining configuration related to partner profile entries (WE20) i.e. to which system you want to send the idocs and Inbound or Outbound etc.
    Let me know if you need further info.
    shylesh

  • Need upload program for Vendor master partners (XK02)

    Hello Experts,
    I need to write data uplaod program for XK02 for vendor master Partner functions. ( Basically we created some custom partner functions and attach it to many existing vendors ).
    So kindly advice me which is the suitable upload method for this.
    1) There is no BAPI available for editing vendors.
    2) BDC is not possible because the Vendor partner screen is having table control and some records are already filled. (No of row not fixed).
    Is there any IDOC available or any standard input pgm?
    Please give suggestion.
    Thanks and rgds,
    Anand

    Hi,
    You can use LSMW --> Vendor Master which supports bothe XK01 and XK02.
    This is a standard Batch input program (RFBIKR00). Look at this program documentation for more info.
    Regards
    Sudhir Atluru

  • Need exit to add new fields for Vendor master creation

    Hi All,
            I have to add a new screen with some fields in Vendor master (Xk01) creation. Can any one suggest me
    any screen exit / user exit through which I can add these fields.
           Please explain the procedure to add the fields through exit.This will be of great help.
    Thanks
    Vinod.

    run the following program which ggives available exits for tcode
    REPORT z_find_userexit NO STANDARD PAGE HEADING.
    *&  Enter the transaction code that you want to search through in order
    *&  to find which Standard SAP User Exits exists.
    *& Tables
    TABLES : tstc,     "SAP Transaction Codes
             tadir,    "Directory of Repository Objects
             modsapt,  "SAP Enhancements - Short Texts
             modact,   "Modifications
             trdir,    "System table TRDIR
             tfdir,    "Function Module
             enlfdir,  "Additional Attributes for Function Modules
             tstct.    "Transaction Code Texts
    *& Variables
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : field1(30).
    DATA : v_devclass LIKE tadir-devclass.
    *& Selection Screen Parameters
    SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK a01.
    *& Start of main program
    START-OF-SELECTION.
    Validate Transaction Code
      SELECT SINGLE * FROM tstc
        WHERE tcode EQ p_tcode.
    Find Repository Objects for transaction code
      IF sy-subrc EQ 0.
        SELECT SINGLE * FROM tadir
           WHERE pgmid    = 'R3TR'
             AND object   = 'PROG'
             AND obj_name = tstc-pgmna.
        MOVE : tadir-devclass TO v_devclass.
        IF sy-subrc NE 0.
          SELECT SINGLE * FROM trdir
             WHERE name = tstc-pgmna.
          IF trdir-subc EQ 'F'.
            SELECT SINGLE * FROM tfdir
              WHERE pname = tstc-pgmna.
            SELECT SINGLE * FROM enlfdir
              WHERE funcname = tfdir-funcname.
            SELECT SINGLE * FROM tadir
              WHERE pgmid    = 'R3TR'
                AND object   = 'FUGR'
                AND obj_name = enlfdir-area.
            MOVE : tadir-devclass TO v_devclass.
          ENDIF.
        ENDIF.
    Find SAP Modifactions
        SELECT * FROM tadir
          INTO TABLE jtab
          WHERE pgmid    = 'R3TR'
            AND object   = 'SMOD'
            AND devclass = v_devclass.
        SELECT SINGLE * FROM tstct
          WHERE sprsl EQ sy-langu
            AND tcode EQ p_tcode.
        FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
        WRITE:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        SKIP.
        IF NOT jtab[] IS INITIAL.
          WRITE:/(95) sy-uline.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
          WRITE:/1 sy-vline,
          2 'Exit Name',
          21 sy-vline ,
          22 'Description',
          95 sy-vline.
          WRITE:/(95) sy-uline.
          LOOP AT jtab.
            SELECT SINGLE * FROM modsapt
            WHERE sprsl = sy-langu AND
            name = jtab-obj_name.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
            WRITE:/1 sy-vline,
            2 jtab-obj_name HOTSPOT ON,
            21 sy-vline ,
            22 modsapt-modtext,
            95 sy-vline.
          ENDLOOP.
          WRITE:/(95) sy-uline.
          DESCRIBE TABLE jtab.
          SKIP.
          FORMAT COLOR COL_TOTAL INTENSIFIED ON.
          WRITE:/ 'No of Exits:' , sy-tfill.
        ELSE.
          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
          WRITE:/(95) 'No User Exit exists'.
        ENDIF.
      ELSE.
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        WRITE:/(95) 'Transaction Code Does Not Exist'.
      ENDIF.
    Take the user to SMOD for the Exit that was selected.
    AT LINE-SELECTION.
      GET CURSOR FIELD field1.
      CHECK field1(4) EQ 'JTAB'.
      SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
      CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.

  • Upload program for Vendor master Partner Data in XK02 needed info

    Hello Experts,
    I need to write data uplaod program for XK02 for vendor master Partner functions. ( Basically we created some custom partner functions and attach it to many existing vendors ).
    So kindly advice me which is the suitable upload method for this.
    1) There is no BAPI available for editing vendors.
    2) BDC is not possible because the Vendor partner screen is having table control and some records are already filled. (No of row not fixed).
    Is there any IDOC available or any standard input pgm?
    Please give suggestion.
    Thanks and rgds,
    Anand

    For the IDOC perspective, you can uses CREMAS.
    For the mass maintenance you still have XK99 (which also uses CREMAS internally)
    True there is NO BAPI
    For the BDC and the table control. Well this is not really true.
    In batchinput, instead of maintaining the rows by there Number, you should select it at the first position.
    OK-CODE /06 will open a selection screen SAPMF02K 2324. The result of the selection screen goes to the first line of the table control.
    Of course this works only in BDC
    reward points if helpful
    Edited by: Alain Bacchi  on Jun 18, 2008 8:48 AM

  • What is the bdc program for vendor master?

    what is the bdc program for vendor master?

    Hi,
    Find the code here.
    And do create your text file data in the order of itab structure.
    {report ZBDC_XK01
           no standard page heading line-size 255.
    data: bdcdata like bdcdata occurs 0 with header line.
    data: begin of itab occurs 0,
    lifnr like lfa1-lifnr,
    bukrs like RF02K-bukrs,
    ekorg like RF02K-ekorg,
    ktokk like RF02K-ktokk,
    anred like lfa1-anred,
    name1 like lfa1-name1,
    sortl like lfa1-sortl,
    land1 like lfa1-land1,
    spras like lfa1-spras,
    waers like lfm1-waers,
    end of itab.
    selection-screen begin of block blk1 with frame.
      parameters: p_file like rlgrap-filename OBLIGATORY.
    selection-screen end of block blk1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      perform f4_help_p_file.
    start-of-selection.
      perform get_data.
      perform upload.
    END-OF-SELECTION.
    *&      Form  f4_help_p_file
          text
    -->  p1        text
    <--  p2        text
    form f4_help_p_file .
    data: v_file like p_file.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = v_file.
      CHECK sy-subrc EQ 0.
      p_file = v_file.
    endform.                    " f4_help_p_file
    *&      Form  get_data
          text
    -->  p1        text
    <--  p2        text
    form get_data .
    data: s_file type string.
      s_file = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = s_file
        FILETYPE                      = 'ASC'
        HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
       DAT_MODE                      = 'D'
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      = itab
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    stop.
    ENDIF.
    endform.                    " get_data
    *&      Form  upload
          text
    -->  p1        text
    <--  p2        text
    form upload .
    loop at itab.
    perform bdc_dynpro      using 'SAPMF02K' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-KTOKK'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-LIFNR'  itab-lifnr.
    perform bdc_field       using 'RF02K-BUKRS' '0001'.
    perform bdc_field       using 'RF02K-EKORG'  '1000'.
    perform bdc_field       using 'RF02K-KTOKK' '0001'.
    perform bdc_dynpro      using 'SAPMF02K' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-SPRAS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-ANRED' itab-anred.
    perform bdc_field       using 'LFA1-NAME1' itab-name1.
    perform bdc_field       using 'LFA1-SORTL' itab-sortl.
    perform bdc_field       using 'LFA1-LAND1' itab-land1.
    perform bdc_field       using 'LFA1-SPRAS' itab-spras.
    perform bdc_dynpro      using 'SAPMF02K' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-KUNNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-BANKS(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPMF02K' '0210'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-AKONT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0215'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-ZTERM'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0220'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB5-MAHNA'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0310'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFM1-WAERS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFM1-WAERS' itab-waers.
    perform bdc_dynpro      using 'SAPMF02K' '0320'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-LIFNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    call transaction 'XK01' using bdcdata mode 'A'.
    refresh bdcdata.
    clear itab.
    endloop.
    endform.                    " upload
    *&      Form  bdc_dynpro
          text
         -->P_0126   text
         -->P_0127   text
    form bdc_dynpro  using   program dynpro.
    clear bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      append bdcdata.
    endform.                    " bdc_dynpro
    *&      Form  bdc_field
          text
         -->P_0316   text
         -->P_0317   text
    form bdc_field  using    fnam fval.
    clear bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      append bdcdata.
    endform.                    " bdc_field}
    Reward points if you find it helpful
    Thanks,
    Prasanna

  • Upload program for vendor master

    Hi Friends,
    Could you please help me in this.
    actually i have a program like this:
    i have to download the data from an excel sheet and reformat it and output into a text file so that the data can be uploaded into vendor master using standard progarm
    <b>"RFBIKR00".</b>
    i have written the program like this:
    but in the middle when formatting the data...i'm facing the problem....
    plz help me in solving that...
    thnx very very much...........
    the program i wrote is like this:
    <b>
    tables: lfa1,             
            lfb1,             
            lfm1,             
            lfbk,             
            bnka,             
            bgr00,            
            blf00,            
            blfa1,            
            blfb1,           
            blfbk,           
            blfm1,           
            blfb5,           
            blfbw,           
            blfei,           
            blfza,           
            blflr,           
            blfm2,           
            bwyt3,           
            bwyt1,           
            blfat.           
    *--- Internal table for spread sheet.
    data: t_filedata like alsmex_tabline occurs 0 with header line.
    *--- Internal table for Vendor Master Data in Spread Sheet.
    data: begin of t_sheet occurs 0,
            name1 like lfa1-name1,           "vendor name1
            name2 like lfa1-name2,           "vendor name2
            altkn like lfb1-altkn,           "previous master record number
            bukrs like lfb1-bukrs,           "company code
            ekorg like lfm1-ekorg,           "purchase organization
            ktokk like lfa1-ktokk,           "account group
            stras like lfa1-stras,           "street
            street4 like lfa1-name4,         "street4
            pfach like lfa1-pfach,           "po box
            ort01 like lfa1-ort01,           "city
            regio like lfa1-regio,           "region
            pstlz like lfa1-pstlz,           "postal code
            land1 like lfa1-land1,           "country
            telf1 like lfa1-telf1,           "first telephone number
            telfx like lfa1-telfx,           "first fax number
            stcd1 like lfa1-stcd1,           "fed tax ID#
            brsch like lfa1-brsch,           "commodity code
            akont like lfb1-akont,           "reconciliation account
            mindk like lfb1-mindk,           "monitory indicator
            zwels like lfb1-zwels,           "payment method
            reprf like lfb1-reprf,           "check double invoice
            banka like bnka-banka,           "bank name
            stret like bnka-stras,           "house number and street
            city  like bnka-ort01,           "city
            provz like bnka-provz,           "bank state
            banks like lfbk-banks,           "bank country
            swift like bnka-swift,           "swift code
            bankl like lfbk-bankl,           "aba#
            bankn like lfbk-bankn,           "bank account no
            zterm like lfb1-zterm,           "payment terms
            terms like lfm1-zterm,           "terms of payment key
          end of t_sheet.
    *--- Internal table for Vendor Master data in Text File.
    data: begin of t_file occurs 0,
            s_session type bgr00,
            s_header  type blf00,
            s_blfa1   type blfa1,
            s_blfb1   type blfb1,
            s_blfbk   type blfbk,
            s_blfm1   type blfm1,
            s_blfbk   type blfbk,
            s_blfb5   type blfb5,
            s_blfza   type blfza,
            s_blfm1   type blfm1,
            s_blfat   type blfat,
            s_bwyt1   type bwyt1,
            s_bwyt3   type bwyt3,
            s_blfm2   type blfm2,
            s_blfei   type blfei1,
            s_blfbw   type blfbw,
            s_blflr   type blflr,
         end of t_file.
                       SELECTION SCREEN                          *****
    *---Selection Parameters.
    selection-screen begin of block b1 with frame title title1.
    parameters: p_xlfile like rlgrap-filename.
    parameters: p_txfile type rlgrap-filename.
    selection-screen end of block b1.
                       INITIALIZATION                            *****
    initialization.
    *---Initialize text fields for selection-screen.
      title1 = 'Selection Parameters'.
                       AT SELECTION-SCREEN                       *****
    at selection-screen.
    at selection-screen on p_xlfile.
       perform check_file using p_xlfile.
    at selection-screen on value-request for p_xlfile.
       perform select_file using p_xlfile.
                       START-OF-SELECTION                        *****
    start-of-selection.
       clear t_sheet.
       refresh t_sheet.
    *---Upload Spreadsheet.
       perform read_file using p_xlfile.
    *---Process data into formatted internal table.
       perform format_data.
            append t_file.
         clear t_file.
       endloop.
    *---Download data to Text file.
       perform download_data.
                       TOP-OF-PAGE                               *****
    top-of-page.
       perform top_of_page.
                       S-U-B-R-O-U-T-I-N-E-S                     *****
           Form TOP_OF_PAGE
          Calling the Standard Report Header
    form top_of_page.
       perform header using 'CREATE FILE FOR'
                            'VENDOR MASTER UPLOAD'
                            132.
       skip 2.
    endform.                        "TOP_OF_PAGE
         Form check_file                                              **
         Checking the File entered                                    **
    data: p_filename type string.
    form check_file using p_filename.
    *---The entered File must be Excel spreadsheet.
      data: l_length type i,
            l_ext(4) type c.
      l_length = strlen( p_xlfile ).
      subtract 4 from l_length.
      l_ext = p_xlfile+l_length(4).
      translate l_ext to upper case.
      if l_ext <> '.XLS'.
         message e009 with 'Only Excel spreadsheets are supported'.
      endif.
    *---Check if File exits and not empty.
      data: l_return(10) type c.
      CALL FUNCTION 'WS_QUERY'
           EXPORTING
                FILENAME             = p_filename
                QUERY                = 'FL'
           IMPORTING
                RETURN               = l_return
           EXCEPTIONS
                INV_QUERY            = 1
                NO_BATCH             = 2
                FRONTEND_ERROR       = 3
                OTHERS               = 4
      IF l_return = space or l_return = '0'.
         message e530(pj) with p_filename.
      ENDIF.
    endform.                        "CHECK_FILE
         Form select_file                                              **
    form select_file using p_filename like rlgrap-filename.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
              PROGRAM_NAME        = SYST-REPID
              DYNPRO_NUMBER       = SYST-DYNNR
              FIELD_NAME          = ' '
                STATIC              = 'X'
                MASK                = ',MS Excel (.xls),.xls.'
           CHANGING
                FILE_NAME           = p_filename
           EXCEPTIONS
                MASK_TOO_LONG       = 1
                OTHERS              = 2
    IF SY-SUBRC <> 0.
      MESSAGE e838(29) with p_filename.
    ENDIF.
    endform.                        "SELECT_FILE
         Form read_file                                                **
    form read_file using p_filename like rlgrap-filename.
    *---Display status message for User.
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
           EXPORTING
                TEXT             = 'Uploading Spreadsheet'
    *---Upload spreadsheet.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                FILENAME                      = p_filename
                I_BEGIN_COL                   = 1
                I_BEGIN_ROW                   = 1
                I_END_COL                     = 256
                I_END_ROW                     = 65536
           TABLES
                INTERN                        = t_filedata
           EXCEPTIONS
                INCONSISTENT_PARAMETERS       = 1
                UPLOAD_OLE                    = 2
                OTHERS                        = 3
    IF t_filedata[] is initial.
    message i009 with 'NO DATA FOUND IN FILE' p_filename.
    stop.
    ENDIF.
    sort t_filedata by row col.
    endform.                        "READ_FILE
         Form format_data                                              **
    form format_data.
      data: l_index type i.
      field-symbols: <fs1>.
    *---Display status message for user.
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
           EXPORTING
                TEXT             = ' Processing Data...'
      loop at t_filedata.
        l_index = t_filedata-col.
        assign component l_index of structure t_sheet to <fs1>.
        <fs1> = t_filedata-value.
        at end of row.
           append t_sheet.
           clear t_sheet.
        endat.
      endloop.
        refresh t_filedata.
        free t_filedata.
    endform.                        "FORMAT_DATA
         Form download_data.
    form download_data.
    OPEN DATASET p_txfile for OUTPUT.
      LOOP at t_file.
         TRANSFER t_file to p_txfile.
      ENDLOOP.
    CLOSE DATASET p_txfile.
    IF SY-SUBRC = 0.
      WRITE: / 'Excel to Textfile for Vendor Master Upload: ', P_TXFILE.
    ENDIF.
    endform.                    "DOWNLOAD_DATA</b>

    Hi!
    You don't need to program the 'translation' from a file into input data for RFBIKR00 yourself. SAP has done this, so that you can do this (nearly) without programming. If you need some special conversion rules, then you can add some coding, but most is possible without.
    Have a look at transaction LSMW. It's not so complicated it looks at the first time. Just look at <a href="http://help.sap.com/saphelp_erp2004/helpdata/en/ad/2d54a41d7011d2b42e006094b944c8/frameset.htm">help</a> for the way to use LSMW.
    Regards,
    Christian
    P.S.: sorry for lost your efforts, but you should switch to LSMW

  • Error in the LSMW for vendor master using standard batch/direct input

    I am facing the problem in the LSMW for the Vendor master data. The vendor is initially created for the company code 350 by using LSMW. NOw when I try to uploasd the same vendor using the same LSMW for the company code 450 then I get the error in the Bach input creation as follows:
    Batch Input Interface for Vendors
    FB012                    Session 1 : Special character for 'empty field' is /
    FB007                    Session 1 session name VNDR_CREATE_ was opened
    FB104                    Trans. 2 XK01 : Acct already exists; general area not being processed
    FB125                    ... Data in table BLFA1 cannot be processed
    FB016                    ... Last header record ...
    FB014                    ... BLF00-STYPE 1
    FB014                    ... BLF00-TCODE XK01
    FB014                    ... BLF00-LIFNR 300951
    FB014                    ... BLF00-BUKRS 402
    FB014                    ... BLF00-EKORG /
    FB014                    ... BLF00-KTOKK VEND
    FB017                    ... Last data record ...
    FB014                    ... BLFA1-STYPE 2
    FB014                    ... BLFA1-TBNAM BLFA1
    FB014                    ... BLFA1-ANRED /
    FB014                    ... BLFA1-NAME1 SAVOIE AUTOMATISME DEXIS
    This is because when we use XK01 to create the vendor by using the

    Please check this answered link:
    Re: LSMW for Vendor Master
    LSMW Upload vendor master data
    Edited by: Afshad Irani on May 5, 2010 12:42 PM

  • Solved - Group Fields for Vendor Master Records in IMG

    This was the solution.
    The new field's data element I added to LFB1 did not have the "change document" field checked.  I made that change and now that field shows up in IMG.
    Hello all,
    I added an append structure to the table LFB1.  This structure has 1 field.  I then created a "Modification-Free Enhancement of Vendor Master Record" to add the new LFB1 field to the vendor master screen, edit and display screens.  This is the 3rd time I have done this.  So far so good.
    Now our functional analyst went into IMG to add this new LFB1 field to a "Group Fields for Vendor Master Records" which we have done 2 other times.
    The new LFB1 field does not show up in the list of possible Table-fields.  
    There must be some other step I am missing.
    Does any of this ring a bell?  We are on version 4.7.
    Thanks
    Bruce
    p.s.
    This is the IMG path for adding 'Field Groups' to vendor master fields.
    Financial Accounting/
    Accounts Receivable and Accounts Payable/
    Vendor Accounts/
    Master Data/
    Preparations for Creating Vendor Master Data/
    Group Fields for Vendor Master Records
    Edited by: Bruce Tjosvold on Nov 21, 2008 1:18 PM

    Hi Vandana,
      There are several tables that are contain Vendor Master related data which can be used for extraction to BW. Some of the tables which can be useful for you are:
    LFA1 :  Vendor Master (General Section)
    LFM1 :  Vendor master record purchasing organization data
    LFBW : Vendor master record (withholding tax types) X
    WYT3 :  Partner Functions
    LFBK : Vendor Master (Bank Details)
    LFB1:  Vendor Master (Company Code)
    ADRC: Addresses (Business Address Services)
    ADR3: Fax Numbers (Business Address Services)
    ADR6: SMTP Numbers (Business Address Services)
    ADRT: Communication Data Text (Business Address Services)
    You may use the Data sources mentioned in the previous update from Venky above namely :
    0VENDOR_ATTR --- for master data attributes
    0VENDOR_TEXTS -- For texts
    Since the fields that you are using are from different tables so its better if you go for a Generic Data source where you can use the fields as per your requirement.
    Thanks
    Pawan
    Edited by: pawan190187 on Aug 19, 2011 12:40 PM

  • How to produce an XML file in OAGIS format ( for Vendor Master & Invoices)

    Hi Guys,
    I've requirement to produce an XML file in OAGIS format ( for Vendor Master & Invoices) under Oracle AP and PO.
    Any inputs?
    thanks.

    Not sure,you are looking for inbuild product to produce the OAG XML format, or trying to build custom one.
    If options is Inbuild Product, Oracle Exchange is yeh another product has such kind of capability. Refer this
    http://download-west.oracle.com/docs/cd/A97329_03/web.902/a88894/adx16orx.htm#1007387
    FOr second , check out these two document in metalink
    150083.1 XML Utilities
    123491.1 How To Insert XML Documents Into The Database And Validate Them Using PL/SQL ?
    Hope this will be help

Maybe you are looking for

  • How compile and run a project or package in Unix environment?

    I write an application of java package using Jdeveloper tool. The first statement in each program is "package packgename". How can I compile this project or package in Unix command line? If I compile each program in the package, then error msg will s

  • Can iTunes burn DVDs into our idevices?

    Since burn CDs is a piece of cake but can iTunes burn DVDs into our idevices.

  • Why is my backing up so slow?

    I'm on my computer right now and I'm trying to sync my iPod Touch 8 GB 4G. I always sync my iPod with no problems. I went to sync my iPod one day and i was waiting for 30 mintues and it was still backing up. I logged off my computer and tried again t

  • Error -61 and -43 When Exporting using Quicktime

    I have recently began receiving errors when I try to export using QuickTime. When I try to export to my external hard drive I get an error -61. When I try to export to Documents I get an error -43 These errors began after I had imported a bunch of ho

  • Measures based on Count

    I would like to find out the total number of counts in a table based on a condition (Gender = 'F' or 'M'), I can do this in SQL. I would like to model a simple BMM layer to create two measures 1. Male Count 2. Female Count; but not sure how to do thi