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

Launch LQ02

Former Member
0 Likes
561

Hi,

I need to launch te transaction LQ02 (program rllq0200) from another program, without having its dynpros.

I tried to implement a submit via job:

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 rllq0200 AND RETURN

WITH s1_lgnum = wa_out-lgnum

WITH s1_lgtyp IN r_lgtyp

WITH s1_lgpla IN r_lgpla

WITH sobkz-low = 'K'

WITH pa_bwlvs = '411'

WITH matnr IN r_matnr

WITH werks IN r_werks

WITH lgort IN r_lgort

WITH pa_bldat = sy-datum

WITH pa_budat = sy-datum

WITH pa_dunkl = 'D'

VIA JOB name NUMBER number.

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.

but, in spite of this, it appears the selection screen of the submitted program, displaying some info and warning message (the Job is regularly created as I can watch on SM37 transaction).

The code of the standard program make a check on sy-batch...I was wondering if the fastest solution could be make a copy of the program and modify it...

Any idea?

Hi,

I need to launch te transaction LQ02 (program rllq0200) from another program, without having its dynpros.

I tried to implement a submit via job:

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 rllq0200 AND RETURN

WITH s1_lgnum = wa_out-lgnum

WITH s1_lgtyp IN r_lgtyp

WITH s1_lgpla IN r_lgpla

WITH sobkz-low = 'K'

WITH pa_bwlvs = '411'

WITH matnr IN r_matnr

WITH werks IN r_werks

WITH lgort IN r_lgort

WITH pa_bldat = sy-datum

WITH pa_budat = sy-datum

WITH pa_dunkl = 'D'

VIA JOB name NUMBER number.

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.

but, in spite of this, it appears the selection screen of the submitted program, displaying some info and warning message (the Job is regularly created as I can watch on SM37 transaction).

The code of the standard program make a check on sy-batch...I was wondering if the fastest solution could be make a copy of the program and modify it...

Any idea?

1 REPLY 1
Read only

Former Member
0 Likes
460

info and warning messages aren't fatal, are they? Are they just being written to log or spool? If so, what is the concern? You mentioned that the screen is being called? Is that what you meant to say? Or, did you mean that the messages that would arise from screen processing in foreground are showing up in the job log and you didn't expect these? Or?