Bapi for serial no.

Hi Experts,
i have a requirment to create SERIAL No for a serialized material so please let me know the name of required bapi for this.
THANKS AND REGARDS
SWATI

Hi,
u can do this by Number Ranges...
Hi,
Maintain number range and intervals in transaction code SNUM
Use this in code..
call function 'NUMBER_RANGE_ENQUEUE'
         exporting
               object              = 'ZOWNNO'   "Create with SNUM
         exceptions
               foreign_lock        = 1
               object_not_found    = 2
               system_failure      = 3
               others              = 4.
  if sy-subrc ne 0.
*   message e086 with 'Lock error' sy-subrc.
  endif.
  call function 'NUMBER_GET_NEXT'
         exporting
               nr_range_nr         = wnorange
               object              = 'ZOWNNO'
               subobject           = wsubobj
         importing
               number                  = wdocno  "Number generated by SAP
         exceptions
               interval_not_found      = 1
               number_range_not_intern = 2
               object_not_found        = 3
               quantity_is_0           = 4
               quantity_is_not_1       = 5
               internal_overflow       = 6
               others                  = 7.
  if sy-subrc ne 0.
*   message e086 with 'Number Range' sy-subrc.
  endif.
  call function 'NUMBER_RANGE_DEQUEUE'
    exporting
      object                 = 'ZOWNNO'.
  if sy-subrc  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.

Similar Messages

  • We look for BAPI/Function to As-Built for Serialized Material (tran.COIB)

    Hello ,
    We look for BAPI/Function to As-Built for Serialized Material (transaction COIB).
    We check transaction COIB in order to create insatlled base for production orders(bill of equipments)
    We look for BAPI/ Function in order to run that process automatically in background base of some rules we will decide. Do you know if there is BAPI/ Function  refer to it?

    Sorry but I found the function group IBPP with the function modules:
    IBPP_CHANGE_IBASE
    IBPP_CREATE_IBASE
    IBPP_GET_IBASE_DOWN_ALL
    For our requirements these fmodules are sufficient.
    Regards

  • Bapi for FB70

    Hi !!!
    Someone knows what's the bapi that i can use as alternative by the transaction FB70 ( Customer Invoice ).
      Best Regards !!!

    sample code is:
    REPORT  zfb70.
    *-----Type pool declaration
    TYPE-POOLS: truxs.
    *-----Structure declaration
    TYPES : BEGIN OF ty_tab,
              col1(30)        TYPE c,  "Serial No
              col2(30)        TYPE c,  "Customer No
              col3(30)        TYPE c,  "Company Code
              col4(30)        TYPE c,  "Reference Document No
              col5(30)        TYPE c,  "Document date
              col6(30)        TYPE c,  "Posting Date
              col7(30)        TYPE c,  "Text
              col8(30)        TYPE c,  "Amount
              col9(30)        TYPE c,  "Currency
              col10(30)       TYPE c,  "G/L Account
              col11(30)       TYPE c,  "Company Code
              col12(50)       TYPE c,  "Amount in Doc.Currency
              col13(50)       TYPE c,  "Currency
              col14(50)       TYPE c,  "Profit center
              col15(50)       TYPE c,  "Item text
            END   OF ty_tab,
            BEGIN OF ty_header,
              col1(30)        TYPE c,  "Serial No
              col2(30)        TYPE c,  "Customer No
              col3(30)        TYPE c,  "Company Code
              col4(30)        TYPE c,  "Reference Document No
              col5(30)        TYPE c,  "Document date
              col6(30)        TYPE c,  "Posting Date
              col7(30)        TYPE c,  "Text
              col8(30)        TYPE c,  "Amount
              col9(30)        TYPE c,  "Currency
            END   OF ty_header,
            BEGIN OF ty_lineitem,
              col10(30)       TYPE c,  "G/L Account
              col11(30)       TYPE c,  "Company Code
              col12(50)       TYPE c,  "Amount in Doc.Currency
              col13(50)       TYPE c,  "Currency
              col14(50)       TYPE c,  "Profit center
              col15(50)       TYPE c,  "Item text
            END   OF ty_lineitem.
    *-----Internal table declarations
    DATA : it_tab             TYPE STANDARD TABLE OF ty_tab,
           it_raw             TYPE truxs_t_text_data,
           it_header          TYPE STANDARD TABLE OF ty_header,
           it_lineitem        TYPE STANDARD TABLE OF ty_lineitem,
           it_bapiaccr09      TYPE STANDARD TABLE OF bapiaccr09,
           it_bapiacgl09      TYPE STANDARD TABLE OF bapiacgl09,
           it_bapiacar09      TYPE STANDARD TABLE OF bapiacar09,
           it_bapiaccr09_temp TYPE STANDARD TABLE OF bapiaccr09,"#EC NEEDED
           return             LIKE bapiret2 OCCURS 0 WITH HEADER LINE,"#EC *
           return1            LIKE bapiret2 OCCURS 0 WITH HEADER LINE,"#EC *
    *-----Workarea declarations
           x_tab              LIKE LINE OF it_tab,
           x_header           LIKE LINE OF it_header,
           x_lineitem         LIKE LINE OF it_lineitem,
           x_invheader        TYPE bapiache09 OCCURS 0 WITH HEADER LINE,"#EC *
           x_bapiaccr09       LIKE LINE OF it_bapiaccr09,
           x_bapiacgl09       LIKE LINE OF it_bapiacgl09,
           x_bapiacar09       LIKE LINE OF it_bapiacar09,
           x_bapiaccr09_temp  LIKE LINE OF it_bapiaccr09,
    *-----Variables declarations
           v_str1(2)          TYPE c,
           v_str2(2)          TYPE c,
           v_str3(4)          TYPE c,
           v_doc_date         LIKE sy-datum,
           v_pstng_date       LIKE sy-datum,
           v_obj_key          TYPE bapiache09-obj_key,
           v_text             TYPE string,
           v_customer         TYPE bapiacar09-customer,
           v_gl_account       TYPE bapiacgl09-gl_account,
           v_itemno           TYPE bapiacgl09-itemno_acc,
           v_itemno_1         TYPE bapiacgl09-itemno_acc,
           v_amount(25)       TYPE c.
      SELECTION-SCREEN declaration                                       *
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(20) text-001 FOR FIELD p_fname.
    SELECTION-SCREEN POSITION 25.
    PARAMETERS: p_fname(128) TYPE c OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
      AT SELECTION-SCREEN ON VALUE-REQUEST                               *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
    *-----Calling function for selecting the local file
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
        IMPORTING
          file_name     = p_fname.
                    START-OF-SELECTION                                   *
    START-OF-SELECTION.
    *-----Uploading excel file into internal table
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          i_line_header        = 'X'
          i_tab_raw_data       = it_raw
          i_filename           = p_fname
        TABLES
          i_tab_converted_data = it_tab[]
        EXCEPTIONS
          conversion_failed    = 1
          OTHERS               = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      LOOP AT it_tab INTO x_tab.
    *-----Checking for existing data in it_header
        READ TABLE it_header INTO x_header WITH KEY col1 = x_tab-col1
                                                    col2 = x_tab-col2
                                                    col3 = x_tab-col3
                                                    col4 = x_tab-col4
                                                    col5 = x_tab-col5
                                                    col6 = x_tab-col6
                                                    col7 = x_tab-col7
                                                    col8 = x_tab-col8
                                                    col9 = x_tab-col9.
        IF sy-subrc NE 0.
          IF x_header IS NOT INITIAL.
    *-----calling bapi for creating customer invoice
            PERFORM call_bapi.
            REFRESH : it_header, it_lineitem.
          ENDIF.
    *-----making header table
          x_header-col1    = x_tab-col1.
          x_header-col2    = x_tab-col2.
          x_header-col3    = x_tab-col3.
          x_header-col4    = x_tab-col4.
          x_header-col5    = x_tab-col5.
          x_header-col6    = x_tab-col6.
          x_header-col7    = x_tab-col7.
          x_header-col8    = x_tab-col8.
          x_header-col9    = x_tab-col9.
          x_lineitem-col10 = x_tab-col10.
          x_lineitem-col11 = x_tab-col11.
          x_lineitem-col12 = x_tab-col12.
          x_lineitem-col13 = x_tab-col13.
          x_lineitem-col14 = x_tab-col14.
          x_lineitem-col15 = x_tab-col15.
          APPEND x_header TO it_header.
          APPEND x_lineitem TO it_lineitem.
        ELSE.
          x_lineitem-col10 = x_tab-col10.
          x_lineitem-col11 = x_tab-col11.
          x_lineitem-col12 = x_tab-col12.
          x_lineitem-col13 = x_tab-col13.
          x_lineitem-col14 = x_tab-col14.
          x_lineitem-col15 = x_tab-col15.
          APPEND x_lineitem TO it_lineitem.
        ENDIF.
      ENDLOOP.
    *-----Calling BAPI for last set of data
      PERFORM call_bapi.
      REFRESH : it_header, it_lineitem.
                             Form  call_bapi                             *
    FORM call_bapi.
    *-----Formatting invoice date
      SPLIT x_header-col5 AT '.' INTO v_str1 v_str2 v_str3.
      IF STRLEN( v_str1 ) LT 2.
        CONCATENATE '0' v_str1 INTO v_str1.
      ENDIF.
      IF STRLEN( v_str2 ) LT 2.
        CONCATENATE '0' v_str2 INTO v_str2.
      ENDIF.
      IF STRLEN( v_str3 ) LT 4.
        CONCATENATE '20' v_str3 INTO v_str3.
      ENDIF.
      CONCATENATE v_str3 v_str1 v_str2 INTO v_doc_date.
      CLEAR : v_str1, v_str2, v_str3.
    *-----Formatting posting date
      SPLIT x_header-col6 AT '.' INTO v_str1 v_str2 v_str3.
      IF STRLEN( v_str1 ) LT 2.
        CONCATENATE '0' v_str1 INTO v_str1.
      ENDIF.
      IF STRLEN( v_str2 ) LT 2.
        CONCATENATE '0' v_str2 INTO v_str2.
      ENDIF.
      IF STRLEN( v_str3 ) LT 4.
        CONCATENATE '20' v_str3 INTO v_str3.
      ENDIF.
      CONCATENATE v_str3 v_str1 v_str2 INTO v_pstng_date.
      CLEAR : v_str1, v_str2, v_str3.
    *-----Making the Header
      x_invheader-obj_type   = 'BKPFF'.                  "Reference procedure
      x_invheader-obj_key    = '$'.                      "Object key
      CONCATENATE sy-sysid 'CLNT' sy-mandt INTO
      x_invheader-obj_sys.                               "Logical system of source document
      x_invheader-bus_act    = 'RFBU'.                   "Business Transaction
      x_invheader-username   = sy-uname.                 "User name
      x_invheader-header_txt = x_header-col7.            "Document Header Text
      x_invheader-comp_code  = x_header-col3.            "Company Code
      x_invheader-doc_date   = v_doc_date.               "Document Date in Document
      x_invheader-pstng_date = v_pstng_date.             "Posting Date in the Document
      x_invheader-doc_type   = 'DR'.                     "Reference Document Number
      x_invheader-ref_doc_no = x_header-col4.            "Reference Document Number
    *-----For ACCOUNTRECEIVABLE
      LOOP AT it_header INTO x_header.
        x_bapiacar09-itemno_acc = '1'.                   "Accounting Document Line Item Number
    *-----Filling zeros before Customer No
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = x_header-col2
          IMPORTING
            output = v_customer.
        x_bapiacar09-customer   = v_customer.            "Customer Number 1
        x_bapiacar09-comp_code  = x_header-col3.         "Company Code
        APPEND x_bapiacar09 TO it_bapiacar09.
      ENDLOOP.
    *-----For ACCOUNTGL
      LOOP AT it_lineitem INTO x_lineitem.
        IF it_bapiacgl09 IS INITIAL.
          v_itemno              = 2.
        ELSE.
          v_itemno              = v_itemno + 1.
        ENDIF.
        x_bapiacgl09-itemno_acc = v_itemno.              "Accounting Document Line Item Number
    *-----Filling zeros before G/L Account no
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = x_lineitem-col10
          IMPORTING
            output = v_gl_account.
        x_bapiacgl09-gl_account = v_gl_account.          "General Ledger Account
        x_bapiacgl09-comp_code  = x_lineitem-col11.      "Company Code
        x_bapiacgl09-profit_ctr = x_lineitem-col14.      "Profit Center
        x_bapiacgl09-item_text  = x_lineitem-col15.      "Item Text
        APPEND x_bapiacgl09 TO it_bapiacgl09.
      ENDLOOP.
    *-----Clearing variable
      CLEAR : v_itemno.
    *-----For CURRENCYAMOUNT
      LOOP AT it_header INTO x_header.
        x_bapiaccr09-itemno_acc = '0000000001'.          "Accounting Document Line Item Number
        x_bapiaccr09-curr_type  = '00'.                  "Currency type and valuation view
        x_bapiaccr09-amt_doccur = x_header-col8.         "Amount in document currency
        x_bapiaccr09-currency   = x_header-col9.         "Currency Key
        APPEND x_bapiaccr09 TO it_bapiaccr09.
      ENDLOOP.
      v_itemno_1 = 1.
      LOOP AT it_lineitem INTO x_lineitem.
        v_itemno_1 = v_itemno_1 + 1.
        x_bapiaccr09_temp-itemno_acc = v_itemno_1.       "Accounting Document Line Item Number
        x_bapiaccr09_temp-curr_type  = '00'.             "Currency type and valuation view
        CONCATENATE '-' x_lineitem-col12 INTO v_amount.
        x_bapiaccr09_temp-amt_doccur = v_amount.         "x_lineitem-col12. "Amount in document currency
        x_bapiaccr09_temp-currency   = x_lineitem-col13. "Currency Key
        APPEND x_bapiaccr09_temp TO it_bapiaccr09.
      ENDLOOP.
      CLEAR : v_itemno_1.
    *-----Calling BAPI for creating Customer Invoice
      CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
        EXPORTING
          documentheader    = x_invheader
        IMPORTING
          obj_key           = v_obj_key
        TABLES
          accountgl         = it_bapiacgl09
          accountreceivable = it_bapiacar09
          currencyamount    = it_bapiaccr09
          return            = return.
    *-----Check the return code for error message.
      LOOP AT return
        TRANSPORTING NO FIELDS
        WHERE type = 'E' OR type = 'A'.
        EXIT.
      ENDLOOP.
    *-----Generating errors (if any)
      IF sy-subrc = 0.
        WRITE : text-003, x_header-col1.                                                 "Serial No :
        WRITE :/ text-002. "Invoice Not Created Because :
        LOOP AT return.                                         "#EC *
          WRITE:/ "return-type,
                  return-message.
        ENDLOOP.
        ULINE :/(150).
      ELSE.
    *-----BAPI Commit
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait   = 'X'
          IMPORTING
            return = return1.
    *-----Displaying invoice no as Success message
        WRITE : text-003, x_header-col1.                                                 "Serial No :
        CONCATENATE 'Invoice No. ' v_obj_key+0(10) ' Created ' INTO v_text."#EC NOTEXT
        WRITE :/ v_text.
        ULINE :/(150).
      ENDIF.
    *-----Refreshing internal tables
      REFRESH : it_bapiaccr09, it_bapiacgl09, it_bapiacar09, it_bapiaccr09_temp, return.
    ENDFORM.                    " call_bapi

  • Material Movement using BAPI with serial number.

    Hello,
    I am currently doing material movement using BAPI with serial number management, however in some case it works fine and in some cases it given and error message E213(IO). Unable to find the reason, when simulated the same it works fine for 200 serial numbers and gives error when going above 200 serial number.  The confusion is some times it works fine for 3000 serial number as well.
    Tried finding the reasion on every possible site. No results.
    Thanks in advance for some solution.

    Hello,
    I am currently doing material movement using BAPI with serial number management, however in some case it works fine and in some cases it given and error message E213(IO). Unable to find the reason, when simulated the same it works fine for 200 serial numbers and gives error when going above 200 serial number.  The confusion is some times it works fine for 3000 serial number as well.
    Tried finding the reasion on every possible site. No results.
    Thanks in advance for some solution.

  • BAPI for Open production orders

    Hi All,
    Any BAPI for open production orders?.... Using BAPI i want to upload open production orders informatiomations.... Please help
    Thanks & Regards
    Santhosh

    Hi,
       Please check the following BAPI,
    Goto BAPI tcode, select hierarchical tab
      Production orders,ProductionOrder ,ProdOrdConfirmation , RCVPRORDCF and check the BAPIs

  • Bapi for open PO

    Hi!
    Can anyone let me know where to find the bapi for open po and how to use it in my report program.
    Thanks in advance.
    Note: Mr Anji Reddy vangala has answered me for which iam very much thankful to him, but i need to know about the concerned bapi.
    Regards,
    Parwez.

    Hi,
    Refer the sample code below which creats PO using BAPI_PO_CREATE1.
    Hope this helps your querry.
    *& Report  YDM_PO_CREATE                                               *
    REPORT  ydm_po_create.
    *-- Input File Declaration
    TYPES: BEGIN OF ty_input_file,
           column1 TYPE char50,
           column2 TYPE char50,
           column3 TYPE char50,
           column4 TYPE char50,
           column5 TYPE char50,
           column6 TYPE char50,
           column7 TYPE char50,
           column8 TYPE char50,
           column9 TYPE char50,
           column10 TYPE char50,
           column11 TYPE char50,
           column12 TYPE char50,
           column13 TYPE char50,
           column14 TYPE char50,
           column15 TYPE char50,
           column16 TYPE char50,
           column17 TYPE char50,
           column18 TYPE char50,
    END OF ty_input_file.
    DATA: i_input_file  TYPE STANDARD TABLE OF ty_input_file,
          wa_input_file TYPE ty_input_file.
    CONSTANTS: c_path     TYPE char20 VALUE 'C:\',
               c_mask     TYPE char9  VALUE ',*.*,*.*.',
               c_mode     TYPE char1  VALUE 'O',
               c_filetype TYPE char10 VALUE 'ASC',
               c_x        TYPE char01 VALUE 'X'.
    PARAMETERS : p_fname   LIKE rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
    *-- Browse Presentation Server
      PERFORM f4_presentation_file.
    START-OF-SELECTION..
    *-- Read presentation server file
      PERFORM f1003_upload_file.
      IF NOT i_input_file[] IS INITIAL.
        PERFORM split_data.
      ENDIF.
    *&                  Form  f4_presentation_file
    *&                F4 Help for presentation server
    FORM f4_presentation_file .
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_path         = c_path
          mask             = c_mask
          mode             = c_mode
          title            = text-001
        IMPORTING
          filename         = p_fname
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
      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.                    " f4_presentation_file
    *&                      Form  f1003_upload_file
    *&                         Upload File
    FORM f1003_upload_file .
      DATA: lcl_filename TYPE string.
      lcl_filename = p_fname.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = lcl_filename
          filetype                = c_filetype
          has_field_separator     = c_x
        TABLES
          data_tab                = i_input_file
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          OTHERS                  = 17.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.
      ENDIF.
    ENDFORM.                    " f1003_upload_file
    *&      Form  split_data
          Collect data for creating Purchase Order
    FORM split_data .
      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.
      break gbpra8.
      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.
      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.
      LOOP AT i_input_file INTO wa_input_file.
        IF wa_input_file-column2 EQ 'HD'.
          wa_header-doc_type = wa_input_file-column3.
          wa_header-creat_date = sy-datum.
          wa_header-created_by = sy-uname.
          wa_header-vendor = wa_input_file-column4.
          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 = wa_input_file-column9.
          wa_header-vper_end = wa_input_file-column10.
          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.
        ENDIF.
        IF wa_input_file-column2 EQ 'IT'.
          wa_poitem-po_item = wa_input_file-column3.
          wa_poitem-short_text = wa_input_file-column6.
          wa_poitem-plant = wa_input_file-column8.
          wa_poitem-quantity = '1'.
          wa_poitem-tax_code = 'V0'.
          wa_poitem-item_cat = 'D'.
          wa_poitem-acctasscat = 'K'.
          wa_poitem-matl_group = wa_input_file-column7.
          wa_poitem-pckg_no = '10'.
          APPEND wa_poitem TO i_poitem .
          wa_poitemx-po_item = wa_input_file-column3.
          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.
          APPEND wa_poitemx TO i_poitemx.
          wa_poitem_sch-po_item = wa_input_file-column3.
          wa_poitem_sch-delivery_date = sy-datum.
          APPEND wa_poitem_sch TO i_poitem_sch.
          wa_poitem_schx-po_item = wa_input_file-column3.
          wa_poitem_schx-po_itemx = c_x.
          wa_poitem_schx-delivery_date = c_x.
          APPEND wa_poitem_schx TO i_poitem_schx.
          wa_acct_***-po_item = 10.
          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_***-po_item = 10.
          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 = 10.
          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_assx-po_item = 10.
          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 = 20.
          wa_services-line_no = 2.
          wa_services-service = wa_input_file-column9.
          wa_services-quantity = '100'.
          wa_services-gr_price = '100'.
          wa_services-userf1_txt = wa_input_file-column13.
          APPEND wa_services TO i_services.
          wa_srvacc-pckg_no = 20.
          wa_srvacc-line_no = 1.
          wa_srvacc-serno_line = 02.
          wa_srvacc-serial_no = 02.
          wa_srvacc-percentage = 100.
          APPEND wa_srvacc TO i_srvacc.
        ENDIF.
      ENDLOOP.
      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          poheader                     = wa_header
          poheaderx                    = wa_headerx
      POADDRVENDOR                 =
      TESTRUN                      =
      MEMORY_UNCOMPLETE            =
      MEMORY_COMPLETE              =
      POEXPIMPHEADER               =
      POEXPIMPHEADERX              =
      VERSIONS                     =
      NO_MESSAGING                 =
      NO_MESSAGE_REQ               =
      NO_AUTHORITY                 =
      NO_PRICE_FROM_PO             =
       IMPORTING
         exppurchaseorder             = ws_po
      EXPHEADER                    =
      EXPPOEXPIMPHEADER            =
       TABLES
         return                       = i_return
         poitem                       = i_poitem
         poitemx                      = i_poitemx
      POADDRDELIVERY               =
         poschedule                   = i_poitem_sch
         poschedulex                  = i_poitem_schx
         poaccount                    = i_acct_***
      POACCOUNTPROFITSEGMENT       =
         poaccountx                   = i_acct_assx
      POCONDHEADER                 =
      POCONDHEADERX                =
      POCOND                       =
      POCONDX                      =
      POLIMITS                     =
      POCONTRACTLIMITS             =
         poservices                   = i_services
         posrvaccessvalues            = i_srvacc
      POSERVICESTEXT               =
      EXTENSIONIN                  =
      EXTENSIONOUT                 =
      POEXPIMPITEM                 =
      POEXPIMPITEMX                =
      POTEXTHEADER                 =
      POTEXTITEM                   =
      ALLVERSIONS                  =
      POPARTNER                    =
      break gbpra8.
      LOOP AT i_return INTO wa_return.
      ENDLOOP.
    ENDFORM.                    " split_data
    *&      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
    <b>Reward points if this helps.
    Manish</b>

  • BAPI for Open Sales Order

    Experts,
    I need a BAPI for list of Sales order against which the invoice has not been generated.  I need to pass date and bapi shall return list of sales order that are not invoiced.
    Thanks
    Harsh

    Hi Frederic
    Sure it does.
    Actually I want to send data from SAP to some .net application. I thought using BAPI would make the job easier.
    Anyways thanks.
    Regards
    Harsh

  • PS: BAPI For Planned Progress and Actual Progress

    Dear All,
                  Is there any BAPI available for Planned Progress and Actual Progress for PS Project.
    Regards,
    Sohail

    Hi,
    Try using this report s_alr_87013532.
    Also for planned and actual progress the table is rpsqt. Could not find any bapi for the progress
    Regards
    Hiren K.Chitalia

  • BAPIs for Vendor Balances

    Hi!
    I need a BAPI for extract the Vendor Balances and other for load the Vendor Balances.
    Do they exist?

    try to search in Se37
    BAPI_AP_ACC_GETBALANCEDITEMS   Vendor Account Clearing Transactions in a given Period
    BAPI_AP_ACC_GETCURRENTBALANCE  Vendor Account Closing Balance in Current Fiscal Year
    BAPI_AP_ACC_GETKEYDATEBALANCE  Vendor Account Balance at Key Date
    BAPI_AP_ACC_GETPERIODBALANCES  Posting Period Balances per Vendor Account in Current Fiscal Year
    regards
    Prabhu

  • Function modules or BAPI for posting plan costs for WBS Element

    Hi all,
    Does anyone know, whether there exists a function module or BAPI for posting plan costs to a WBS Element? K_COSTS_PLAN_PS does not work, because RKP1 is not allowed.
    Greetings

    check
    BAPI_COSTACTPLN_POSTACTINPUT   Activity Input Planning: Posting                
    BAPI_COSTACTPLN_POSTACTOUTPUT  Activity/Price Planning: Posting                
    BAPI_COSTACTPLN_POSTKEYFIGURE  Stat. Key Figure Planning: Postings             
    BAPI_COSTACTPLN_POSTPRIMCOST   Primary Cost Planning: Postings                 
    BAPI_PDTRANSCO_POSTPRIMCOST    Transfer of Planning Data: Post Primary Costs   
    K40C                           CO Actual Postings, Manual                      
    BAPI_ACC_PRIMARY_COSTS_POST    Accounting: Post Primary Costs                  
    BAPI_COPAACTUALS_POSTCOSTDATA  BAPI Operating Concern: Post Costing-Based Actua
    BAPI_PRIM_COST_CHECK_AND_POST  Primary Costs: Formal Parameter Check           
    S@meer

  • IDOC/BAPI for Production order creation from Legacy system

    Hi all
    We are using an interface to create Production orders from legacy to SAP. Would you recommend an IDOC or a BAPI to create Production orders. If IDOC or BAPI then could you please mention which one?
    thanks a bunch

    Hi John,
    For your purposes, please use BAPI for production order creation from legacy system. There is no standard inbound IDoc available to use. SAP has an IDoc for outbound interface only (message type LOIPRO).
    If there is an inbound IDoc available, I would recommend to use an IDoc.
    IDoc technology has excellent error handling and will allow you to reprocess an error (if any).
    BAPI is also good approach to use and fast in term of  processing.
    For BAPI approach, you can use BAPI BAPI_PRODORD_CREATE.
    Hope this will help.
    Regards,
    Ferry Lianto

  • Bapi for vendor payment with details of tunover and blocked payment

    Dear all
    I want to know whether any BAPI available for the details of vendor payment made and the open item with  blocked payment (with the reason for the blocked payment) and the turnover of the vendor for a particular fiscal year...................
    The client want to get the output as mentioned below.
    e.g...
    PO no : 45629810
    Inv.No : 73409 (Vendor's Invoice no.)
    Payment : Paid amt with date and details
    Payment : Outstanding (Due and Over Due with no.of days)
    Blocked Payment : Amt with the reason for blocking the payment.
    Turn Over : Total turn over for that fiscal year.
    This is an urgent req. from my client,i will be very grateful if any one can  help me over this issue ..............
    Appreciate for any relevant answers and suggestion ...........
    I am in ECC 6.0
    Regards
    Praveen

    Hello Raj,
    Unfortunately there is no BAPI for payment detals and other company code data. The only possibility is via direct input (external data transfer).
    Please have a look at the following Easy-Access-path:
    SAP Menu
    -> Accounting
      -> Bank Applications
       -> Loans Management
        -> Environment
         -> External Data Transfer
    Within this menu entry you find diverse functions. Please start the function KCLJ to transfer data. Before you can do this you need to
    prepare the transfer by creating your own transfer structure and so on. You can get further information on what to do here by navigating to
    "Help   > Application help" within transaction KCLJ. From here you get to the right area of SAP library.
    Thanks Amber

  • Bapi for posting IR line item at a time

    Hi....
    Do we have a bapi for posting invoive receipt line item wise instead of posting the PO at a time......this wud be more precise for my requirement.....presently i'm using bapi_acc_document_post but this wud clear the document with single document number.....but i want it to be posted line item wise to see the amount individually item wise instead of combined one....similar to what we have in the IR which shows amount of individual items........

    This is an old bug that keeps popping up:
    https://forums.lenovo.com/t5/T400-T500-and-newer-T-series/Vertical-scrolling-got-reset-everytime-I-use-Ultra-Nav-to-scroll/td-p/343477

  • Help Rgd. BAPI for Creation of Inbound delivery Document

    Hi all,
    I need a Bapi to create inbound delivery document without using PO reference. I have seen the below BAPIs. i) BAPI_IBDLV_CREATE_FROM_OBDLV, 
    ii) BAPI_GOODSMVT_CREATE. I am not sure whether they are for creating inbound delivery document without using PO reference.
    It will be of great use if anyone can give me the BAPI for the purpose and the mandatory parameters or sample test data for the BAPI.
    Thanks in Advance,
    Rakesh.

    If you create the inbound delivery->check the purchase order in the tabstrip "Confirmations" on item level. There are three fields: "Confirmation control key", "Order acknowl." and "acknowl. required".
    Ckeck if there is a value in "confirmation control key".
    You should get the same error if you try to create VL31N in dialog mode, not only by using the bapi.
    Rgds,
    JP

  • BAPI for changing delivery date and delivery time fields in LIKP table

    Hi All,
         Is there any BAPI or function module to change the delivery date and delivery time in LIKP table ?
    Please tell me experts if exists.
    Thank you,
    Raghu.

    try these:
    BAPI/FM to update LIKP and VTTK tables
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi-for-changing-sales-headertable-likp-662800

Maybe you are looking for

  • [T400] no sound within Windows 7 on BIOS release v3.01-1.03​, but with 2.12-1.01

    Hi, I made an upgrade from Windows XP ti Windows 7 on my T400. Also I updated my BIOS from 2.x to 3.01 and the firmware of the harddrive. Windows 7 is nice, but sound wasn´t working. I watched several forums and installed dozens of Conexant drivers.

  • How to use a LOV object in apex with the parameter?

    Hi, I would like to create a LOV object with a query: SELECT ID, NAME FROM TABLE WHERE REF= APEX_FORM_VARIABLE This is for an Apex report page and each row provides the Apex form variable.

  • Buttons Not Working - 10g

    Hi! I created a new form - in dev suite 10g - added push buttons - trigger - WHEN-BUTTON-PRESSED Ex. one button just has Clear_Form; The bottons work in dev suite 10g - Run Form, but when deployed to the application server - Linux - the buttons do no

  • Exporting video in iphoto

    I made a video clip with my camera which I would like to use with and Imovie project. How do I get it into my imovie project?

  • Drag and drop doesn't work

    Drag and drop does not seem to work for me. I have 2 IPods & an Ipad2. I use iTunes ios5. I see many posts on the Internet for this problem but no solutions! Help!,