Skip to Content
Technical Articles

Calling the Submit Report/ Program through the Odata Service

Hi All,

All of you know the Alv report and OData service individually. Coming to this scenario some of the members don’t aware how to use the Report through Submit in OData service.

So I am trying to explain how do we use Submit report in Netweaver gate way services.


Note: Please follow the following steps

Create the custom program:

Step1:  Go to t-code SE38

Step2 : Create one sample report with the required fields like below.

REPORT zsubmit_demo81.

** Data declarations
DATA:  lv_vbeln TYPE vbeln_va,
o_alv TYPE REF TO cl_salv_table.

** Select options
SELECT-OPTIONS: s_vbeln FOR lv_vbeln.

** Get data
SELECT vbeln, posnr, matnr
FROM vbap
UP TO 10 rows
WHERE vbeln IN @s_vbeln  .

** Assign internal table to method
r_salv_table = oval
t_table = lt_vbap ).

**   Display Data
o_alv->display( ).


Execute :




Use the Report in OData service through SUBMIT  :

Step3: Create the project with t-code ‘SEGW’.

Step4: Create the method and redefine it

Step5: Use the already created program SUBMIT as like below.

METHOD sales_detailset_get_entityset.

** Data declarations
DATA:  lt_seltab TYPE TABLE OF rsparams,
ls_seltab LIKE LINE OF lt_seltab,
list_tab TYPE TABLE OF abaplist,
ls_data TYPE REF TO data.
FIELD-SYMBOLS: <lt_data> TYPE table.

** Passing the values
ls_seltab-selname = ‘S_VBELN’.
ls_seltab-kind = ‘S’.
ls_seltab-sign = ‘I’.
ls_seltab-option = ‘EQ’.
ls_seltab-low = ‘4970’.

** Disable the display and metadata
display = abap_false
metadata = abap_false
data = abap_true ).

** Passing the i/p values to internal table
APPEND ls_seltab TO lt_seltab.

** Using the report through Submit

IF sy-subrc = 0.

**  Getting the internal table data
IMPORTING r_data = ls_data ).

ASSIGN ls_data->* TO <lt_data>.
MOVE-CORRESPONDING <lt_data> TO et_entityset.



Step6: Go to the maintain services T-code ‘/n/iwfnd/maint_services‘ and execute it.

Step7: Find the project and execute it.


Note : Here we displayed the same data as like got the data in report

I hope it will be helpfull to you



Sreeram G.

Be the first to leave a comment
You must be Logged on to comment or reply to a post.