Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8533

Re: New User Session via ABAP

$
0
0

This is some solution hope you will find it usefull:

 

  CALL FUNCTION 'JOB_OPEN'

    EXPORTING

      jobname          = 'ZMYJOB'

    IMPORTING

      jobcount         = l_jobcount

    EXCEPTIONS

      cant_create_job  = 1

      invalid_job_data = 2

      jobname_missing  = 3

      OTHERS           = 4.

 

  IF sy-subrc = 0.

 

    SUBMIT zsomereport [WITH parameter = x]

          USER username VIA JOB 'ZMYJOB' NUMBER l_jobcount AND RETURN.

 

    IF sy-subrc = 0.

      CALL FUNCTION 'JOB_CLOSE'

        EXPORTING

          jobcount             = l_jobcount

          jobname              = 'ZMYJOB'

          strtimmed            = 'X'

        EXCEPTIONS

          cant_start_immediate = 1

          invalid_startdate    = 2

          jobname_missing      = 3

          job_close_failed     = 4

          job_nosteps          = 5

          job_notex            = 6

          lock_failed          = 7

          invalid_target       = 8

          OTHERS               = 9.

      IF sy-subrc <> 0.

* Implement suitable error handling here

      ENDIF.

    ENDIF.

  ENDIF.


Viewing all articles
Browse latest Browse all 8533

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>