/scripts/ahub.form.attachments.js
-1

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

Apr 04, 2017 at 07:00 AM

81

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Horst Keller
Apr 04, 2017 at 07:04 AM
3

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

Show 3 Share
10 |10000 characters needed characters left characters exceeded

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.

0

I said it above:

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

0

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"

0
Rakshith Gore
Apr 04, 2017 at 08:55 AM
1

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

Share
10 |10000 characters needed characters left characters exceeded
Skip to Content