Application Development 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: 

Handle messages of called program(standard)

Former Member
0 Kudos

Hi All,

I am calling a standard program in my Zprogram using Submit statement. But the standard program retruns Popup messages which I have to sent by default 'Yes'.

So how can I handled these Popup messages in my Z Program . Can any one give some suggestions on this.

-Thanks.

3 REPLIES 3

Former Member
0 Kudos

Hi,

You could either copy the standard program to a Zprogram and remove the message/popup OR you could run it in background.

You'll have to use the JOB_OPEN function to get number n.

Submit rep-name via job job_name number n.

former_member480923
Active Contributor
0 Kudos

Submit the program in background via job using the following syntax:


DATA: number           TYPE tbtcjob-jobcount, 
      name             TYPE tbtcjob-jobname VALUE 'JOB_TEST', 
      print_parameters TYPE pri_params. 

... 

CALL FUNCTION 'JOB_OPEN' 
  EXPORTING 
    jobname          = name 
  IMPORTING 
    jobcount         = number 
  EXCEPTIONS 
    cant_create_job  = 1 
    invalid_job_data = 2 
    jobname_missing  = 3 
    OTHERS           = 4. 
IF sy-subrc = 0. 
  SUBMIT submitable TO SAP-SPOOL 
                    SPOOL PARAMETERS print_parameters 
                    WITHOUT SPOOL DYNPRO 
                    VIA JOB name NUMBER number 
                    AND RETURN. 
  IF sy-subrc = 0. 
    CALL FUNCTION 'JOB_CLOSE' 
      EXPORTING 
        jobcount             = number 
        jobname              = name 
        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 
        OTHERS               = 8. 
    IF sy-subrc <> 0. 
      ... 
    ENDIF. 
  ENDIF. 
ENDIF. 

Thanks

Anirban M.

OttoGold
Active Contributor
0 Kudos

have to sent by default 'Yes'.

Are they decisions? Are they asking for input? Are they screens? Then submitting it via a job does not help as far as I know.

You would have to do the program copy and change it accordingly or write an ECATT for it.

Otto