Application Development 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: 

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

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

horst_keller
Product and Topic Expert
Product and Topic Expert

"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.

5 REPLIES 5

horst_keller
Product and Topic Expert
Product and Topic Expert

"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.

0 Kudos

Hi Horst,

thanks for your fast answer.
But how can i give Importing-Parameters from Type "STRUCTURE" to a Report via Submit?

Can you give me a example?
What should i create in the Report, that i can call a Submit with this Importing-Parameters and Structures?

Thanks in forward.

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

I said it above:

"A parameter that is declared with NO-DISPLAY can have any type except reference types or enumerations."

0 Kudos

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"

rgore
Advisor
Advisor

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