Urgent- BAPI Code

Hi all,
i am using BAPI_FIXEDASSET_CREATE1 to upload asset data. in this function module there is a mandatory parameter that is key regarding this i am getting a dump error. saying that <b>Type is correct but incorrect for key length</b>. here is my declaration .
data: begin of wa_companycode occurs 0.
      include structure BAPI1022_KEY.
data  End of WA_Companycode.
WA_COMPANYCODE-COMPANYCODE = WA_SOURCE-BUKRS.
CALL FUNCTION 'BAPI_FIXEDASSET_CREATE1'
  EXPORTING
    key                               = WA_COMPANYCODE-COMPANYCODE
   GENERALDATA              = WA_GENERALDATA
*   GENERALDATAX             =
    POSTINGINFORMATION         = WA_POSTINGINFORMATION
*   POSTINGINFORMATIONX        =
   TIMEDEPENDENTDATA          = WA_TIMEDEPENDENTDATA
*   TIMEDEPENDENTDATAX         =
   ALLOCATIONS                = WA_ALLOCATIONS
*  ALLOCATIONSX               =
IMPORTING
  ASSETCREATED               = wa_Assetcreated
   RETURN                     = wa_return
** TABLES
**   DEPRECIATIONAREAS          =
**   DEPRECIATIONAREASX         =
**   INVESTMENT_SUPPORT         =
**   EXTENSIONIN                =

Make the highlighted change:
WA_COMPANYCODE-COMPANYCODE = WA_SOURCE-BUKRS.
CALL FUNCTION 'BAPI_FIXEDASSET_CREATE1'
  EXPORTING
<b>    key                               = WA_COMPANYCODE</b>
   GENERALDATA              = WA_GENERALDATA
  GENERALDATAX             =
    POSTINGINFORMATION         = WA_POSTINGINFORMATION
  POSTINGINFORMATIONX        =
   TIMEDEPENDENTDATA          = WA_TIMEDEPENDENTDATA
  TIMEDEPENDENTDATAX         =
   ALLOCATIONS                = WA_ALLOCATIONS
ALLOCATIONSX               =
IMPORTING
  ASSETCREATED               = wa_Assetcreated
   RETURN                     = wa_return
TABLES
  DEPRECIATIONAREAS          =
  DEPRECIATIONAREASX         =
  INVESTMENT_SUPPORT         =
  EXTENSIONIN                =
REgards,
Ravi

Similar Messages

  • BAPI CODE PLZZ

    HI FRNDS I NEED BAPI CODE FOR
    SCHEDULE LINES AND PURCHASE REQISITION.
    PLZZ FRNDS ITS URGENT.
                                 WITH REGARDS,
                                   SANJAY

    hello
    go to transaction bapi
    in the hierarchical node:
    Go to Material management/purchasing/PurchaseRequisition
    Please reward with points if usefull, thanx.

  • BAPI code Combination

    Hi,
    Any one have BAPI code for the combination of these
    VBAK-VBELN, with
    VBAK-KUNNR, VBKD-BSTKD, VBAK-AUDAT,
    VBAK-VKORG, VBAK-IHREZ, vbak-netwr, vbak-waerk,
    likp-bolnr,
    And also need to check VBELN customer user as internal or external.
    Regards,
    Maruti

    Yes, It is new dev.
    I need to display all these fields from .

  • Sample Bapi code for creating orders

    HI all,
    ive been working on creating an order using idoc_input_orders and couldnt do it because of 2 fields. now changed my decission and thinking of writing a bapi to do the same. has anybody got the sample code for mapping and filling in the bapis before calling bapi for creating an order. Could somebody help me with a sample code and i could use it as a reference before starting coding.
    thanks,
    Kiran

    See if this helps.
            one order with total sum of effort
              clear:   l_order_header,
                       l_salesdocument,
                       l_order_partners,
                       l_order_items,
                       l_order_schdl.
              refresh: it_order_items,
                       it_order_partners,
                       it_order_schdl,
                       it_return.
    ???????? get from material ...
            Order header
              l_order_header-doc_type          = 'ZQBV'.
              l_order_header-distr_chan        = '10'.
              l_order_header-division          = '00'.
              if g_qals-werk eq '1100'.
                l_order_header-sales_org         = '1000'.
              else.
                if g_qals-werk eq '3100'.
                  l_order_header-sales_org         = '3000'.
                else.
                  message i001(00) with text-005.
                endif.
              endif.
              l_order_header-purch_no_c        = g_qals-prueflos.  " <= lot
            Partner data
              l_order_partners-partn_role      = 'AG'.
              l_order_partners-partn_numb      = g_qals-kunnr.
              append l_order_partners to it_order_partners.
            Order items => only one
              l_order_items-itm_number         = 10.
              l_order_items-material           = g_qals-matnr.
              l_order_items-target_qty         = 1.
              append l_order_items to it_order_items.
            Schedules for quantity
              l_order_schdl-itm_number         = 10.
              l_order_schdl-req_qty            = 1.        " <=  only 1 !
              append l_order_schdl to it_order_schdl.
            Conditions for value
              l_order_conditions-itm_number    = 10.
              l_order_conditions-cond_type     = 'PR00'.
              l_order_conditions-cond_value    = g_effort_sum.
              l_order_conditions-currency      = g_effort_unit.
              append l_order_conditions to it_order_conditions.
            BAPI to create sales order
              CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
                EXPORTING
               SALESDOCUMENTIN               =
                  ORDER_HEADER_IN               = l_order_header
               ORDER_HEADER_INX              =
               SENDER                        =
               BINARY_RELATIONSHIPTYPE       =
               INT_NUMBER_ASSIGNMENT         =
               BEHAVE_WHEN_ERROR             =
               LOGIC_SWITCH                  =
               TESTRUN                       =
               CONVERT                       = ' '
                IMPORTING
                  SALESDOCUMENT                 = l_salesdocument
                TABLES
                  RETURN                        = it_return
                  ORDER_ITEMS_IN                = it_order_items
               ORDER_ITEMS_INX               =
                  ORDER_PARTNERS                = it_order_partners
                  ORDER_SCHEDULES_IN            = it_order_schdl
               ORDER_SCHEDULES_INX           =
                  ORDER_CONDITIONS_IN           = it_order_conditions
               ORDER_CONDITIONS_INX          =
               ORDER_CFGS_REF                =
               ORDER_CFGS_INST               =
               ORDER_CFGS_PART_OF            =
               ORDER_CFGS_VALUE              =
               ORDER_CFGS_BLOB               =
               ORDER_CFGS_VK                 =
               ORDER_CFGS_REFINST            =
               ORDER_CCARD                   =
               ORDER_TEXT                    =
               ORDER_KEYS                    =
               EXTENSIONIN                   =
               PARTNERADDRESSES              =
              if not l_salesdocument is initial.
              order successfully created
                message i001(00) with text-001 l_salesdocument.
              endif.
            endif.

  • URGENT :T.code for allcoation invocies to down payment made

    < per the forum rules, don't use workds such as 'urgent' in the title.  thread locked >
    Hi Friends,
    could you please provide T.code for allocation invoices for down payment.
    Can you please give T.code it.s very URGEENT
    Thanks in addvance.
    Shekar
    Edited by: nama chandrashekar on Jun 12, 2008 2:21 PM

    hi,
    Your question is not clear.
    Down payment is down with following t.codes
    F-37 - Request
    F-29 - Down Payment
    F-39 - Clearing
    For SAP standard report on downpayments
    S_ALR_87012199 - List Of Down Payments Open On Key Date - Customers
    Please let me know if you need more  information.
    Assign points if useful.
    Regards
    Sridhar M

  • Urgent-BAPI

    Hi all,
    Pls provide me the sample code for uploading purchase order details using BAPI.
    Thanks in advance.

    Hi
    See the sample code and do accordingly
    REPORT zpo_bapi_purchord_tej.
    DATA DECLARATIONS *
    TYPE-POOLS slis.
    TYPES: BEGIN OF ty_table,
    v_legacy(8),
    vendor TYPE bapimepoheader-vendor,
    purch_org TYPE bapimepoheader-purch_org,
    pur_group TYPE bapimepoheader-pur_group,
    material TYPE bapimepoitem-material,
    quantity(13),
    delivery_date TYPE bapimeposchedule-delivery_date,
    net_price(23),
    plant TYPE bapimepoitem-plant,
    END OF ty_table.
    TYPES: BEGIN OF ty_alv,
    v_legs(8),
    success(10),
    v_legf(8),
    END OF ty_alv.
    TYPES: BEGIN OF ty_alv1,
    v_legf1(8),
    v_msg(500),
    END OF ty_alv1.
    *-----Work area declarations.
    DATA: x_table TYPE ty_table,
    x_header TYPE bapimepoheader,
    x_headerx TYPE bapimepoheaderx,
    x_item TYPE bapimepoitem,
    x_itemx TYPE bapimepoitemx,
    x_sched TYPE bapimeposchedule,
    x_schedx TYPE bapimeposchedulx,
    x_commatable(255),
    x_alv TYPE ty_alv,
    x_alv1 TYPE ty_alv1,
    x_alv2 TYPE ty_alv1.
    *-----Internal table declarations.
    DATA: it_table TYPE TABLE OF ty_table,
    it_commatable LIKE TABLE OF x_commatable,
    it_item TYPE TABLE OF bapimepoitem,
    it_itemx TYPE TABLE OF bapimepoitemx,
    it_sched TYPE TABLE OF bapimeposchedule,
    it_schedx TYPE TABLE OF bapimeposchedulx,
    it_alv TYPE TABLE OF ty_alv,
    it_alv1 TYPE TABLE OF ty_alv1,
    it_alv2 TYPE TABLE OF ty_alv1.
    DATA: po_number TYPE bapimepoheader-po_number,
    x_return TYPE bapiret2,
    it_return TYPE TABLE OF bapiret2,
    v_file TYPE string,
    v_temp(8),
    v_succsount TYPE i VALUE 0,
    v_failcount TYPE i VALUE 0,
    v_total TYPE i.
    DATA: v_temp1(5) TYPE n VALUE 0.
    DATA: x_event TYPE slis_t_event,
    x_fieldcat TYPE slis_t_fieldcat_alv,
    x_list_header TYPE slis_t_listheader,
    x_event1 LIKE LINE OF x_event,
    x_layout1 TYPE slis_layout_alv,
    x_variant1 TYPE disvariant,
    x_repid2 LIKE sy-repid.
    DATA : it_fieldcat TYPE TABLE OF slis_t_fieldcat_alv.
    SELECTION-SCREEN *
    SELECTION-SCREEN BEGIN OF BLOCK v_b1 WITH FRAME.
    *-----To fetch the flat file.
    PARAMETERS: p_file TYPE rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK v_b1.
    AT SELECTION-SCREEN *
    AT SELECTION-SCREEN.
    IF p_file IS INITIAL.
    MESSAGE text-001 TYPE 'E'.
    ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    *-----To use F4 help to find file path.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    program_name = syst-cprog
    dynpro_number = syst-dynnr
    IMPORTING
    file_name = p_file.
    v_file = p_file.
    START-OF-SELECTION *
    START-OF-SELECTION.
    PERFORM gui_upload.
    LOOP AT it_table INTO x_table.
    PERFORM header_details.
    v_temp = x_table-v_legacy.
    LOOP AT it_table INTO x_table WHERE v_legacy = v_temp.
    PERFORM lineitem.
    PERFORM schedule.
    ENDLOOP.
    DELETE it_table WHERE v_legacy = v_temp.
    PERFORM bapicall.
    MOVE po_number TO x_alv-success.
    APPEND x_alv TO it_alv.
    CLEAR x_alv.
    *-----To clear the item details in internal table after the operation for a header.
    REFRESH: it_item,
    it_itemx,
    it_sched,
    it_schedx.
    CLEAR: v_temp1.
    ENDLOOP.
    v_total = v_succsount + v_failcount.
    PERFORM display_alv.
    FORM GUI_UPLOAD *
    FORM gui_upload .
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = v_file
    filetype = 'ASC'
    TABLES
    data_tab = it_commatable
    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.
    *-----To fetch the comma seperated flat file into an internal table.
    LOOP AT it_commatable INTO x_commatable.
    IF x_commatable IS NOT INITIAL.
    SPLIT x_commatable AT ',' INTO
    x_table-v_legacy
    x_table-vendor
    x_table-purch_org
    x_table-pur_group
    x_table-material
    x_table-quantity
    x_table-delivery_date
    x_table-net_price
    x_table-plant.
    APPEND x_table TO it_table.
    ENDIF.
    CLEAR x_table.
    ENDLOOP.
    ENDIF.
    ENDFORM. " gui_upload
    FORM HEADER_DETAILS *
    FORM header_details .
    MOVE 'NB' TO x_header-doc_type.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = x_table-vendor
    IMPORTING
    output = x_table-vendor
    MOVE x_table-vendor TO x_header-vendor.
    MOVE x_table-purch_org TO x_header-purch_org.
    MOVE x_table-pur_group TO x_header-pur_group.
    x_headerx-doc_type = 'X'.
    x_headerx-vendor = 'X'.
    x_headerx-purch_org = 'X'.
    x_headerx-pur_group = 'X'.
    ENDFORM. " header_details
    FORM LINEITEM *
    FORM lineitem .
    v_temp1 = v_temp1 + 10.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = v_temp1
    IMPORTING
    output = v_temp1.
    MOVE v_temp1 TO x_item-po_item.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = x_table-material
    IMPORTING
    output = x_table-material.
    MOVE x_table-material TO x_item-material.
    MOVE x_table-quantity TO x_item-quantity.
    MOVE x_table-net_price TO x_item-net_price.
    MOVE x_table-plant TO x_item-plant.
    x_itemx-po_item = v_temp1.
    x_itemx-material = 'X'.
    x_itemx-quantity = 'X'.
    x_itemx-net_price = 'X'.
    x_itemx-plant = 'X'.
    APPEND x_item TO it_item.
    APPEND x_itemx TO it_itemx.
    CLEAR: x_item, x_itemx.
    ENDFORM. " lineitem1
    FORM SCHEDULE *
    FORM schedule .
    MOVE x_table-delivery_date TO x_sched-delivery_date.
    MOVE v_temp1 TO x_sched-po_item.
    x_schedx-delivery_date = 'X'.
    x_schedx-po_item = v_temp1.
    APPEND x_sched TO it_sched.
    APPEND x_schedx TO it_schedx.
    CLEAR: x_sched, x_schedx.
    ENDFORM. " schedule
    FORM BAPICALL *
    FORM bapicall .
    CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
    poheader = x_header
    poheaderx = x_headerx
    IMPORTING
    exppurchaseorder = po_number
    TABLES
    return = it_return
    poitem = it_item
    poitemx = it_itemx
    poschedule = it_sched
    poschedulex = it_schedx.
    IF po_number IS NOT INITIAL.
    v_succsount = v_succsount + 1.
    MOVE x_table-v_legacy TO x_alv-v_legs.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    ELSE.
    v_failcount = v_failcount + 1.
    MOVE x_table-v_legacy TO x_alv-v_legf.
    MOVE x_table-v_legacy TO x_alv1-v_legf1.
    LOOP AT it_return INTO x_return.
    IF x_alv1-v_msg IS INITIAL.
    MOVE x_return-message TO x_alv1-v_msg.
    ELSE.
    CONCATENATE x_alv1-v_msg x_return-message INTO x_alv1-v_msg SEPARATED BY space.
    ENDIF.
    ENDLOOP.
    APPEND x_alv1 TO it_alv1.
    CLEAR x_alv1.
    ENDIF.
    ENDFORM. " bapicall
    FORM DISPLAY_ALV *
    FORM display_alv .
    PERFORM x_list_header.
    PERFORM build_fieldcat CHANGING x_fieldcat.
    x_repid2 = sy-repid.
    x_event1-name = 'TOP_OF_PAGE'.
    x_event1-form = 'TOP_OF_PAGE'.
    APPEND x_event1 TO x_event.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = x_repid2
    is_layout = x_layout1
    it_fieldcat = x_fieldcat
    i_callback_user_command = 'USER_COMMAND'
    i_callback_top_of_page = 'TOP_OF_PAGE'
    i_save = 'A'
    is_variant = x_variant1
    it_events = x_event
    TABLES
    t_outtab = it_alv
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM. " display_master_data
    FORM USER_COMMAND *
    FORM user_command USING ucomm LIKE sy-ucomm selfield
    TYPE slis_selfield.
    READ TABLE it_alv INTO x_alv INDEX selfield-tabindex.
    CLEAR : x_alv2,it_alv2[].
    LOOP AT it_alv1 INTO x_alv1 WHERE v_legf1 = x_alv-v_legf.
    x_alv2 = x_alv1.
    APPEND x_alv2 TO it_alv2 .
    ENDLOOP.
    DATA : it_fieldcat TYPE slis_t_fieldcat_alv.
    DATA : x3_fieldcat LIKE LINE OF it_fieldcat.
    CLEAR : x3_fieldcat,it_fieldcat[].
    CLEAR x3_fieldcat.
    x3_fieldcat-col_pos = '1'.
    x3_fieldcat-fieldname = 'V_LEGF1'.
    x3_fieldcat-reptext_ddic = text-111.
    x3_fieldcat-ref_tabname = 'IT_ALV2'.
    APPEND x3_fieldcat TO it_fieldcat.
    CLEAR x3_fieldcat.
    CLEAR x3_fieldcat.
    x3_fieldcat-col_pos = '1'.
    x3_fieldcat-fieldname = 'V_MSG'.
    x3_fieldcat-reptext_ddic = text-112.
    x3_fieldcat-ref_tabname = 'IT_ALV2'.
    APPEND x3_fieldcat TO it_fieldcat.
    CLEAR x3_fieldcat.
    x_layout1-colwidth_optimize = 'X'.
    x_layout1-zebra = 'X'.
    IF it_alv2[] IS NOT INITIAL.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = x_repid2
    is_layout = x_layout1
    it_fieldcat = it_fieldcat
    i_save = 'A'
    i_callback_top_of_page = 'TOP'
    is_variant = x_variant1
    it_events = x_event
    TABLES
    t_outtab = it_alv2
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    ENDIF.
    ENDFORM.
    FORM USER_COMMAND *
    FORM top.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    it_list_commentary = 'Commentry'.
    ENDFORM.
    FORM BUILD_FIELDCAT *
    FORM build_fieldcat CHANGING et_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: x1_fieldcat TYPE slis_fieldcat_alv.
    CLEAR x1_fieldcat.
    x1_fieldcat-col_pos = '1'.
    x1_fieldcat-fieldname = 'V_LEGS'.
    x1_fieldcat-reptext_ddic = text-108.
    x1_fieldcat-ref_tabname = 'IT_ALV'.
    APPEND x1_fieldcat TO et_fieldcat.
    CLEAR x1_fieldcat.
    x1_fieldcat-col_pos = '2'.
    x1_fieldcat-fieldname = 'SUCCESS'.
    x1_fieldcat-key = 'X'.
    x1_fieldcat-reptext_ddic = text-109.
    x1_fieldcat-ref_tabname = 'IT_ALV'.
    APPEND x1_fieldcat TO et_fieldcat.
    CLEAR x1_fieldcat.
    x1_fieldcat-col_pos = '3'.
    x1_fieldcat-fieldname = 'V_LEGF'.
    x1_fieldcat-key = 'X'.
    x1_fieldcat-reptext_ddic = text-110.
    x1_fieldcat-ref_tabname = 'IT_ALV'.
    APPEND x1_fieldcat TO et_fieldcat.
    CLEAR x1_fieldcat.
    ENDFORM. " build_fieldcat
    FORM BUILD_LIST_HEADER *
    FORM x_list_header.
    DATA: x_list_header1 TYPE slis_listheader.
    *-----List Header: type H
    CLEAR x_list_header1 .
    x_list_header1-typ = 'H'.
    x_list_header1-info = text-105.
    APPEND x_list_header1 TO x_list_header.
    *-----List Key: type S
    x_list_header1-typ = 'S'.
    x_list_header1-key = text-106.
    x_list_header1-info = v_total.
    APPEND x_list_header1 TO x_list_header.
    *-----List Key: Type S
    CLEAR x_list_header1 .
    x_list_header1-typ = 'S'.
    x_list_header1-key = text-107.
    x_list_header1-info = v_succsount.
    APPEND x_list_header1 TO x_list_header.
    ENDFORM. " build_list_header
    FORM TOP_OF_PAGE *
    FORM top_of_page.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    it_list_commentary = x_list_header.
    ENDFORM. " TOP_OF_PAGE
    Regards
    Kiran

  • BAPI  CODE

    Hi,
    I am using a RFC function (Z_LV***) in web dynpro application.
    I have 4 input(import) parameters as
    <b>Parameter Name</b>    <b>Associated Type</b>
        Number                  BAPIP0001-PERNR
        QuotaBeg                BAPIABWKON-QUOTABEG
    In custom controller> implementation in wdDoInit() method> how to create new element in Bapis and other nodes.
    I am following Flightlist TutorIAL.
    cAN SOMEONE HELP IN THIS CODE?.
    THANKS,
    DEEPTI PATIL
    CAN SOMEONE HELP ME IN CODE OF THIS?

    Hello Deepthi,
    The problem that i found is that in the value binding part, you are initializing a class instead you pass corresponding context value to the input parameter of the RFC.
    Try to hardcode the values and try:
    Eg:
    input.setnumber( 12);   // Thinking that the parameter type as int
    input.setdestination_from( "delhi"); // considering as String
    You may follow this link for any clarification:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/7d646a6c-0501-0010-b480-bf47b8673143?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#15 [original link is broken]
    For binding the model context to component controller; Drag from source to target as a whole; but when you try to bind with view controller, you have to create separate binding for input and output.
    Regards
       Vinod V

  • !!urgent - BAPI ..... pls help!!

    Hi,
    I really need help to be able to save materials made up of several parts with BAPI.
    Let me show you the idea by using the example of car (finished product):
    Car is built from a lot of components, for instance:
    - 1 engine
    - 4 tires
    - 2 front lights
    etc.
    My task is to implement a method responsible for creating a finished product and all necessary semi-finished products which are connected with ready prod and save them in SAP. Furthermore I've got to create a bill of materials.
    Has somebody faced similar problem? How have you solved it? How?
    Below I show what I've found out:
    I've got to create material master record for trading goods(type: HAWA in Headdata) and create Semifinished products (type: HALB) by using BAPI_MATERIAL_SAVEDATA (hopefully I'm right, otherwise pls correct me), but I still don't know how to connect them with each other and then use to create BOM.
    According to my best knowledge there is no BAPI to create BOM...i tried to find without any result.
    Looking forward your answers.
    BR,
    Rafal

    Hi
    This is the documentation for Function module - CSAP_MAT_BOM_CREATE  
    Functionality
    You can use this function module to create simple material BOMs.
    You cannot add alternatives or variants to a BOM, as in transaction CS01.
    Current restrictions:
    You cannot create long texts.
    You cannot create sub-items.
    You cannot classify BOM items for batches.
    You can only save your BOM if no errors occur, because it is not yet possible to change a BOM. Both header data and all item data must be correct.
    Please note:
    Fields where no entry can be made because they were not selected are initialized. The log does not contain information on initialized fields.
    The BOM default values defined in the control data and any user-specific defaults are handled in the same way as in the online transaction.
    Default values that are dependent on BOM usage (for example, indicators for relevancy to production, costing, and so on) are not processed.
    If you create items with object dependencies, the dependency must have basic data, a description, and source code entered.
    The fields OBJECT_ID and IDENTIFIER identify the object to which a dependency belongs.
    (OBJECT_ID = '2'  => BOM item)
    Dependencies are identified by internal or external names. When you create a dependency, you must enter an external name, because an internal name is not assigned until you save.
    Recursiveness in class items is recognized, but no information is available on which objects in the class caused the recursiveness. You cannot define recursiveness as allowed for these objects.
    Example
    *---- Feldleiste Stücklistenkopfdaten
    data: begin of tstko.
              include structure stko_api01.
    data: end of tstko.
    *---- Tabelle Stücklistenpositionen
    data: begin of tstpo occurs 0.
              include structure stpo_api01.
    data: end of tstpo.
    *---- Tabellen für Beziehungswissen:
        Basisdaten
    data: begin of tdep_data occurs 0.
             include structure csdep_dat.
    data: end of tdep_data.
        Beschreibung
    data: begin of tdep_descr occurs 0.
             include structure csdep_desc.
    data: end of tdep_descr.
        Source
    data: begin of tdep_source occurs 0.
             include structure csdep_sorc.
    data: end of tdep_source.
        Reihenfolge
    data: begin of tdep_order occurs 0.
             include structure csdep_ord.
    data: end of tdep_order.
        Dokumentation
    data: begin of tdep_doc occurs 0.
             include structure csdep_doc.
    data: end of tdep_doc.
    data: flg_warning like capiflag-flwarning.
    *- Datenbankprotokoll eröffnen
       call function 'CALO_INIT_API'
            exceptions
                 log_object_not_found     = 1
                 log_sub_object_not_found = 2
                                                                       other_error              = 3
                                                                       others                   = 4.
    *- Kopfdaten füllen
       tstko-base_quan = '1.000'.
       tstko-bom_text = 'Stücklistentext'.
    *- Positionsdaten füllen
    1. Position (Lagerteil)
       clear tstpo.
       tstpo-item_no    = '0010'.
                                                                                    tstpo-item_categ = 'L'.                                                                                "Mußeingabe
                                                                                    tstpo-component  =                                                                                'MAT200'.                                                                                "Mußeingabe
                                                                                    tstpo-comp_qty                                                                                = '1.000'.                                "Mußeingabe
       tstpo-comp_unit  = 'ST'.
       append tstpo.
    2. Position (Rohmaßposition)
       2 Stück a 4 m X 3 m => 2 St a 12 m2
       clear tstpo.
       tstpo-item_no    = '0020'.
                                                                                    tstpo-item_categ = 'R'.                                                                                "Mußeingabe
                                                                                    tstpo-component  =                                                                                'MAT300'.                                                                                "Mußeingabe
                                                                                    tstpo-comp_qty                                                                                = '2.000'.                                "Mußeingabe
                                                                                    tstpo-vsi_size1  =                                                                                '4.000'.                                  "Mußeingabe
       tstpo-vsi_size2  = '3.000'.
       tstpo-vsi_szunit = 'M'.
       tstpo-comp_unit  = 'M2'.
       append tstpo.
    3. Position (Textposition)
       clear tstpo.
       tstpo-item_no    = '0030'.
                                                                                    tstpo-item_categ = 'T'.                                                                                "Mußeingabe
       tstpo-item_text1 = 'Positionstext'.           "Mußeingabe
       append tstpo.
    4. Position (Dokumentposition)
       clear tstpo.
       tstpo-item_no    = '0040'.
                                                                                    tstpo-item_categ = 'D'.                                                                                "Mußeingabe
                                                                                    tstpo-document   = 'DOK1'.                                                                                "Mußeingabe
                                                                                    tstpo-doc_type   =                                                                                'DRW'.                          "Mußeingabe
       tstpo-comp_qty   = '1.000'.
       tstpo-comp_unit  = 'ST'.
    5. Position (Klassenposition)
       clear tstpo.
       tstpo-item_no    = '0050'.
                                                                                    tstpo-item_categ = 'K'.                                                                                "Mußeingabe
       tstpo-res_itm_ct = 'L'.
                                                                                    tstpo-class      = 'CLS1'.                                                                                "Mußeingabe
                                                                                    tstpo-class_type =                                                                                '200'.                          "Mußeingabe
                                                                                    tstpo-comp_qty                                                                                = '1.000'.                                "Mußeingabe
       tstpo-comp_unit  = 'ST'.
    6. Position (Lagerteil) mit Beziehungswissen
       clear tstpo.
       tstpo-item_no    = '0060'.
                                                                                    tstpo-item_categ = 'L'.                                                                                "Mußeingabe
                                                                                    tstpo-component  =                                                                                'MAT200'.                                                                                "Mußeingabe
                                                                                    tstpo-comp_qty                                                                                = '1.000'.                                "Mußeingabe
       tstpo-comp_unit  = 'ST'.
       tstpo-identifier = 'P1'.      "Mußeingabe beim Anlegen von BezWissen
       append tstpo.
    Beziehungswissen zu Position 0060
       clear tdep_data.
       tdep_data-object_id  =  '2'.
       tdep_data-identifier = 'P1'.
       tdep_data-dep_extern = 'B1'.
       tdep_data-dep_type   = '5'.
       tdep_data-status     = '1'.
       append tdep_data.
       clear tdep_source.
       tdep_source-object_id  = '2'.
       tdep_source-identifier = 'P1'.
       tdep_source-dep_extern = 'B1'.
       tdep_source-line_no    = '1'.
       tdep_source-line       = 'Farbe = ''rot'''.
       append tdep_source.
       clear tdep_descr.
       tdep_descr-object_id  = '2'.
       tdep_descr-identifier = 'P1'.
       tdep_descr-dep_extern = 'B1'.
       tdep_descr-language   = 'D'.
       tdep_descr-descript   = 'Beziehung B1 zu Position P1'.
       append tdep_descr.
    7. Position (Lagerteil) mit Beziehungswissen
       clear tstpo.
       tstpo-item_no    = '0070'.
                                                                                    tstpo-item_categ = 'L'.                                                                                "Mußeingabe
                                                                                    tstpo-component  =                                                                                'MAT400'.                                                                                "Mußeingabe
                                                                                    tstpo-comp_qty                                                                                = '1.000'.                                "Mußeingabe
       tstpo-comp_unit  = 'ST'.
       tstpo-identifier = 'P2'.      "Mußeingabe beim Anlegen von BezWissen
       append tstpo.
    Beziehungswissen zu Position 0070
       clear tdep_data.
       tdep_data-object_id  =  '2'.
       tdep_data-identifier = 'P2'.
       tdep_data-dep_extern = 'B2'.
       tdep_data-dep_type   = '5'.
       tdep_data-status     = '1'.
       append tdep_data.
       clear tdep_source.
       tdep_source-object_id  = '2'.
       tdep_source-identifier = 'P2'.
       tdep_source-dep_extern = 'B2'.
       tdep_source-line_no    = '1'.
       tdep_source-line       = 'Farbe = ''rot'''.
       append tdep_source.
       clear tdep_descr.
       tdep_descr-object_id  = '2'.
       tdep_descr-identifier = 'P2'.
       tdep_descr-dep_extern = 'B2'.
       tdep_descr-language   = 'D'.
       tdep_descr-descript   = 'Beziehung B1 zu Position P1'.
       append tdep_descr.
    *- Materialstückliste anlegen
       call function 'CSAP_MAT_BOM_CREATE'
            exporting
                 material   = 'MAT100'
                                                                       plant      = '0001'
                 bom_usage  = '1'
                 valid_from = '01.01.1995'
                 i_stko  = tstko
            importing
                 fl_warning = flg_warning
            tables
                                                                       t_stpo       = tstpo
                 t_dep_data   = tdep_data
                 t_dep_descr  = tdep_descr
                 t_dep_source = tdep_source
                 t_dep_order  = tdep_order
                 t_dep_doc    = tdep_doc
            exceptions
                 error   = 1.
       if sy-subrc eq 1.
    *---- Fehler aufgetreten (Stückliste kann nicht angelegt werden)
        Bitte Protokoll auswerten
       endif.
       if flg_warning eq 'X'.
    *---- Bitte Protokoll auswerten. Dieses enthält Informationen, War-
        nungen und Erfolgsmeldungen
       Endif.
    Parameters
    MATERIAL
    PLANT
    BOM_USAGE
    VALID_FROM
    CHANGE_NO
    REVISION_LEVEL
    I_STKO
    FL_NO_CHANGE_DOC
    FL_COMMIT_AND_WAIT
    FL_CAD
    FL_DEFAULT_VALUES
    FL_WARNING
    BOM_NO
    T_STPO
    T_DEP_DATA
    T_DEP_DESCR
    T_DEP_ORDER
    T_DEP_SOURCE
    T_DEP_DOC
    T_LTX_LINE
    T_STPU
    Exceptions
    ERROR
    Function Group
    CSAP
    Regards
    - Atul

  • URGENT - Error code while installing iTunes

    Hi,
    I'm currently trying to install iTunes on my laptop as I've just bought the new iPod touch 5th generation and due to me being on vacation I am unable to connect to the accomodation's wifi on the iPod due to having to use their website to connect resulting in me having to connect it to iTunes instead. However during the installation of iTunes i'm receiving error code:
    [An error occured during the installation of assembly 'Microsoft.VC80.CRT,type="win32",version="8.0.50727.6195",publicKeyToken="1fc8b 3b9a1e18e3b",processorArchitecture="x86"'. Please refer to help and support for more information. HRESULT: 0x80073712]
    i
    I have tried so many things and nothing is letting it install. I've removed all security from my laptop. This runs on windows vista and it is a dell if that helps.
    Could someone please help urgently!!!!!!!!
    Thank you

    See the second box in Troubleshooting issues with iTunes for Windows updates.
    tt2

  • Urgent: ABAP Code help reqd

    Hi,
    Can anyone please me provide me ABAP code for the following case:
    Table1 – JHAGA
    Table2 – JHAGVZ
    Primary keys in JHAGA:
    Order Item Number [POS_NR]
    Billing Dataset [GRUPPABRNR]
    Sales Document Number [AVM_NR]
    This requirement is for an InfoSet. For each order ideally we can have multiple sales agent. Sales Agent is being pulled from JHAGVZ. For this InfoSet we are going to go with assumption that we wont have more then 10 sales agent for an order,
    Consider 10 extra fields in InfoSet SA1 – SA10 for 10 Sales Agent.
    I need code which to populate this sales agent field. If an order exists in JHAGA then for that order in JHAGVZ populate the SA1-SA10 field.
    JHAGA – Order#10
    JHAGVZ – Order#10 – SalesAgent11
                   SalesAgent12
                   SalesAgent13
    Then SA1 should have SalesAgent11, SA2 should have SalesAgent12 and SA3 should have SalesAgent13 and so on…     
    Thank you,
    sam

    HI ,
    Are these two field a part of the table INFOROBJECT?
    if they are, you can write a select statement like :
    select 0CUSTOMER 0SALESORG YLEG_ENTITY
           from INFOROBJECT
           into Y_CUST_LE
           where ( Yacc_SEQ <> ´ZROO´  and
                   0PRICE_LIST <> space).
    Hope this helps.
    If not, please explain problem clearly.

  • Very Urgent : 'BAPI for CK74n in ECC 6.0 for crating the cost estimates'

    Hi guys,
    i am working in the upgradation project from 4.5b to ecc 6.0
    in 4.5b we have the tcode ck71 for cost estimates
    the respective tcode in ecc 6.0 is CK74N
    I want BAPI for tcode CK74N to upload the data
    can you please help me to find out the respective BAPI
    Thanks
    Ramesh

    Hi guys,
    i am working in the upgradation project from 4.5b to ecc 6.0
    in 4.5b we have the tcode ck71 for cost estimates
    the respective tcode in ecc 6.0 is CK74N
    I want BAPI for tcode CK74N to upload the data
    can you please help me to find out the respective BAPI
    Thanks
    Ramesh

  • URGENT: Reason code in Material document

    Dear all,
    We processed a thousand 551 movements without reason code.
    The user strongly NEEDs that field populated.
    I tried to modified the document with MB02 but, the field 'reason code'  does not appear.
    I looked in configuration trying to find a way to open it for input when process with MB02 and I did not find it.
    This has BIG implications in our company and the user is thinking in updating directly MSEG with the reason code.
    Does any body know how to open the field in MB02  OR if there is any implication in updating field Reason code (MSEG-GRUND) directly in the database?
    Thank you.
    Monica.

    Monica,
    I don't think it's possible via MB02. In general, changes to a material document are very limited (except a few text fields). I would suggest to cancel the movements and redo them correctly instead of doing a direct table update.
    If the volume is high, you should try to use LSMW or similar methods. Have a look into BAPI_GOODSMVT_CANCEL and BAPI_GOODSMVT_CREATE.
    Hope this helps.
    H Narayan

  • Urgently Need Code for Copy & Paste from Html Table in JSP to Excel file

    I am creating a html table in JSP file .
    I need code for 'Cut,Copy,Paste' functions ie. if someone wants to copy data from my table to excel file or from excel file to html table he shud be able to do that.
    Can someone give me code for 'Cut,Copy and Paste' i.e. some javascript functions which can do cut, copy and paste which i can put in my jsp file
    Thanks
    Message was edited by:
    javatechguru2007

    package com.chinmayananda
    public class Tetris{
    // complete here
    code]
    public abstract class AbstractTetris {
       public abstract void start();
       public abstract void stop();
    }nearly done

  • Urgent java code help needed

    i need java code for writing following lines in a file
    <?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
    "http://www.wapforum.org/DTD/wml_1.1.xml">
    Moreover i need code for reading word by word html file.
    PLease reply as soon as possible.
    iwapsms

    for the html-part there are several html-parser, that bould whole parsetrees, which you can traverse (walk) through as you whish. just check google for it (something like: java html parser).
    if that xml you have there is in String-form, just use a Filewriter
    BufferedWriter writer = new BufferedWriter (new FileWriter (new File ("FilePath/filename.xml")));
    writer.write (xmlString);
    writer.close();however, if you have to juggle xml tags, content and attributes a lot, i'd recomend jdom to construct the xml and saxParser to write it.
    again jsut google for it.

  • Urgent:  Booking code for ABAP ECC 5.0

    Hi,
    What is the booking code for the ABAP ECC 5.0 cerfication.
    Regards
    Suresh

    There are several one, but it seems it's something TAW12 ot TAW10, probable C_TAW12_04 is relevant for you.
    C_TAW12 SAP NW-ABAP Workbench (2003)
    C_TAW12_04 SAP NW-Appl.Dev.Focus ABAP
    TAW12: ABAP Workbench Concepts
    TAW10 ABAP Workbench Fundamentals
    Best regards,
    Peter

Maybe you are looking for

  • Error while running the RFC on ECC 6.0 server

    Hello Champs,       The problem I am facing while sending the data for validation and invalidation from RFC on ECC server to Pi server to be send to a webservice. This scenario was working perfectly fine when the RFC was run on R/3 4.7 server. On upg

  • Nomad Jukebox Zen Xtra 30GB mp3 player - Windows Vista

    I no longer have the disc that came with my player and can't seem to find drivers to get my PC to recognize the player. Downloads seem to be for older operating systems maybe because the player is so old. When I try to downlod them I get errors. Not

  • Customer document number not picked while making payment

    Hi  guys we have one vendor the same vendor as customer also. while we making payment to vendor customer document document number not picked,, the erro message comes.. " NO APPROPRIATE LINE ITEM IS CONTAINED IN THE DOCUMENT" But we already assigned t

  • Why Facetime is not working in United Arab Emirates?

    Why Facetime is not working in United Arab Emirates?? Even the icon for it and its setting in the phone's setting list are not exist.. Could it be that this service is locked by our local mobile carrier or from Apple side?

  • How to download xMII

    Hi Export.    I tried to download SAP xMII 12.0 or 11.5 version through my OSS ID Download-->Entry by Application --> Composit application But am not able to download any version. Kindly help me to get download SAP xMII 12.SCA file from Servicemarket