Application Development and Automation 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: 
Read only

JOB_CLOSE PROBLEM

Former Member
0 Likes
997

Hi,

For this below code iam getting exception as <b>invalid_startdate = 2</b> .Please help me out


   call function 'JOB_CLOSE'                                  
        exporting                                             
 *         AT_OPMODE                   = ' '                  
 *         AT_OPMODE_PERIODIC          = ' '                  
 *         CALENDAR_ID                 = ' '                  
 *         EVENT_ID                    = ' '                  
 *         EVENT_PARAM                 = ' '                  
 *         EVENT_PERIODIC              = ' '                  
             jobcount                    = job_numb           
             jobname                     = job_name           
 *         laststrtdt                  = v_sdate              
 *         LASTSTRTTM                  = NO_TIME              
 *         PRDDAYS                     = 0                    
 *         PRDHOURS                    = 0                    
 *         PRDMINS                     = 0                    
 *         PRDMONTHS                   = 0                    
 *         PRDWEEKS                    = 0                    
 *         PREDJOB_CHECKSTAT           = ' '                  
 *         PRED_JOBCOUNT               = ' '                  
 *         PRED_JOBNAME                = ' '                  
<b>          sdlstrtdt                    = sy-datum           </b> 
*         sdlstrttm                   = sy-uzeit             
*         STARTDATE_RESTRICTION       = BTC_PROCESS_ALWAYS   
*         strtimmed                   = 'X'                       
*         TARGETSYSTEM                = 'avphux01_D01_00 '        
*         START_ON_WORKDAY_NOT_BEFORE = SY-DATUM                  
*         START_ON_WORKDAY_NR         = 0                         
*         WORKDAY_COUNT_DIRECTION     = 0                         
*         RECIPIENT_OBJ               =                           
           targetserver                = host_server              
*    IMPORTING                                                    
*         JOB_WAS_RELEASED            =                           
    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                          
            .                                                     

Thanks

Vijaya

Message was edited by:

Vijaya Lakshmi Palla

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
760

Hi,

It should be the problem with the format of sy -datum. assign the value to the variable then pass it to the FM.

ex: STARTDATE = '19970101'.

this will work!

***reward points if helpful

regards,

madhumitha

4 REPLIES 4
Read only

Former Member
0 Likes
760

Do you need to specify start time also.

Read only

Former Member
0 Likes
760

Hi,

Please help me out this is v.urgent issue

Thanks

Vikranth Khimavath

Read only

Former Member
0 Likes
761

Hi,

It should be the problem with the format of sy -datum. assign the value to the variable then pass it to the FM.

ex: STARTDATE = '19970101'.

this will work!

***reward points if helpful

regards,

madhumitha

Read only

Former Member
0 Likes
760

Hi,

I found this thread and it comes quite close to the problem I have. I am using job_open and job_close to schedule a successor job every 5 minutes. Sometimes, I get also the error message INVALID_STARTDATE = 2. Since I am not specifying any startdate, I am a bit lost, why this error occurs. Does anyone have an idea? I read in another thread, that either sdlstrtdt or laststrtdt.

Thanks,

Tim