Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

GENERATE SUBROUTINE POOL

Dear Experts,

In the following logic, i'm trying to call the subroutine with in the LOOP statement. The program is executing well for the first record of the itab, but it is fail to execute for the next subsequent records, and is getting failed to trigger the Perform statement for the second record saying that 'Program Does Not exist'. Pl. can someone can point-out the defect in the logic.

LOOP AT ITAB INTO ITAB_WA.

v_where = '&' AND '&'.

REPLACE '&' WITH ITAB_WA-X INTO v_where.

REPLACE '&' WITH ITAB_WA-Y INTO v_where.

CONDENSE v_where NO-GAPS.

tab-line = 'Report sy-repid.'.

append tab. clear tab.

tab-line = 'form f_create_apps using value(v_where).'.

append tab. clear tab.

concatenate tab-line 'do some thing' v_where INTO TAB-LINE separated by space.

append tab. clear tab.

tab-line = 'endform.'.

append tab. clear tab.

TRY.

generate subroutine pool tab name v_name.

perform f_create_apps in program (v_name) using v_where.

  • Exception Catching.

CATCH cx_root INTO o_field.

text = o_field->get_text( ).

  • Calling Function to give information message regarding Exception

CALL FUNCTION 'POPUP_TO_INFORM'

EXPORTING

titel = text-t03

txt1 = text

txt2 = text-t04.

LEAVE TO LIST-PROCESSING.

ENDTRY.

ENDLOOP.

I'm very thankful for your suggestions.

with best regards

Mahesh

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question