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

Error while calling subroutine in method ( class pool )

Former Member
0 Likes
2,055

Dear Friends,

i am creating BDC program for Ik02 Tcode ( Chage Measuring points ),  i have written the below code in one of the method , but i am getting error

"FORMs cannot be defined in a class pool, For this reason, there is no PERFORM statement for internal FORMs"

         can any please give me the solution

Advance Thanks

Vijaya

       

        METHOD sync_data1.

        PERFORM bdc_dynpro      USING 'SAPLIMR0' '1110'.

         PERFORM bdc_field       USING 'BDC_CURSOR'

                                       'IMPT-POINT'.

         PERFORM bdc_field       USING 'BDC_OKCODE'

                                       '/00'.

         PERFORM bdc_field       USING 'IMPT-POINT'

                                       '196'.

         PERFORM bdc_dynpro      USING 'SAPLIMR0' '5110'.

         PERFORM bdc_field       USING 'BDC_CURSOR'

                                       'IMPT-PTTXT'.

         PERFORM bdc_field       USING 'BDC_OKCODE'

                                       '=BU'.

         PERFORM bdc_field       USING 'IMPT-PSORT'

                                       'BLS03'.

         PERFORM bdc_field       USING 'IMPT-PTTXT'

                                       'Test 3 friday  at 10.36  am - shdb - r'

                                     & 'ec'.

         PERFORM bdc_field       USING 'IMPT-INDCT'

                                       'X'.

         PERFORM bdc_field       USING 'IMPT-CODGR'

                                       'BLSCHUTZ'.

         PERFORM bdc_field       USING 'RIMR0-CJUMC'

                                       '+_________________'.

         PERFORM bdc_field       USING 'RIMR0-PYEAC'

endmethod.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,084

Refer this link.

3 REPLIES 3
Read only

Former Member
0 Likes
1,085

Refer this link.

Read only

Former Member
0 Likes
1,084

Hi Laxmi,

You will have to use Mehtod calls instead of FORM-PERFORM to acheive your requirement.

REgards,

DN.

Read only

Former Member
0 Likes
1,084

Hi Vijaya

Subroutine FORM doesn't supports class method.

You can create multiple methods at the place of different FORM(S) in the same class and call them in class method.

Thanks,

Mukesh