Open all | Close all

Creating a BSP which executes an ABAP report to retrieve data for use within BSP application

Step 1 - Create ABAP report to retrieve data Using SE80 create program ZBSP_GETDATA. Step 2 - Create new BSP Application Using SE80 create BSP Application (I.e. ZBSP_GRANTS). Step 3 - Create new page (initial.htm) Right click on BSP object name and select create->page (with flow logic). Step 4 – Populate ‘Layout’ tab Insert the following code into initial.htm layout section.

<%@page language="abap"%> <%@extension name="htmlb" prefix="htmlb"%> <html> <head> <link rel="stylesheet" href="../../sap/public/bc/bsp/styles/sapbsp.css"> <title> Intial page of BSP application </title> </head> <body class="bspBody1"> <h1><img src="sap_logo.gif"> Transaction Display(TSTC)</h1> <% submit ZBSP_GETDATA and return with p_bsp = 'X'.%> <% import it_tstc to it_tstc from memory id sy-uname.%> <table width="80%" cellspacing="0" cellpadding="0" border="0"> <tr> <td><b>T Code </b></td> <td><b>Program</b></td> </tr> <% data wa_tsts2 like line of it_tstc. Loop at it_tstc into wa_tstc. %> <tr> <td><%=wa_tstc-tcode%></td> <td><%=wa_tstc-PGMNA%></td> </tr> <% Endloop. %> </table> </body> </html>

Step 5 – Setup ‘Type Definitions’ (TYPE declarations) TYPES: BEGIN OF t_tstc, TCODE type tstc-tcode, PGMNA type tstc-pgmna, END OF t_tstc. types: tt_tstc type standard table of t_tstc. Step 6 – Setup ‘Page Attributes’ (Data declarations) it_tstc wa_tstc TT_TSTC T_TSTC Step 7 – Activate and test Save everything and press the activate button, if all is ok press the test button which should open up a browser window and display your newly created BSP.


SAP ABAP development help
More SAP ABAP development help and information


ABAP code and information
More SAP ABAP development tips and tricks

 
 

Number of SAP Development Users currently online hit counters