BAPI  (mega URGENT)

Hello
We have set up an interface to post invoices.
We use the bapi BAPI_ACC_DOCUMENT_POST to do this. The logic has already been programmed.
This BAPI takes the FC (foreign currency amount) (out of our sourcefile) + exchange rate and calculates via this infomation the LC(local currency amount).
In latest tests, it appears that for financial & internal reasons we also need to take the Local currency amount out of our source file & not calculated via SAP.
Problem: There is no field foreseen in this BAPI to do this (to add the LC amounts).
How could we solve this?
Could we use a second BAPI to update the LC amounts (LC tax base amounts need to be updated also, in fact all LC amounts on invoice need to be updated)??
Would this have no neg concequences?
What BAPI can we use for this?
First we thought to update the fields that come out of the BAPI just before they go into the BKPF/BSEG/BSET tables, but the programmer says this is not possible...
Many thanks!!
Message was edited by: Boiler

Hi Guys, thx for your answer.
This is Boiler with an account of a collegue, since mine was blocked due to an error.
Is it not possible to use our existing BAPI and then use some CHANGE or UPDATE BAPI to change the Local Currency Amount of the invoice?
Is it possible to change the Local Currency Amount of an invoice??
If we have to use the BAPI's that you guys are suggesting, this would mean that we have to do the programming all over again...
We would like to keep using our existing BAPI, but use a second BAPI to update the LOCAL CURRENCY AMOUNT in the invoice that was booked.
Any idea's please??
Thanks for your reply's!
Kr,
Boiler

Similar Messages

  • Plz help me out bapi message (urgent)

    hi
    i need help. i m passing values in bapi n taking message from table in bapi to print in out put.
    requirment is..
    a)     Pass the following parameters:
    NUMBER = NETWORK
    Tables: I_COMPONENTS_CHANGE
         COMPONENT = IT_COMP-COMPONENT
         BATCH = P_CHARG
    Tables: I_COMPONENTS_CHANGE_UPDATE
         COMPONENT = IT_COMP-COMPONENT
         BATCH = “X”
    b)     The components that failed update are provided in table, E_MESSAGE_TABLE. If MESSAGE_TYPE = “E”, get EXTERNAL_OBJECT_ID and MESSAGE_TEXT. Remove spaces from EXTERNAL_OBJECT_ID and then match against IT_COMP-COMPONENT to get MATERIAL, PLANT and NETWORK and write MATERIAL, PLANT and NETWORK and MESSAGE_TEXT to the job log.
    so for that i m doing coding like (this is part of my program)
    LOOP AT i_temp_comp.
        CLEAR : i_comp_change,i_comp_upd,i_e_msg.
        REFRESH : i_comp_change,i_comp_upd,i_e_msg.
        LOOP AT i_comp WHERE network = i_temp_comp-network.
          l_number = i_comp-network.
          i_comp_change-component = i_comp-component.
          i_comp_change-batch = p_charg.
          APPEND i_comp_change.
          i_comp_upd-component = i_comp-component.
          i_comp_upd-batch = c_x.
          APPEND i_comp_upd.
        ENDLOOP.
        CALL FUNCTION 'BAPI_NETWORK_COMP_CHANGE'
          EXPORTING
            number                     = l_number
          TABLES
            i_components_change        = i_comp_change
            i_components_change_update = i_comp_upd
            e_message_table            = i_e_msg.
        IF NOT i_e_msg[] IS INITIAL.
          LOOP AT i_e_msg.
            IF i_e_msg-message_type = c_e.
              READ TABLE i_comp WITH KEY network = l_number
         component = i_e_msg-external_object_id.       "#EC *
                IF sy-subrc IS INITIAL.
                  i_output-material = i_comp-material.
                  i_output-plant = i_comp-plant.
                  i_output-network = i_comp-network.
                  i_output-message = i_e_msg-message_text.
                  APPEND i_output.
                ENDIF.
              ENDIF.
            ENDIF.
          ENDLOOP.
        ELSE.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
        ENDIF.
      ENDLOOP.
    problem is it is not showing message in i_output.
    so no data is printing.
    plz help me out

    There are several IFs in your code here.
    IF NOT i_e_msg[] IS INITIAL.
      LOOP AT i_e_msg.
        IF i_e_msg-message_type = c_e.
          READ TABLE i_comp WITH KEY network = l_number
              component = i_e_msg-external_object_id. "#EC *
          IF sy-subrc IS INITIAL.
            i_output-material = i_comp-material.
            i_output-plant = i_comp-plant.
            i_output-network = i_comp-network.
            i_output-message = i_e_msg-message_text.
            APPEND i_output.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    ENDIF.
    It can be any IF failure. Check in debugging and see how this "i_e_msg" internal table is filled. May be the return table is giving the component number in external format and you have it in internal format or vice-versa in the READ statement "component = i_e_msg-external_object_id".

  • BAPI help urgent

    Dear All,
    cud any spot the error the error..it throws an exception FAILURE
    *& Report  Y1MM_PODRG                                                  *
    report  y1mm_podrg                              .
    tables: mara,
            lfa1,
            eina,
            eine,
            eban,
            zdrgsah, zdrgsap,
            t100.
    *Internal Table to get the input Data
    data: begin of i_input occurs 0,
            matnr like ekpo-matnr,
            asqty like ekpo-menge,
            ebeln like ekpo-ebeln,
            posnr like zdrgsap-posnr,
            invno like zdrgsap-invno,
            invdt like zdrgsah-invdt,
            netpr like zdrgsap-netpr,
            cntno like zdrgsap-cntno,
            shcnm like zdrgsah-shcnm,
            werks like ekpo-werks,
            lgort like ekpo-lgort,
            matkl like ekpo-matkl,
          end of i_input.
    data: begin of i_error occurs 0,
            matnr like mara-matnr,
            remark(255) type c,
          end of i_error.
    data: i_mara type mara occurs 0 with header line,
          i_eina like eina occurs 0 with header line,
          i_eine like eine occurs 0 with header line.
    *Data declaration.
    data: v_file     type string,           " Variable for uploading file
          v_item(5)  type c,             " Line item number
          v_itno(2)  type c,
          p_wkurs like zdrgkurs-wkurs,
          v_matnr(20)    type c,
          v_menge(20)    type c,
          v_banfn(20)    type c,
          v_bnfpo(20)    type c,
          v_bednr(20)    type c,
          p_lifnr like lfa1-lifnr,
          v_flag,
            p_lifnrtxt(10),
          p_wkurstxt(9),
          p_bsartxt(4).
    data: begin of i_inputxt occurs 0,
            matnr(18) ,
            asqty(13) ,
            ebeln(10) ,
            posnr(6)  ,
            invno(10) ,
            invdt(8)  ,
            netpr(11) ,
            cntno(11) ,
            shcnm(10) ,
            werks(4) ,
            lgort(4) ,
            matkl(9) ,
          end of i_inputxt.
    Constants
    constants : c_pd01 like eine-werks value 'PD01',
                c_x value 'X'.
    *Structures to hold PO header data
    data : header like  bapimepoheader   ,
           headerx like  bapimepoheaderx .
    data : begin of cheader occurs 0,
            cond_type like bapimepocondheader-cond_type,
           end of cheader.
    *data : cheaderx like bapimepocondheaderx.
    data :  begin of cheaderx occurs 0,
            cond_type like bapimepocondheaderx-cond_type,
           end of cheaderx.
    *Internal Tables to hold PO ITEM DATA
    data : item   like bapimepoitem  occurs 0 with header line,
           itemx  like bapimepoitemx occurs 0 with header line,
    *Internal table to hold messages from BAPI call
           return like bapiret2 occurs 0 with header line.
    data : w_header(40) value 'PO Header'.
    data : ws_langu like sy-langu.
    *text-001 = 'PO Header' - define as text element
    data : v_company like header-comp_code  value 'SBA'      ,
           v_doctyp  like header-doc_type   value 'NB'       ,
           v_cdate   like header-creat_date value  'sy-datum'   ,
           v_vendor  like header-vendor     ,
           v_pur_org like header-purch_org  value 'sbap'     ,
           v_pur_grp like header-pur_group  value 'PG1'      .
    *Selection Screen Declarations
    selection-screen begin of block b1 with frame title text-010.
    parameters: p_invno like zdrgsah-invno obligatory,
                p_bsart like ekko-bsart.
    selection-screen end of block b1.
    *selection-screen begin of block b2 with frame title text-002.
    *parameters : item_num like item-po_item  default '00010',
                material like mara-matnr default '0011442062'   ,
                plant    like item-plant    default 'PD01' ,
               quantity like item-quantity default 100.
    *selection-screen end of block b2.
    start-of-selection.
    *DATA POPULATION
      ws_langu = sy-langu.   "Language variable
      To Upload the data into Internal table.
      perform f_upload_data.
    To Validate the input data.
      perform f_check_data.
      if i_error[] is initial.
    To process the data file
       perform f_process_session.
       elseif not i_error[] is initial.
    To display the error message
       perform f_display_error.
        perform bapi_call_data.
      endif.
    end-of-selection.
    *Output the messages returned from BAPI call
      loop at return.
        write / return-message.
      endloop.
    *&      Form  f_upload_data
    form f_upload_data .
      select matwa as matnr asqty ebeln posnr b~invno invdt netpr cntno
        shcnm into table i_input
             from zdrgsah as a join zdrgsap as b on
             a~invno = b~invno
             where b~invno eq p_invno.
      loop at i_input.
        select single * from eban
           where banfn eq i_input-ebeln
           and   bnfpo eq i_input-posnr.
        if sy-subrc eq 0.
          move eban-werks to i_input-werks.
          move eban-lgort to i_input-lgort.
          move eban-matkl to i_input-matkl.
          modify i_input.
          clear  i_input.
        endif.
      endloop.
    endform.                    " f_upload_data
    *&      Form  f_check_data
    form f_check_data .
      if not i_input[] is initial.
        select * from mara
        into table i_mara
        for all entries in i_input
        where matnr eq i_input-matnr.
      endif.
      if i_mara[] is initial.
        message e000(zcnc) with text-001.
      endif.
      read table i_input index 1.
      if sy-subrc eq 0.
        select single lifnr into p_lifnr from zdrgsup
           where shcnm = i_input-shcnm.
        if sy-subrc <> 0.
          message e000(zcnc) with text-002.
        endif.
      endif.
      select single wkurs into p_wkurs from zdrgkurs
        where invno = p_invno.
      if sy-subrc ne 0.
        message e000(zcnc) with text-s11.
      endif.
        call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
        exporting
          input  = p_lifnr
        importing
          output = p_lifnr.
      p_lifnrtxt = p_lifnr.
      p_wkurstxt = p_wkurs.
      p_bsartxt = p_bsart.
      loop at i_input.
        move-corresponding i_input to i_inputxt.
        append i_inputxt.
      endloop.
    endform.                    "f_check_data
    *&      Form  bapi_call_data
          text
    form bapi_call_data.
    *POPULATE HEADER DATA FOR PO
      header-comp_code  = v_company    .
      header-doc_type   = v_doctyp     .
      header-creat_date = v_cdate      .
      header-vendor     = p_lifnr     .
      header-langu      = ws_langu   .
      header-quotation  = p_invno.
      header-exch_rate  = p_wkurs.
      header-ex_rate_fx = 'X'.
      header-purch_org  = v_pur_org    .
      header-pur_group  = v_pur_grp    .
      header-doc_date   = sy-datum.
    *POPULATE HEADER FLAG.
      headerx-comp_code  = c_x.
      headerx-doc_type   = c_x.
      headerx-creat_date = c_x.
      headerx-vendor     = c_x.
      headerx-langu      = c_x.
      headerx-quotation  = c_x.
      headerx-exch_rate  = c_x.
      headerx-ex_rate_fx = c_x.
      headerx-purch_org  = c_x.
      headerx-pur_group  = c_x.
      headerx-doc_date   = c_x.
    *POPULATE HEADER DATA.CONDITIONS
      cheader-cond_type = 'ZCA1'.
      append cheader.
      cheader-cond_type = 'ZFA1'.
      append cheader.
      cheader-cond_type = 'ZINC'.
      append cheader.
      cheader-cond_type = 'ZIV1'.
      append cheader.
      cheader-cond_type = 'ZOT1'.
      append cheader.
    *POPULATE HEADER CONDITION FLAG.
      cheader-cond_type = c_x.
    *POPULATE ITEM DATA.
    perform bdc_field       using v_bednr   i_input-cntno.
    item-price_unit = '100'.
      loop at i_inputxt.
        item-plant      = i_inputxt-werks.
        item-stge_loc   = i_inputxt-lgort.
        item-material   = i_inputxt-matnr.
        item-matl_group = i_inputxt-matkl.
        item-quantity   = i_inputxt-asqty.
        item-preq_no    = i_inputxt-ebeln.
        item-preq_item  = i_inputxt-posnr.
        item-trackingno = i_inputxt-cntno.
       item-preq_item = i_input-posnr.
    item-net_price  = item-price_unit * item-quantity.
        append item.
        clear item.
      endloop.
    *POPULATE ITEM FLAG TABLE
    itemx-po_item    = item_num.
      itemx-material   = c_x.
      itemx-plant      = c_x .
      itemx-stge_loc   = c_x .
      itemx-quantity   = c_x .
      itemx-stge_loc   = c_x .
      itemx-tax_code   = c_x .
      itemx-item_cat   = c_x .
      itemx-acctasscat = c_x .
    itemx-net_price  = c_x.
      append itemx.
    *BAPI CALL
      call function 'BAPI_PO_CREATE1'
        exporting
          poheader                     = header
          poheaderx                    = headerx
        POADDRVENDOR                 =
        TESTRUN                      =
        IMPORTING
        EXPPURCHASEORDER             =
        EXPHEADER                    =
        EXPPOEXPIMPHEADER            =
       tables
        pocondheader                 = cheader
        pocondheaderx                = cheaderx
         return                       = return
         poitem                       = item
         poitemx                      = itemx.
    *Confirm the document creation by calling database COMMIT
      call function 'BAPI_TRANSACTION_COMMIT'
       exporting
         wait          = 'X'
    IMPORTING
      RETURN        =
    endform.                    "bapi_call_data
    Thanks a lot ,
    santosh Kotra.

    Hi,
       Check out the sample code for the same BAPI.
       This error may come because of incorrect Package no value.
    DATA: i_poitem        TYPE STANDARD TABLE OF bapimepoitem,
          i_poitemx       TYPE STANDARD TABLE OF bapimepoitemx,
          i_poitem_sch    TYPE STANDARD TABLE OF bapimeposchedule,
          i_poitem_schx   TYPE STANDARD TABLE OF bapimeposchedulx,
          i_acct_***      TYPE STANDARD TABLE OF bapimepoaccount,
          i_acct_assx     TYPE STANDARD TABLE OF bapimepoaccountx,
          i_services      TYPE STANDARD TABLE OF bapiesllc ,
          i_srvacc        TYPE STANDARD TABLE OF bapiesklc,
          i_return        TYPE STANDARD TABLE OF bapiret2,
          wa_header       TYPE bapimepoheader,
          wa_headerx      TYPE bapimepoheaderx,
          wa_poitem       TYPE bapimepoitem,
          wa_poitemx      TYPE bapimepoitemx,
          wa_poitem_sch   TYPE bapimeposchedule,
          wa_poitem_schx  TYPE bapimeposchedulx,
          wa_acct_***     TYPE bapimepoaccount,
          wa_acct_assx    TYPE bapimepoaccountx,
          wa_services     TYPE bapiesllc,
          wa_srvacc       TYPE bapiesklc,
          wa_return       TYPE bapiret2,
          ws_po           TYPE bapimepoheader-po_number,
          ws_wait         TYPE bapita-wait.
    CONSTANTS: c_x        TYPE char01 VALUE 'X'.
    break gbpra8.
    wa_header-doc_type = 'ZDET'.
    wa_header-vendor = '0002000000'.
    PERFORM conversion_output USING wa_header-vendor
                              CHANGING wa_header-vendor.
    wa_header-comp_code = 'DE03'.
    wa_header-purch_org = 'DE03'.
    wa_header-pur_group = 'DE1'.
    wa_header-vper_start = '20060730'.
    wa_header-vper_end = '20070621'.
    wa_headerx-comp_code = c_x.
    wa_headerx-doc_type = c_x.
    wa_headerx-creat_date = c_x.
    wa_headerx-created_by = c_x.
    wa_headerx-vendor = c_x.
    wa_headerx-purch_org = c_x.
    wa_headerx-pur_group = c_x.
    wa_headerx-vper_start = c_x.
    wa_headerx-vper_end = c_x.
    wa_poitem-po_item = 100.
    wa_poitem-short_text = 'Sample'.
    wa_poitem-plant = 'DE03'.
    wa_poitem-quantity = 1.
    wa_poitem-tax_code = 'V1'.
    wa_poitem-item_cat = 'D'.
    wa_poitem-acctasscat = 'K'.
    wa_poitem-matl_group = 'ZDESS'.
    wa_poitem-pckg_no = 10.
    wa_poitem-gr_ind = space.
    wa_poitem-gr_basediv = space.
    APPEND wa_poitem TO i_poitem .
    wa_poitemx-po_item = 100.
    wa_poitemx-po_itemx = c_x.
    wa_poitemx-short_text = c_x.
    wa_poitemx-plant = c_x.
    wa_poitemx-quantity = c_x.
    wa_poitemx-tax_code = c_x.
    wa_poitemx-item_cat = c_x.
    wa_poitemx-acctasscat = c_x.
    wa_poitemx-matl_group = c_x.
    wa_poitemx-pckg_no = c_x.
    wa_poitemx-gr_ind = c_x.
    wa_poitemx-gr_basediv = space.
    APPEND wa_poitemx TO i_poitemx.
    wa_poitem-po_item = 200.
    wa_poitem-short_text = 'Sample'.
    wa_poitem-plant = 'DE03'.
    wa_poitem-quantity = 1.
    wa_poitem-tax_code = 'V1'.
    wa_poitem-item_cat = 'D'.
    wa_poitem-acctasscat = 'K'.
    wa_poitem-matl_group = 'ZDESS'.
    wa_poitem-pckg_no = 40.
    wa_poitem-gr_ind = space.
    wa_poitem-gr_basediv = space.
    APPEND wa_poitem TO i_poitem .
    wa_poitemx-po_item = 200.
    wa_poitemx-po_itemx = c_x.
    wa_poitemx-short_text = c_x.
    wa_poitemx-plant = c_x.
    wa_poitemx-quantity = c_x.
    wa_poitemx-tax_code = c_x.
    wa_poitemx-item_cat = c_x.
    wa_poitemx-acctasscat = c_x.
    wa_poitemx-matl_group = c_x.
    wa_poitemx-pckg_no = c_x.
    wa_poitemx-gr_ind = c_x.
    wa_poitemx-gr_basediv = space.
    APPEND wa_poitemx TO i_poitemx.
    wa_acct_***-po_item = 100.
    wa_acct_***-serial_no = 01.
    wa_acct_***-gl_account = '0006360100'.
    wa_acct_***-co_area  = '1000'.
    wa_acct_***-costcenter = 'KC010000'.
    APPEND wa_acct_*** TO i_acct_***.
    wa_acct_assx-po_item = 100.
    wa_acct_assx-serial_no = 01.
    wa_acct_assx-po_itemx = c_x.
    wa_acct_assx-serial_nox = c_x.
    wa_acct_assx-gl_account = c_x.
    wa_acct_assx-co_area  = c_x.
    wa_acct_assx-costcenter = c_x.
    APPEND wa_acct_assx TO i_acct_assx.
    wa_acct_***-po_item = 100.
    wa_acct_***-serial_no = 02.
    wa_acct_***-gl_account = '0006360100'.
    wa_acct_***-co_area  = '1000'.
    wa_acct_***-costcenter = 'KC010000'.
    APPEND wa_acct_*** TO i_acct_***.
    wa_acct_assx-po_item = 100.
    wa_acct_assx-serial_no = 02.
    wa_acct_assx-po_itemx = c_x.
    wa_acct_assx-serial_nox = c_x.
    wa_acct_assx-gl_account = c_x.
    wa_acct_assx-co_area  = c_x.
    wa_acct_assx-costcenter = c_x.
    APPEND wa_acct_assx TO i_acct_assx.
    wa_acct_***-po_item = 200.
    wa_acct_***-serial_no = 01.
    wa_acct_***-gl_account = '0006360100'.
    wa_acct_***-co_area  = '1000'.
    wa_acct_***-costcenter = 'KC010000'.
    APPEND wa_acct_*** TO i_acct_***.
    wa_acct_assx-po_item = 200.
    wa_acct_assx-serial_no = 01.
    wa_acct_assx-po_itemx = c_x.
    wa_acct_assx-serial_nox = c_x.
    wa_acct_assx-gl_account = c_x.
    wa_acct_assx-co_area  = c_x.
    wa_acct_assx-costcenter = c_x.
    APPEND wa_acct_assx TO i_acct_assx.
    wa_acct_***-po_item = 200.
    wa_acct_***-serial_no = 02.
    wa_acct_***-gl_account = '0006360100'.
    wa_acct_***-co_area  = '1000'.
    wa_acct_***-costcenter = 'KC010000'.
    APPEND wa_acct_*** TO i_acct_***.
    wa_acct_assx-po_item = 200.
    wa_acct_assx-serial_no = 02.
    wa_acct_assx-po_itemx = c_x.
    wa_acct_assx-serial_nox = c_x.
    wa_acct_assx-gl_account = c_x.
    wa_acct_assx-co_area  = c_x.
    wa_acct_assx-costcenter = c_x.
    APPEND wa_acct_assx TO i_acct_assx.
    wa_services-pckg_no = 10.
    wa_services-line_no = 1.
    wa_services-outl_no = '0'.
    wa_services-outl_ind = c_x.
    wa_services-subpckg_no = 20.
    wa_services-from_line = 1.
    wa_services-to_line = 2.
    APPEND wa_services TO i_services.
    wa_services-pckg_no = 20.
    wa_services-line_no = 2.
    wa_services-service = 'H007'.
    wa_services-quantity = '12'.
    wa_services-gr_price = '100'.
    wa_services-userf1_txt = 'Firm'.
    APPEND wa_services TO i_services.
    wa_services-pckg_no = 40.
    wa_services-line_no = 1.
    wa_services-outl_no = '0'.
    wa_services-outl_ind = c_x.
    wa_services-subpckg_no = 50.
    wa_services-from_line = 1.
    wa_services-to_line = 2.
    APPEND wa_services TO i_services.
    wa_services-pckg_no = 50.
    wa_services-line_no = 2.
    wa_services-service = 'H008'.
    wa_services-quantity = '12'.
    wa_services-gr_price = '100'.
    wa_services-userf1_txt = 'Firm'.
    APPEND wa_services TO i_services.
    wa_srvacc-pckg_no = 10.
    wa_srvacc-line_no = 1.
    wa_srvacc-serno_line = 01.
    wa_srvacc-serial_no = 01.
    wa_srvacc-percentage = 100.
    APPEND wa_srvacc TO i_srvacc.
    wa_srvacc-pckg_no = 20.
    wa_srvacc-line_no = 2.
    wa_srvacc-serno_line = 02.
    wa_srvacc-serial_no = 02.
    wa_srvacc-percentage = 100.
    APPEND wa_srvacc TO i_srvacc.
    wa_srvacc-pckg_no = 40.
    wa_srvacc-line_no = 1.
    wa_srvacc-serno_line = 01.
    wa_srvacc-serial_no = 01.
    wa_srvacc-percentage = 100.
    APPEND wa_srvacc TO i_srvacc.
    wa_srvacc-pckg_no = 50.
    wa_srvacc-line_no = 2.
    wa_srvacc-serno_line = 02.
    wa_srvacc-serial_no = 02.
    wa_srvacc-percentage = 100.
    APPEND wa_srvacc TO i_srvacc.
    CALL FUNCTION 'BAPI_PO_CREATE1'
      EXPORTING
        poheader          = wa_header
        poheaderx         = wa_headerx
      IMPORTING
        exppurchaseorder  = ws_po
      TABLES
        return            = i_return
        poitem            = i_poitem
        poitemx           = i_poitemx
        poschedule        = i_poitem_sch
        poschedulex       = i_poitem_schx
        poaccount         = i_acct_***
        poaccountx        = i_acct_assx
        poservices        = i_services
        posrvaccessvalues = i_srvacc.
    break gbpra8.
    LOOP AT i_return INTO wa_return.
    ENDLOOP.
    ws_wait = 5.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait = ws_wait.
    *&      Form  conversion_output
          Conversion exit input
    FORM conversion_output  USING    p_ip
                            CHANGING p_op.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = p_ip
        IMPORTING
          output = p_op.
    ENDFORM.                    " conversion_output
      Reward points if it helps.
    Manish

  • Need Code For PO-GR through MiGO for multiple documents through BAPI

    Hi All
    Im using BAPI_GOODSMVT_CREATE to post goods for PO-GR.
    When im posting multiple documents its giving error.
    When im posting individually, it's working fine.
    Please send me the code for PO-GR through BAPI.
    Urgently required.
    Regards,
    SImha.

    Is this not working???
    BAPI_GOODSMVT_CREATE to post Goods Movement
    The following is an abap program making used of the BAPI function BAPI_GOODSMVT_CREATE to do Goods Receipts for Purchase Order after importing the data from an external system.
    BAPI TO Upload Inventory Data
    GMCODE Table T158G - 01 - MB01 - Goods Receipts for Purchase Order
                         02 - MB31 - Goods Receipts for Prod Order
                         03 - MB1A - Goods Issue
                         04 - MB1B - Transfer Posting
                         05 - MB1C - Enter Other Goods Receipt
                         06 - MB11
    Domain: KZBEW - Movement Indicator
         Goods movement w/o reference
    B - Goods movement for purchase order
    F - Goods movement for production order
    L - Goods movement for delivery note
    K - Goods movement for kanban requirement (WM - internal only)
    O - Subsequent adjustment of "material-provided" consumption
    W - Subsequent adjustment of proportion/product unit material
    report zbapi_goodsmovement.
    parameters: p-file like rlgrap-filename default
                                     'c:\sapdata\TEST.txt'.
    parameters: e-file like rlgrap-filename default
                                     'c:\sapdata\gdsmvterror.txt'.
    parameters: xpost like sy-datum default sy-datum.
    data: begin of gmhead.
            include structure bapi2017_gm_head_01.
    data: end of gmhead.
    data: begin of gmcode.
            include structure bapi2017_gm_code.
    data: end of gmcode.
    data: begin of mthead.
            include structure bapi2017_gm_head_ret.
    data: end of mthead.
    data: begin of itab occurs 100.
            include structure bapi2017_gm_item_create.
    data: end of itab.
    data: begin of errmsg occurs 10.
            include structure bapiret2.
    data: end of errmsg.
    data: wmenge like iseg-menge,
          errflag.
    data: begin of pcitab occurs 100,
            ext_doc(10),           "External Document Number
            mvt_type(3),           "Movement Type
            doc_date(8),           "Document Date
            post_date(8),          "Posting Date
            plant(4),              "Plant
            material(18),          "Material Number
            qty(13),               "Quantity
            recv_loc(4),           "Receiving Location
            issue_loc(4),          "Issuing Location
            pur_doc(10),           "Purchase Document No
            po_item(3),            "Purchase Document Item No
            del_no(10),            "Delivery Purchase Order Number
            del_item(3),           "Delivery Item
            prod_doc(10),          "Production Document No
            scrap_reason(10),      "Scrap Reason
            upd_sta(1),            "Update Status
          end of pcitab.
    call function 'WS_UPLOAD'
      exporting
        filename                      = p-file
        filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
      tables
        data_tab                      = pcitab
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      OTHERS                        = 6
    if sy-subrc <> 0.
      message id sy-msgid type sy-msgty number sy-msgno
              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      exit.
    endif.
    gmhead-pstng_date = sy-datum.
    gmhead-doc_date = sy-datum.
    gmhead-pr_uname = sy-uname.
    gmcode-gm_code = '01'.   "01 - MB01 - Goods Receipts for Purchase Order
    loop at pcitab.
      itab-move_type  = pcitab-mvt_type.
      itab-mvt_ind    = 'B'.
      itab-plant      = pcitab-plant.
      itab-material   = pcitab-material.
      itab-entry_qnt  = pcitab-qty.
      itab-move_stloc = pcitab-recv_loc.
      itab-stge_loc   = pcitab-issue_loc.
      itab-po_number  = pcitab-pur_doc.
      itab-po_item    = pcitab-po_item.
      concatenate pcitab-del_no pcitab-del_item into itab-item_text.
      itab-move_reas  = pcitab-scrap_reason.
      append itab.
    endloop.
    loop at itab.
      write:/ itab-material, itab-plant, itab-stge_loc,
              itab-move_type, itab-entry_qnt, itab-entry_uom,
              itab-entry_uom_iso, itab-po_number, itab-po_item,
                                                  pcitab-ext_doc.
    endloop.
    call function 'BAPI_GOODSMVT_CREATE'
      exporting
        goodsmvt_header             = gmhead
        goodsmvt_code               = gmcode
      TESTRUN                     = ' '
    IMPORTING
        goodsmvt_headret            = mthead
      MATERIALDOCUMENT            =
      MATDOCUMENTYEAR             =
      tables
        goodsmvt_item               = itab
      GOODSMVT_SERIALNUMBER       =
        return                      = errmsg
    clear errflag.
    loop at errmsg.
      if errmsg-type eq 'E'.
        write:/'Error in function', errmsg-message.
        errflag = 'X'.
      else.
        write:/ errmsg-message.
      endif.
    endloop.
    if errflag is initial.
      commit work and wait.
      if sy-subrc ne 0.
        write:/ 'Error in updating'.
        exit.
      else.
        write:/ mthead-mat_doc, mthead-doc_year.
        perform upd_sta.
      endif.
    endif.
          FORM UPD_STA                                                  *
    form upd_sta.
      loop at pcitab.
        pcitab-upd_sta = 'X'.
        modify pcitab.
      endloop.
      call function 'WS_DOWNLOAD'
        exporting
          filename                      = p-file
          filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
        tables
          data_tab                      = pcitab
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      OTHERS                        = 6
    endform.
    *--- End of Program
    REgards,
    Ravi

  • Opening odt file in Word or WordPerfect

    Hello everyone -
    I am new to Star Office, and its products. I have the Star products on my home computer, and am working on an 8-page paper. I thought I'd send it by email to my work computer, to work on the paper during my lunch hour this week. My work computer has Microsoft software on it. Can I open the odt file in Microsoft Word or Corel Wordperfect? I have tried it, and there are so many formats I could use to open it (i.e. ASCII, Word, etc). However, with each format I've tried, all that is shown in the document is gobble-dee-gook and is unreadable.
    Is the odt file not readable for other word processing software?
    Thank you, in advance, for any help.
    Denise

    Hi there, Thanks for posting the question. I will try and explain and show you the options available.
    ODT is an 'open' format (e.g. not locked down to one company owning the format), at the moment Word can not read or write this format, but DONT worry!
    You have a couple of options here... On your works computer you could install "OpenOffice" this is a free of charge version of Star Office and has the same functionality.
    If you need the document mega urgently and it is not confidential and you are not able to use OpenOffice in work let me know and if you send me the file privately I will open it and save it to a word format for you.
    For future...
    When you are creating a document on Star/Open Office save it as a .doc format!! This way you will be able to open it in word, save it and re-open it in StarOffice.
    Hope this helps!

  • Help only one speaker gives out sound x

    Hello folks,I am new to this forum malarky and could really use some help. I have the soundblaster x-fi sound card and use it on my home pc with the 7. surround speakers. I mainly use the PC for music creation. I haven't had any issues until recently. When i plug my headphones into the volume box, i am only hearing sound through the left headphone, this is now the case when using the speakers, all the sound is channel through one speaker. I thought i had maybe damaged my speakers somehow, but have run the tests and all speakers tested fine? I am so stuck and can not write using just the one speaker. TRhis is mega urgent folks so any advice would be massivly appreciated!?

    My guess is that you have the track set to stereo which would work if you have two channels input and your recording stereo channel 1&2. Try setting it to mono.

  • ITouch stucked at completly black screen (hard reset doesn't help)

    My iPod touch 4G is stucked at completly black screen, with no apple logo at all.
    This happened after restoring my iPod touch.
    Also hard resetting (holding home+power for 10 seconds doesn't work),  LCD isn't dead as I got it to go white when restoring.
    Now I can't even restore. I always get error 1600. But I can't reboot to solve it.   If I do so, it doesn't show apple logo, but just keep black screen.
    It's mega urgent.

    Error 1600, 1601, 1602: Try the following steps to resolve this error:
    Ensure proper USB isolation troubleshooting has been performed, and test with a known-good cable.
    Follow the steps listed for Error 1604.
    This error may be resolved by disabling, deactivating, or uninstalling third-party security, antivirus, and firewall software. See steps in this article for details on troubleshooting security software.
    Error 1604: This error is often related to USB timing. Try changing USB ports, uninstalling and reinstalling USB ports, and other available USB troubleshooting steps (troubleshooting USB connections, device not recognized properly, computer won't recognize a FireWire or USB device). If you are using a dock, bypass it and connect directly to the white Apple USB dock connector cable. If the issue persists on a known-good computer, the device may need service.
    If the issue is not resolved by USB isolation troubleshooting, and another computer is not available, try these steps to resolve the issue:
    Connect the device to iTunes, confirm that the device is in Recovery Mode. If it's not in Recovery Mode, put it into Recovery Mode.
    Restore and wait for error 1604.
    When prompted, click OK.
    Close and reopen iTunes while iPhone remains connected.
    iPhone should now be recognized in Recovery Mode again.
    Try to restore again.
    If the steps above do not resolve the issue, try restoring using a known-good USB cable, computer, and network connection.
    Above from:
    http://support.apple.com/kb/TS3694

  • 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

  • Very Urgent: Deleting Batch from STO and Goos Issue reversal  Using BAPI

    Hi,
    I want to delete outbound delivery for particular shipment number and this should be done using BAPI or a FM not using the tcode VL02N.
    I wld be very grateful
    Please List out the BAPI 's or FM that can be used for to perform these listed , with using Tcodes:
    1) REVERSE BILLING DOCUMENT(VF11)
    2) GOODS ISSUe REVERSAL (VL09N)
    3) REMOVE DELIVERY FROM SHIPMENT (VT02N)
    4) DELETING DELIVERY(VL02N)
    5) REMOVE BATCH FROM STO (ME22N)
    Its very urgent..
    Thank you in advance....

    1) REVERSE BILLING DOCUMENT(VF11)
    BAPI_BILLINGDOC_CANCEL
    2) GOODS ISSUe REVERSAL (VL09N)
    BAPI_GOODSMVT_CANCEL
    3) REMOVE DELIVERY FROM SHIPMENT (VT02N)
    BAPI_SHIPMENT_CHANGE
    4) DELETING DELIVERY(VL02N)
    5) REMOVE BATCH FROM STO (ME22N)
    BAPI_PO_CHANGE

  • Step by step bapi to convert SAP to XML please its urgent

    step by step bapi to convert SAP to XML please its urgent
    full points if with full example and coding in ABAP,
    Thank you,
    Regards,
    Jagrut Shukla

    yes i want to convert Catsdb table into xml format and safely in server, i.e secured  place

  • BAPI, facing problem(urgent)

    Hi all,
    seagate is our customer & motorola is our end customer. so first, motorola gives PO to seagate. here , seagate is the vendor for motorola. seagate receives that PO & adds some data( like seagate sales order no,seagate material no, seagate item no etc.) to that PO. then seagate passes that modified PO to my company through EDI.
    for this said PO , i have already created sales order in BAPI & now need to crete shipment order.
    To create shipment order,i am using BAPI_SHIPMENT_CREATE. seagate wants my company, to put so many datas into shipment order but i am not finding those fields in that BAPI FM.
    1)i am describing those fields below.plz suggest me if there is corresponding fields in that BAPI_SHIPMENT_CREATE function module.
    i)shipment identification no.
    ii)purchase order no of seagate.
    iii)PO date
    iv)PO type
    v)Transportation method/type.
    vi)shipment method of payment.
    vii)payment terms.
    viii) Hierchical ID no.(To identify a perticular data segment in a hierchical structure)
    ix)Hierchical parent ID no.(identification no. of the next hierchical data segment)
    x)for pallet,
    i) seagate pallet no
    ii)Hierchical ID no
    iii)hierchical parent ID no
    xi) for carton,
    i)seagate carton no
    ii) hierchical ID no
    iii) hierchical parent ID no
    ( FOR ITEM IDENTIFICATION)
    i) seagate's customer's (i.e motorola) PO material no.
    ii)seagate's customer's PO item no.
    iii)seagate's sales order item no.
    iv)seagate's material no.
    v)no. of units shipped(qty in the carton)
    vi)no. of units shipped(qty in the pallet)
    vii)unit/ basis for meas code for this qty.
    (FOR SUBLINE ITEM DATAIL)
    i)seagate's barcoded serial no
    ii)product date of manufacturer
    iii)relationship code(relationship between subline item to baseline item)
    OR is there any other BAPI to create shipment.
    plz suggest me .it is very urgent.
    Thanks & Regards

    Did you read the documentation of the BAPI, most of the input parameters are self-explanatory.  Go to SE37 and enter BAPI_SHIPMENT_CREATE, and go to IMPORT thats where you have the header details and in the TABLES you have all the item details.  Just double click on the type they refer to, am sure its easier for you to find out all your parameters.  Also do a test run using F8 before you code as this would help you in identifying the parameters and speed up your process.  If your test case is successful store it as a variant and refer to it when you are coding.
    hith
    Sunil Achyut

  • BAPI FOR BOM - URGENT

    Could anybody please give me the coding for uploading BOM by BAPI ? Please it is very urgent.
                                                             Regards,
                                                             SAURAV  LAHIRY

    Hi Saurav,
    Try the following Code.
    REPORT  ZTEST_BOM_BAPI.
    DATA:
       it_bomgroup LIKE bapi1080_bgr_c OCCURS 0 WITH HEADER LINE,
       it_variants LIKE bapi1080_bom_c OCCURS 0 WITH HEADER LINE,
       it_items LIKE bapi1080_itm_c OCCURS 0 WITH HEADER LINE,
       it_matrel LIKE bapi1080_mbm_c OCCURS 0 WITH HEADER LINE,
       it_itemas LIKE bapi1080_rel_itm_bom_c OCCURS 0 WITH HEADER LINE,
       it_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    * Fill the data
    * Material BoM Group Header Data
    CLEAR it_bomgroup.
    it_bomgroup-bom_group_identification = 'BAPI_SMP_COL1'.
    it_bomgroup-object_type = 'BGR'.
    it_bomgroup-object_id = 'SIMPLE1'.
    it_bomgroup-bom_usage = '1'.  " YOU COULD CHANGE THE BOM USAGE TO YOUR
    *nEEDS
    *it_bomgroup-created_in_plant = '0001'.
    it_bomgroup-ltxt_lang = sy-langu.
    it_bomgroup-technical_type = ' '.
    it_bomgroup-bom_text = 'Simple BoM - FM'.
    APPEND it_bomgroup.
    * Header Details of the different variants
    CLEAR it_variants.
    it_variants-bom_group_identification = 'BAPI_SMP_COL1'.
    it_variants-object_type = 'BOM'.
    it_variants-object_id = 'SIMPLE1'.
    it_variants-alternative_bom = '01'.
    it_variants-bom_status = '01'.
    it_variants-base_qty = '1.000'.
    it_variants-valid_from_date = sy-datum.
    it_variants-function = 'NEW'.
    APPEND it_variants.
    * Details of the items of the variants
    CLEAR it_items.
    it_items-bom_group_identification = 'BAPI_SMP_COL1'.
    it_items-object_type = 'ITM'.
    it_items-object_id = 'SIMPLE1'.
    it_items-item_no = '0010'.
    it_items-item_cat = 'L'.
    it_items-component = '000000000000000078'.
    it_items-comp_qty = '1'.
    it_items-valid_from_date = sy-datum.
    APPEND it_items.
    CLEAR it_items.
    it_items-bom_group_identification = 'BAPI_SMP_COL1'.
    it_items-object_type = 'ITM'.
    it_items-object_id = 'SIMPLE1'.
    it_items-item_no = '0020'.
    it_items-item_cat = 'L'.
    it_items-component = '000000000000000076'.
    it_items-comp_qty = '2'.
    it_items-valid_from_date = sy-datum.
    APPEND it_items.
    * Details of the materials of the different variants
    CLEAR it_matrel.
    it_matrel-bom_group_identification = 'BAPI_SMP_COL1'.
    it_matrel-material = '000000000000000077'.
    *it_matrel-plant = '0001'.
    it_matrel-bom_usage = '1'.
    it_matrel-alternative_bom = '01'.
    APPEND it_matrel.
    * Linking items to the corresponding variants
    CLEAR it_itemas.
    it_itemas-bom_group_identification = 'BAPI_SMP_COL1'.
    it_itemas-sub_object_type = 'ITM'.
    it_itemas-sub_object_id = 'SIMPLE1'.
    it_itemas-super_object_type = 'BOM'.
    it_itemas-super_object_id = 'SIMPLE1'.
    it_itemas-valid_from_date = sy-datum.
    it_itemas-function = 'NEW'.
    APPEND it_itemas.
    * Create variants
    CALL FUNCTION 'BAPI_MATERIAL_BOM_GROUP_CREATE'
    EXPORTING
       all_error         = 'X'
    TABLES
       bomgroup          = it_bomgroup
       variants          = it_variants
       items             = it_items
       materialrelations = it_matrel
       itemassignments   = it_itemas
       return            = it_return.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    LOOP AT it_return.
    WRITE:/ it_return-type, it_return-id, it_return-number,
             it_return-message.
    ENDLOOP.
    Reward if useful.
    Thanks and Regards,
    Maddineni Bharath.

  • Objects_objref_not_assigned  - error ( while executing the bapi) - urgent

    Hi,
    i designed a bapi  which is internally calling a transaction (i.e. TRIP ), and returning the status.
    when i call this in back end(abap) side it is giving the desired results correctly.  but when i call the bapi from the front end side , i am getting the error : objects_objref_not_assigned.
    what could be the reasons.
    for your information : we have provided the correct user name and password to execute this tcode.
    regards
    giri

    hi,
    thx for your response, but in the front end side they are calling the rfc using the JCO connection.
    for  your information other bapi's are all working the way which we call.
    regards
    giri
    since it's very urgent if you give your phone no or email .id , it would be helpful.
    thx

  • Urgent ! Need to know a FM or a BAPI.

    Hello Peers,
    I have an urgent requirement where I need to get the <b>***.ATP Quantity</b>  which you can find in CO06 or CO09 T.Code  & display in the Report.
    I tried with FM : MD_STOCK_REQUIREMENTS_LIST_API  which will return  material stock details like Required stock, Available Stock , ATP quantity etc.
    But infact this is not returning the ATP quantity .
    The inputs I have given are : Material No & Plant.
    We could not find  the Database table which contains this value.
    Can anybody suggest any other similar function module which will return the ATP Quantity.
    Thank You,
    Daniel.

    Check with BAPI - BAPI_MATERIAL_AVAILABILITY
    I think *** ATP Quantity is Req/Received quantity -  the confirmed issue quantity
    You can calculate as above formula
    also do check with below FM's :
    RV_GET_PLANT_LIST
    MD_PEGGING
    Thanks
    Seshu

  • Need  F.M or BAPI to update the table IFLOT---URGENT

    HI ALL,
    i need  F.M or BAPI to update the table IFLOT
    its urgent ........................

    use the function module
    EXIT_SAPLITO0_001/2
    www.jt77.com/plant-maintenance/quality-management-11667.html - 11k -
    reward if useful

Maybe you are looking for

  • Blank Screen after selecting a role within the new WebClient User Interface

    Hi, I have another Problem with the new UI. I did all steps as described within the Best Practice Guide for the new Web Client (C04). I used this guide to set up our CRM 2007 System. Unfortunately no matter what I do after selecting the appropriate r

  • Data mapping to Adobe Form /RPM/FORM_PFS_ITEM with WDcomp /RPM/UI_FACTSHEET

    Hi, Scenario:  Data is filled in the form  /RPM/FORM_PFS_ITEM with the webdynpro component /RPM/UI_FACTSHEET. Problem:  I need the mapping of data to the form  /RPM/FORM_PFS_ITEM with the webdynpro component  /RPM/UI_FACTSHEET. Thank You, Swetha.C

  • How can I get the previous version of Acrobat back?

    The new DC version is **** and keeps crashing itself and the program I'm printing from when I print to PDF which has wasted too much of my time.  I'm using CC and can't see an option to reinstall a previous version.

  • GRAND TOTAL SOULD BE DISPLAYED ON THE LOST PAGE OF THE SMART FORM

    Hi friend,                 i calculated the grand total value in my smart form, i want to display it in a smartforms lost page only can any one help me pls. In my footer i gave the grand total in a separate line type and condition i gave only before

  • Filters in PHP

    Hello I have a page with an already URL variable, and then the page shows records with that variable. How can i create filters for that information?? ex: family products and than show for ascending price, or descending price, or by Brand, by producer