Skip to Content
author's profile photo Former Member
Former Member

How to send spool to Distribution List using JOB_CLOSE

Please help on sending Distribution list when job defined using JOB_OPEN, JOB_Submit and JOB_CLOSE

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jul 27, 2009 at 11:28 AM

    Following tables used to get the distribution List

    SODM ,SOFR ,SOID

    FM SO_DLI_READ_API1 You can get the List Check the Following Threads

    what-tables-store-the-email-addresses-for-a-distri

    Kanagaraja L

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 11, 2009 at 07:15 PM

    Hi, this is code:

    DATA WA_RECIPIENT LIKE swotobjid.

    CONSTANTS: gc_objname TYPE oj_name VALUE 'RECIPIENT'.

    .

    .

    PERFORM get_distribucion_list USING 'NAME_LIST' " name of List of distribution

    CHANGING WA_RECIPIENT.

    .

    .

    .

    CALL FUNCTION 'JOB_CLOSE'

    EXPORTING

    jobcount = l_jobcount

    jobname = l_jobname

    strtimmed = 'X'

    recipient_obj = wa_recipient

    IMPORTING

    job_was_released = l_libero

    EXCEPTIONS

    cant_start_immediate = 1

    invalid_startdate = 2

    jobname_missing = 3

    job_close_failed = 4

    job_nosteps = 5

    job_notex = 6

    lock_failed = 7

    OTHERS = 8.

    FORM get_distribucion_list USING p_objnam TYPE so_obj_nam

    CHANGING p_wa_recipient LIKE swotobjid.

    DATA: it_tab LIKE STANDARD TABLE OF soxdl

    INITIAL SIZE 0 WITH HEADER LINE.

    CHECK NOT p_objnam IS INITIAL.

    CALL FUNCTION 'SO_DLI_LIST_READ_XDL'

    EXPORTING

    dli_generic_name = p_objnam

    public = 'X'

    subscript = 'X'

    TABLES

    dli_display_tab = it_tab

    EXCEPTIONS

    communication_failure = 1

    dl_list_no_entries = 2

    owner_not_exist = 3

    system_failure = 4

    x_error = 5

    parameter_error = 6

    OTHERS = 7

    .

    IF sy-subrc = 0.

    READ TABLE it_tab INDEX 1.

    IF sy-subrc = 0.

    CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'

    IMPORTING

    own_logical_system = p_wa_recipient-logsys

    EXCEPTIONS

    own_logical_system_not_defined = 1

    OTHERS = 2.

    IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    MOVE gc_objname TO p_wa_recipient-objtype.

    CONCATENATE it_tab-dlitp it_tab-dliyr it_tab-dlino

    INTO p_wa_recipient-objkey.

    ENDIF.

    ELSE.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    ENDFORM.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.