Error while creating a Custom BAPI?

Hi Guys,
              I created Custom BAPI thru SWO1 tr code and API method also.AFter API methos creation i went to GOTO->ERRORLIST then i got these errors
"Field SAPB -SAPFILES is too long to be included in the container
Field BAPICONTEN -LINE is too large to be included in container"
so what shall i do to overcome thiese errors
Thanks,
Gopi.

Hi Gopi,
Check this link
[http://www.erpgenie.com/sap/abap/bapi/example.htm]

Similar Messages

  • Error while creating a customer

    Hi All,
    While creating a customer my client is getting an error message "Specify reference account number-Message no.F2065".
    Thanks in advance.
    Ramesh.

    Hi Dear,
    When ever creating the customer master you must select account Group
    1.Ex: Local, Foreign or One time customer etc. check which group your selecting here.
    2. Specify company code
    3. Specify Sales Area
    4. Also check common Master data for  Distribution channel  and Division
    MENUPATH: SPRO - IMG - SD - MASTER DATA - Define COMMON Dist Chanl & Divsion.
    Regards,
    MH

  • Error while creating BOM using BAPI (urgent)

    Hi all,
    Thanks for ur help. i am getting some error while creting a BOM using that BAPI
    BAPI_MATERIAL_BOM_GROUP_CREATE.
    errors are
    1) Error/warning when checking the structure of the BOM group with ID =
    2)Alternative does not exist for material assignment to material BAPIBOMFG1
    is it mandatory to pass the bom group id to this bapi?
    In bomgroup structure , i am not passing anything to BOM_GROUP field.
    is it mandatory to pass this data? i am giving my coding below.plz suggest , where i am making mistake. it is urgent.
    regards
    pabitra
    report z_bom_create
    line-size 132
    line-count 65
    no standard page heading.
    *-- DATA DECLARATION--
    include <icon> .
    *---Tables
    tables : s076, t100, marc .
    *---Types
    types : begin of t_upload, " Upload file data
    col1(18),
    col2(10),
    col3(30),
    col4(12),
    col5(50),
    end of t_upload,
    begin of t_split,
    location like stpu-ebort,
    end of t_split.
    data:begin of i_return occurs 10.
    include structure bapiret2.
    data:end of i_return.
    types:begin of t_item."occurs 10.
    include structure BAPI1080_ITM_C.
    types:end of t_item.
    types:begin of t_subitem." occurs 10.
    include structure BAPI1080_SUI_C.
    types:end of t_subitem.
    types:begin of t_header." occurs 10.
    include structure BAPI1080_MBM_C.
    types:end of t_header.
    types:begin of t_bomgroup." occurs 10.
    include structure BAPI1080_BGR_C.
    types:end of t_bomgroup.
    types:begin of t_variant." occurs 10.
    include structure BAPI1080_BOM_C.
    types:end of t_variant.
    *--- Tables
    data: i_upload type standard table of t_upload, " to hold data
    i_upload1 type standard table of t_upload,
    i_split type standard table of t_split,
    i_item type standard table of t_item,
    i_subitem type standard table of t_subitem,
    i_header type standard table of t_header,
    i_bomgroup type standard table of t_bomgroup,
    i_variant type standard table of t_variant.
    data: wa_upload type t_upload, " to hold file data,
    wa_upload1 type t_upload, " to hold plan data,
    wa_split type t_split,
    wa_item type t_item,
    wa_subitem type t_subitem,
    wa_header type t_header,
    wa_bomgroup type t_bomgroup,
    wa_variant type t_variant.
    data:v_matnr like mara-matnr,
    v_start like sy-index,
    v_count(3) type c.
    *--Constants
    data: c_dot type c value '.',
    c_x type c value 'X',
    c_comma type c value ','.
    -------Selection Screen Design -
    *Selection screen for input of upload file address
    selection-screen skip 2.
    selection-screen begin of block blk1 with frame.
    parameters : p_file like rlgrap-filename obligatory .
    parameters : p_matnr like mara-matnr obligatory,
    p_werks like marc-werks obligatory memory id wrk,
    p_stlan like afko-stlan obligatory default '1' .
    selection-screen end of block blk1.
    ---AT SELECTION SCREEN -
    at selection-screen on value-request for p_file.
    *--For popup to select file.
    perform f_give_help.
    at selection-screen on p_matnr.
    perform f_check_matnr.
    -----START OF SELECTION -
    *--Data upload using WS_Upload.
    perform f_get_data.
    perform f_get_bom_data.
    perform f_get_bom_data1.
    perform f_call_bapi.
    *& Form f_give_help
    text
    --> p1 text
    <-- p2 text
    FORM f_give_help.
    call function 'WS_FILENAME_GET'
    exporting
    mask = ',.,..'
    mode = 'O'
    importing
    filename = p_file
    exceptions
    inv_winsys = 1
    no_batch = 2
    selection_cancel = 3
    selection_error = 4
    others = 5.
    if sy-subrc <> 0 and not sy-msgty is initial.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    ENDFORM. " f_give_help
    *& Form f_check_matnr
    text
    --> p1 text
    <-- p2 text
    FORM f_check_matnr.
    CALL FUNCTION 'BAPI_MAT_BOM_EXISTENCE_CHECK'
    EXPORTING
    MATERIAL = p_matnr
    PLANT = p_werks
    BOMUSAGE = '1'
    VALID_FROM_DATE =
    VALID_TO_DATE =
    TABLES
    RETURN = i_return.
    ENDFORM. " f_check_matnr
    *& Form f_get_data
    text
    --> p1 text
    <-- p2 text
    FORM f_get_data.
    call function 'WS_UPLOAD'
    exporting
    CODEPAGE = ' '
    filename = p_file
    filetype = 'DAT'
    tables
    data_tab = i_upload
    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
    others = 10
    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. " f_get_data
    *& Form f_get_bom_data
    text
    --> p1 text
    <-- p2 text
    FORM f_get_bom_data.
    delete i_upload where col1 is initial.
    delete i_upload where col1 cs 'ITEM'.
    read table i_upload into wa_upload with key col1 = 'FINISHED GOOD:'.
    if sy-subrc = 0.
    v_matnr = wa_upload-col2.
    if v_matnr <> p_matnr.
    message e001(zl) with p_matnr.
    endif.
    else.
    message e000(zl).
    endif.
    ENDFORM. " f_get_bom_data
    *& Form f_get_bom_data1
    text
    --> p1 text
    <-- p2 text
    FORM f_get_bom_data1.
    loop at i_upload into wa_upload where col1 CS 'FINISHED GOOD'.
    v_start = sy-tabix + 1.
    loop at i_upload into wa_upload1 from v_start .
    if wa_upload1-col1 cs 'FINISHED GOOD'.
    exit.
    else.
    perform f_split_upload_data.
    endif.
    endloop.
    endloop.
    ENDFORM. " f_get_bom_data1
    *& Form f_split_upload_data
    text
    --> p1 text
    <-- p2 text
    FORM f_split_upload_data.
    if not wa_upload1-col5 is initial.
    if wa_upload1-col5 cs c_comma.
    split wa_upload1-col5 at c_comma into table i_split.
    loop at i_split into wa_split.
    v_count = v_count + 1.
    endloop.
    if wa_upload1-col4 <> v_count.
    wa_upload1-col4 = v_count.
    endif.
    clear wa_upload1-col5.
    clear wa_split.
    loop at i_split into wa_split.
    wa_upload1-col5 = wa_split-location.
    append wa_upload1 to i_upload1.
    endloop.
    else.
    append wa_upload1 to i_upload1.
    endif.
    else.
    append wa_upload1 to i_upload1.
    endif.
    ENDFORM. " f_split_upload_data
    *& Form f_call_bapi
    text
    --> p1 text
    <-- p2 text
    FORM f_call_bapi.
    clear wa_upload1.
    wa_header-material = p_matnr.
    wa_header-plant = p_werks.
    wa_header-bom_usage = p_stlan.
    append wa_header to i_header.
    wa_bomgroup-bom_usage = p_stlan.
    wa_bomgroup-created_in_plant = p_werks.
    append wa_bomgroup to i_bomgroup.
    wa_variant-alternative_bom = 1.
    wa_variant-base_qty = 1.
    wa_variant-valid_from_date = sy-datum.
    append wa_variant to i_variant.
    loop at i_upload1 into wa_upload1.
    wa_item-item_no = wa_upload1-col1.
    wa_item-item_cat = wa_upload1-col2.
    wa_item-component = wa_upload1-col3.
    wa_item-comp_qty = wa_upload1-col4.
    append wa_item to i_item.
    wa_subitem-subitem_qty = '1'.
    wa_subitem-installation_point = wa_upload1-col5.
    append wa_subitem to i_subitem.
    endloop.
    CALL FUNCTION 'BAPI_MATERIAL_BOM_GROUP_CREATE'
    EXPORTING
    TESTRUN = ' '
    ALL_ERROR = ' '
    TABLES
    BOMGROUP = i_bomgroup
    VARIANTS = i_variant
    ITEMS = i_item
    SUBITEMS = i_subitem
    MATERIALRELATIONS = i_header
    ITEMASSIGNMENTS =
    SUBITEMASSIGNMENTS =
    TEXTS =
    RETURN = i_return.
    if i_return[] is initial.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    *write: /'BOM created:', stpo-stlnr.
    else.
    *if not i_return[] is initial.
    loop at i_return.
    IF i_return-TYPE = 'E'.
    errmsg-type = i_return-type.
    errmsg-line = i_return-message.
    append errmsg.
    ULINE /1(108).
    write:/ icon_led_RED as icon, i_return-MESSAGE.
    ULINE /1(108).
    ENDIF.
    IF i_return-TYPE = 'W'.
    errmsg-type = i_return-type.
    errmsg-line = i_return-message.
    append errmsg.
    ULINE /1(108).
    write:/ icon_led_YELLOW as icon, i_return-MESSAGE.
    ULINE /1(108).
    ENDIF.
    ENDLOOP.
    *write: / i_return-id, i_return-number, i_return-message(80).
    *endloop.
    *write: /'Error'.
    endif.
    ENDFORM. " f_call_bapi

    Hi shashi,
    Thanks for ur help.i tried after passing the group but it is giving same error.
    i am getting the error
    "Error/warning when checking the structure of the BOM group with ID= test"
    i am gettig the above error when i put bomgroup-bom_group_identification = 'TEST'.
    whatever i am putting in this field, the same error is comming having different value.
    if i put--- bomgroup-bom_group_identification = ' '. then i will get error
    "Error/warning when checking the structure of the BOM group with ID=
    if i omit that field, then also , i am getting same error.
    plz suggest what r the fields i need to pass for BOMGROUP structure for that bapi?
    regards
    pabitra

  • Error while creating new customer(xd01)

    following error ocurred while crating new customer.It wasnt case when i created customer before for the S/Org....
    "Communication error with external tax system(Vertex_MS0018)"
    Msg No TAX_TXJCD864)
    Pls help..
    thanks
    Amol

    Hi Amol,
    One user faced the same issue on IT tool forum, check the link for solution.
    http://sap.ittoolbox.com/groups/technical-functional/sap-crm/communication-error-with-the-external-tax-systemvertex_ms0018-909264
    Hope it helps,
    Regards,
    MT

  • Error while creating the custom controller

    Hi experts,
    I am working on a web dynpro object where i need to create an application configuration.I created a custom controller context.I mapped it to main view.I am using the attribute of custom controller context in main view so that another view view1 is displayed based on this attribute.
    custom controller context
    node1 --> display_view1
    mapped above node to main view.
    view1 is triggered in main view onaction method based on display_view1 value.
    Presently i am getting the dump " node1.1.main doesnot have elements."
    Please help.
    Edited by: ch_ravi_sap on Nov 22, 2011 2:11 PM

    Hi I get rid off the error.
    Changes i have made are cardinality from 0:n to 1:n. selection 0:n
    But presently i am changing the attribute of custom controller in component configuration browser.I am not able to see the changed value in main view ( where i have used this attribute ).
    Any help is appreciated
    Edited by: ch_ravi_sap on Nov 23, 2011 12:17 PM

  • Error while creating WBS through BAPI

    I am using BAPI_PROJECT_MAINTAIN to create WBS L2 & L3.
    There is only 1 WBS at both levels.
    For some cases it is running fine, but I am getting the following error in some cases:
    "WBS element 3UTWB_BSRHT_001 can no longer be shifted"
    What could be the reason?

    As you told you are creating WBS vai BAPI. This may not be  exact relevant Normally you cannot  change  hierarchy of WBS Elements after you have done some sort of execution / planning on it. If you are getting error than please share details of error message with no.
    With Regards
    Nitin P.

  • Error while creating Salesorder using BAPI

    hello frnds,
    I m new to abap and tryin to make use of BAPI_SALESORDER_CREATEFROMDAT1 to create Sales Order
    I have used the progrtam below.
    *& Report  ZSALESBAPITRIAL
    REPORT  zsalesbapitrial.
    TABLES : vbak , vbap.
    Parameter Screen.
    Sales Document Type.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    Sales document type.
    PARAMETERS: p_auart TYPE vbak-auart OBLIGATORY.
    Sales Organisation.
    PARAMETERS: p_vkorg TYPE vbak-vkorg OBLIGATORY.
    Distribution channel.
    PARAMETERS: p_vtweg TYPE vbak-vtweg OBLIGATORY.
    Division.
    PARAMETERS: p_spart TYPE vbak-spart OBLIGATORY.
    SKIP 1.
    Sold to.
    PARAMETERS: p_sold TYPE vbak-kunnr OBLIGATORY.
    Ship to.
    PARAMETERS: p_ship TYPE vbak-kunnr OBLIGATORY.
    SKIP 1.
    Material(Article No).
    PARAMETERS: p_matnr TYPE vbap-matnr   OBLIGATORY.
    Quantity (Cummulative quantity of sales Order)
    PARAMETERS: p_menge type vbap-kwmeng obligatory.
    Plant(Site )
    parameters: p_plant type vbap-werks obligatory.
    SELECTION-SCREEN END OF BLOCK b1.
    Data declarations.
    DATA: v_vbeln            LIKE vbak-vbeln.
    DATA: header             LIKE bapisdhead1.
    DATA: headerx            LIKE bapisdhead1x.
    DATA: item               LIKE bapisditem  OCCURS 0 WITH HEADER LINE.
    DATA: itemx              LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner            LIKE bapipartnr  OCCURS 0 WITH HEADER LINE.
    DATA: return             LIKE bapiret2    OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                             WITH HEADER LINE.
    DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                             WITH HEADER LINE.
    Header data
    Sales document type
      header-doc_type = p_auart.
      headerx-doc_type = 'X'.
    Sales organization
      header-sales_org = p_vkorg.
      headerx-sales_org = 'X'.
    Distribution channel
      header-distr_chan  = p_vtweg.
      headerx-distr_chan = 'X'.
    Division
      header-division = p_spart.
      headerx-division = 'X'.
      headerx-updateflag = 'I'.
    Partner data
    Sold to
      partner-partn_role = 'AG'.
      partner-partn_numb = p_sold.
      APPEND partner.
    Ship to
      partner-partn_role = 'WE'.
      partner-partn_numb = p_ship.
      APPEND partner.
    ITEM DATA
      itemx-updateflag = 'I'.
    Line item number.
      item-itm_number = '000010'.
      itemx-itm_number = 'X'.
    Material
      item-material = p_matnr.
      itemx-material = 'X'.
    Plant
      item-plant    = p_plant.
      itemx-plant   = 'X'.
    Quantity
      item-target_qty = p_menge.
      itemx-target_qty = 'X'.
      APPEND item.
      APPEND itemx.
      Fill schedule lines
      lt_schedules_in-itm_number = '000010'.
      lt_schedules_in-sched_line = '0001'.
      lt_schedules_in-req_qty    = p_menge.
      APPEND lt_schedules_in.
      Fill schedule line flags
      lt_schedules_inx-itm_number  = '000010'.
      lt_schedules_inx-sched_line  = '0001'.
      lt_schedules_inx-updateflag  = 'X'.
      lt_schedules_inx-req_qty     = 'X'.
      APPEND lt_schedules_inx.
    CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
    EXPORTING
    sales_header_in = header
    sales_header_inx = headerx
    IMPORTING
    salesdocument_ex = v_vbeln
    TABLES
    return = return
    sales_items_in = item
    sales_items_inx = itemx
    sales_schedules_in = lt_schedules_in
    sales_schedules_inx = lt_schedules_inx
    sales_partners = partner.
    Check the return table.
    LOOP AT return WHERE type = 'E' OR type = 'A'.
    EXIT.
    ENDLOOP.
    IF sy-subrc = 0.
    WRITE: / 'Error in creating document'.
    ELSE.
    WRITE: / 'Document ', v_vbeln, ' created'.
    ENDIF.
    but its giving 'Error in creating document' I m unable to figure wat i m missing . Is it tht i m gving wrong parameters.
    Please help !!!

    Does tht mean i need to add the following code
    Line item number.
    item-itm_number = '000010'.
    itemx-itm_number = 'X'.
    Material
    item-material = p_matnr.
    itemx-material = 'X'.
    Plant
    item-plant    = p_plant.
    itemx-plant   = 'X'.
    Quantity
    item-target_qty = p_menge.
    itemx-target_qty = 'X'.
    APPEND item.
    APPEND itemx.
    For second item.
    Line item number.
    item-itm_number = '000020'.
    itemx-itm_number = 'X'.
    Material
    item-material = '600020001'.
    itemx-material = 'X'.
    Plant
    item-plant    = p_plant.
    itemx-plant   = 'X'.
    Quantity
    item-target_qty = p_menge.
    itemx-target_qty = 'X'.
    APPEND item.
    APPEND itemx.
      Fill schedule lines
    lt_schedules_in-itm_number = '000010'.
    lt_schedules_in-sched_line = '0001'.
    lt_schedules_in-req_qty    = p_menge.
    APPEND lt_schedules_in.
      Fill schedule lines
    lt_schedules_in-itm_number = '000020'.
    lt_schedules_in-sched_line = '0002'.
    lt_schedules_in-req_qty    = p_menge.
    APPEND lt_schedules_in.
      Fill schedule line flags
    lt_schedules_inx-itm_number  = '000010'.
    lt_schedules_inx-sched_line  = '0001'.
    lt_schedules_inx-updateflag  = 'X'.
    lt_schedules_inx-req_qty     = 'X'.
    APPEND lt_schedules_inx.
      Fill schedule line flags
    lt_schedules_inx-itm_number  = '000020'.
    lt_schedules_inx-sched_line  = '0002'.
    lt_schedules_inx-updateflag  = 'X'.
    lt_schedules_inx-req_qty     = 'X'.
    APPEND lt_schedules_inx.
    But i guess it is overwritting my frst material..
    Also i m gettin a error 
    For object rv_beleg, number  range interval doesnot exist
    Pls suggest

  • Error while creating BOM using BAPI 'BAPI_BOM_UPLOAD_SAVE'

    Hi All,
    We are getting an error as 'Data is incomplete' while trying to create BoM using the bapi 'BAPI_BOM_UPLOAD_SAVE', if the item contains Item category as 'T'. But for other item category like 'L' or 'N', the bapi is sucessfull.
    The values that we pass to fill the item category 'T' are operation, item_cat, bom_itm_no, COMPON_QTY, FIXED_QTY as 'X', UNMEAS as 'ST', ITEM_TEXT1 and ITEM_TEXT2.
    Anyone who has faced same problem or has a solution to the problem, kindly provide a solution.
    Regards,
    Vijay

    The error you receive is because of different config for different Item Categories. Find out from the functional team what fields have they kept mandatory for the item category 'T'. You may not be passing one of those fields in the BAPI.
    Try creating a BOM manually for item category 'T' and you may figure our which field you are missing.

  • Error while creating GR using BAPI

    *I am creating material document using BAPI_GOODSMVT_CREATE .
    When I create the Material document using this BAPI I am able to create is successfully when there is no Account assignment category used means it blank at scheduling agreement level.
    But if the Account assignment category is given at the scheduling agreement level then BAPI fails and shows the error message u201CNo goods receipt possible for purchase order.
    I am using SAP version 4.6C
        SPLIT w_file-dln AT '.' INTO w_dd w_mm w_yyyy.
        CONCATENATE w_yyyy w_mm w_dd INTO w_dt.
        w_gm_hdr-pstng_date = w_dt.    " Posting Date
        w_gm_hdr-doc_date   = sy-datum." Doc Date
        w_gm_hdr-pr_uname   = sy-uname." User Name
        w_gm_cd-gm_code     = '01'.    "01 Goods Receipts for Purchase Order
        w_gm_itm-move_type  = '101'.
        w_gm_itm-mvt_ind    = 'B'.
      BAPI Call.
    Edited by: Nandkumar Ghodke on May 21, 2010 4:15 PM
    Edited by: Nandkumar Ghodke on May 21, 2010 4:16 PM

    As per i know..
    that the account assignment information applies to the item level and not to the schedule line level. This means that the quantities, values, and percentage rates indicate how the account assignment information of an item is assigned. This also applies to service items and purchase orders with invoicing plan
    Thanks
    Naresh

  • Net price must be greater than 0 error while creating PO using BAPI

    Hi guys!
    I'm using BAPI_PO_CREATE1 to create several PO's from a Z table record. I finally achieved that my BAPI to work as wished, with conditions, etc.
    The problem im having is that  i get the error of net price must be > 0.
    I do not have any condition type defined . Is it necessary to define one?
    Plz any help will be very appreciated.
    Thx.

    It will be configuration problem,create one PO manually and see the results
    and create same data for Po using  Function module and see the results
    most of the time net price should be more than 0,keep net price should be more than zero
    see the simple program ,what i created :
    *& Report  ZBAPI
    REPORT  ZBAPI.
    DATA: BEGIN OF i_data OCCURS 0,
            text(255),
          END OF i_data.
    DATA: i_ekko TYPE bapiekkoc.
    DATA: it_ekko LIKE TABLE OF i_ekko INITIAL SIZE 0  WITH HEADER LINE.
    DATA: BEGIN OF i_ekpo OCCURS 0,
            po_item(5),
            pur_mat(18),
            plant(4),
            net_price(23),
            disp_quan(13),
         END OF i_ekpo.
    DATA: it_ekpo LIKE TABLE OF bapiekpoc INITIAL SIZE 0 WITH HEADER LINE .
    DATA: BEGIN OF i_eket OCCURS 0,
             po_item(5),
             deliv_date(8),
             quantity(13),
          END OF i_eket.
    DATA: it_eket LIKE TABLE OF bapieket INITIAL SIZE 0 WITH HEADER LINE.
    DATA: v_index TYPE i.
    DATA: return TYPE TABLE OF bapireturn INITIAL SIZE 0 WITH HEADER LINE.
    DATA: po_num(10).
    START-OF-SELECTION.
    CALL FUNCTION 'UPLOAD'
    EXPORTING
      CODEPAGE                      = ' '
      FILENAME                      = ' '
      FILETYPE                      = ' '
      ITEM                          = ' '
      FILEMASK_MASK                 = ' '
      FILEMASK_TEXT                 = ' '
      FILETYPE_NO_CHANGE            = ' '
      FILEMASK_ALL                  = ' '
      FILETYPE_NO_SHOW              = ' '
      LINE_EXIT                     = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      SILENT                        = 'S'
    IMPORTING
      FILESIZE                      =
      CANCEL                        =
      ACT_FILENAME                  =
      ACT_FILETYPE                  =
      TABLES
        data_tab                      = i_data
    EXCEPTIONS
      CONVERSION_ERROR              = 1
      INVALID_TABLE_WIDTH           = 2
      INVALID_TYPE                  = 3
      NO_BATCH                      = 4
      UNKNOWN_ERROR                 = 5
      GUI_REFUSE_FILETRANSFER       = 6
      OTHERS                        = 7
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    loop at i_data.
    if i_data-text(1) = 'H'.
       shift i_data-text.
       v_index = v_index + 1.
       split i_data-text at ',' into i_ekko-doc_type
                                    i_ekko-purch_org
                                    i_ekko-pur_group
                                    i_ekko-vendor.
      append i_ekko to it_ekko.
    elseif i_data-text(1) = 'I'.
    shift i_data-text.
    split i_data-text at ',' into i_ekpo-po_item
                                   i_ekpo-pur_mat
                                   i_ekpo-plant
                                   i_ekpo-net_price
                                   i_ekpo-disp_quan.
    append i_ekpo.
    move-corresponding i_ekpo to it_ekpo.
    append it_ekpo.
    clear it_ekpo.
    else.
    shift i_data-text.
    split i_data-text at ',' into i_eket-po_item
                                   i_eket-deliv_date
                                   i_eket-quantity.
    append it_eket .
    move-corresponding i_eket to it_eket.
    append it_eket.
    clear it_eket.
    endif.
    endloop.
    CALL FUNCTION 'BAPI_PO_CREATE'
      EXPORTING
        po_header                        = i_ekko
      PO_HEADER_ADD_DATA               =
      HEADER_ADD_DATA_RELEVANT         =
      PO_ADDRESS                       =
      SKIP_ITEMS_WITH_ERROR            = 'X'
      ITEM_ADD_DATA_RELEVANT           =
      HEADER_TECH_FIELDS               =
    IMPORTING
      PURCHASEORDER                    =
      tables
        po_items                         = it_ekpo
      PO_ITEM_ADD_DATA                 =
        po_item_schedules                = it_eket
      PO_ITEM_ACCOUNT_ASSIGNMENT       =
      PO_ITEM_TEXT                     =
       RETURN                           = return
      PO_LIMITS                        =
      PO_CONTRACT_LIMITS               =
      PO_SERVICES                      =
      PO_SRV_ACCASS_VALUES             =
      PO_SERVICES_TEXT                 =
      PO_BUSINESS_PARTNER              =
      EXTENSIONIN                      =
      POADDRDELIVERY                   =
    write: po_num.
    use BAPi_TRANSACTION_COMITT FM always
      loop at return.
      write:/ return-message,return-type.
      endloop.
    Thanks
    Seshu
    Message was edited by:
            Seshu Maramreddy
    Message was edited by:
            Seshu Maramreddy

  • Tables TCURM and T001K inconsistent Error While Creating Materials by BAPI

    Hi I am Using the BAPI
    BAPI_MATERIAL_SAVEDATA to create Material Masters I am creating all views for a Material.
    When I repeatedly run the BAPI for Multiple runs to create the Materials for Multiple plants and multple sales Views
    I get an Error Message when it is tryng to create accounting and costing View
    The error is Tables
    TCURM and T001K inconsistent; notify your systems administrator
    I dont get this message if I create one Material.
    I get this error message only when I repeat the loop and try to create Materials for different valvation areas..
    Please some one give ur views ..
    I promise All replies will be rewarded..
    Thanks
    Martin

    Rob,
    This is the peculiar behavious of SAP.
    As i am trying to create the materials by using the BAPI with in Visual Basic.
    The error can be simulated by using online data entry
    i did a research on it and i found that the error can be overcome if we create the accouting view first and later oher views and this occurs if we try to create accouting views for other valuation areas are plants when we set the MRP_VIEW = "X" and ACCOUNT_VIEW = "X" and COST_VIEW = "X"
    i dont know the exact reason for all this...
    Thanks
    Martin

  • Error while creating WebService for BAPI

    Hi,
    I am trying to create a webservice for BAPI, i created Virtual interface and Webserice and activated.
    In transaction code WSCONFIG i checked webservice has been released. When i test webservice i am getting following error in browser.
    - <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    - <soap-env:Body>
    - <soap-env:Fault>
      <faultcode>soap-env:Server</faultcode>
      <faultstring xml:lang="en">SOAP processing failure, error id = 112</faultstring>
      </soap-env:Fault>
      </soap-env:Body>
      </soap-env:Envelope>
    Could u please tell me whats wrong on this?
    thanks for ur time.
    Murali.

    Does tht mean i need to add the following code
    Line item number.
    item-itm_number = '000010'.
    itemx-itm_number = 'X'.
    Material
    item-material = p_matnr.
    itemx-material = 'X'.
    Plant
    item-plant    = p_plant.
    itemx-plant   = 'X'.
    Quantity
    item-target_qty = p_menge.
    itemx-target_qty = 'X'.
    APPEND item.
    APPEND itemx.
    For second item.
    Line item number.
    item-itm_number = '000020'.
    itemx-itm_number = 'X'.
    Material
    item-material = '600020001'.
    itemx-material = 'X'.
    Plant
    item-plant    = p_plant.
    itemx-plant   = 'X'.
    Quantity
    item-target_qty = p_menge.
    itemx-target_qty = 'X'.
    APPEND item.
    APPEND itemx.
      Fill schedule lines
    lt_schedules_in-itm_number = '000010'.
    lt_schedules_in-sched_line = '0001'.
    lt_schedules_in-req_qty    = p_menge.
    APPEND lt_schedules_in.
      Fill schedule lines
    lt_schedules_in-itm_number = '000020'.
    lt_schedules_in-sched_line = '0002'.
    lt_schedules_in-req_qty    = p_menge.
    APPEND lt_schedules_in.
      Fill schedule line flags
    lt_schedules_inx-itm_number  = '000010'.
    lt_schedules_inx-sched_line  = '0001'.
    lt_schedules_inx-updateflag  = 'X'.
    lt_schedules_inx-req_qty     = 'X'.
    APPEND lt_schedules_inx.
      Fill schedule line flags
    lt_schedules_inx-itm_number  = '000020'.
    lt_schedules_inx-sched_line  = '0002'.
    lt_schedules_inx-updateflag  = 'X'.
    lt_schedules_inx-req_qty     = 'X'.
    APPEND lt_schedules_inx.
    But i guess it is overwritting my frst material..
    Also i m gettin a error 
    For object rv_beleg, number  range interval doesnot exist
    Pls suggest

  • Error while creating a custom LOV

    Hi All,
    We have a requirement to open a custom page on the click of an LOV
    inside a table(n Number of rows will be there in the table). We need to
    populate the base page field after selecting a value from the custom page.
    We are using a flow layout with a text box and a torch icon. On the
    click of torch icon we are using javascript to open the custom Page.
    Everything works fine. When we use the cancel/apply in the custom popup
    page, we are using javascript to submit the base page. The popup closes,
    but the base page is erroring out saying
    "You are trying to access a page that is no longer active.
    - The referring page may have come from a previous session. Please
    select Home to proceed. "
    Can we achive this functionality by any other approach?
    We cannot use the standard LOV as the page should have much more
    functionality than what the standard LOV offers. The client want the
    functionality to be in the same way as LOV works.
    We have set the Security property of the custom page to 'SelfSecured'.
    The javascript used on the click of the torch icon is given below.
    function popupWindow(pageUrl,formName,rowId,retainAM,isModal)
         var Nav4 = ((navigator.appName == "Netscape") &&
    (parseInt(navigator.appVersion) >= 4))
         if(rowId != null)
              pageUrl += "&xxbgRowId=" + rowId;
         if(retainAM)
              pageUrl += "&retainAM=Y";
         if(isModal)
              if(navigator.userAgent.indexOf("Firefox")!=-1) // For Mozilla --
    added for BUG#2339
                   var versionindex = navigator.userAgent.indexOf("Firefox")+8;
                   if (parseInt(navigator.userAgent.charAt(versionindex))>=1)
                        openWindow(self, pageUrl,formName ,{width:650, height:450,
    resizable:'yes'},'modal','dialog', true);
              else if(Nav4) // For Netscape -- For Mozilla also Nav4 will be true,
    but if the browser is mozilla it would be caught in the previous block only
    open(pageUrl,'self','width=600,height=400,toolbar=no,menubar=yes,status=1,resizable=yes,scrollbars=yes,modal=yes');
              else // For IE
                   openWindow(self, pageUrl, 'modal',{width:650, height:450,
    resizable:'yes'}, true);
         else
    open(pageUrl,'self','width=600,height=400,toolbar=no,menubar=yes,status=1,resizable=yes,scrollbars=yes');
    The javascript used on the click of the cancel button on the custom
    popup page is below.
    function closeAndSubmitBasePage()
         window.close();
    window.opener.submitForm(0,0,{serverValidate:'0',FromPopup:'selectSubmit'});
    }

    Mukul,
    I have tried with the bound value approach also. The popup is coming fine, but when the base page is submitted , it is still erroring out. Also if we close the popup with the browser close (X), and then do some action on the base page, it is erroring out saying
    "You cannot complete this task because you accessed this page using the browser's navigation buttons (the browser Back button, for example).".
    Now our client has agreed to navigate to another page and come back to the originating page instead of bringing the popup. Since we are close to the release point, I am going ahead with this approach., there is lot to do with the page functionality.
    I will try to use the popup again , once the functionality of the page is done and will update you on the same.
    Thanks a lot Mukul
    --Anoop                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Error while creating a custom type

    i'am having the following statement,
    create or replace type myType as object ( x varchar2(20) not null )
    when i try to create, i get the following error,
    PLS-00218: a variable declared NOT NULL must have an initialization assignment
    now how do i create an object whose value(S) should be not null...???...............

    my_type.id here is nonsense. It's NOT a type at all.
    OUT and IN OUT parameters can't be assigned with DEFAULT value:
    SQL> create procedure wrong_params(id in out number default 0)
      2  is
      3  begin
      4   null;
      5  end;
      6  /
    Warning: Procedure created with compilation errors.
    SQL> show error
    Errors for PROCEDURE WRONG_PARAMS:
    LINE/COL ERROR
    1/24     PLS-00230: OUT and IN OUT formal parameters may not have default
             expressionsIf you declare variable as NOT NULL you have to assign default value to prevent
    PL/SQL compiler confusion:
    SQL> declare
      2   id number not null;
      3  begin
      4   null;
      5  end;
      6  /
    id number not null;
    ERROR at line 2:
    ORA-06550: line 2, column 5:
    PLS-00218: a variable declared NOT NULL must have an initialization assignment
    SQL> declare
      2   id number not null default 10;
      3  begin
      4   null;
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    I read out parameters cannot be of type not nullFormal arguments of procedures/functions can not be declared as NOT NULL
    anyway they are OUT or IN.
    But actual parameters (variables you are passing into procedures) can be declared
    as not null. Because of this this call cause the error - procedure passes null value ( [i]default value for OUT formal argument ) out to actual parameter which is not null:
    SQL> create or replace procedure my_proc
      2  (formal_argument out number)
      3  is
      4  begin
      5   null;
      6  end;
      7  /
    Procedure created.
    SQL> declare
      2   actual_argument number not null := 0;
      3  begin
      4    my_proc(actual_argument);
      5  end;
      6  /
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at line 4See Tom Kyte's threads for more explanations:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:12505620454267529210::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:325417134618
    Rgds.

  • Error while creating Contracts using BAPI

    Hello,
    I am trying to use BAPI BUS2014 to create new Purchasing Contracts. Now everything works fine, except for some strange cases where Contracts are failing out with a message as:
    Reference document or master record has different language
    I don't understand it why. Language being set in Contracts is defined for those items in MM and it works for others but not for all. I think I am missing some basic point here. Can anyone please suggest?
    Any help is highly appreciated!
    Cheers
    EssKay

    OK - stupid question. I did figure it out myself. Sorry for my impatience. This is my first BAPI program, so a bit too shaky
    Cheers
    EssKay

Maybe you are looking for

  • Getting rtorrent to re-download a previously deleted torrent?

    I have watch directories setup, that seem to be working. Now I'd like to download a torrent that I have downloaded before, and then deleted (.torrent and data). Unfortunately, rtorrent knows that it's been downloaded before, and therefore only compla

  • Af:query advanced mode.How to hide ???

    I am using Jdeveloper 11.1.2.3.0 I have a af:query component. I need to have the advanced mode features like add fields but I want to know is there a way to make the screen have the look and feel of basic mode.(Just to have one search box for a field

  • Networks seen by airport, but can not connect to internet

    Hello, This is for a powerbook G4 running 10.5.8 that previously connected to our time capsule without issues. Recently, it stopped connecting to the internet although our two macbooks, phones, etc. have no problem. It can see our network and also an

  • Need help in RegExp  AS 3.0

    Hi, var str:String ="123+31+21-25*5"; var re:RegExp = /(\d+)/; var results:Array = str.split(re); trace(results) // ,123,+,31,+,21,-,25,*,5,*/ //but if the string will be is ... var str:String ="123.5+31.5+21-25*5"; var re:RegExp = /(\d+)/; var resul

  • Crashs of MBP 13 mid-2010 (MC375LL/A)

    Hi, I am using a a MBP 13 mid-2010 (MC375LL/A) with the following characteristics MacBookPro 7,1 Intel Core 2 Duo 2.6GHz RAM: 8Gb (2x4Gb in replacement of the 2x2Gb) HDD: WD Blue 500Go 5400trs/min (in replacement of 320Go) GPU: Nvidia 320M 256Mo OSX: