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

How to suppress / hide warning messages in SUBMIT statement

former_member367551
Participant
0 Likes
6,652

Dear forumers,

With a SUBMIT statement below, how may I suppress / hide warning messages that are issued from the program, RM07MLBD?

SUBMIT rm07mlbd USING SELECTION-SCREEN 1000

     WITH matnr    IN s_matnr

     WITH werks    IN s_werks

     WITH bwart    IN s_bwart

     WITH datum    IN s_datum

     WITH lgbst    EQ c_true

     WITH bwbst    EQ ''

     WITH sbbst    EQ ''

     WITH pa_sumfl EQ c_true

     AND RETURN.


Appreciate any inputs or help here at all. Much thanks.

P/S:

Example of the warning message issued: message M7391



Deborah

6 REPLIES 6
Read only

Former Member
0 Likes
3,758

Hi Deborah

Maybe you can let this report run in background job, then that kind of messages will show in job log.

CALL 'JOB_OPEN'.   SUBMIT rm07mlbd  VIA JOB.  CALL 'JOB_CLOSE'.

regards,
Archer

Read only

0 Likes
3,758

Hi Archer,

Thanks for your input. Appreciate it.

I've tried the JOB_OPEN and JOB_CLOSE approach, but it will not work for me as the data that I need to extract comes from an EXPORT statement within the rm07mlbd report.

Might there be any other alternatives for this, perhaps?

Thanks much.

Read only

0 Likes
3,758

This is how the latest codes look like, with the JOB_OPEN and JOB_CLOSE approach:-

DATA: jobname LIKE tbtcjob-jobname VALUE 'TRANSFER DATA'.

DATA: jobcount LIKE tbtcjob-jobcount.

DATA: host LIKE msxxlist-host.

DATA: BEGIN OF starttime.

         INCLUDE STRUCTURE tbtcstrt.

DATA: END OF starttime.

DATA: starttimeimmediate LIKE btch0000-char1 VALUE 'X'.

CONSTANTS: c_true(1) TYPE c VALUE 'X'.

TABLES: marc, mseg.

SELECT-OPTIONS: s_matnr FOR marc-matnr.

SELECT-OPTIONS: s_werks FOR marc-werks.

SELECT-OPTIONS: s_bwart FOR mseg-bwart.

SELECT-OPTIONS: s_datum FOR sy-datum.

* Job open

CALL FUNCTION 'JOB_OPEN'

   EXPORTING

     delanfrep        = ' '

     jobgroup         = ' '

     jobname          = jobname

     sdlstrtdt        = sy-datum

     sdlstrttm        = sy-uzeit

   IMPORTING

     jobcount         = jobcount

   EXCEPTIONS

     cant_create_job  = 01

     invalid_job_data = 02

     jobname_missing  = 03.

IF sy-subrc <> 0.

   "error processing

ENDIF.

SUBMIT zrm07mlbd USING SELECTION-SCREEN 1000

   WITH matnr    IN s_matnr

*    WITH bukrs    EQ ''

   WITH werks    IN s_werks

*    WITH lgort    EQ ''

*    WITH charg    EQ ''

*    WITH bwtar    EQ ''

   WITH bwart    IN s_bwart

*    WITH sobkz    EQ ''

   WITH datum    IN s_datum

   WITH lgbst    EQ c_true

   WITH bwbst    EQ ''

   WITH sbbst    EQ ''

   WITH pa_wdzer EQ c_true

   WITH pa_wdzew EQ c_true

   WITH pa_wdwiz EQ c_true

   WITH pa_wdwuw EQ c_true

   WITH pa_wdwew EQ c_true

   WITH pa_ndzer EQ c_true

   WITH pa_ndsto EQ c_true

   WITH xsum     EQ ''

   WITH pa_suvar EQ ''

   WITH pa_sumfl EQ c_true

   WITH pa_sflva EQ ''

   WITH xchar    EQ ''

   WITH xnomchb  EQ ''

   WITH nosto    EQ ''

   WITH p_vari   EQ ''

   WITH archive  EQ ''

   WITH pa_aistr EQ ''

   VIA JOB jobname

   NUMBER jobcount

*  EXPORTING LIST TO MEMORY

   AND RETURN.

IMPORT g_t_mseg_lean FROM MEMORY ID 'G_T_MSEG_LEAN'.

* Close job

starttime-sdlstrtdt = sy-datum + 1.

starttime-sdlstrttm = '220000'.

CALL FUNCTION 'JOB_CLOSE'

   EXPORTING

     jobcount             = jobcount

     jobname              = jobname

     strtimmed            = starttimeimmediate

   EXCEPTIONS

     cant_start_immediate = 01

     invalid_startdate    = 02

     jobname_missing      = 03

     job_close_failed     = 04

     job_nosteps          = 05

     job_notex            = 06

     lock_failed          = 07

     OTHERS               = 99.

IF sy-subrc EQ 0.

   "error processing

ENDIF.

IF g_t_mseg_lean[] IS NOT INITIAL.

   WRITE: 'Data extracted.'.

ELSE.

   WRITE: 'Empty data.'.

ENDIF.


When I run the codes above, I will always have empty data in the internal table, G_T_MSEG_LEAN.

Read only

0 Likes
3,758

Hi,

You need to move the IMPORT statement after the JOB_CLOSE statement.

And you have to wait for the job to finish!

cheers

Paul

Read only

0 Likes
3,758

Hi Paul,

Thanks for your reply.

Here's what I've done, but the data is still empty -- even though the job is finished and there's spool output available.

* Job open

CALL FUNCTION 'JOB_OPEN'

   EXPORTING

     delanfrep        = ' '

     jobgroup         = ' '

     jobname          = jobname

     sdlstrtdt        = sy-datum

     sdlstrttm        = sy-uzeit

   IMPORTING

     jobcount         = jobcount

   EXCEPTIONS

     cant_create_job  = 01

     invalid_job_data = 02

     jobname_missing  = 03.

IF sy-subrc <> 0.

   "error processing

ENDIF.

SUBMIT zrm07mlbd USING SELECTION-SCREEN 1000

   WITH matnr    IN s_matnr

*    WITH bukrs    EQ ''

   WITH werks    IN s_werks

*    WITH lgort    EQ ''

*    WITH charg    EQ ''

*    WITH bwtar    EQ ''

   WITH bwart    IN s_bwart

*    WITH sobkz    EQ ''

   WITH datum    IN s_datum

   WITH lgbst    EQ c_true

   WITH bwbst    EQ ''

   WITH sbbst    EQ ''

   WITH pa_wdzer EQ c_true

   WITH pa_wdzew EQ c_true

   WITH pa_wdwiz EQ c_true

   WITH pa_wdwuw EQ c_true

   WITH pa_wdwew EQ c_true

   WITH pa_ndzer EQ c_true

   WITH pa_ndsto EQ c_true

   WITH xsum     EQ ''

   WITH pa_suvar EQ ''

   WITH pa_sumfl EQ c_true

   WITH pa_sflva EQ ''

   WITH xchar    EQ ''

   WITH xnomchb  EQ ''

   WITH nosto    EQ ''

   WITH p_vari   EQ ''

   WITH archive  EQ ''

   WITH pa_aistr EQ ''

   VIA JOB jobname

   NUMBER jobcount

*  EXPORTING LIST TO MEMORY

   AND RETURN.

* Close job

starttime-sdlstrtdt = sy-datum + 1.

starttime-sdlstrttm = '220000'.

CALL FUNCTION 'JOB_CLOSE'

   EXPORTING

     jobcount             = jobcount

     jobname              = jobname

     strtimmed            = starttimeimmediate

   EXCEPTIONS

     cant_start_immediate = 01

     invalid_startdate    = 02

     jobname_missing      = 03

     job_close_failed     = 04

     job_nosteps          = 05

     job_notex            = 06

     lock_failed          = 07

     OTHERS               = 99.

IF sy-subrc EQ 0.

   "error processing

ENDIF.

WAIT UP TO 5 SECONDS.

IMPORT g_t_mseg_lean FROM MEMORY ID 'G_T_MSEG_LEAN'.

IF g_t_mseg_lean[] IS NOT INITIAL.

   WRITE: 'Data extracted.'.

ELSE.

   WRITE: 'Empty data.'.

ENDIF.

Read only

0 Likes
3,758

Hi

Just try other memory, like 'SHARED MEMORY' or 'SHARED BUFFER'. i think once you defined a Job, the session is different with the report, so 'ABAP memory' is not works here.

In you zrm07mlbd report, EXPORT itab TO SHARED MEMORY dbtab(ar) ID id.

then in this report:

WAIT UP TO 5 SECONDS.

IMPORT g_t_mseg_lean FROM SHARED MEMORY dbtab(ar) ID id.

IF g_t_mseg_lean[] IS NOT INITIAL.

   WRITE: 'Data extracted.'.

ELSE.

   WRITE: 'Empty data.'.

ENDIF.