Dump while using BAPI BAPI_SALESORDER_CREATEFROM in background

Hi All,
I am using bapi BAPI_SALESORDER_CREATEFROM to create sales order in background. I am picking a file from server and converting that into header and line iten and passing that to above BAPI. Its creating order successfully and background job is also finished successfully. But when we check ST22 there is always a short dump corresponding to above job.
Can someone please help me? Following is some of the text from dump
Runtime Error          DYNPRO_SEND_IN_BACKGROUND
       Occurred on     06.05.2009 at   16:07:12
Screen output without connection to user.
What happened?
Error in ABAP application program.
The current ABAP program "SAPMSSY0" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
Information on where terminated
The termination occurred in the ABAP program "SAPMSSY0" in "%_CTL_OUTPUT".
The main program was "SAPMV75B ".
The termination occurred in line 30 of the source code of the (Include)
program "<SYSINI>"
of the source code of program "<SYSINI>" (when calling the editor 300).
Error occurred during batch input processing
000270   * Nach DCO
000280   module %_CTL_OUTPUT output.
000290     perform %_CTL_OUTPUT in program SAPMSSYD using SY-REPID if found.
     >   endmodule.
000310
Regards,
Sanjay

Hi Lalit,
I didn't understand what do you mean?
I have uploaded header and line item file into internal table and converted them according to BAPI requirement and then I am passing internal tables to BAPI. Its creating order successfully and as I said earlier also job is also finished successfully but when I check ST22 there is a dump corresponding to above job.
thanks,
Regards,
Sanjay

Similar Messages

  • Short dump while using FM "BAPI_GOODSMVT_CREATE" in background

    Hi Sir,
    I am using the FM "BAPI_GOODSMVT_CREATE" to create the Goods movement. While running the program through a job in background, article docu is generated successfully,,but at the same time it gives short dump in ST22.
    Short text
        Exception condition "CNTL_ERROR" raised.
    A RAISE statement in the program "CL_GUI_CUSTOM_CONTAINER=======CP" raised the
    exception
    condition "CNTL_ERROR".
    Since the exception was not intercepted by a superior
    program, processing was terminated.
    Please tell me what can be the possible reason for the same and how to avoid the same?
    Warm regards
    Krishan

    There's at least one note addressing this. You should be able to find it quite easily.
    Rob

  • Short Dump while using BAPI_PS_PRECOMMIT to set Project Definition Status

    Hi All,
    I am getting a short dump while using BAPI_PS_PRECOMMIT for setting the Project Definition status..
    The requirement is to create a Project Definition and then set its status to REL from CRTD. For this purpose i am using the BAPI's in the following sequence :
    1. BAPI_PS_INITIALIZATION
    2. BAPI_PROJECT_MAINTAIN
    3. BAPI_BUS2001_SET_STATUS
    4. BAPI_PS_PRECOMMIT
    5. BAPI_TRANSACTION_COMMIT
    The Proj Def creation is happening successfully in step2. Interestingly, when I debug the program and stop at PRECOMMIT BAPI the program does not give a dump. I have also tried to give COMMIT WORK / WAIT FOR n SECONDS after BAPI_BUS2001_SET_STATUS, to give BAPI sometime for DB update but nothing seems to be a permanent solution.
    Please give your views on a solution for this problem..
    Thanks & Regards,
    Somil

    Can you please check how to post code in SDN ...
    I cannot read your code properly

  • How to handle  user exits while using BAPI

    HI experts can any one help me on how to handle user exits while using BAPI. Do we need to handle it explicitly or standard  BAPI will take care of it??.
    Regards,
    Hari Krishna

    If you have added some fields using append structures for screen enhancements, then you have to use appropriate user exits to fill these data while calling BAPI.  Some BAPIs have EXTENSION structures to fill the custom data which can be processed using user exists or enhancements.
    Regards
    Vinod

  • Strange Dump while using HR_INFOTYPE_OPERATION.

    Hi frnz,
    I am facing dump while using the FM 'HR_INFOTYPE_OPERATION' as below. <b>If I swap positions of w_p0041-endda and w_p0041-begda it does not give a dump but error msg is generated saying that no selection in the period(as obviously dates are in propper range).</b> <u>Whlie testing the FM in SE37 with the same data, it works fine.</u> Please help me find the problem.
    data: TCLAS like PSPAR-TCLAS,
          OPERATION like PSPAR-ACTIO,
          infty like PRELP-INFTY.
          infty = '0041'.
          OPERATION = 'MOD'.
          TCLAS = 'A'.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          INFTY                  = infty
          NUMBER                 = w_p0041-pernr
      SUBTYPE                =
      OBJECTID               =
      LOCKINDICATOR          =
         VALIDITYEND            = w_p0041-endda
         VALIDITYBEGIN          = w_p0041-begda
      RECORDNUMBER           =
          RECORD                 = w_p0041
          OPERATION              = OPERATION
          TCLAS                  = TCLAS
      DIALOG_MODE            = '0'
        NOCOMMIT               = SPACE
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
       IMPORTING
         RETURN                 =  Return
      KEY                    =

    Hi all ,
    I have already tried converting date to internal format, the data types are also fine. I am not able to paste the screen shot so here is a part of it. Please help.
    ************DUMP************************************
    If we can not remap we would like to just re-raise the
    exception like below like "RAISE EXCEPTION exception.".
    Unfortunately the kernel will then forget about the
    original source position.
    So this is the fallback strategy. Calling this method
    is only allowed if the exception can be resolved. Since
    this is not the case we indicate a parameter violation.
      RAISE EXCEPTION TYPE cx_hrpa_invalid_parameter
        EXPORTING
          previous  = exception
          parameter = 'EXCEPTION'.
    ENDMETHOD.
    ********************END**************
    Thanks
    Sachin

  • Short dumps while using J3A9 & VK12

    We are implementing SAP ECC 6.0 and are experiencing short dumps while using transactions J3A9 and VK12.  They all point to program /AFS/SD_DISP_CONDITION_TABLE and related Includes.  I haven't found any information regarding this program on this site or in OSS, mostly due to the fact that the program is only 2 months old, which is troubling enough...
    If anyone is experiencing similar issues, please feel free to respond.  I have opened an OSS note with SAP and they are having trouble recreating the issue as it doesn't happen consistently. 
    Thanks and best regards,
    Chris Mowl

    We are implementing SAP ECC 6.0 and are experiencing short dumps while using transactions J3A9 and VK12.  They all point to program /AFS/SD_DISP_CONDITION_TABLE and related Includes.  I haven't found any information regarding this program on this site or in OSS, mostly due to the fact that the program is only 2 months old, which is troubling enough...
    If anyone is experiencing similar issues, please feel free to respond.  I have opened an OSS note with SAP and they are having trouble recreating the issue as it doesn't happen consistently. 
    Thanks and best regards,
    Chris Mowl
    10/22/08:  Several OSS notes have been created regarding this issue but none of them have solved it.  The two most recent notes are 1262962 & 1225190.  If you are having this problem. start with these notes.

  • Classification System CA-CL: Problems / Dumps while using a new class type

    Hi All,
    You'd really make my day by helping me out w. hints or even a solution. Would reward points for your efforts...
    The problem: in order to develop a class hierachy of product groups (in industry system, Rel. 6.40) I created a new class type (let's call it ZWG).
    While doing so R/3 requsted me to provide info on the objects to assign to this class type as well as the transaction for displaying these objects. For Product Groups (material classes) this is object-table T023 and transaction WG24.
    Furthermore the sys demands the implementation of a function module. This module's task is to check the existence of a given object as well as the locking and later unlocking in the process of classifying objects. Following SAP's naming convention I implemented and activated FM OBJECT_CHECK_T023.
    After that I created a new class (FIRST_CLASS) of class-type ZWG.
    I managed to assign exactly one (1) prod-grp to this class but afterwards I only receive dumps while using transactions CL20N, CL24N  to assign objects.
    The Message from ST22 says:
    Assignment error: Overwriting a protected field.
    Error in ABAP application program.                                                                               
    The current ABAP program "SAPLCLCV" had to be terminated because one of the 
    statements could not be executed.                                                                               
    This is probably due to an error in the ABAP program.                       
    Do I have to debug throughout thís enormous amount of coding now? :-(((
    Hope someone get's my "message in a bottle"
    Best Regards
    Udo

    Yatin please see attached for warning.I am trying to create Z class using 001

  • Short dump while using BAPI_PO_CREATE1

    Hi all,
    I am facing this short dump while executing my program that uses BAPI_PO_CREATE1.
    The error is 'Exception condition "failure" raised'.
    The trigger location of runtime error is
    Program : CL_HANDLE_MANAGER_MM====================CP
    Include:   CL_HANDLE_MANAGER_MM=====================CM005
    Module name:   GET
    Source code:
    Method GET.
    If my_manager is initial.
        Call method get_manager.
    endif.
    call method my_manager-> search EXporting im_id  = im_id
                                                            Importing ex_handle = ex_handle
                                                            Exceptions failure = 01.
    If sy-subrc <>0.
      raise failure.
    endif.
    I am a beginner in ABAP. Plz help.

    Hi ,
    I faced the similar situation once , in my case when i passed the Delivery indicator value in the Item Table as well as Itemx Table , i was facing this error .
    what  i suggest you is to pass it at the Item table only , not at the itemx Table.
    it worked  for me .
    try this and reply for the same.

  • Error while using bapi BAPI_INCOMINGINVOICE_CREATE to post MIRO

    Hi Friends,
             Im using bapi BAPI_INCOMINGINVOICE_CREATE to post MIRO.
             im passing data to table GLACCOUNTDATA.
             Below are the table fields im paasing
         INVOICE_DOC_ITEM " '000001' deafault always
         GL_ACCOUNT  "Which is constant for all in my case               
         ITEM_AMOUNT      " Total PO net amt + Frieght charges header level      
         DB_CR_IND      " 'S' always default     
         COMP_CODE      " 'RPPL' always default          
         TAX_CODE      " 'V0'     deafault always     
         PROFIT_CTR       " for ex 1100180. based on plant
              While posting this bapi is trhrowing error as below
         'profit centre  RPPL/1100180 does not exist for 01.12.2008'
         where 01.12.2008 is the MIRO posting date which im passing in header.
            We checked dates for profit centres they are correct.
            Awaiting the reply ASAP.
    Regards,
    Venky

    Hi,
    It would be better if you do a recheck on data input for BAPI. If you sure the data are ok but the BAPI still gives error message, then I suggest to post to OSS.
    Regards,
    Teddy Kurniawan

  • How to create service PO while using BAPI

    Dear Experts
    I am getting error while creating Service PO using BAPI
    E 518
    No account assignment exists for service line 0000000010
    E 518
    No account assignment exists for service line 0000000010
    TYPES : BEGIN OF ty_header,
            po_no(10)   TYPE n,
            purch_org   TYPE bapimepoheader-purch_org,
            pur_group   TYPE bapimepoheader-pur_group,
            doc_type    TYPE bapimepoheader-doc_type,
            vendor      TYPE bapimepoheader-vendor,
            doc_date    TYPE bapimepoheader-doc_date,
            currency    TYPE bapimepoheader-currency,
            comp_code   TYPE bapimepoheader-comp_code,
            END OF ty_header,
            BEGIN OF ty_item,
            po_no(10)   TYPE n,                             " Internal Use
            po_item     TYPE bapimepoitem-po_item,
            acctasscat  TYPE bapimepoitem-acctasscat,
            short_text  TYPE bapimepoitem-short_text,
            plant       TYPE bapimepoitem-plant,
            pckg_no     TYPE bapimepoitem-pckg_no,
            stge_loc    TYPE bapimepoitem-stge_loc,
            quantity    TYPE bapimepoitem-quantity,
            po_unit     TYPE bapimepoitem-po_unit,
            po_price    TYPE bapimepoitem-po_price,
            net_price   TYPE bapimepoitem-net_price,
            price_unit  TYPE bapimepoitem-price_unit,
            orderpr_un  TYPE bapimepoitem-orderpr_un,
            delivery_date TYPE bapimeposchedule-delivery_date,              " bapimeposchedule
            matl_group  TYPE bapimepoitem-matl_group,
            tax_code    TYPE bapimepoitem-tax_code,
            END OF ty_item,
            BEGIN OF ty_service,
            po_no(10)   TYPE  n,                            " Internal Use
            po_item     TYPE  bapimepoitem-po_item,         " Internal Use
            pckg_no     TYPE  bapiesllc-pckg_no,
            line_no     TYPE  bapiesllc-line_no,
            ext_line    TYPE  bapiesllc-ext_line,
            outl_ind    TYPE  bapiesllc-outl_ind,
            subpckg_no  TYPE  bapiesllc-subpckg_no,
            serial_no   TYPE  bapiesklc-serial_no,           " bapiesklc
            short_text  TYPE  bapiesllc-short_text,
            quantity    TYPE  bapiesllc-quantity,
            base_uom    TYPE  bapiesllc-base_uom,
            gr_price    TYPE  bapiesllc-gr_price,
            matl_group  TYPE  bapiesllc-matl_group,
            END OF ty_service,
            BEGIN OF ty_poaccount,
            po_no(10)   TYPE n,                             " Internal Use
            po_item      TYPE bapimepoaccount-po_item,
            serial_no    TYPE bapimepoaccount-serial_no,
            gl_account   TYPE bapimepoaccount-gl_account,
            costcenter   TYPE bapimepoaccount-costcenter,
            asset_no     TYPE bapimepoaccount-asset_no,
            orderid      TYPE bapimepoaccount-orderid,
            END OF ty_poaccount.
    DATA : it_header TYPE TABLE OF ty_header,
           wa_header TYPE ty_header,
           it_item   TYPE TABLE OF ty_item,
           wa_item   TYPE ty_item,
           it_service TYPE TABLE OF ty_service,
           wa_service TYPE ty_service,
           it_account TYPE TABLE OF ty_poaccount,
           wa_account TYPE ty_poaccount.
    DATA : it_excel1 TYPE TABLE OF alsmex_tabline,
           wa_excel1 TYPE alsmex_tabline,
           it_excel2 TYPE TABLE OF alsmex_tabline,
           wa_excel2 TYPE alsmex_tabline,
           it_excel3 TYPE TABLE OF alsmex_tabline,
           wa_excel3 TYPE alsmex_tabline,
           it_excel4 TYPE TABLE OF alsmex_tabline,
           wa_excel4 TYPE alsmex_tabline.
    DATA : number TYPE string,
           number1 TYPE string.
    ********** BAPI**************
    CONSTANTS : c_x VALUE 'X'.
    *Structures to hold PO header data
    DATA : header LIKE bapimepoheader ,
           headerx LIKE bapimepoheaderx .
    *Internal Tables to hold PO ITEM DATA
    DATA : item LIKE bapimepoitem OCCURS 0 WITH HEADER LINE,
           itemx LIKE bapimepoitemx OCCURS 0 WITH HEADER LINE.
    *Structures to hold PO schedule data
    DATA : itemschedule LIKE bapimeposchedule OCCURS 0 WITH HEADER LINE ,
           itemschedulex LIKE bapimeposchedulx OCCURS 0 WITH HEADER LINE .
    *Structures to hold PO services data
    DATA : services LIKE bapiesllc OCCURS 0 WITH HEADER LINE .
    *Structures to hold PO (distrib.imputac.lín.servicios) data
    DATA : posrvaccessvalues LIKE bapiesklc OCCURS 0 WITH HEADER LINE .
    *Structures to hold PO account data
    DATA : account  LIKE bapimepoaccount OCCURS 0 WITH HEADER LINE ,
           accountx LIKE bapimepoaccountx OCCURS 0 WITH HEADER LINE .
    *Internal table to hold messages from BAPI call
    DATA : return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
           purchaseorder LIKE bapimepoheader-po_number.
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS : p_file1 TYPE rlgrap-filename OBLIGATORY,
                 p_brow1 TYPE i,
                 p_erow1 TYPE i.
    SELECTION-SCREEN : END OF BLOCK b1.
    SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS : p_file2 TYPE rlgrap-filename OBLIGATORY,
                 p_brow2 TYPE i,
                 p_erow2 TYPE i.
    SELECTION-SCREEN : END OF BLOCK b2.
    SELECTION-SCREEN : BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS : p_file3 TYPE rlgrap-filename OBLIGATORY,
                 p_brow3 TYPE i,
                 p_erow3 TYPE i.
    SELECTION-SCREEN : END OF BLOCK b3.
    SELECTION-SCREEN : BEGIN OF BLOCK b4 WITH FRAME TITLE text-004.
    PARAMETERS : p_file4 TYPE rlgrap-filename OBLIGATORY,
                 p_brow4 TYPE i,
                 p_erow4 TYPE i.
    SELECTION-SCREEN : END OF BLOCK b4.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
          field_name    = ' '
        IMPORTING
          file_name     = p_file1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file2.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
          field_name    = ' '
        IMPORTING
          file_name     = p_file2.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file3.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
          field_name    = ' '
        IMPORTING
          file_name     = p_file3.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file4.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
          field_name    = ' '
        IMPORTING
          file_name     = p_file4.
    START-OF-SELECTION.
      PERFORM excel_to_itab.
      PERFORM get_final.
    *&      Form  excel_to_itab
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM excel_to_itab .
    ************** Excel 1
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                      = p_file1
          i_begin_col                   = '1'
          i_begin_row                   = p_brow1
          i_end_col                     = '08'
          i_end_row                     = p_erow1
        TABLES
          intern                        = it_excel1
    * EXCEPTIONS
    *   INCONSISTENT_PARAMETERS       = 1
    *   UPLOAD_OLE                    = 2
    *   OTHERS                        = 3
      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_excel1  INTO wa_excel1.
        CASE wa_excel1-col.
          WHEN '0001'.
            wa_header-po_no = wa_excel1-value.
          WHEN '0002'.
            wa_header-purch_org = wa_excel1-value.
          WHEN '0003'.
            wa_header-pur_group = wa_excel1-value.
          WHEN '0004'.
            wa_header-doc_type = wa_excel1-value.
          WHEN '0005'.
            wa_header-vendor = wa_excel1-value.
          WHEN '0006'.
            wa_header-doc_date = wa_excel1-value.
          WHEN '0007'.
            wa_header-currency = wa_excel1-value.
          WHEN '0008'.
            wa_header-comp_code = wa_excel1-value.
        ENDCASE.
        AT END OF row.
          APPEND wa_header TO it_header.
          CLEAR wa_header.
        ENDAT.
      ENDLOOP.
    ************** Excel 2
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
          EXPORTING
            filename                      = p_file2
            i_begin_col                   = '1'
            i_begin_row                   = p_brow2
            i_end_col                     = '16'
            i_end_row                     = p_erow2
          TABLES
            intern                        = it_excel2
    * EXCEPTIONS
    *   INCONSISTENT_PARAMETERS       = 1
    *   UPLOAD_OLE                    = 2
    *   OTHERS                        = 3
      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_excel2 INTO wa_excel2.
        CASE wa_excel2-col.
          WHEN '0001'.
            wa_item-po_no = wa_excel2-value.
          WHEN '0002'.
            wa_item-po_item = wa_excel2-value.
          WHEN '0003'.
            wa_item-acctasscat = wa_excel2-value.
          WHEN '0004'.
            wa_item-short_text = wa_excel2-value.
          WHEN '0005'.
            wa_item-plant = wa_excel2-value.
          WHEN '0006'.
            wa_item-pckg_no  = wa_excel2-value.
          WHEN '0007'.
            wa_item-stge_loc = wa_excel2-value.
          WHEN '0008'.
            wa_item-quantity = wa_excel2-value.
          WHEN '0009'.
            wa_item-po_unit = wa_excel2-value.
          WHEN '0010'.
            wa_item-po_price = wa_excel2-value.
          WHEN '0011'.
            wa_item-net_price = wa_excel2-value.
          WHEN '0012'.
            wa_item-price_unit = wa_excel2-value.
          WHEN '0013'.
            wa_item-orderpr_un = wa_excel2-value.
          WHEN '0014'.
            wa_item-delivery_date  = wa_excel2-value.
          WHEN '0015'.
            wa_item-matl_group = wa_excel2-value.
          WHEN '0016'.
            wa_item-tax_code  = wa_excel2-value.
        ENDCASE.
        AT END OF row.
          APPEND wa_item TO it_item.
          CLEAR wa_item.
        ENDAT.
      ENDLOOP.
    ************** Excel 3
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
          EXPORTING
            filename                      = p_file3
            i_begin_col                   = '1'
            i_begin_row                   = p_brow3
            i_end_col                     = '13'
            i_end_row                     = p_erow3
          TABLES
            intern                        = it_excel3
    * EXCEPTIONS
    *   INCONSISTENT_PARAMETERS       = 1
    *   UPLOAD_OLE                    = 2
    *   OTHERS                        = 3
      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_excel3 INTO wa_excel3.
        CASE wa_excel3-col.
          WHEN '0001'.
            wa_service-po_no = wa_excel3-value.
          WHEN '0002'.
            wa_service-po_item = wa_excel3-value.
          WHEN '0003'.
            wa_service-pckg_no = wa_excel3-value.
          WHEN '0004'.
            wa_service-line_no = wa_excel3-value.
          WHEN '0005'.
            wa_service-ext_line = wa_excel3-value.
          WHEN '0006'.
            wa_service-outl_ind = wa_excel3-value.
          WHEN '0007'.
            wa_service-subpckg_no = wa_excel3-value.
          WHEN '0008'.
            wa_service-serial_no = wa_excel3-value.
          WHEN '0009'.
            wa_service-short_text = wa_excel3-value.
          WHEN '0010'.
            wa_service-quantity = wa_excel3-value.
          WHEN '0011'.
            wa_service-base_uom = wa_excel3-value.
          WHEN '0012'.
            wa_service-gr_price = wa_excel3-value.
          WHEN '0013'.
            wa_service-matl_group = wa_excel3-value.
        ENDCASE.
        AT END OF row.
          APPEND wa_service TO it_service.
          CLEAR wa_service.
        ENDAT.
      ENDLOOP.
    ************** Excel 3
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
          EXPORTING
            filename                      = p_file4
            i_begin_col                   = '1'
            i_begin_row                   = p_brow4
            i_end_col                     = '07'
            i_end_row                     = p_erow4
          TABLES
            intern                        = it_excel4
    * EXCEPTIONS
    *   INCONSISTENT_PARAMETERS       = 1
    *   UPLOAD_OLE                    = 2
    *   OTHERS                        = 3
      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_excel4 INTO wa_excel4.
        CASE wa_excel4-col.
          WHEN '0001'.
            wa_account-po_no  = wa_excel4-value.
          WHEN '0002'.
            wa_account-po_item  = wa_excel4-value.
          WHEN '0003'.
            wa_account-serial_no = wa_excel4-value.
          WHEN '0004'.
            wa_account-gl_account = wa_excel4-value.
          WHEN '0005'.
            wa_account-costcenter = wa_excel4-value.
          WHEN '0006'.
            wa_account-asset_no = wa_excel4-value.
          WHEN '0007'.
            wa_account-orderid  = wa_excel4-value.
        ENDCASE.
        AT END OF row.
          APPEND wa_account TO it_account.
          CLEAR wa_account.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " excel_to_itab
    *&      Form  GET_FINAL
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM get_final .
      LOOP AT it_header INTO wa_header.
    *  BAPI HEADER
        header-purch_org  = wa_header-purch_org.
        header-pur_group  = wa_header-pur_group.
        header-doc_type   = wa_header-doc_type.
        header-vendor     = wa_header-vendor.
        header-doc_date   = wa_header-doc_date.
        header-currency   = wa_header-currency.
        header-comp_code  = wa_header-comp_code.
    * BAPI HEADERX
        headerx-comp_code = c_x.
        headerx-doc_type = c_x.
        headerx-vendor = c_x.
        headerx-creat_date = c_x.
        headerx-created_by = c_x.
        headerx-purch_org = c_x.
        headerx-pur_group = c_x.
        headerx-langu = c_x.
        headerx-sales_pers = c_x.
        headerx-currency = c_x.
        headerx-doc_date = c_x.           " Added
        LOOP AT it_item INTO wa_item WHERE po_no = wa_header-po_no.
          CALL FUNCTION 'NUMBER_GET_NEXT'
             EXPORTING
               nr_range_nr                   = '01'
               object                        = 'SERVICE'
    *   quantity                      = '1'
    *   SUBOBJECT                     = ' '
    *   TOYEAR                        = '0000'
    *   IGNORE_BUFFER                 = ' '
              IMPORTING
              number                        =    number
    *   QUANTITY                      =
    *   RETURNCODE                    =
    * EXCEPTIONS
    *   INTERVAL_NOT_FOUND            = 1
    *   NUMBER_RANGE_NOT_INTERN       = 2
    *   OBJECT_NOT_FOUND              = 3
    *   QUANTITY_IS_0                 = 4
    *   QUANTITY_IS_NOT_1             = 5
    *   INTERVAL_OVERFLOW             = 6
    *   BUFFER_OVERFLOW               = 7
    *   OTHERS                        = 8
          IF sy-subrc <> 0.
    * Implement suitable error handling here
          ENDIF.
          item-po_item        =     wa_item-po_item.
          item-acctasscat     =     wa_item-acctasscat.
          item-item_cat       =     '9'.
          item-short_text     =     wa_item-short_text.
          item-plant          =     wa_item-plant.
          item-pckg_no        =     number.
          item-stge_loc       =     wa_item-stge_loc.
          item-quantity       =     wa_item-quantity.
          item-po_unit        =     wa_item-po_unit.
          item-po_price       =     wa_item-po_price.
          item-net_price      =     wa_item-net_price.
          item-price_unit     =     wa_item-price_unit.
          item-orderpr_un     =     wa_item-orderpr_un.
          item-matl_group     =     wa_item-matl_group.
          item-tax_code       =     wa_item-tax_code.
          APPEND item.
          CLEAR item.
          itemx-po_item = wa_item-po_item.
          itemx-item_cat =  c_x.
          itemx-po_itemx = c_x.
          itemx-short_text = c_x.
          itemx-quantity = c_x.
          itemx-tax_code = c_x.
          itemx-acctasscat = c_x.
          itemx-item_cat = c_x.
          itemx-matl_group = c_x.
          itemx-plant = c_x.
          itemx-trackingno = c_x.
          itemx-agreement = c_x.
          itemx-agmt_item = c_x.
          itemx-stge_loc = c_x.
          itemx-quantity = c_x.
          itemx-po_unit = c_x.
          itemx-conv_num1 = c_x.
          itemx-conv_den1 = c_x.
          itemx-net_price = c_x.
          itemx-price_unit = c_x.
          itemx-gr_pr_time = c_x.
          itemx-prnt_price = c_x.
          itemx-unlimited_dlv = c_x.
          itemx-gr_ind = c_x .
          itemx-ir_ind = c_x .
          itemx-gr_basediv = c_x .
          itemx-pckg_no = c_x.
          itemx-po_price = c_x.         " Added
          itemx-orderpr_un = c_x.         " Added
          APPEND itemx.
          CLEAR itemx.
          itemschedule-po_item = wa_item-po_item.
          itemschedule-del_datcat_ext = 'D'.
          itemschedule-delivery_date =  wa_item-delivery_date.
          APPEND itemschedule.
          CLEAR itemschedule.
          itemschedulex-po_item = wa_item-po_item.
          itemschedulex-po_itemx = c_x .
          itemschedulex-del_datcat_ext = c_x.
          itemschedulex-delivery_date = c_x .
          APPEND itemschedulex.
          CLEAR itemschedulex.
          LOOP AT  it_service INTO wa_service WHERE po_no = wa_item-po_no AND po_item = wa_item-po_item.
            IF  wa_service-outl_ind IS INITIAL.
    IF number1 IS INITIAL.
              CALL FUNCTION 'NUMBER_GET_NEXT'
                EXPORTING
                  nr_range_nr                   = '01'
                  object                        = 'SERVICE'
    *   quantity                      = '1'
    *   SUBOBJECT                     = ' '
    *   TOYEAR                        = '0000'
    *   IGNORE_BUFFER                 = ' '
                 IMPORTING
                 number                        =    number1
    *   QUANTITY                      =
    *   RETURNCODE                    =
    * EXCEPTIONS
    *   INTERVAL_NOT_FOUND            = 1
    *   NUMBER_RANGE_NOT_INTERN       = 2
    *   OBJECT_NOT_FOUND              = 3
    *   QUANTITY_IS_0                 = 4
    *   QUANTITY_IS_NOT_1             = 5
    *   INTERVAL_OVERFLOW             = 6
    *   BUFFER_OVERFLOW               = 7
    *   OTHERS                        = 8
              IF sy-subrc <> 0.
    * Implement suitable error handling here
              ENDIF.
              services-pckg_no      =  number.
              services-line_no      =  '1'.
              services-ext_line     =  '0'.
              services-outl_ind     =  'X'.
              services-subpckg_no   =  number1.
    *          services-short_text   =  wa_service-short_text.
    *          services-quantity     =  wa_service-quantity.
    *          services-base_uom     =  wa_service-base_uom.
    *          services-gr_price     =  wa_service-gr_price.
    *          services-matl_group   =  wa_service-matl_group.
              APPEND  services.
              CLEAR services.
    ENDIF.
    *        ELSE.
              services-pckg_no      =  number1.
              services-line_no      =  wa_service-line_no.
              services-ext_line     =  wa_service-ext_line.
    *          services-outl_ind     =  wa_service-outl_ind.
              services-subpckg_no   =  '0'.
              services-short_text   =  wa_service-short_text.
              services-quantity     =  wa_service-quantity.
              services-base_uom     =  wa_service-base_uom.
              services-gr_price     =  wa_service-gr_price.
              services-matl_group   =  wa_service-matl_group.
              APPEND  services.
              CLEAR services.
            ENDIF.
            IF wa_service-outl_ind IS INITIAL.
              posrvaccessvalues-pckg_no =  number1.
              posrvaccessvalues-line_no = wa_service-line_no.
              posrvaccessvalues-serno_line = '01'.
              posrvaccessvalues-serial_no = wa_service-serial_no.
    *          posrvaccessvalues-percentage = '100'.
              APPEND posrvaccessvalues . CLEAR posrvaccessvalues.
            ENDIF.
          ENDLOOP.
          LOOP AT it_account INTO wa_account WHERE po_no = wa_item-po_no AND po_item = wa_item-po_item.
            account-po_item         =       wa_account-po_item.
            account-serial_no       =       wa_account-serial_no.
            account-gl_account      =       wa_account-gl_account.
            account-costcenter      =       wa_account-costcenter.
            account-asset_no        =       wa_account-asset_no.
            account-orderid         =       wa_account-orderid.
            APPEND account.
            CLEAR account.
            accountx-po_item = wa_account-po_item.
            accountx-po_itemx = c_x .
            accountx-serial_no = wa_account-serial_no.
            accountx-serial_nox = c_x .
    *        accountx-creat_date = c_x .
            accountx-costcenter = c_x .
            accountx-gl_account = c_x .
    *        accountx-co_area = c_x .
    *        accountx-tax_code = c_x .
    *        accountx-asset_no        = c_x .   " Added
    *        accountx-orderid         = c_x .   " Added
            APPEND accountx. CLEAR accountx.
          ENDLOOP.
        ENDLOOP.
        CALL FUNCTION 'BAPI_PO_CREATE1'
          EXPORTING
            poheader          = header
            poheaderx         = headerx
    *       POADDRVENDOR      =
    *       TESTRUN           =
          IMPORTING
            exppurchaseorder  = purchaseorder
    *       EXPHEADER         =
    *       EXPPOEXPIMPHEADER =
          TABLES
            return            = return
            poitem            = item
            poitemx           = itemx
            poschedule        = itemschedule
            poschedulex       = itemschedulex
            poaccount         = account
            poaccountx        = accountx
            poservices        = services.
        posrvaccessvalues = posrvaccessvalues.
        IF purchaseorder IS NOT INITIAL.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              wait = 'X'.
        ENDIF.
        LOOP AT return.
          WRITE : / return-type, return-number, return-message.
        ENDLOOP.
      ENDLOOP.
    ENDFORM.                    " GET_FINAL

    Hi ganesh,
    Please look at the SAP note 376424 - BAPI_PO_CREATE1: Error messages for parked POs.
    Sap recommends to install the support service pack. Take a look at the note for detailed understanding.
    Also take a look at SAP NOte
    767284 - SE518 occurs although account assignment is supplied to BAPI (this requires Note 552114 must be applied as a prerequisite)
    Consider contacting basis team after your analysis about the issue.
    Regards,
    Sivaganesh

  • Error while using BAPIs that deals with DMS

    Hi everybody,
    We are developing a portal with Web Dynpro and trying to call from our java code BAPIs that deals with DMS:
    BAPI_DOCUMENT_CREATE2 - to create a new DMS document and checkin an original.
    CVAPI_DOC_CHECKIN - to checkin an original to an existing DMS document.
    CVAPI_DOC_CHECKOUT - to checkout an original from the DMS.
    While using other bapi's that deals with DMS but do not deals with originals (like creating a new document, retrieving metadata about documents and originals) we don't have any problem.
    Only when trying to checkin or checkout originals we get the following message (from the DMS?): RFC_START_PROGRAM
    the full message is: com.sap.aii.proxi.framework.core.BaseProxiException:RFC_START_PROGRAM error key:RFC_ERROR_PROGRAM.
    does anybody knows the meaning of this message?
    by the way - those BAPIs works well while called from the R/3. only when we call them from the portal we have this problem.
    thanks for any information, Adi.

    Hello,
    BTW, You have BAPIs for Doc. checkin and checkout.
    BAPI_DOCUMENT_CHECKIN
    BAPI_DOCUMENT_CHECKIN2
    BAPI_DOCUMENT_CHECKOUTSET
    BAPI_DOCUMENT_CHECKOUTSET2
    Can you use these and give a try?
    You have a detailed documentation maintained for these BAPIs.
    Hope this helps you.
    Best Regards, Murugesh AS

  • Getting Dump while using PYXX_READ_PAYROLL_RESULT FM

    I m trying to get the gross salary and ESI contribution amount for an indian based employee. While using the FM 'PYXX_READ_PAYROLL_RESULT' i m getting the following dump.
    ************************************************************************************************************************************************************An exception occurred that is explained in detail below.The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', wa  not caught in  procedure "PYXX_READ_PAYROLL_RESULT" "(FUNCTION)", nor was it propagated by  RAISING clause.Since the caller of the procedure could not have anticipated that the exception would occur, the current program is terminated. The reason for the exception is:
    Call to FORM "IMPORT_RESULT" is incorrect:
    The actual parameter no. 2 has a different data type in the
    PERFORM than requested for the FORM "IMPORT_RESULT" in program  %_T06K40".    
    and it is showing the dump result here
    ELSE.
          PERFORM import_client_spec IN PROGRAM (subroutine_pool-name)
                                      USING client
                                             key
                                             payroll_result
                                             import_subrc
                                             pcl2_version_number
                                             typepool_version_number
                            IF FOUND.
    Pls help me to solve the issue as it very high priroty work

    Hi Faisal,
    Before the FM the Sy-Subrc is zero only and i have declared the exception part also..
    IF sy-subrc = 0.
      CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
        EXPORTING
          clusterid                    = 'IN'
          employeenumber               = P0001-pernr
          sequencenumber               = it_rgdir-seqnr
          filter_cumulations           = ''
        CHANGING
          payroll_result               = it_payresult
        EXCEPTIONS
          illegal_isocode_or_clusterid = 1
          error_generating_import      = 2
          import_mismatch_error        = 3
          subpool_dir_full             = 4
          no_read_authority            = 5
          no_record_found              = 6
          versions_do_not_match        = 7
          error_reading_archive        = 8
          error_reading_relid          = 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.
    Endif.
    Thanks!

  • ABAP Dump while using "Upload from clipboard"

    Hi,
    We are facing ABAP dump when using "upload from clipboard" funciton without any data on the clipboard.
    "Upload data" is working fine if some data exists on the clipboard. If in case of no data on the clipboard, it is leading to an ABAP dump.
    Appreciate if anyone could point some OSS note or any solution if you've already faced this issue.
    This is happening in our BW system with SAP_BASIS "SAPKB62018" and SAP_ABA "SAPKA62018".
    Same thing happens in our BW test systems which are upgraded to the latest support pack.
    Following is the error analysis
    Error analysis                                                                               
    A RAISE statement in the program "CL_GUI_FRONTEND_SERVICES======CP " raised the        
    exception                                                                             
    condition "CNTL_ERROR".                                                                
    Since the exception was not intercepted by a superior program                          
    in the hierarchy, processing was terminated.                                                                               
    Short description of exception condition:                                                                               
    For detailed documentation of the exception condition, use                             
    Transaction SE37 (Function Library). You can take the called                           
    function module from the display of active calls.                                      
    How to correct the error                                                                               
    You may able to find an interim solution to the problem                                
    in the SAP note system. If you have access to the note system yourself,                
    use the following search criteria:                                                                               
    "RAISE_EXCEPTION" C                                                                    
    "CL_GUI_FRONTEND_SERVICES======CP " or "CL_GUI_FRONTEND_SERVICES======CM00T "          
    "CLIPBOARD_IMPORT"

    Hi,
    When you say 'We are facing ABAP dump when using "upload from clipboard" funciton without any data on the clipboard.', are you using this in a custom program and are you running your custom program in the background?
    From the error you mentioned, to me it looks like you had a control error and controls are for foreground, online process and not suitable for background processing. Same argument holds good for most of the enjoy SAP transactions when you try to do BDC, they will give you a similar error if you hit the piece of code where controls are used.
    Controls are created on the desktop of the user and in background this is not possible.
    Please let me know if this is the reason.
    Srinivas

  • Error while using BAPI  to create Goods Receipt Document

    Hello All,
        While using the bapi BAPI_GOODSMVT_CREATE to create  Goods receipt document ,the following error is encountered:-
    Error Message:FOR OBJECT XABBELEGNR,NUMBER RANGE INTERVAL DOES NOT EXIST OM36.
    Do we need to create a number range object ??If yes,how and where to create ?
    Thanks,
    Deepti.

    Hi Deepti!
    There is only a valid interval missing, not the whole object.
    Maintenance can be done via transaction SNRO, enter your object XABBELEGNR in entry screen. (Alternatively use transaction OMJ6).
    Push button 'Number Ranges' and 'Change Intervals'. Here you can define an interval.
    Regards,
    Christian

  • Error while using BAPI BAPI_GOODSMVT_CREATE for Momvent type 321

    Hi Guys,
    We trying to transfer material from Inspection to Un.Stock by using momvent type 321...In SAP we do QVM1 and do stock postion.
    We are using BAPI BAPI_GOODSMVT_CREATE getting this error " E QA 495 Change the inspection stock of material 11036125 in QM only".
    Any one have any idea how to overcome this issue.
    Atul

    Hi Sachin,
    Pass the Item Number of Reservation to GOODSMVT_ITEM-RES_ITEM .
    Regards
    DKS

Maybe you are looking for

  • Can't drag movies into iTunes v8

    or should I rather say, I can drag 'em, but the do not land there. When dragging a .avi-movie in Vista, the thumbnail is shown, but the LIBRARY tab does not highlight, when dragging the movie over it (as it is, when dragging an MP3 there) Dropping th

  • AP Express as a repeater

    Hi, I have a Belkin Wireless G Plus Router for my WiFi. There are some WiFi "holes" in my house, and I was wondering if I can use the AP Express as a repeater. Or do I need to buy a third party router. Thanks again! Josh iBook G3 500 MHz, 576 MB RAM

  • I-pod Touch Cable

    I got question guys.Today I found an Ipod on the sidewalk (Lucky me)I noticed taht i t still works but the battery is low.Is there any USB Cable that can help me transfer music,Videos,Photos...Etc .I saw one the BestBuy website.Its brand is Griffin..

  • Adding an exsisting o365 Tenant Cloud Group as site admin to all sites on all our o365 SPO Sites?

    Is there any way to add an existing o365 Tenant Cloud group as System Admin to all Sites on our o365 SPO Tenant via power shell?   I know we can do it with accounts.  But apparently since o365 Tenant cloud groups have no email it's not possible via s

  • Images from camera card

    I downloaded images from my camera card into Elements. They have an offline symbol on them and the images are fuzzy. What does this mean and how do I correct it?