Skip to Content
avatar image
Former Member

getting error Internal server error when calling gateway service

hi,

  I am getting error Internal server error  when I  calling customer_creating_entity method from gateway and i am getting data from get method.

I write following ajax code in sapui5.

jQuery.ajax({

                     beforeSend: function(xhrObj){

                             xhrObj.setRequestHeader("X-Requested-With","XMLHttpRequest");

                             xhrObj.setRequestHeader("Content-Type","application/json");

                             xhrObj.setRequestHeader("Accept","application/json");

                     },

                     type: "POST",

                     contentType: "application/json",

                     url: url,

                     dataType: "json",

                     data: {

                  "CoID": 20241,

                     "CoName": "krishna",

                              "ContactNo": "12345678990"

                    },

                

                 success: function(xml) {

                   //oModel.setData(data);            

                   alert("success to post");

                 },

            

                 error: function(xml) {

                   //oModel.setData(data);       

                   alert("fail to  post");

                   alert(xml);

                 }

             });

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 17, 2015 at 07:12 AM

    Hi,

    Please  goto this tcode : /IWFND/ERROR_LOG    and click on active source. Which will take you to the source code . Pease paste the screen shot of the source code with displaying class and method.

    Thanking you

    Vengaiah

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      the following is the source code of customer_create_entity method

      METHOD customer_create_entity.

        DATA: ls_request_input TYPE zcl_zcutomer_mpc=>ts_ystorecostome,

              ls_costomer TYPE ystore_costomer.

        io_data_provider->read_entry_data( IMPORTING es_data = ls_request_input ).

        ls_costomer-co_id = ls_request_input-co_id.

        ls_costomer-co_name = ls_request_input-co_name.

        ls_costomer-contact_no = ls_request_input-contact_no.

        INSERT ystore_costomer FROM ls_costomer.

        IF sy-subrc = 0.

          er_entity = ls_request_input. "Fill Exporting parameter ER_ENTITY

        ENDIF.

      **TRY.

      *CALL METHOD SUPER->CUSTOMER_CREATE_ENTITY

      *  EXPORTING

      *    IV_ENTITY_NAME          =

      *    IV_ENTITY_SET_NAME      =

      *    IV_SOURCE_NAME          =

      *    IT_KEY_TAB              =

      **    io_tech_request_context =

      *    IT_NAVIGATION_PATH      =

      **    io_data_provider        =

      **  IMPORTING

      **    er_entity              =

      *    .

      ** CATCH /iwbep/cx_mgw_busi_exception .

      ** CATCH /iwbep/cx_mgw_tech_exception .

      **ENDTRY.

      ENDMETHOD.




      screenshoot of error log file is attached

      adi2.JPG (154.9 kB)
  • avatar image
    Former Member
    Oct 19, 2015 at 07:19 AM

    i got answer

    Add comment
    10|10000 characters needed characters exceeded