Skip to Content
0
Former Member
Oct 28, 2009 at 01:17 PM

Subroutines in BSP

54 Views

Hi all,

I know that we need to place the routines in a include program and use it in BSP.

But i am not quite sure where to call the include program.

Below is my piece of code.

****************start of code***********************

LOOP AT gt_result INTO gs_result.

IF sy-tabix EQ 1.

CASE gs_result-value.

WHEN 1.

gt_output = gt_output1.

WHEN 2.

gt_output = gt_output2.

WHEN OTHERS.

  • do nothing.

ENDCASE.

  • endif.

ELSE.

CASE gs_result-value.

WHEN 1.

PERFORM compare TABLES gt_output

gt_output1.

WHEN 2.

PERFORM compare TABLES gt_output

gt_output2.

ENDCASE.

ENDIF.

ENDLOOP.

***********************end of code**********************************

With the above code ,its giving me error " missing 'ENDMETHOD' ".

On searching the forum i learnt that below is the logic to call the include program.

DATA: progname(12) TYPE c VALUE 'ZINCLUDE' .

PERFORM test_include IN PROGRAM (progname) IF FOUND.

So, I created the include program "ZINCLUDE" for that perform "compare"

But I am not quite sure where to implement the above logic.

Please do throw some light on this.

Thanks & Regards,

Bhargav.