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

Syntax for SUBMIT

Former Member
0 Likes
2,394

Hi All,

I need to know the syntax for SUBMIT to call a SAP Standard Program.... how do i pass values to the program and retrieve back from it... can u explain with an example??

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,418

Hi thanks for all of ur concern... my problem is with a module pool program.... my program....... can i call it using submit???

9 REPLIES 9
Read only

Former Member
0 Likes
1,418

Hi,

Check this link.

https://www.sdn.sap.com/irj/sdn/forums

Thanks,

Anitha

Read only

Former Member
0 Likes
1,418

hi,

SUBMIT rep.

Additions

1. ... LINE-SIZE col

2. ... LINE-COUNT lin

3. ... TO SAP-SPOOL

4. ... VIA SELECTION-SCREEN

5. ... AND RETURN

6. ... EXPORTING LIST TO MEMORY

7. ... USER user VIA JOB job NUMBER n

8. ... Various additions for parameter transfer to rep

9. ... USING SELECTION-SETS OF PROGRAM prog

Effect

Calls the report rep . Leaves the active program and starts the new report rep .

Addition 1

... LINE-SIZE col

Effect

Prints the report with the line width col .

Addition 2

... LINE-COUNT lin

Effect

Prints the report with lin lines (per page).

Addition 4

... VIA SELECTION-SCREEN

Effect

Displays the selection screen for the user. In this case, the selection screen is redisplayed after return from the report list display - the user's entries are retained.

Addition 5

... AND RETURN

Effect

Returns to the calling transaction or program after the called program has been executed. SUBMIT ... AND RETURN creates a new internal mode .

Addition 6

... EXPORTING LIST TO MEMORY

Effect

Does not display the output list of the called report, but saves it in SAP memory and leaves the called report immediately. Since the calling program can read the list from memory and process it further, you need to use the addition ... AND RETURN . Also, since the called report cannot be requested for printing, the addition ... TO SAP-SPOOL is not allowed here. You can read the saved list from SAP memory with the function module 'LIST_FROM_MEMORY' and then (for example) store it in the database with EXPORT . You can process this list further with the function modules 'WRITE_LIST' , 'DISPLAY_LIST' ... of the function group "SLST" .

Addition 7

... USER user VIA JOB job NUMBER n

Effect

Schedules the specified report in the job specified by the job name job and the job number n . The job runs under the user name user and you can omit the addition USER user . The assignment of the job number occurs via the function module JOB_OPEN (see also the documentation for the function modules JOB_CLOSE and JOB_SUBMIT . This addition can only be used with the addition ...AND RETURN .

Note

When scheduling a report with the SUBMIT ... VIA JOB job NUMBER n statement, you should always use the addition ...TO SAP-SPOOL to pass print and/or archive parameters. Otherwise, default values are used to generate the list and this disturbs operations in a production environment.

Addition 9

... USING SELECTION-SETS OF PROGRAM prog

Effect

Uses variants of the program prog when executing the program rep .

Note

Important

The programs prog and rep must have the same SELECT-OPTIONS and PARAMETER s. Otherwise, variants of the program prog may be destroyed.

Note

When using this addition, the specified variant vari of the program prog is taken in USING SELECTION-SET vari . On the other hand, all variant-related actions on the selection screen of rep (Get , Save as variant , Display , Delete ) refer to the variants of prog .

Example

SUBMIT REPORT01

VIA SELECTION-SCREEN

USING SELECTION-SET 'VARIANT1'

USING SELECTION-SETS OF PROGRAM 'REPORT00'

AND RETURN.

Effect

Executes the program REPORT01 with the variant VARIANT1 of the program REPORT00 .

Note

Runtime errors

LOAD_PROGRAM_NOT_FOUND : The specified program was not found.

SUBMIT_WRONG_TYPE : The specified program is not a report.

SUBMIT_IMPORT_ONLY_PARAMETER : Only one value passed to a report parameter.

SUBMIT_WRONG_SIGN : Invalid value passed to a selection with the addition SIGN .

SUBMIT_IN_ITAB_ILL_STRUCTURE : Table passed to a selection with WITH sel IN itab had an unexpected structure.

Read only

Former Member
0 Likes
1,418

hi

good

You can call executable programs from other ABAP programs using the following statement:

SUBMIT prog|(field) [AND RETURN] [options].

You can either specify the name of the program you want to call statically by entering the program name in the code of the calling program, or dynamically by specifying the name of a field (in parentheses) containing the name of the program. If the system cannot find the specified executable program when trying to execute the SUBMIT statement, a runtime error occurs.

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9dd035c111d1829f0000e829fbfe/content.htm

thanks

mrutyun^

Read only

Former Member
0 Likes
1,419

Hi thanks for all of ur concern... my problem is with a module pool program.... my program....... can i call it using submit???

Read only

0 Likes
1,418

Hi Sowmya,

I don't think you can call it using SUBMIT. You may need to call it using CALL TRANSACTION.

Regards,

Atish

Message was edited by:

Atish Sarda

Read only

0 Likes
1,418

hi

good

Module pools are directly created using the ABAP Editor and are introduced with the PROGRAM statement. With the exception of reporting event blocks and function modules, module pools can contain all processing blocks supported in ABAP and as many local classes as required. While they are executed, all events of the ABAP runtime environment may be triggered.

The most important technical attribute of a module pool is that it can only be controlled using screen flow logic. You must start them using a transaction code, which is linked to the program and one of its screens (initial screen). Another feature of these programs is that you must define your own screens in the Screen Painter (although the initial screen can be a selection screen).

When you start a program using a transaction code, the runtime environment starts a processor that calls the initial screen. This then calls a dialog module in the corresponding ABAP program. The remainder of the program flow can take any form. For example, the dialog module can:

· return control to the screen, after which the processing passes to a subsequent screen. Each screen has a following screen, set either statically or dynamically. Screens and their subsequent screens are components of freely definable screen sequences.

· call other screen sequences, selection screens or lists, from which further processing blocks in the ABAP program are started.

· call other processing blocks itself, either internally or externally.

· call other application programs using CALL TRANSACTION or SUBMIT.

It is appropriate to use module pools when you write dialog-oriented programs using a large number of screens whose flow logic largely determines the program flow of screen sequences.

thanks

mrutyun^

Read only

Former Member
0 Likes
1,418

Hi just one more clarification..... are u sure we cannot call module pool programs without call transaction.... cant that be called like a report program and pass parameters to and from it???

Read only

0 Likes
1,418

yes.

You need to use call transaction.

Reward points to all useful answers.

Regards,

Atish

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
1,418

Hi

SUBMIT RMCB0300 WITH SL_WERKS-LOW EQ SO_WERKS-LOW

WITH SL_MATNR IN SO_MATNR

WITH VA EQ 'X'

WITH SL_SPMON-LOW EQ W_BUDAT1

WITH SL_SPMON-HIGH EQ W_BUDAT1

WITH SL_MTART-LOW EQ 'ROH'

WITH SLV_NO EQ 'STOCK'

EXPORTING LIST TO MEMORY AND RETURN.

Now funtion LIST_FROM_MEMORY is called to get the value from the memory

and stored in table LISTTAB

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

LISTOBJECT = LISTTAB

EXCEPTIONS

NOT_FOUND = 1

OTHERS = 2.

I hope U got some idea

Regards,

Sree