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 SAP script program in BAPI and want to display in html format

Former Member
0 Likes
396

Dear All,

I am writing bapi and calling sap script program in it.

I want output in html format pl suggest me

same coding is working for report giving error in sapscript only.

types: begin of tt_html,

html type w3html,

end of tt_html.

data: list_tab type standard table of abaplist.

SELTAB-SELNAME = 'S_INVNO'.

SELTAB-KIND = 'S'.

SELTAB-SIGN = 'I'.

SELTAB-OPTION = 'EQ'.

SELTAB-LOW = INVOICE_NUM1.

SELTAB-HIGH = INVOICE_NUM2.

APPEND SELTAB.

submit ZSDRDINVPNBRPT with selection-table seltab

exporting list to memory and return.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = MTAB_REPORT_LIST

EXCEPTIONS

not_found = 1

OTHERS = 2.

CALL FUNCTION 'WRITE_LIST'

EXPORTING

WRITE_ONLY = 'X'

TABLES

listobject = MTAB_REPORT_LIST

EXCEPTIONS

EMPTY_LIST = 1

OTHERS = 2.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'WWW_LIST_TO_HTML'

TABLES

HTML = MTAB_REPORT_HTML

EXCEPTIONS

OTHERS = 1.

LOOP AT MTAB_REPORT_HTML.

ENDLOOP.

1 REPLY 1
Read only

Former Member
0 Likes
295

For displaying output in html format,

u can either use BSP ( Business Server Pages)

or Webdynpro.

Reward if helpful.