cancel
Showing results for 
Search instead for 
Did you mean: 

getting error Internal server error when calling gateway service

Former Member
0 Kudos

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);

                 }

             });

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

i got answer

former_member185414
Active Contributor
0 Kudos

Then please close this thread.

BR.

former_member388328
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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