Data upload into infotype 2003

Hiii
   I have a customer requirement to upload flat file containing
below fileds into IT2003
PersNo,
Begindate,
Endate,
Daily work schedule.
currently they are using LSMW.
Can i use Function Module  HR_INFOTYPE_OPERATION'
to upload in to IT2003
Regards,
nazi

Yes. for data which u have for Upload ,U can surely use the FM HR_INFOTYPE_OPERATION
with Operation  options :
COP     Copy
DEL     Delete
DIS     Display
EDQ     Lock/unlock
INS     Create
LIS9     Delimit
MOD     Change
INSS     Create for Actions is not converted to Change
Apart this u will be reqd to Use  BAPI_EMPLOYEE_ENQUEUE : so that the records stored for this
person cannot be accessed.
Once done with operation ,end it with BAPI_EMPLOYEE_DEQUEUE.
Regds,
AS

Similar Messages

  • Data upload in infotype 2006 using LSMW

    Dear gurus,
    I am trying to upload data from  a flat file into infotype 2006 using LSMW can you tell me what the standard t code thorugh which infotype 2006 is populated or can please you please guide me procceding forward .
    Thanks in advance

    Hi,
    Please Have a look at the following Link there is Much more information about using FM: HR INFOTYPE OPERATION. This link is the Result of Search From SCN you can also search like this.
    Because you are new to SDN so always Search Before Posting your Query there are lots of Thread having info about most of the Questions
    [HR INFOTYPE OPERATION|https://www.sdn.sap.com/irj/scn/advancedsearch?query=%22hr_infotype_operation%22&cat=sdn_all]
    Hope will help you to solve out your problem,
    Kind Regards,
    Faisal

  • Master data upload into SAP system

    Hello,
    I want to know if there is any standard method to upload material master, customer master, vendor master and finance master data into SAP system.
    I am not referring to LSMW's, BDC's and using BAPI's. I am aware of standard programs like RMDATIND for material master upload, RFBIDE00 for customer master upload and RFBIKR00 for vendor master upload. But these are using direct input method and SAP recommends this only for testing purpose. I am not sure if this could be really used in actual live scenarios.
    From some other posts in the forum, I came to know about some transactions like BDLR, SXDB and BMVO. Can some one tell me how to use these T.Codes?
    If some one has any detailed documentation on these T.codes or in general standard master data upload techniques please send it to [email protected]
    Thanks in advance,
    CMV

    Hi,
    Define the following attributes, using the F4 input help and F1 field help:
    Report
    Name of a registered program for this program type
    Variant
    You can only specify a variant with programs that are started directly.
    With direct input, data from the data transfer file undergoes the same checks as with the online transaction and is then transferred directly into the SAP System. The database is updated directly with the transferred data.
    For the documentation of other transactions please refer the correponding program documentation..which is more helpful,
    <b>Reward points if helpful,</b>
    Regards,
    jinesh

  • Photo upload into infotype 2

    Hi All,
    After uploading photos into infotype 2, the photos are dipalying in infotype 3, 14, 15 infotype but not in IT0001, IT0002.
    Can anybody help me out?
    Thanx in advance.

    Hi Shiv,
    These are the steps to add photos.
    1) You'll find the customizing settings in :-
    IMG - Personnel management - personnel administration - customizing user interfaces - change screen header.
    Regarding the archiving part you better ask your basis admin to set that up for document type HRICOLFOTO.
    2) Photo in the PA IT0002
    1. Define physical archives using transaction OAC0 Arx. ZZ
    2. Assign objects types & document types to archive & documents tables for Obj PREL , doc.type HRIEMPFOTO,
    Arx. ZZ using transaction OAC3
    3. Define number range using transaction OANR
    4. Using transaction OAC2 define doc.typ & tech doc types for exmpl. HRIEMPFOTO - TIF
    5. Create protocol for Archive link using transactions OAA3 for exmpl. Comm.prot.,version. Generate it will define
    application type from list and so on.
    6. In the table 585O define relevant infotype for object and document type for exmpl. for IT0002
    7. Using transaction OAAD create link for PERNR with relevant infotype & files on the server, which described on the
    first step. 
    Please check this link for reference
    How to upload Employee Photo in HR  Personnel Adminstration
    upload photo to infotypes!!
    http://sapr3.tripod.com/saphr.htm
    <b>***Reward Points if Useful</b>
    Warm Regards
    Gokul

  • Data Upload into PD Module

    Dear All,
    Could anyone please let me know how to upload data into PD module.
    I need to create Upload data for different KRA's.
    Thanks & Regards,
    Satya.

    Hi,
    I am handling PD as whole module in one of my project.
    Can you please tell me what are the various templates for data uploading used in this PD module and for which processes?
    Regards,
    Milind

  • Xml data upload into tables using loader

    Hi,
    I have to load XML file data into multiple tables using sqlloader. i wrote a cotrol file to execute this ,but i was not able to load the data into multiple tables at the same time, first loading table in control file is able to load the data ,rest of the load is giving error,please refer the below control file and log. Help me with your great efforts.
    Have a great day!
    Control file:
    LOAD DATA
    TRUNCATE
    INTO TABLE Derivative_Security
    WHEN DERIVATIVESECURITYID != ' '
    FIELDS TERMINATED BY '</DerivativeSecurity>' optionally enclosed by '"'
    TRAILING NULLCOLS
    DUMMY1 filler char(50000) Terminated by '<DerivativeSecurity ',
    DUMMY2 filler char(200) Terminated by WHITESPACE enclosed by 'FAS157Level="' and '"',
    DUMMY3 filler char(200) Terminated by WHITESPACE enclosed by 'FAS157MVAdjustable="' and '"',
    DUMMY4 filler char(200) Terminated by WHITESPACE enclosed by 'OriginalMV="' and '"',
    DUMMY5 filler char(200) Terminated by WHITESPACE enclosed by 'FAS157MVDelta="' and '"',
    DUMMY6 filler char(200) Terminated by WHITESPACE enclosed by 'FAS157AdjustedMV="' and '"',
    DUMMY7 filler char(200) Terminated by WHITESPACE enclosed by 'PLCurrency="' and '"',
    DERIVATIVESECURITYID Terminated by WHITESPACE enclosed by 'DerivativeSecurityID="' and '"',
    METDERIVATIVEID Terminated by WHITESPACE enclosed by 'MetDerivativeID="' and '"',
    MUREXTRANSNUMBER Terminated by WHITESPACE enclosed by 'MurexTransactionNumber="' and '"',
    DUMMY8 filler char(200) Terminated by WHITESPACE enclosed by 'Trader="' and '"',
    DUMMY9 filler char(200) Terminated by WHITESPACE enclosed by 'BuySell="' and '"',
    DETAILTYPE Terminated by WHITESPACE enclosed by 'DetailType="' and '"',
    DERIVATIVETYPE Terminated by WHITESPACE enclosed by 'DerivativeType="' and '"',
    AL_MANAGEMENTSIDE Terminated by WHITESPACE enclosed by 'AL_ManagementSide="' and '"',
    COUNTERPARTYCODE Terminated by WHITESPACE enclosed by 'CounterpartyCode="' and '"',
    COUNTERPARTYNAME Terminated by WHITESPACE enclosed by 'CounterpartyName="' and '"',
    CURRENCYCODE Terminated by WHITESPACE enclosed by 'CurrencyCode="' and '"',
    DUMMY10 filler char(200) Terminated by WHITESPACE enclosed by 'Coupon="' and '"',
    DUMMY11 filler char(200) Terminated by WHITESPACE enclosed by 'FixedFloatingIndicator="' and '"',
    DUMMY12 filler char(200) Terminated by WHITESPACE enclosed by 'IndexMultiplier="' and '"',
    DUMMY13 filler char(200) Terminated by WHITESPACE enclosed by 'IndexName="' and '"',
    DUMMY42 filler char(200) Terminated by WHITESPACE enclosed by 'Margin="' and '"',
    DUMMY14 filler char(200) Terminated by WHITESPACE enclosed by 'Comment11="' and '"',
    DUMMY15 filler char(200) Terminated by WHITESPACE enclosed by 'Comment12="' and '"',
    DUMMY16 filler char(200) Terminated by WHITESPACE enclosed by 'Comment13="' and '"',
    DUMMY17 filler char(200) Terminated by WHITESPACE enclosed by 'Comment21="' and '"',
    DUMMY18 filler char(200) Terminated by WHITESPACE enclosed by 'Comment22="' and '"',
    DUMMY19 filler char(200) Terminated by WHITESPACE enclosed by 'Comment23="' and '"',
    DUMMY20 filler char(2000) Terminated by WHITESPACE enclosed by 'TradeComment="' and '"',
    DUMMY21 filler char(200) Terminated by WHITESPACE enclosed by 'OptionCallPut="' and '"',
    DUMMY22 filler char(200) Terminated by WHITESPACE enclosed by 'OptionType="' and '"',
    DUMMY23 filler char(200) Terminated by WHITESPACE enclosed by 'SettleType="' and '"',
    DUMMY24 filler char(200) Terminated by WHITESPACE enclosed by 'RefISIN="' and '"',
    DUMMY25 filler char(200) Terminated by WHITESPACE enclosed by 'RefObligation="' and '"',
    DUMMY26 filler char(200) Terminated by WHITESPACE enclosed by 'Sensitivity="' and '"',
    DUMMY27 filler char(200) Terminated by WHITESPACE enclosed by 'EffectiveConvexity="' and '"',
    DUMMY28 filler char(200) Terminated by WHITESPACE enclosed by 'Vega="' and '"',
    DUMMY29 filler char(200) Terminated by WHITESPACE enclosed by 'NextResetDate="' and '"',
    DUMMY30 filler char(200) Terminated by WHITESPACE enclosed by 'LastResetDate="' and '"',
    EFFECTIVEDURATION Terminated by WHITESPACE enclosed by 'EffectiveDuration="' and '"',
    DUMMY31 filler char(200) Terminated by WHITESPACE enclosed by 'Instrument="' and '"',
    DUMMY32 filler char(200) Terminated by WHITESPACE enclosed by 'IssuerCode="' and '"',
    DUMMY33 filler char(200) Terminated by WHITESPACE enclosed by 'IssuerName="' and '"',
    DUMMY34 filler char(200) Terminated by WHITESPACE enclosed by 'IssuerREDCode="' and '"',
    DUMMY35 filler char(200) Terminated by WHITESPACE enclosed by 'Strategy="' and '"',
    DUMMY36 filler char(200) Terminated by WHITESPACE enclosed by 'StrikePrice="' and '"',
    MATURITYDATE Terminated by WHITESPACE enclosed by 'MaturityDate="' and '"',
    DUMMY37 filler char(200) Terminated by WHITESPACE enclosed by 'TickerSymbol="' and '"',
    DUMMY38 filler char(200) Terminated by WHITESPACE enclosed by 'MetPay="' and '"',
    DUMMY39 filler char(200) Terminated by WHITESPACE enclosed by 'MetRec="' and '"',
    DUMMY40 filler char(200) Terminated by WHITESPACE enclosed by 'Payrec="' and '"',
    DUMMY41 filler char(200) Terminated by WHITESPACE enclosed by 'RiskSection="' and '"',
    DUMMY54 filler char(200) Terminated by WHITESPACE enclosed by 'HedgedItem="' and '"',
    DUMMY43 filler char(200) Terminated by WHITESPACE enclosed by 'ResetFrequency="' and '"',
    DUMMY44 filler char(200) Terminated by WHITESPACE enclosed by 'ResetFrequencyNumber="' and '"',
    DUMMY45 filler char(200) Terminated by WHITESPACE enclosed by 'PaymentFrequency="' and '"',
    DUMMY46 filler char(200) Terminated by WHITESPACE enclosed by 'PaymentFrequencyNumber="' and '"',
    DUMMY47 filler char(200) Terminated by WHITESPACE enclosed by 'CapFloorCoupon="' and '"',
    DUMMY48 filler char(200) Terminated by WHITESPACE enclosed by 'RefIndexRate="' and '">',
    DUMMY50 filler char(1000) enclosed by "<Classification=" and "/>",
    DUMMY51 filler char(1000) enclosed by "<Classification=" and "/>",
    DUMMY52 filler char(1000) enclosed by "<Classification=" and "/>",
    DUMMY53 filler char(1000) enclosed by "<Classification=" and "/>"
    INTO TABLE DERIVATIVE_POSITION
    WHEN PORTFOLIOCODE != ' '
    FIELDS TERMINATED BY '</NewDataSet>' optionally enclosed by '"'
    TRAILING NULLCOLS
    DUMMY1 filler char(65000) terminated by '<DerivativePosition ',
    DERIVATIVESECURITYID TERMINATED BY WHITESPACE enclosed by 'DerivativeSecurityID="' and '"',
    PORTFOLIOCODE TERMINATED BY WHITESPACE enclosed by 'PortfolioCode="' and '"',
    LONGSHORTINDICATOR TERMINATED BY WHITESPACE ENCLOSED BY 'LongShortIndicator="' and '"',
    FAS157Level filler char(100) TERMINATED BY WHITESPACE enclosed by 'FAS157Level="' and '"',
    FAS157MVAdjustable filler char(100) TERMINATED BY WHITESPACE enclosed by 'FAS157MVAdjustable="' and '"',
    OriginalMV filler char(100)TERMINATED BY WHITESPACE enclosed by 'OriginalMV="' and '"',
    FAS157MVDelta filler char(100) TERMINATED BY WHITESPACE enclosed by 'FAS157MVDelta="' and '"',
    FAS157AdjustedMV filler char(100)TERMINATED BY WHITESPACE enclosed by 'FAS157AdjustedMV="' and '"',
    CURRENTNOTIONALLOCAL TERMINATED BY WHITESPACE enclosed by 'CurrentNotionalLocal="' and '"',
    CURRENTNOTIONALUSD TERMINATED BY WHITESPACE enclosed by 'CurrentNotionalUSD="' and '"',
    OPENQUANTITY TERMINATED BY WHITESPACE enclosed by 'OpenQuantity="' and '"',
    ORIGINALNOTIONALLOCAL TERMINATED BY WHITESPACE enclosed by 'OriginalNotionalLocal="' and '"',
    ORIGINALNOTIONALUSD TERMINATED BY WHITESPACE enclosed by 'OriginalNotionalUSD="' and '"',
    ORIGINALQUANTITY TERMINATED BY WHITESPACE enclosed by 'OriginalQuantity="' and '"',
    ACCRUEDINTERESTLOCAL TERMINATED BY WHITESPACE enclosed by 'AccruedInterestLocal="' and '"',
    ACCRUEDINTERESTUSD TERMINATED BY WHITESPACE enclosed by 'AccruedInterestUSD="' and '"',
    ACCRUEDINTERESTBASE TERMINATED BY WHITESPACE enclosed by 'AccruedInterestBase="' and '"',
    CLEANMARKETVALUEENDOFDAYLOCAL TERMINATED BY WHITESPACE enclosed by 'CleanMarketValueEndOfDayLocal="' and '"',
    CLEANMARKETVALUEENDOFDAYUSD TERMINATED BY WHITESPACE enclosed by 'CleanMarketValueEndOfDayUSD="' and '"',
    CLEANMARKETVALUEENDOFDAYBASE TERMINATED BY WHITESPACE enclosed by 'CleanMarketValueEndOfDayBase="' and '"',
    DIRTYMARKETVALUEENDOFDAYLOCAL TERMINATED BY WHITESPACE enclosed by 'DirtyMarketValueEndOfDayLocal="' and '"',
    DIRTYMARKETVALUEENDOFDAYUSD TERMINATED BY WHITESPACE enclosed by 'DirtyMarketValueEndOfDayUSD="' and '"',
    PREMIUMLOCAL TERMINATED BY WHITESPACE enclosed by 'PremiumLocal="' and '"',
    PREMIUMUSD TERMINATED BY WHITESPACE enclosed by 'PremiumUSD="' and '"',
    PREMIUMBASE TERMINATED BY WHITESPACE enclosed by 'PremiumBase="' and '"',
    BIDDIES TERMINATED BY WHITESPACE enclosed by 'Biddies="' and '"',
    ADDONEXPOSUREUSD TERMINATED BY WHITESPACE enclosed by 'AddOnExposureUSD="' and '"',
    RegulatoryExposureUSD filler char(100) TERMINATED BY WHITESPACE enclosed by 'RegulatoryExposureUSD="' and '"',
    PARCR01 filler char(100) TERMINATED BY WHITESPACE enclosed by 'PARCR01="' and '"',
    FAS133DESIGNATIONGAAP TERMINATED BY WHITESPACE enclosed by 'FAS133DesignationGAAP="' and '"',
    FAS133DESIGNATIONSTAT TERMINATED BY WHITESPACE enclosed by 'FAS133DesignationSTAT="' and '"',
    TRADEDATE TERMINATED BY WHITESPACE enclosed by 'TradeDate="' and '"',
    EffectiveDate filler char(100) TERMINATED BY WHITESPACE enclosed by 'EffectiveDate="' and '"',
    ALLOCATION TERMINATED BY WHITESPACE enclosed by 'Allocation="' and '"' "round(:ALLOCATION,4)",
    DUMMY36 filler char(100) enclosed by '/' and '>'
    Log:
    Table DERIVATIVE_SECURITY:
    4079 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    28074 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Table DERIVATIVE_POSITION:
    0 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    32153 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 248196 bytes(26 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 32153
    Total logical records rejected: 0
    Total logical records discarded: 28074

    When there are multiple tables in a control file, SQL Loader assumes the data for the first file in the second table immediately follows the last field in the first table. You probably want SQL Loader to start looking for the first column of the second table at the start of the second table. You can do this by using the POSITION clause
    DUMMY51 filler char(1000) enclosed by "<Classification=" and "/>",
    DUMMY52 filler char(1000) enclosed by "<Classification=" and "/>",
    DUMMY53 filler char(1000) enclosed by "<Classification=" and "/>"
    INTO TABLE DERIVATIVE_POSITION
    WHEN PORTFOLIOCODE != ' '
    FIELDS TERMINATED BY '</NewDataSet>' optionally enclosed by '"'
    TRAILING NULLCOLS
    DUMMY1 filler *position(1)* char(65000) terminated by '<DerivativePosition ',
    DERIVATIVESECURITYID TERMINATED BY WHITESPACE enclosed by 'DerivativeSecurityID="' and '"',
    PORTFOLIOCODE TERMINATED BY WHITESPACE enclosed by 'PortfolioCode="' and '"',
    .

  • Hr data upload for Infotypes 14, 17 and 442

    Hi all,
    I need to upload hr data to sap for infotypes 14, 17 and 442. Is there any BAPIs / FMs / Idocs fot this.
    Help will be highly appreciated & rewarded
    Regards,
    Younus

    HI,
    Are you looking for a BAPI or IDOC? what are you going to do with IDOC to upload 14 and 17 Infotypes using PA30?
    Can't you do the same Upload by writing a BDC Program?
    Regards,
    Anji

  • DATA UPLOAD into 5 Different Internal Tables !!!

    Hi ABAPers,
    I have data in 5 different TABS of an Excel Sheet.
    I have to UPLOAD this data in these different TABS to 5 different Internal tables.
    Can any one give me a solution to this ???

    take data from all internal tabels into final internal table.....and proceed in below way......
    fill ur inetnal table and call call the below form DOWNLOAD_TO_EXCEL, This Form is displaying an internal table it_outtab
    Move data from it_outtab to it_excel
    it_excel will contain all the charecter fields
    DATA : BEGIN OF IT_EXCEL OCCURS 0,
    FLD1(32),
    FLD2(32),
    FLD3(32),
    FLD4(32),
    FLD5(32),
    FLD6(32),
    FLD7(32),
    FLD8(32),
    FLD9(32),
    FLD10(32),
    FLD11(32),
    FLD12(32),
    FLD13(32),
    FLD14(32),
    FLD15(32),
    FLD16(32),
    FLD17(32),
    FLD18(32),
    FLD19(32),
    FLD20(32),
    FLD21(32),
    END OF IT_EXCEL.
    FORM DOWNLOAD_TO_EXCEL.
    PERFORM GET_FILE_NAME .
    CLEAR IT_EXCEL.
    REFRESH IT_EXCEL.
    IF NOT FNAME IS INITIAL .
    PERFORM POPULATE_HEADER_DETAIL.
    LOOP AT IT_OUTTAB.
    IT_EXCEL-FLD1 = IT_OUTTAB-BANFN.
    IT_EXCEL-FLD2 = IT_OUTTAB-BNFPO.
    IT_EXCEL-FLD3 = IT_OUTTAB-EBELN.
    IT_EXCEL-FLD4 = IT_OUTTAB-EBELP.
    IT_EXCEL-FLD5 = IT_OUTTAB-STYLE.
    IT_EXCEL-FLD6 = IT_OUTTAB-SKU.
    IT_EXCEL-FLD7 = IT_OUTTAB-LP_COLOR.
    IT_EXCEL-FLD8 = IT_OUTTAB-MAKTX.
    IT_EXCEL-FLD9 = IT_OUTTAB-CURR_PRICE.
    IF NOT IT_OUTTAB-VALID_FROM IS INITIAL.
    CONCATENATE IT_OUTTAB-VALID_FROM+4(2) '/'
    IT_OUTTAB-VALID_FROM+6(2) '/'
    IT_OUTTAB-VALID_FROM(4) INTO IT_EXCEL-FLD10.
    ENDIF.
    IF NOT IT_OUTTAB-VALID_TO IS INITIAL.
    CONCATENATE IT_OUTTAB-VALID_TO+4(2) '/'
    IT_OUTTAB-VALID_TO+6(2) '/'
    IT_OUTTAB-VALID_TO(4) INTO IT_EXCEL-FLD11.
    ENDIF.
    IT_EXCEL-FLD12 = IT_OUTTAB-FUT_PRICE.
    IT_EXCEL-FLD13 = IT_OUTTAB-FAC_PRICE.
    IF NOT IT_OUTTAB-FAC_VALID_FROM IS INITIAL.
    CONCATENATE IT_OUTTAB-FAC_VALID_FROM+4(2) '/'
    IT_OUTTAB-FAC_VALID_FROM+6(2) '/'
    IT_OUTTAB-FAC_VALID_FROM(4) INTO IT_EXCEL-FLD14.
    ENDIF.
    IF NOT IT_OUTTAB-FAC_VALID_TO IS INITIAL.
    CONCATENATE IT_OUTTAB-FAC_VALID_TO+4(2) '/'
    IT_OUTTAB-FAC_VALID_TO+6(2) '/'
    IT_OUTTAB-FAC_VALID_TO(4) INTO IT_EXCEL-FLD15.
    ENDIF.
    IT_EXCEL-FLD16 = IT_OUTTAB-JPN_PRICE.
    IT_EXCEL-FLD17 = IT_OUTTAB-EAN11_1.
    IT_EXCEL-FLD18 = IT_OUTTAB-EAN11_2.
    IT_EXCEL-FLD19 = IT_OUTTAB-HANG_TAG_STAT.
    IT_EXCEL-FLD20 = IT_OUTTAB-LABEL_STAT.
    IT_EXCEL-FLD21 = IT_OUTTAB-CJI_STAT.
    APPEND IT_EXCEL.
    CLEAR IT_EXCEL.
    ENDLOOP.
    CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
    EXPORTING
    CHECK_VERSION = ' '
    DATA_NAME = FNAME
    DATA_PATH_FLAG = ''
    DATA_TYPE = 'DAT'
    DATA_BIN_FILE_SIZE =
    MACRO_NAME = ' '
    MACRO_PATH_FLAG = 'E'
    FORCE_START = ' '
    WAIT = ''
    IMPORTING
    WINID =
    TABLES
    DATA_TAB = IT_EXCEL
    EXCEPTIONS
    NO_BATCH = 1
    EXCEL_NOT_INSTALLED = 2
    WRONG_VERSION = 3
    INTERNAL_ERROR = 4
    INVALID_TYPE = 5
    CANCELLED = 6
    DOWNLOAD_ERROR = 7
    OTHERS = 8
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDIF .
    ENDFORM. " DOWNLOAD_TO_EXCEL
    FORM GET_FILE_NAME.
    DATA: TMP_FILENAME LIKE RLGRAP-FILENAME,
    GLOBAL_FILEMASK_ALL(80),
    GLOBAL_FILEMASK_MASK(20), GLOBAL_FILEMASK_TEXT(20),
    GLOBAL_DOWNLOAD_PATH LIKE RLGRAP-FILENAME,
    DEF_PATH LIKE RLGRAP-FILENAME,
    FIELDLN TYPE I,
    MODE TYPE C,
    TMP_MASK LIKE GLOBAL_FILEMASK_ALL.
    FIELD-SYMBOLS: .
    IF GLOBAL_FILEMASK_MASK IS INITIAL.
    TMP_MASK = ',.,..'.
    ELSE.
    TMP_MASK = ','.
    WRITE GLOBAL_FILEMASK_TEXT TO TMP_MASK+1.
    WRITE ',' TO TMP_MASK+21.
    WRITE GLOBAL_FILEMASK_MASK TO TMP_MASK+22.
    WRITE '.' TO TMP_MASK+42.
    CONDENSE TMP_MASK NO-GAPS.
    ENDIF.
    IF NOT GLOBAL_FILEMASK_ALL IS INITIAL.
    TMP_MASK = GLOBAL_FILEMASK_ALL.
    ENDIF.
    FIELDLN = STRLEN( DEF_PATH ) - 1.
    ASSIGN DEF_PATH+FIELDLN(1) TO .
    ENDIF.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    DEF_FILENAME = FNAME "rlgrap-filename
    DEF_PATH = DEF_PATH
    MASK = TMP_MASK
    MODE = MODE
    TITLE = ' '
    IMPORTING
    FILENAME = FNAME
    RC =
    EXCEPTIONS
    INV_WINSYS = 01
    NO_BATCH = 02
    SELECTION_CANCEL = 03
    SELECTION_ERROR = 04.
    IF SY-SUBRC = 0.
    FNAME = TMP_FILENAME.
    ELSE.
    ENDIF.
    ENDFORM. " GET_FILE_NAME
    FORM POPULATE_HEADER_DETAIL.
    IT_EXCEL-FLD8 = 'S U D H E E R'.
    APPEND IT_EXCEL.
    CLEAR IT_EXCEL.
    IT_EXCEL-FLD1 = 'Price Validation Report'.
    IT_EXCEL-FLD14 = 'Page'.
    APPEND IT_EXCEL.
    CLEAR IT_EXCEL.
    IT_EXCEL-FLD1 = 'Vendor Number/Name'.
    IT_EXCEL-FLD3 = 'Plan Month'.
    IT_EXCEL-FLD4 = 'Effective In-store-Date'.
    APPEND IT_EXCEL.
    CLEAR IT_EXCEL.
    IT_EXCEL-FLD1 = VENDOR_NAME.
    IT_EXCEL-FLD3 = P_BEDNR.
    IT_EXCEL-FLD4 = P_EFF_DT.
    APPEND IT_EXCEL.
    CLEAR IT_EXCEL.
    sudheer start
    APPEND IT_EXCEL.
    IT_EXCEL-FLD1 = 'PR'.
    IT_EXCEL-FLD2 = 'Line'.
    IT_EXCEL-FLD3 = 'PO'.
    IT_EXCEL-FLD4 = 'PO Line'.
    IT_EXCEL-FLD5 = 'Style'.
    IT_EXCEL-FLD6 = 'SKU'.
    IT_EXCEL-FLD7 = 'Long Color'.
    IT_EXCEL-FLD8 = 'Material Description'.
    IT_EXCEL-FLD9 = 'Current Price'.
    IT_EXCEL-FLD10 = 'validity'.
    IT_EXCEL-FLD11 = 'Period'.
    IT_EXCEL-FLD12 = 'Future Price'.
    IT_EXCEL-FLD13 = 'Factory Price'.
    IT_EXCEL-FLD14 = 'Validity'.
    IT_EXCEL-FLD15 = 'Period'.
    IT_EXCEL-FLD16 = 'Japan Price'.
    IT_EXCEL-FLD17 = 'First UPC'.
    IT_EXCEL-FLD18 = 'Factory UPC'.
    IT_EXCEL-FLD19 = 'Hang Tag Status'.
    IT_EXCEL-FLD20 = 'Label Status'.
    IT_EXCEL-FLD21 = 'CJI Label Status'.
    *sudheer end
    APPEND IT_EXCEL.
    CLEAR IT_EXCEL.
    ENDFORM. " POPULATE_HEADER_DETAIL
    Check these links for sample code :
    http://www.sapdevelopment.co.uk/ms/ms_excel.htm
    please check this example:
    FORM download.
    DATA: lh_file1 TYPE rlgrap-filename,
    lh_file2 TYPE rlgrap-filename,
    lh_file3 TYPE rlgrap-filename,
    lh_datda(1).
    CLEAR: lh_file1, lh_file2, lh_file3.
    Download neue Daten
    CONCATENATE xh_pfad 'Datafile materialmaster new ' sy-datum(4)
    sy-datum4(2) sy-datum6(2) sy-uzeit '.xls' INTO lh_file1.
    working area
    DATA: index TYPE i,
    lh_col TYPE i.
    FIELD-SYMBOLS: .
    SORT xt_bmm00 BY matnr.
    SORT xt_bmmh1 BY matnr.
    SORT xt_bmmh4 BY matnr.
    SORT xt_bmmh7 BY matnr.
    IF NOT xt_bmm00[] IS INITIAL.
    MOVE 'X' TO lh_datda.
    DO 4 TIMES.
    CASE sy-index.
    WHEN 1.
    CREATE OBJECT lh_excel 'EXCEL.APPLICATION' .
    SET PROPERTY OF lh_excel 'Visible' = 1 .
    GET PROPERTY OF lh_excel 'Workbooks' = lh_workbooks .
    GET PROPERTY OF lh_workbooks 'Application' = lh_application .
    SET PROPERTY OF lh_application 'SheetsInNewWorkbook' = 1 .
    CALL METHOD OF lh_workbooks 'Add' = lh_workbook .
    CALL METHOD OF lh_workbook 'Sheets' = lh_sheets .
    CALL METHOD OF lh_sheets 'Item' = lh_sheet
    EXPORTING #1 = sy-index .
    SET PROPERTY OF lh_sheet 'NAME' = 'BMMH7'.
    Überschrift erstellen
    CLEAR xt_ftab.
    REFRESH xt_ftab.
    CALL FUNCTION 'GET_FIELDTAB'
    EXPORTING
    langu = sy-langu
    tabname = '/SIE/TS_MM01S005'
    withtext = ' '
    only = 'T'
    TABLES
    fieldtab = xt_ftab
    EXCEPTIONS
    OTHERS = 1.
    CLEAR lh_col.
    LOOP AT xt_ftab.
    ADD 1 TO lh_col.
    PERFORM fill_cell
    USING 1 lh_col xt_ftab-fieldname lh_excel lh_cells.
    ENDLOOP.
    LOOP AT xt_bmmh7.
    index = sy-tabix + 1.
    DO 4 TIMES.
    ASSIGN COMPONENT sy-index OF STRUCTURE xt_bmmh7 TO  lh_excel lh_cells.
    ENDIF.
    ENDDO.
    ENDLOOP.
    WHEN 2.
    GET PROPERTY OF lh_workbook 'Sheets' = lh_sheets .
    CALL METHOD OF lh_sheets 'Add' = lh_newsheet .
    SET PROPERTY OF lh_newsheet 'Name' = 'BMMH4'.
    CALL METHOD OF lh_excel 'WorkSheets' = lh_activesheet
    EXPORTING #1 = 'BMMH4'.
    CALL METHOD OF lh_activesheet 'Activate' .
    Überschrift erstellen
    CLEAR xt_ftab.
    REFRESH xt_ftab.
    CALL FUNCTION 'GET_FIELDTAB'
    EXPORTING
    langu = sy-langu
    tabname = '/SIE/TS_MM01S004'
    withtext = ' '
    only = 'T'
    TABLES
    fieldtab = xt_ftab
    EXCEPTIONS
    OTHERS = 1.
    CLEAR lh_col.
    LOOP AT xt_ftab.
    ADD 1 TO lh_col.
    PERFORM fill_cell
    USING 1 lh_col xt_ftab-fieldname lh_excel lh_cells.
    ENDLOOP.
    LOOP AT xt_bmmh4.
    index = sy-tabix + 1.
    DO 4 TIMES.
    ASSIGN COMPONENT sy-index OF STRUCTURE xt_bmmh4 TO  lh_excel lh_cells.
    ENDIF.
    ENDDO.
    ENDLOOP.
    WHEN 3.
    GET PROPERTY OF lh_workbook 'Sheets' = lh_sheets .
    CALL METHOD OF lh_sheets 'Add' = lh_newsheet .
    SET PROPERTY OF lh_newsheet 'Name' = 'BMMH1'.
    CALL METHOD OF lh_excel 'WorkSheets' = lh_activesheet
    EXPORTING #1 = 'BMMH1'.
    CALL METHOD OF lh_activesheet 'Activate' .
    Überschrift erstellen
    CLEAR xt_ftab.
    REFRESH xt_ftab.
    CALL FUNCTION 'GET_FIELDTAB'
    EXPORTING
    langu = sy-langu
    tabname = '/SIE/TS_MM01S003'
    withtext = ' '
    only = 'T'
    TABLES
    fieldtab = xt_ftab
    EXCEPTIONS
    OTHERS = 1.
    CLEAR lh_col.
    LOOP AT xt_ftab.
    Die folgende Abfrage ist notwendig, weil der Namensraum ZZ...
    in der Struktur nicht erlaubt ist, aber im Excel-Sheet als
    Überschrift gebraucht wird.
    IF xt_ftab-fieldname = 'SPIRIDON'.
    MOVE 'ZZSSN' TO xt_ftab-fieldname.
    ENDIF.
    ADD 1 TO lh_col.
    PERFORM fill_cell
    USING 1 lh_col xt_ftab-fieldname lh_excel lh_cells.
    ENDLOOP.
    LOOP AT xt_bmmh1.
    index = sy-tabix + 1.
    DO 72 TIMES.
    ASSIGN COMPONENT sy-index OF STRUCTURE xt_bmmh1 TO  lh_excel lh_cells.
    ENDIF.
    ENDDO.
    ENDLOOP.
    WHEN 4.
    GET PROPERTY OF lh_workbook 'Sheets' = lh_sheets .
    CALL METHOD OF lh_sheets 'Add' = lh_newsheet .
    SET PROPERTY OF lh_newsheet 'Name' = 'BMM00'.
    CALL METHOD OF lh_excel 'WorkSheets' = lh_activesheet
    EXPORTING #1 = 'BMM00'.
    CALL METHOD OF lh_activesheet 'Activate' .
    Überschrift erstellen
    CLEAR xt_ftab.
    REFRESH xt_ftab.
    CALL FUNCTION 'GET_FIELDTAB'
    EXPORTING
    langu = sy-langu
    tabname = '/SIE/TS_MM01S002'
    withtext = ' '
    only = 'T'
    TABLES
    fieldtab = xt_ftab
    EXCEPTIONS
    OTHERS = 1.
    CLEAR lh_col.
    LOOP AT xt_ftab.
    ADD 1 TO lh_col.
    PERFORM fill_cell
    USING 1 lh_col xt_ftab-fieldname lh_excel lh_cells.
    ENDLOOP.
    LOOP AT xt_bmm00.
    index = sy-tabix + 1.
    DO 21 TIMES.
    ASSIGN COMPONENT sy-index OF STRUCTURE xt_bmm00 TO  lh_excel lh_cells.
    ENDIF.
    ENDDO.
    ENDLOOP.
    ENDCASE.
    ENDDO.
    CALL METHOD OF lh_workbook 'SAVEAS'
    EXPORTING #1 = lh_file1.
    CALL METHOD OF lh_excel 'QUIT'.
    FREE OBJECT: lh_cells, lh_sheet, lh_sheets, lh_application,
    lh_workbook, lh_workbooks, lh_excel,
    lh_chart, lh_activesheet.
    ENDIF.
    Download geänderter Materialstammdaten
    CONCATENATE xh_pfad 'Datafile materialmaster change ' sy-datum(4)
    sy-datum4(2) sy-datum6(2) sy-uzeit '.xls' INTO lh_file2.
    IF NOT xt_emmh1[] IS INITIAL.
    MOVE 'X' TO lh_datda.
    DO 2 TIMES.
    CALL METHOD OF lh_sheets 'Item' = lh_sheet
    EXPORTING #1 = sy-index .
    CASE sy-index.
    WHEN 1.
    CREATE OBJECT lh_excel 'EXCEL.APPLICATION' .
    SET PROPERTY OF lh_excel 'Visible' = 1 .
    GET PROPERTY OF lh_excel 'Workbooks' = lh_workbooks .
    GET PROPERTY OF lh_workbooks 'Application' = lh_application .
    SET PROPERTY OF lh_application 'SheetsInNewWorkbook' = 1 .
    CALL METHOD OF lh_workbooks 'Add' = lh_workbook .
    CALL METHOD OF lh_workbook 'Sheets' = lh_sheets .
    CALL METHOD OF lh_sheets 'Item' = lh_sheet
    EXPORTING #1 = sy-index .
    SET PROPERTY OF lh_sheet 'NAME' = 'BMMH7'.
    Überschrift erstellen
    CLEAR xt_ftab.
    REFRESH xt_ftab.
    CALL FUNCTION 'GET_FIELDTAB'
    EXPORTING
    langu = sy-langu
    tabname = '/SIE/TS_MM01S005'
    withtext = ' '
    only = 'T'
    TABLES
    fieldtab = xt_ftab
    EXCEPTIONS
    OTHERS = 1.
    CLEAR lh_col.
    LOOP AT xt_ftab.
    ADD 1 TO lh_col.
    PERFORM fill_cell
    USING 1 lh_col xt_ftab-fieldname lh_excel lh_cells.
    ENDLOOP.
    LOOP AT xt_emmh7.
    index = sy-tabix + 1.
    DO 4 TIMES.
    ASSIGN COMPONENT sy-index OF STRUCTURE xt_emmh7 TO  lh_excel lh_cells.
    ENDIF.
    ENDDO.
    ENDLOOP.
    WHEN 2.
    GET PROPERTY OF lh_workbook 'Sheets' = lh_sheets .
    CALL METHOD OF lh_sheets 'Add' = lh_newsheet .
    SET PROPERTY OF lh_newsheet 'Name' = 'BMMH1'.
    CALL METHOD OF lh_excel 'WorkSheets' = lh_activesheet
    EXPORTING #1 = 'BMMH1'.
    CALL METHOD OF lh_activesheet 'Activate' .
    Überschrift erstellen
    CLEAR xt_ftab.
    REFRESH xt_ftab.
    CALL FUNCTION 'GET_FIELDTAB'
    EXPORTING
    langu = sy-langu
    tabname = '/SIE/TS_MM01S003'
    withtext = ' '
    only = 'T'
    TABLES
    fieldtab = xt_ftab
    EXCEPTIONS
    OTHERS = 1.
    CLEAR lh_col.
    LOOP AT xt_ftab.
    Die folgende Abfrage ist notwendig, weil der Namensraum ZZ...
    in der Struktur nicht erlaubt ist, aber im Excel-Sheet als
    Überschrift gebraucht wird.
    IF xt_ftab-fieldname = 'SPIRIDON'.
    MOVE 'ZZSSN' TO xt_ftab-fieldname.
    ENDIF.
    ADD 1 TO lh_col.
    PERFORM fill_cell
    USING 1 lh_col xt_ftab-fieldname lh_excel lh_cells.
    ENDLOOP.
    LOOP AT xt_emmh1.
    index = sy-tabix + 1.
    DO 72 TIMES.
    ASSIGN COMPONENT sy-index OF STRUCTURE xt_emmh1 TO  lh_excel lh_cells.
    ENDIF.
    ENDDO.
    ENDLOOP.
    ENDCASE.
    ENDDO.
    CALL METHOD OF lh_workbook 'SAVEAS'
    EXPORTING #1 = lh_file2.
    CALL METHOD OF lh_excel 'QUIT'.
    FREE OBJECT: lh_cells, lh_sheet, lh_sheets, lh_application,
    lh_workbook, lh_workbooks, lh_excel,
    lh_chart, lh_activesheet.
    ENDIF.
    Download geänderter Texte
    CONCATENATE xh_pfad 'Datafile materialmaster change PO ' sy-datum(4)
    sy-datum4(2) sy-datum6(2) sy-uzeit '.xls' INTO lh_file3.
    IF NOT xt_tmmh7[] IS INITIAL.
    CLEAR: lh_cells, lh_sheet, lh_sheets, lh_application,
    lh_workbook, lh_workbooks, lh_excel,
    lh_chart, lh_activesheet.
    MOVE 'X' TO lh_datda.
    CREATE OBJECT lh_excel 'EXCEL.APPLICATION' .
    SET PROPERTY OF lh_excel 'Visible' = 1 .
    GET PROPERTY OF lh_excel 'Workbooks' = lh_workbooks .
    GET PROPERTY OF lh_workbooks 'Application' = lh_application .
    SET PROPERTY OF lh_application 'SheetsInNewWorkbook' = 1 .
    CALL METHOD OF lh_workbooks 'Add' = lh_workbook .
    CALL METHOD OF lh_workbook 'Sheets' = lh_sheets .
    CALL METHOD OF lh_sheets 'Item' = lh_sheet
    EXPORTING #1 = 1 .
    SET PROPERTY OF lh_sheet 'NAME' = 'BMMH7'.
    Überschrift erstellen
    CLEAR xt_ftab.
    REFRESH xt_ftab.
    CALL FUNCTION 'GET_FIELDTAB'
    EXPORTING
    langu = sy-langu
    tabname = '/SIE/TS_MM01S005'
    withtext = ' '
    only = 'T'
    TABLES
    fieldtab = xt_ftab
    EXCEPTIONS
    OTHERS = 1.
    CLEAR lh_col.
    LOOP AT xt_ftab.
    ADD 1 TO lh_col.
    PERFORM fill_cell
    USING 1 lh_col xt_ftab-fieldname lh_excel lh_cells.
    ENDLOOP.
    LOOP AT xt_tmmh7.
    index = sy-tabix + 1.
    DO 4 TIMES.
    ASSIGN COMPONENT sy-index OF STRUCTURE xt_tmmh7 TO  lh_excel lh_cells.
    ENDIF.
    ENDDO.
    ENDLOOP.
    CALL METHOD OF lh_workbook 'SAVEAS'
    EXPORTING #1 = lh_file3.
    CALL METHOD OF lh_excel 'QUIT'.
    FREE OBJECT: lh_cells, lh_sheet, lh_sheets, lh_application,
    lh_workbook, lh_workbooks, lh_excel,
    lh_chart, lh_activesheet.
    ENDIF.
    IF lh_datda NE 'X'.
    MESSAGE i016.
    ENDIF.
    ENDFORM. " download
    FORM fill_cell USING p_i
    value
    p_customer_cell1
    h_excel
    h_cells.
    CALL METHOD OF h_excel 'Cells' = h_cells EXPORTING #1 = p_i #2 = value.
    SET PROPERTY OF lh_cells 'Numberformat' = '@'.
    SET PROPERTY OF h_cells 'Value' = p_customer_cell1.
    ENDFORM. " fill_cell

  • Data Upload into SAP from Microsoft Excel

    Hi Guys: I created a function module from a BDC program and made it RFC enabled. When I execute this in SAP, it works fine and creates a customer. But when I try to trigger it from Excel, it gives me the error “Object Variable or With Block Variable not set”.  Please HELP!...
    Here is my VB code
    Option Explicit
    ' Declaration for the necessary objects
    Dim objBAPICortrol, objConnection, objCreateCustomer, objAcctGr, objCoCode, objReturn As Object
    Dim objSalesOrg, objDistCh, objDiv, objName, objStreet, objPostalCode, objCity, objRegion, objCountry As Object
    Dim objCountycode, objCityCode, objReconAcnt, objPaymentHist, objCustPrPro, objCustStGrp, objIncoTerms, objSDPayTerms, objAcntAssGrp, objTaxClass As Object
    Dim vLastRow, vRows As Integer
    Private Sub CommandButton2_Click()
    ' Create an Email in Outlook
    Application.Dialogs(xlDialogSendMail).Show
    End Sub
    Private Sub CommandButton3_Click()
    ' Getting the last filled Row in Column A
    vLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    ' Setting the necessary variables for R/3 connection
    Set objBAPICortrol = CreateObject("SAP.Functions")
    Set objConnection = objBAPICortrol.connection
    ' Establish a connection
    If objConnection.Logon(0, False) Then
        MsgBox "Connection Established"
    End If
    On Error Resume Next
    ' Assign the Parameters
    Set objCreateCustomer = objBAPICortrol.Add("Z_RFC_CUSTOMER_CREATE_XLS")
    Set objAcctGr = objCreateCustomer.Exports("KTOKD_005")
    Set objCoCode = objCreateCustomer.Exports("BUKRS_001")
    Set objSalesOrg = objCreateCustomer.Exports("VKORG_002")
    Set objDistCh = objCreateCustomer.Exports("VTWEG_003")
    Set objDiv = objCreateCustomer.Exports("SPART_004")
    Set objName = objCreateCustomer.Exports("NAME1_006")
    Set objStreet = objCreateCustomer.Exports("STRAS_007")
    'Set objHouseNumber = objCreateCustomer.Exports("House Number")
    Set objPostalCode = objCreateCustomer.Exports("PSTLZ_009")
    Set objCity = objCreateCustomer.Exports("ORT01_008")
    Set objRegion = objCreateCustomer.Exports("REGIO_011")
    Set objCountry = objCreateCustomer.Exports("LAND1_010")
    Set objCountycode = objCreateCustomer.Exports("COUNC_013")
    'Set objPhone = objCreateCustomer.Exports("Phone")
    'Set objContact = objCreateCustomer.Exports("Contact")
    'Set objFax = objCreateCustomer.Exports("Fax")
    'Set objEmail = objCreateCustomer.Exports("Email")
    'Set objDirections = objCreateCustomer.Exports("Directions")
    Set objCityCode = objCreateCustomer.Exports("CITYC_014")
    Set objReconAcnt = objCreateCustomer.Exports("AKONT_015")
    Set objPaymentHist = objCreateCustomer.Exports("XZVER_017")
    Set objCustPrPro = objCreateCustomer.Exports("KALKS_019")
    Set objCustStGrp = objCreateCustomer.Exports("VERSG_020")
    Set objIncoTerms = objCreateCustomer.Exports("INCO1_021")
    Set objSDPayTerms = objCreateCustomer.Exports("ZTERM_023")
    Set objAcntAssGrp = objCreateCustomer.Exports("KTGRD_024")
    Set objTaxClass = objCreateCustomer.Exports("TAXKD_01_025")
    ' Now looping through all values create customer
    ' The data begin row is set to 2
    For vRows = 2 To vLastRow
    ' Set the Parameter Values
    objAcctGr.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 1).Value
    objCoCode.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 2).Value
    objSalesOrg.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 3).Value
    objDistCh.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 4).Value
    objDiv.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 5).Value
    objName.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 6).Value
    objStreet.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 7).Value
    'objHouseNumber.value = ThisWorkbook.ActiveSheet.Cells(vRows, 8).Value
    objPostalCode.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 9).Value
    objCity.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 10).Value
    objRegion.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 11).Value
    objCountry.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 12).Value
    objCountycode.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 13).Value
    'objPhone.value = ThisWorkbook.ActiveSheet.Cells(vRows, 14).Value
    'objContact.value = ThisWorkbook.ActiveSheet.Cells(vRows, 15).Value
    'objFax.value = ThisWorkbook.ActiveSheet.Cells(vRows, 16).Value
    'objEmail.value = ThisWorkbook.ActiveSheet.Cells(vRows, 17).Value
    'objDirections.value = ThisWorkbook.ActiveSheet.Cells(vRows, 18).Value
    objCityCode.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 19).Value
    objReconAcnt.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 20).Value
    objPaymentHist.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 21).Value
    objCustPrPro.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 22).Value
    objCustStGrp.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 23).Value
    objIncoTerms.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 24).Value
    objSDPayTerms.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 25).Value
    objAcntAssGrp.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 26).Value
    objTaxClass.Value = ThisWorkbook.ActiveSheet.Cells(vRows, 27).Value
    ' Function call
    objCreateCustomer.call
    ' Get return parameters & display in excel
    Set objReturn = objCreateCustomer.Imports("RETURN")
    ActiveSheet.Cells((vLastRow + vRows), 1) = objReturn.Value("MESSAGE")
    ' Error handling
    If Err Then
        MsgBox Err.Description
    End If
    Next vRows
    End Sub

    Hello,
    Whatz impossible ??
    Yes you can export the data from excel to SAP using VBA, but you need to create fome RFC in SAP as well that will handle the data you will send.
    1. Create a RFC function in R/3 that will read a file from specific location and perform the respective transaction.
    2. Create your excel file with respective file format and call the RFC function in SAP passing the parameters as file name and other required details.
    3. SAP coding for RFC will be a single time activity and then onwads you can just create excel file for upload and use VBA code to initiate the RFC call.
    Hope this make some sence. Tell me if you have more queries.
    Regards,
    Vishal
    Reward points.. if helpful

  • SPP: Demand Data uploaded into cube but not visible in screen

    Hi,
    I am working on SCM 5.0 in a test environment.
    I had loaded the sample test data using csv file. The data is visibile in the both multiprovders.
    9ARAWMUL AND 9ADEMMUL( in txn rsa1)
    Also in the transaction : /sapapo/sppdmrd- i can see the raw data history
    But for the same selection paramter i cannot see any data in sapapo/sppdmdh- adjust demand history.
    Can somebody help?
    Regards,
    RM

    Hi Nithi,
    Did you checked in Listcube  if data is available for that plant.
    Also try running the querry in RSRT and check whether you are using any querry variable for it.
    Please check in querry designer if you have any exclude selection for the plant.
    Hope this Helps,
    Thanks,
    Amit Kr.

  • BOM Data upload

    Hi,
      We plan to create new fields in the BOM header through INCLUDE structure CI_STKO and do a data upload into these fields through LSMW. However, the issue is that CI_STKO structure is not included in the BI structure BICSK used in LSMW, hence the fields added to the BOM header through CI_STKO cannot be loaded through LSMW.
    This works fine at the item level - since CI_STPO is included in BICSP.
    Can anyone let me know if they have faced similar problem and are aware of a solution.
    Thanks,
    Vikas

    Hi,
    Insted of LSMW goo for BDC.. if not goo for BAPI.. you have an enhancemnet concept by using this concept you can enhance the standard BAPI.. and you can process for upload ...
    BAPI_MATERIAL_BOM_GROUP_CREATE

  • PA40 data load for infotype 0,1,2

    Hi All
    i am doing data upload for infotype 0,1,2 using pa40 data load, this works fine for one record, but if there are two, then the screen doenst refresh and it doenst work. Does any body have this proble before and can guide me
    thanks
    C

    No its not resolved, these are the fields in my source file, the problem is for the second record, the pernr remains the same and doesnt refresh, so it throws error, is there any way when it comes to next record the pernr becomes blank.
    begda     werks     persg     persk     plans     anred     vorna     midnm     nachn     perid     gesch     gbdat     gblnd     natio     sprsl     famst     anzkd
    cheers
    C

  • Query on uploading data into infotype

    Hi,
    I am in search of a method to upload data into infotypes  IT0001,HRP1001.
    I have serached and found we can do it using BDC,LSMW and through Hr_INOFYTPE_OPERATION--fm.
    But in my flat file am having pernr ,begda,endda and supervisor..
    Some of my searches said if i had a pernr in flat file its impossible to do with HR_INFOTYPE_OPERATION.
    CAN ANYONE PLS SUGGEST ME THE BEST WAY TO DO?
    Thanks

    Hi Salini
    Using BDC or LSMW might lead to some inconsistencies.
    Uploading of various infotype data depends upon its volume.
    There is a FM: HR_MAINTAIN_MASTERDATA through which you can upload the data. But this does for one record at a time. So the performance gets affected at times. Before calling this FM each time, clear the buffer using the FM:  'HR_PSBUFFER_INITIALIZE'. This will be of great help.
    Incase you want to upload all your data at once, you can use BAPI_HRMASTER_SAVE_REPL_MULT.
    Let me know incase you need any help in any of these.
    Regards
    Harsh

  • Uploading data to OM infotypes

    Hi,
    Can anyone pls let me know what is the best method to upload data into infotyp hrp1051 its an OM infotype.
    AS per my search i understood PA infotype can be uploaded with HR_MAINTAIN_MASTERDATA.
    Here my doubt is Can OM infotypes also be updated using this FM or we need to go for BDC,LSMW.
    Thanks.

    HI Salini
    There are various FMs available for this purpose..
    If u directly insert, update or modify record in OM Infotpye Tables then some related table might not be updated..
    So use FMs..
    RH_COPY_INFTY
    RH_CUT_INFTY
    RH_DELETE_INFTY
    RH_INSERT_INFTY
    RH_INVERT_RELA_INFTY
    RH_UPDATE_INFTY
    For IT 1001
    RH_CUT_INFTY_1001_EXT
    RH_CUT_INFTY_1001_EXT_GENERIC
    RH_DELETE_INFTY_1001_EXT
    RH_DEL_INFTY_1001_EXT_GENERIC
    RH_INSERT_INFTY_1001_EXT
    RH_UPDATE_INFTY_1001_EXT
    RH_BASE_READ_INFTY_1001
    RH_READ_INFTY_1001
    RH_READ_INFTY_1001_EXT
    RH_READ_INFTY_1001_EXT_ONLY
    Hope this helps.
    Harsh

  • Insert Data Into Infotypes

    Hello!
    I am developing an inbound IDoc, during which i am suppose to insert respective segment structure into infotypes PA0000, PA0001, PA0002, PA0006 & PA0008 through Function Module RH_INSERT_INFTY, its throwing error sy-subrc 1, i can give sample code of it
    CALL FUNCTION 'RH_INSERT_INFTY'
    EXPORTING
    fcode = 'INSE'
    vtask = 'S'
    order_flg = 'X'
    commit_flg = 'X'
    repid = sy-repid
    TABLES
    innnn = innnn
    EXCEPTIONS
    no_authorization = 1
    error_during_insert = 2
    repid_form_initial = 3
    corr_exit = 4
    begda_greater_endda = 5
    OTHERS = 6.
    The internal table innnn has record of type as follows
    710 12080033 12/31/2006 12/27/2005 000 01/02/2006
    When Idoc is posted through We19 through 'RH_INSERT_INFTY', it throws Sy-Subrc 1.
    When the same record is input manually through SE37 into function Module 'RH_INSERT_INFTY', it throws error_during_insert,
    Can any guys suggest me to come out of this problem, if possible suggest any other standard Fuction Module to insert data into Infotypes,
    Thank You
    Regards
    Rajesh

    Hi Rajesh,
    The function module 'RH_INSERT_INFTY lets you insert multiple infotype records for OM objects into the Personnel Planning databases (HRPnnnn). ie the PD infotypes. For updating PA infotypes pl use 'HR_INFOTYPE_OPERATION' as suggested by others earlier.
    Regards,
    Suresh Datti

Maybe you are looking for

  • Laserjet 6p added memory unknown???

    I have a 6P and it has an installed memory card on one of the 3 available memory slots.I can not tell what the size of the memory card is and called the manufacturer who said that its model number is no longer available in their database. I held down

  • Replace host name in SQL Plus

    hi, how i can change host name intead of SQL> in sql plus , like whenever i connect SQL PLUS scott/tiger@servername, it automatically change prompt SQL> to SERVERNAME> thanks in advance Noman ul haq

  • How to use Due date notification

    Hi I am using Background callable object, which will trigger after 2 days. But this due date notification is not working. Its executing next Callable object immediately. Flow as follows:-- CO1-here i am setting due date BCO- CO2-

  • Ext Services management - Question on price change indicator

    We are setting up outline agreements with item category D.  We specify the service master numbers on the Service tab, with the pre-negotiated price for each service.  I have checked the "Price change in entry sheet" to ON for a few services. We creat

  • Corrupt file downloaded from OTN

    Cannot open file - it does not appear to be a valid archive. The download completes without error. However OTN indicates a file size of approx 500M yet the downloaded file is 179,512k. Is the OTN file corrupt ? or is the download corrupting the file