Skip to Content
author's profile photo
Former Member

Problem with Submit

I've developed a program that calls program RM06BA00 and automatically populates the selection criteria of this program. Program RM06BA00 is doing an export of its internal table which is what I need. Then I will import this internal table into my program and do some more filtering.

My code:

SUBMIT rm06ba00 AND RETURN EXPORTING LIST TO MEMORY 
      WITH ba_banfn IN r_banfn 
      WITH ba_ekgrp IN r_ekgrp 
      WITH ba_matnr IN r_matnr 
      WITH ba_matkl IN r_matkl 
      WITH s_werks  IN r_werks 
      WITH s_lfdat  IN r_lfdat 
      WITH s_frgdt  IN r_frgdt 
      WITH s_flief  IN r_flief 
      WITH p_afnam  = preq_name 
      WITH p_txz01  = short_text 
      WITH p_zugba  = open 
      WITH p_erblba = closed 
      WITH p_bstba  = open 
      WITH p_freig  = closed 
      WITH p_selgs  = open 
      WITH p_selpo  = open 
      WITH s_kostl  IN r_kostl 
      WITH s_aufnr  IN r_aufnr. 

  IMPORT BAN COM FROM MEMORY ID 'ZYX'.

In standard SAP Code:

Program RM06BA00 calls SAPMF06B

PERFORM SUBMIT(SAPFM06B) USING SUCOMM

.

Then program SAPFM06B calls RM06BL00

SUBMIT RM06BL00 AND RETURN.

As shown in the codes above, program (RM06BA00) calls program SAPFM06B which is where it does the export. Then this second program calls program RM06BL00 to display the output. My problem is that I don't need program RM06BL00. How do I exclude this program? Is there any way to suppress the display output?

Any other suggesstions are highly appreciated.

Thanks in advance!

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • author's profile photo
    Former Member
    Sep 21, 2005 at 09:33 PM

    The best thing would to be to make a 'Z' copy of SAPMF06B that doesn't do the extra submit. In your Z program, you could try setting sy-batch to 'X' if it's not already in the background. It would still submit the report, but to the spool. Probably not a good idea. Make the copy.

    rob

    Add comment
    10|10000 characters needed characters exceeded

    • Are you only interested in the data which is being passed back thru EXPORT/IMPORT? If so, then when submitting the program, say TO SAP-SPOOL, this will make it not show the output of the list on the screen.

      The only problem with this is it will create a spool. Which really isn't a big deal.

      Regards,

      Rich Heilman

  • author's profile photo
    Former Member
    Sep 22, 2005 at 01:59 AM

    I was looking at code of SUBMIT(SAPFM06B).

    EXPORT ban com TO MEMORY ID 'ZYX'.

    IF sy-binpt EQ space. "<--- h91102

    IF hucomm EQ 'PRIN' OR sy-batch NE space.

    CALL FUNCTION 'GET_PRINT_PARAMETERS'

    EXPORTING

    mode = 'CURRENT'

    no_dialog = 'X'

    IMPORTING

    out_archive_parameters = arcparams "HW 202820

    out_parameters = params

    EXCEPTIONS

    archive_info_not_found = 1

    invalid_print_params = 2

    invalid_archive_params = 3

    OTHERS = 4.

    SUBMIT rm06bl00 TO SAP-SPOOL WITHOUT SPOOL DYNPRO

    ARCHIVE PARAMETERS arcparams "HW 202820

    SPOOL PARAMETERS params AND RETURN.

    ELSE.

    SUBMIT rm06bl00 AND RETURN.

    ENDIF.

    ELSE. "<--- insert

    SUBMIT rm06bl00 AND RETURN. "<--- insert

    ENDIF. "<--- insert

    So if you run your program in batch the output will goto spool, see the SY-BATCH NE SAPCE condition.

    Hope this helps.

    Cheers

    Add comment
    10|10000 characters needed characters exceeded

    • JB L, have you come up with a solution yet? Have you tryed accessing EBAN directly? Should be a very simple RFC function module. Or, do you need other data as well? If so, you can probably access that data directly as well. Let us know your progress. Thanks.

      Regards,

      Rich Heilman

  • Sep 22, 2005 at 03:15 PM

    If this must run in the foreground, I think your only option would be do copy the first program(RM06BA00) into a "Z" program and modify this statement.

    *  PERFORM SUBMIT(SAPFM06B) USING SUCOMM.  "Liste ausgeben
    PERFORM SUBMIT(SAPFM06B) USING 'PRIN'.  "Liste ausgeben

    Doing so will allow your data to be exported and force the print out to the SAP-SPOOL.

    Regards,

    Rich Heilman

    Add comment
    10|10000 characters needed characters exceeded