04-04-2017 8:00 AM
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
04-04-2017 8: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.
04-04-2017 8: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.
04-04-2017 8:56 AM
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.
04-04-2017 9:15 AM
I said it above:
"A parameter that is declared with NO-DISPLAY can have any type except reference types or enumerations."
04-04-2017 10:39 AM
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"
04-04-2017 9: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