avatar image
-1
Former Member

Is it possible to "CALL a Function Module in Background" that it create a Spool-Number?

Hi Experts,

i have a Function Module "ZSAVE_ITEMS_DB" and it makes only Insert´s in my Z-Table.

MY Question:Is it possible to call this FunctionModule in Background (Spool), that i can always before starting look into Spool, if it is still running or not???

I think with Report it is possible to call via Submit into Spool, but the Problem is that i have 3 Importing-Parameter (1. Parameter, 2. Parameter, 3. Structure).

Hope somebody can help me or have a good idea for this Problem?

Kind Regards
ETN

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 04, 2017 at 07:04 AM

    "but the Problem is that i have 3 Importing-Parameter (1. Parameter, 2. Parameter, 3. Structure)."

    Reports (executable programs) can have "importing" parameters too. The standard selection screen parameters by default serve as importing parameters when a report is called by SUBMIT. A parameter that is declared with NO-DISPLAY can have any type except reference types or enumerations.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Horst,

      thank you for help, it works perfect :)

      The way of implementation:
      In Report "ZCALL_IN_BACKGROUND":
      ----------------------------------------------------------------------------------------------------------------------------------------------------

      PARAMETERS: p_carrid TYPE s_carr_id NO-DISPLAY,
      p_spfli TYPE spfli NO-DISPLAY.



      In Calling (Report/ FunctionModule/ Method):

      ----------------------------------------------------------------------------------------------------------------------------------------------------

      1. CALL FUNCTION: "JOB_OPEN"

      2. SUBMIT ZCALL_IN_BACKGROUND TO SAP-SPOOL
      SPOOL PARAMETERS lv_print_parameters
      WITHOUT SPOOL DYNPRO
      VIA JOB lv_name NUMBER lv_number
      AND RETURN
      WITH p_carrid = 'LH02'
      WITH p_spfli = ls_spfli.

      3. CALL FUNCTION: "JOB_CLOSE"

  • Apr 04, 2017 at 08:55 AM

    The requirement is not clear, what is the purpose of looking at the spool before Inserting any entries to Z table?? You can always use the SY-SUBRC to check whether entries are added or not.

    Thanks & Regards,

    Rakshith Gore

    Add comment
    10|10000 characters needed characters exceeded

Skip to Content