What are the parameters have to pass to bapi material creation?

can any one help me in creating material by using bapi.....
which is 'BAPI_MATERIAL_SAVEDATA'.....by using the above bapi wen i am creating material....how to pass data to that bapi....what are the thing s i ahve to pass.........

hi
please chk this code
TYPES : BEGIN OF S_BAPI,
        MATNR LIKE MARA-MATNR,
        MBRSH LIKE MARA-MBRSH,
        MTART LIKE MARA-MTART,
        MAKTX LIKE MAKT-MAKTX,
        MEINS LIKE MARA-MEINS,
        MATKL LIKE MARA-MATKL,
        END OF S_BAPI.
DATA : I_BAPI TYPE STANDARD TABLE OF S_BAPI WITH HEADER LINE.
PARAMETER : P_FILE LIKE RLGRAP-FILENAME DEFAULT 'C:\Documents and Settings\mansi_makhijani\Desktop\upload.txt'.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
  CODEPAGE                      = ' '
   FILENAME                      = P_FILE
   FILETYPE                      = 'DAT'
  HEADLEN                       = ' '
  LINE_EXIT                     = ' '
  TRUNCLEN                      = ' '
  USER_FORM                     = ' '
  USER_PROG                     = ' '
  DAT_D_FORMAT                  = ' '
IMPORTING
  FILELENGTH                    =
  TABLES
    DATA_TAB                      = I_BAPI
EXCEPTIONS
  CONVERSION_ERROR              = 1
  FILE_OPEN_ERROR               = 2
  FILE_READ_ERROR               = 3
  INVALID_TYPE                  = 4
  NO_BATCH                      = 5
  UNKNOWN_ERROR                 = 6
  INVALID_TABLE_WIDTH           = 7
  GUI_REFUSE_FILETRANSFER       = 8
  CUSTOMER_ERROR                = 9
  NO_AUTHORITY                  = 10
  OTHERS                        = 11
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DATA : S_HEADDATA TYPE BAPIMATHEAD,
       S_CLIENTDATA TYPE BAPI_MARA,
       S_CLIENTDATAX TYPE BAPI_MARAX,
       I_MAKT TYPE STANDARD TABLE OF BAPI_MAKT WITH HEADER LINE.
LOOP AT I_BAPI.
  S_HEADDATA-MATERIAL = I_BAPI-MATNR.
  S_HEADDATA-IND_SECTOR = I_BAPI-MBRSH.
  S_HEADDATA-MATL_TYPE = I_BAPI-MTART.
  S_CLIENTDATA-MATL_GROUP = I_BAPI-MATKL.
  S_CLIENTDATA-BASE_UOM = I_BAPI-MEINS.
  S_CLIENTDATAX-MATL_GROUP ='X'.
  S_CLIENTDATAX-BASE_UOM ='X'.
  I_MAKT-MATL_DESC = I_BAPI-MAKTX.
  I_MAKT-LANGU_ISO ='EN'.
  I_MAKT-LANGU ='EN'.
  I_MAKT-DEL_FLAG =' '.
  CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
    EXPORTING
      HEADDATA                  = S_HEADDATA
   CLIENTDATA                  = S_CLIENTDATA
   CLIENTDATAX                 = S_CLIENTDATAX
  PLANTDATA                   =
  PLANTDATAX                  =
  FORECASTPARAMETERS          =
  FORECASTPARAMETERSX         =
  PLANNINGDATA                =
  PLANNINGDATAX               =
  STORAGELOCATIONDATA         =
  STORAGELOCATIONDATAX        =
  VALUATIONDATA               =
  VALUATIONDATAX              =
  WAREHOUSENUMBERDATA         =
  WAREHOUSENUMBERDATAX        =
  SALESDATA                   =
  SALESDATAX                  =
  STORAGETYPEDATA             =
  STORAGETYPEDATAX            =
  FLAG_ONLINE                 = ' '
  FLAG_CAD_CALL               = ' '
  NO_DEQUEUE                  = ' '
IMPORTING
  RETURN                      =
TABLES
   MATERIALDESCRIPTION         = I_MAKT
  UNITSOFMEASURE              =
  UNITSOFMEASUREX             =
  INTERNATIONALARTNOS         =
  MATERIALLONGTEXT            =
  TAXCLASSIFICATIONS          =
  RETURNMESSAGES              =
  PRTDATA                     =
  PRTDATAX                    =
  EXTENSIONIN                 =
  EXTENSIONINX                =
  NFMCHARGEWEIGHTS            =
  NFMCHARGEWEIGHTSX           =
  NFMSTRUCTURALWEIGHTS        =
NFMSTRUCTURALWEIGHTSX       =
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT          =
IMPORTING
RETURN        =
ENDLOOP.
~hitesh
If your queries are solved try to close the thread

Similar Messages

  • I have created a quotation in CRM system. I want that to be downloaded into ECC, so that, I can create a sales order there with reference to that quotation. So, what are the parameters that I need to set in CRM system so that my quotation gets replicated?

    Dear Experts,
    I have created a quotation in CRM system. I want that to be downloaded into ECC, so that, I can create a sales order there with reference to that quotation. What are the parameters that I need to set in CRM system so that my quotation gets replicated without any error?
    Please help me in this regard. An early and in detail step by step guidance is highly appreciated.
    Thanks,
    SMTP

    It may be best to recreate the folder and the smart playlists from scratch.
    tt2

  • What are the parameters in Call transaction method?

    Hi ABAPER'S,
        Please give me what are the parameters in call transaction method?
    Thanks,
    Prakash

    Processing batch input data with CALL TRANSACTION USING is the faster of the two recommended data transfer methods. In this method, legacy data is processed inline in your data transfer program.
    Syntax:
    CALL TRANSACTION <tcode>
    USING <bdc_tab>
    MODE  <mode>
    UPDATE  <update>
    <tcode> : Transaction code
    <bdc_tab> : Internal table of structure BDCDATA.
    <mode> : Display mode:
    A
    Display all
    E
    Display errors only
    N
    No display
    <update> : Update mode:
    S
    Synchronous
    A
    Asynchronous
    L
    Local update
    A program that uses CALL TRANSACTION USING to process legacy data should execute the following steps:
    Prepare a BDCDATA structure for the transaction that you wish to run.
    With a CALL TRANSACTION USING statement, call the transaction and prepare the BDCDATA structure. For example:
    CALL TRANSACTION 'TFCA' USING BDCDATA
    MODE 'A'
    UPDATE 'S'.
    MESSAGES INTO MESSTAB.
    IF SY-SUBRC <> 0.
    <Error_handling>.
    ENDIF.
    The MODE Parameter
    You can use the MODE parameter to specify whether data transfer processing should be displayed as it happens. You can choose between three modes:
    A Display all. All screens and the data that goes in them appear when you run your program.
    N No display. All screens are processed invisibly, regardless of whether there are errors or not. Control returns to your program as soon as transaction processing is finished.
    E Display errors only. The transaction goes into display mode as soon as an error in one of the screens is detected. You can then correct the error.
    The display modes are the same as those that are available for processing batch input sessions.
    The UPDATE Parameter
    You use the UPDATE parameter to specify how updates produced by a transaction should be processed. You can select between these modes:
    A Asynchronous updating. In this mode, the called transaction does not wait for any updates it produces to be completed. It simply passes the updates to the SAP update service. Asynchronous processing therefore usually results in faster execution of your data transfer program.
    Asynchronous processing is NOT recommended for processing any larger amount of data. This is because the called transaction receives no completion message from the update module in asynchronous updating. The calling data transfer program, in turn, cannot determine whether a called transaction ended with a successful update of the database or not.
    If you use asynchronous updating, then you will need to use the update management facility (Transaction SM12) to check whether updates have been terminated abnormally during session processing. Error analysis and recovery is less convenient than with synchronous updating.
    S Synchronous updating. In this mode, the called transaction waits for any updates that it produces to be completed. Execution is slower than with asynchronous updating because called transactions wait for updating to be completed. However, the called transaction is able to return any update error message that occurs to your program. It is much easier for you to analyze and recover from errors.
    L Local updating. If you update data locally, the update of the database will not be processed in a separate process, but in the process of the calling program. (See the ABAP keyword documentation on SET UPDATE TASK LOCAL for more information.)
    The MESSAGES Parameter
    The MESSAGES specification indicates that all system messages issued during a CALL TRANSACTION USING are written into the internal table <MESSTAB> . The internal table must have the structure BDCMSGCOLL .
    You can record the messages issued by Transaction TFCA in table MESSTAB with the following coding:
    (This example uses a flight connection that does not exist to trigger an error in the transaction.)
    DATA: BEGIN OF BDCDATA OCCURS 100.
    INCLUDE STRUCTURE BDCDATA.
    DATA: END OF BDCDATA.
    DATA: BEGIN OF MESSTAB OCCURS 10.
    INCLUDE STRUCTURE BDCMSGCOLL.
    DATA: END OF MESSTAB.
    BDCDATA-PROGRAM = 'SAPMTFCA'.
    BDCDATA-DYNPRO = '0100'.
    BDCDATA-DYNBEGIN = 'X'.
    APPEND BDCDATA.
    CLEAR BDCDATA.
    BDCDATA-FNAM = 'SFLIGHT-CARRID'.
    BDCDATA-FVAL = 'XX'.
    APPEND BDCDATA.
    BDCDATA-FNAM = 'SFLIGHT-CONNID'.
    BDCDATA-FVAL = '0400'.
    APPEND BDCDATA.
    CALL TRANSACTION 'TFCA' USING BDCDATA MODE 'N'
    MESSAGES INTO MESSTAB.
    LOOP AT MESSTAB.
    WRITE: / MESSTAB-TCODE,
    MESSTAB-DYNAME,
    MESSTAB-DYNUMB,
    MESSTAB-MSGTYP,
    MESSTAB-MSGSPRA,
    MESSTAB-MSGID,
    MESSTAB-MSGNR.
    ENDLOOP.
    The following figures show the return codes from CALL TRANSACTION USING and the system fields that contain message information from the called transaction. As the return code chart shows, return codes above 1000 are reserved for data transfer. If you use the MESSAGES INTO <table> option, then you do not need to query the system fields shown below; their contents are automatically written into the message table. You can loop over the message table to write out any messages that were entered into it.
    Return codes:
    Value
    Explanation
    0
    Successful
    <=1000
    Error in dialog program
    > 1000
    Batch input error
    System fields:
    Name:
    Explanation:
    SY-MSGID
    Message-ID
    SY-MSGTY
    Message type (E,I,W,S,A,X)
    SY-MSGNO
    Message number
    SY-MSGV1
    Message variable 1
    SY-MSGV2
    Message variable 2
    SY-MSGV3
    Message variable 3
    SY-MSGV4
    Message variable 4
    Error Analysis and Restart Capability
    Unlike batch input methods using sessions, CALL TRANSACTION USING processing does not provide any special handling for incorrect transactions. There is no restart capability for transactions that contain errors or produce update failures.
    You can handle incorrect transactions by using update mode S (synchronous updating) and checking the return code from CALL TRANSACTION USING. If the return code is anything other than 0, then you should do the following:
    write out or save the message table
    use the BDCDATA table that you generated for the CALL TRANSACTION USING to generate a batch input session for the faulty transaction. You can then analyze the faulty transaction and correct the error using the tools provided in the batch input management facility.

  • What  are  the  parameters  which  control the  pop up  of  sales area

    Hi Experts
    What  are  the  parameters  which  control the  pop up  of  sales area  along with sales  office  when  Sold to party  is fed  in to the CRM order .
    I  have  an issue   that,  though  the  distribution channel  and  division  is  maintained  in the  sales org  it is not   appearing  in the pop up.
    The  BP   is extended  to the  sales area .
    If  any  one  can  give  me details / documentataion   on the setting , it  is  highly  appreciated.
    Regards
    Raj

    Dear Srikanth
    Thank  for your  up date .  in my case   the customer  is assigned  with   two sales area. The  org model  ,  nothing  is  maintained  in the  attributes , still one  is appearing in the  pop up and  and  other  one  is not . It is surpricing.
    if you  can mention the logic  of maintaining  the   division and  distribution  channel inthe attribute  it is  of great help.
    Regards
    Raj

  • What are the paramters to b passed to the bapi_salesorder_change?

    what are the paramters to b passed to the bapi_salesorder_change, and how the parameters to b populated?

    Check the documentation in SE37.
    how to use bapi to change so's schedule line category
    Help with BAPI_SALESORDER_CHANGE
    Regards,
    Amit
    Reward all helpful replies.

  • What are the parameters of Function Module

    Hi,
    What are the parameters of Function Module?

    Function Modules are special external subroutine stored in a central library. The R/3 system provides numerous predefined function modules that you can call from the ABAP/4 programs.
    All the function Modules are created under the Function Groups. Function Groups are nothing but the related group of function modules.
    The function modules can be maintained through T.CodeSE37 and T.Code SE80.
    In general the function module has the following components.
    Documentation:
    This is the place where you can find the discription/purpose of the function module.
    Import & Export Parameters.
    Import parameters correspond to the formal input parameters of subroutines. They pass data from the calling program to the function module.
    Export parameters correspond to the formal input parameters of subroutines. They pass data from the function module back to the calling program.
    Table Parameters.
    Table parameters are internal tables. Internal tables are treated like changing parameters and are always passed by reference.
    Exceptions.
    Exceptions are used to handle error scenarios which can occur in the function modules. The function modules checks for any type of error and raise exception and returns SY-SUBRC value to the calling program.
    Source Code:
    the programming logic of the function module is written in this source code.
    Rewards if useful.

  • What are the Preparations recommended to Pass OCA 10gDBA(1Z0-042) exam ?

    What are the Preparations recommended to Pass OCA *10gDBA(1Z0-042)* exam ?

    My recommendations is as below:
    1. You should be familiary with the [exam topics |http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=41&p_exam_id=1Z0_042] and read them from Documentation
    2. You should read Sybex book [OCA: Oracle 10g Administration I Study Guide: Exam 1Z0-042|http://www.sybex.com/WileyCDA/SybexTitle/OCA-Oracle-10g-Administration-I-Study-Guide-Exam-1Z0-042.productCd-0782143679.html]
    3. You should read McGraw Hill [Oracle Database 10g OCP Certification All-In-One Exam Guide|http://www.mhprofessional.com/product.php?cat=7&isbn=0072257903] book
    4. And at the end, you should install Oracle Database and practice, practice and practice
    Good Luck!!!
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com

  • What are the must have apps for Snow Leopard

    Just downgraded from Mavericks to Snow Leopard 10.6.8. Just can't stand the frequent beach balls. Was wondering what are the must have apps that are still being updated by the developers?

    Most of the apps that comes with OSX 10.6 are not being updated anymore. It would be great if you could recommend apps that are still being updated for security, stability etc for the following:
    1. Email
    2. Browsing
    3. Office Suite (like iWork)
    4. To do List
    5. Photo Editor
    6. P2P / File Sharing
    I am aware that there are reviews in the net for best apps, but I am interested to learn what people in this community have used personally and suggest.
    Cheers

  • What are the parameters of run_product?

    What are the parameters of run_product?
    Please help me.
    Regards,
    Arjun

    http://download.oracle.com/otn_hosted_doc/forms/forms/A73074_01.pdf

  • What are the must-have accessories?

    What are the must-have accessories ?

    Backup drives for your valuable data so if your MBP fails you will have not lose everything.  Two backups are better than one.  All HDDs will eventually fail.
    Ciao.

  • What are the parameters for DB2 / JDBC Connetivity?

    I have insert IDoc data from SAP > XI > DB2.
    What are the connection parameters for the Reeiver JDBC channel to connect from XI to a DB2 database?
    Regards,
    Bhaskar

    Hey
    please have a look at the following thread
    JDBC connection to DB2 Database
    also please search SDN for DB2 drivers,there is lots of material for it
    thanx
    Aamir

  • What are the must have SAP componets req to publish MDM 7.1.03.86 on web

    Can anyone explain to me what are the SAP components required for MDM 7.1.03.86 allowing me create a webpage front end to MDM 7.1 and create and publish my own screens?
    Like many I am very new to the world of SAP.
    There are many others in my own company with a vast knowledge of what are all the pieces needed to run almost anything
    In SAP. One of the exceptions to this rule is SAP Master Data Management (MDM).
    We run:
    - SAP MDM version 7.1.03.86
    - A Windows 2003 server
    - Oracle 10.X.
    - 7.1 Import Manager
    - 7.1 Import Server
    - 7.1 Data Manager
    - 7.1 Syndication Server
    - I see reference to the 7.1 MDM Publishers but I donu2019t see the API in the way I have software loaded right now.
    I would like to get to the point where I can create a web portal front end to the MDM product.
    My problem is I canu2019t get anyone to give me a an answer as to what are the other pieced of software I would need to get
    In an end to end solution. Starting with barebones and working up to the works!
    Here is what I would like to be able to do:
    - Publish in a SAP Portal screens to the web. (SAP NetWeaver CE Portal, PI Portal ????)
    - Write code in Java, SQL, VB and more, save and test them. (SAP NetWeaver WebDynpro for Java ???)
    - create a web screen in the portal and publish to a Portal or URL. (SDK kit or Developer's kit Like: SAP NetWeaver
    Developer Studio ???)
    - It looks to me like the "SAP NetWeaver BPM" product is "Nice" to have but not required.
    This is soo confusing, PLEASE help!
    Thank You
    Steve T

    Hi Steve
    Adding to Anu's response:
    The prebuilt packages (worksets) cannot be used on a CE portal - only on a NW Enterprise Portal.
    iView templates are also provided which allows you to put together your own pages and worksets. Again, these require the Enterprise Portal.
    You don't have to use an SAP portal. You can use any webserver combined with Java code
    (that makes use of the MDM Java API) to access the data (check out http://catalog.bd.com/ for a sample of this). Of course, this requires a lot more effort on your side.
    "SAP NetWeaver BPM" amounts to NetWeaver CE. It is required if you want to make use of the WebDynpro components in new MDM releases.
    Since you mentioned the MDM Publisher, if you want to simply publish "read only" data to a web front-end, you may be able to make use of the MDM Publisher together with Adboe InDesign.
    Java code can make use of the MDM Java API. Windows development tools can make use of the MDM COM and MDM .NET APIs.
    HTH,
    Mark

  • What are the parameters? can u say what type of parameters regularly used?

    what are the perameters? can u say what type of perameters regularly used?

    Dear Srikanth
    Thank  for your  up date .  in my case   the customer  is assigned  with   two sales area. The  org model  ,  nothing  is  maintained  in the  attributes , still one  is appearing in the  pop up and  and  other  one  is not . It is surpricing.
    if you  can mention the logic  of maintaining  the   division and  distribution  channel inthe attribute  it is  of great help.
    Regards
    Raj

  • What are the options "alert" and "passes" under my account info?

    Hi guys, I was going on viewing my account info, and I happened to see some options which I have no idea what are their usage? Can someone tell me what is the option "passes" and "alert" for? Thank you

    Passes will list any season passes you have purchased and still have some left to get.
    Alerts is to notify you of new music from artists you select.
    Go to the artist page in iTunes and scroll to the bottom and click on *Alert me*.

  • What are the parameters "page-forward" and "page-backward"  used for?

    In the LIMITS section of the Netscape Calendar Server configuration
    documentation, there are two parameters called "page-forward" and
    "page-backward." The default setting for these parameters is FALSE. However,
    it is unclear what these parameters are used for.
    <P>
    With previous versions of Calendar Server, you could scroll one page forward
    or one page backward through the user search screens. However, with the
    implementation of LDAP in later versions, the options have been disabled in
    the client.
    <P>
    Although the page-forward and page-backward parameters are documented in the
    Administrator guides for Calendar Server versions 3.5 and 4.0, the guides
    state that the default value of FALSE for both parameters cannot be
    changed. In actuality, the parameters can be changed. However, the reason
    that users should not change these parameters is that versions 3.5 and 4.0
    do not support the page-forward and page-backward capabilities. So to avoid
    errors, please do not change these parameters from the default value of FALSE.

    if AdobeRGB is the more professional working space, then why not use that profile?
    on the web (and in unmanaged and broken work flows) sRGB is the safest profile (source space)
    just open your tagged Adobe RGB and tagged ProPhoto RGB document (use the embedded profile in each document)
    and go to View> Proof Setup: Monitor RGB (notice the loss in saturation? that's how most of the people on the Internet will be viewing your color, assuming you have a standard-gamut monitor like most people)
    always CONVERT to sRGB for the World Wide Web
    i didn't read your link
    anyone who recommends "disable color management in Photoshop" -- set Working RGB to "Monitor RGB" -- AND MOST UNBELIEVABLY -- "Don't color manage this document" (ignore embedded profiles) ------ is pretty mixed up (in my opinion)
    i will recommend reading JEFF SCHEWE and BRUCE FRASER for professional color management information

Maybe you are looking for

  • StealthSwitch 2 or Keyboard Question

    Hi, I am trying to help out someone who uses a MacBook Pro and recently bought something called a StealthSwitch 2 from ThinkGeek.com. It seems to work but it disables the keyboard on the MacBook when he plugs it in. Sorry to say he is a PeeSee user a

  • SAP Jam Integration With SAP Cloud For Customer

    Hi Experts, Can anyone have idea about how we can integrate the SAP JAM with SAP Cloud For Customer . Any document or any guide please share with me. Appreciate your help. Many Thanks, Mithun

  • Dispatching an event while closing a title window

    my app requires some data to be refreshed whenever a new data is submitted the new data is submitted in a form that opens in a seperate title windiw and i want to dispatch some sort of an event or indication which can be listened to in my main progra

  • Won't accept my three digit security code

    My card number, valid thru date, and type are all correct, but every time I put it in it says it needs a valid security code. Right now if I wanted to use my card, I can't (red), but that doesn't mean my card isn't still correct.  Is this the problem

  • Error updating to iOS 5.1

    Help! I can't download iOS 5.1! I tried everything from restoring to changing the DNS. Tried on iPod and over wifi and Ethernet on iTunes. On my iPod it says error occurred while trying to update. In iTunes in say network connection could not be esta