Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CALLING REPORT IN BAPI

Former Member
0 Likes
488

Hi Gurus,

I am writing a bapi and calling one report of invoice pinting ZSDRDINVRPT1

now in this when I run this report and ask for printing of invoice by giving the range of invoice it is printing for all the invoices from range to range

but the same when I am running through bapi it printing for first value only i mean even giving range it is printing for first valu of range I am taking output in xml page here

my coding is following

Data: LIST_TAB type standard table of ABAPLIST.

Data: MTAB_REPORT_HTML type standard table of W3HTML WITH HEADER LINE.

Submit ZSDRDINVRPT1 with SELECTION-TABLE SELTAB

exporting list to Memory and return.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = list_tab

EXCEPTIONS

not_found = 1

OTHERS = 2.

CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'

EXPORTING

TEMPLATE_NAME = 'WEBREPORTING_REPORT'

  • CHARSET = 'UTF8'

TABLES

html = MTAB_REPORT_HTML

listobject = list_tab.

FREE MEMORY.

CLEAR LIST_TAB[].

loop at MTAB_REPORT_HTML.

concatenate htmlstring

MTAB_REPORT_HTML-LINE into htmlstring.

endloop.

3 REPLIES 3
Read only

Former Member
0 Likes
451

data : it_rsparams type table of rsparams.

data : wa_rsparams type rsparams.

loop at seltab.

clear wa_rsparams.

wa_rsparams-selname = your program select-options

wa_rsparams-kind = 'S'.

wa_rsparams-sign = 'I'.

wa_rsparams-option = 'EQ'.

wa_rsparams-low = seltab-low

append wa_rsparams to it_rsparams.

endloop.

Submit ZSDRDINVRPT1 with SELECTION-TABLE it_rsparams

exporting list to Memory and return.

Try with this.

Regards,

Madan.

Read only

0 Likes
451

can you tell me how pass range of import parameter in bapi

Read only