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: 

SUBMIT program

Former Member
0 Kudos

Hi,

Iam uploading the data from file (which is either on Appl server or Pres server ) to ITAB in Program 'X'.

now my requirement is

I hav to call some standard program from X , and i hav to pass the file path for selection screen of standard program .

Could anyone plz help me in this regard with some SUBMIT statemnt.

Thanks,

Hem

5 REPLIES 5

Former Member
0 Kudos

Hi HEM,

SUBMIT is used to call a report directly, without using a transaction code, thus you can pass values to its parameters/select-options, which you cannot do directly when using transactions (only possible by mapping screens with SHDB).

SUBMIT report [VIA SELECTION-SCREEN]

[USING SELECTION-SET var]

[WITH sel criterion]

[WITH FREE SELECTIONS freesel]

[WITH SELECTION-TABLE rspar]

[AND RETURN].

Report is a report name, without apostrophes (' '). The report name can be also a variable enclosed in parantheses, so, the report name can be dynamic.

VIA SELECTION-SCREEN: The selection screen of the called executable program appears.

USING SELECTION-SET <var>: This addition tells the system to start the called program with the variant var.

WITH sel criterion: Use this addition to fill individual elements sel of the selection screen (selection tables and parameters) with the help of the language elements criterion.

WITH FREE SELECTION freesel: User dialog for dynamic selections. To use this option, the called program must be connected to a logical database that supports dynamic selections.

WITH SELECTION-TABLE rspar: Dynamic transfer of different values. An internal table rspar with the Dictionary structure RSPARAMS is created. This table can be filled dynamically in the calling program with all the required values for the selection screen of the called program.

AND RETURN: The system stores the data of the calling executable program and returns to the calling after processing the called program.

More information can be found here.

Hope this helps!

Kishi.

Former Member
0 Kudos

hi,

write the submit statement in this way

submit <program name> with p_parameter1 = p_file.

p_file is the parameter in program X and p_parameter1 is parameter in standard program.

regards,

Navneeth K.

Former Member
0 Kudos

Hi Hem,

Please go thro' below. It might be usefulto u .

Reward points if useful.

Regards,

Vijayakumar V

Parameter passing with SUBMIT

Variants:

1. ... USING SELECTION-SET vari

2. ... WITH p op f SIGN s

3. ... WITH p BETWEEN f1 AND f2 SIGN s

4. ... WITH p NOT BETWEEN f1 AND f2 SIGN s

5. ... WITH p IN sel

6. ... WITH SELECTION-TABLE seltab

7. ... WITH FREE SELECTIONS texpr

Effect

Passes values to the SELECT-OPTIONS and PARAMETERS of the program rep (these can also be defined in the database program SAPDBldb of the relevant logical database ldb). p is the name of a parameter or selection criterion.

Variant 1

... USING SELECTION-SET vari

Effect

The variable vari contains the name of a variant used to start the report.

Variant 2

... WITH p op f SIGN s

Effect

op is one of the operations EQ, NE, CP, NP, GE, LT, LE, GT. s is a variable which must contain one of the values 'I' or 'E' (any other values result in a runtime error). The addition SIGN is optional and the default is 'I'. If p is a selection criterion (SELECT-OPTIONS), an entry with LOW = f, OPTION = op and SIGN = s is generated in the relevant internal table.

If p is a parameter (PARAMETERS), the system treats all options like EQ, i.e. it always transfers a single value. The field f is passed to the parameter p or to the field p-LOW of the selection criterion (xxx in the above list) in internal format. If p is not the same type as f, a type conversion is performed in the target report when data is passed.

Note

Instead of the option EQ, you can also use = or INCL.

Variant 3

... WITH p BETWEEN f1 AND f2 SIGN s

Effect

Passes the range with the lower limit f1 and the upper limit f2 to the selection criterion p. As with variant 2, f1 and f2 are passed in internal format and the handling of SIGN is also the same. The system thus generates an entry with LOW = f1, HIGH = f2, OPTION = BT and SIGN = s. When data is passed, a type conversion is performed.

Variant 4

... WITH p NOT BETWEEN f1 AND f2 SIGN s

Effect

Similar to 3, except that OPTION NB is generated instead of OPTION BT.

Variant 5

... WITH p IN sel

Effect

p is a selection criterion and sel is an internal table which is compatible with p and contains the transfer values. You are recommended to define sel with RANGES. The lines of sel must have exactly the same structure as the lines of a selection table (see SELECT-OPTIONS).

Variant 6

... WITH SELECTION-TABLE seltab

Effect

seltab is an internal table with the structure RSPARAMS.

This variant allows you to set the names and contents of the parameters and selection options dynamically at runtime.

You can use the function module RS_REFRESH_FROM_SELECTOPTIONS to read the contents of the parameters and selection options of the current program into an internal table seltab with the structure RSPARAMS. By using SUBMIT ... WITH SELECTION-TABLE seltab, you can then pass these values on directly.

Variant 7

... WITH FREE SELECTIONS texpr

Effect

Passes dynamic selections.

texpr is an internal table of the type RSDS_TEXPR (see type pool RSDS).

Note

You can, for example, fill the object texpr in one of the following ways:

While processing a report with dynamic selections, call the function module RS_REFRESH_FROM_DYNAMICAL_SEL. This returns an object of the type RSDS_TRANGE which a subsequent function module FREE_SELECTIONS_RANGE_2_EX then converts to an object of the type RSDS_TEXPR. In this way, you can pass on the dynamic selections of the current report with SUBMIT.

Call the function modules FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG in order to offer the user a dialog for entering dynamic selections. These function modules return an object of the type RSDS_TEXPR.

Notes

You can combine the variants 1-7 in any permutation. The same selection criterion may be addressed several times with WITH. This generates several lines in the internal table assigned to the selection criterion p. You can also combine parameter transfer using a variant with explicit parameter passing via the WITH clause. In the event of a conflict, the following sequence applies:

Firstly, the variant is imported

Secondly, the contents of the selection table are read (WITH SELECTION TABLE)

Finally, the values passed explicitly using WITH are copied.

Parameter passing by selection table overwrites the corresponding parameter or selection option from the variant, and explicit parameter passing by WITH overwrites both the selection table values and the variant values.

The values passed during SUBMIT are not taken over until the event INITIALIZATION has been processed, i.e. default values set at INITIALIZATION are overwritten if values are passed for the PARAMETER or SELECT-OPTION during SUBMIT.

Examples

1. Combination of variant and WITH

DATA: RANGE_LANGU TYPE RANGE OF SY-LANGU,

RANGE_LANGU_WA LIKE lINE OF RANGE_LANGU.

PARAMETERS: MSG_FR LIKE T100-MSGNR,

MSG_TO LIKE T100-MSGNR.

MOVE: 'I' TO RANGE_LANGU_WA-SIGN,

'BT' TO RANGE_LANGU_WA-OPTION,

'D' TO RANGE_LANGU_WA-LOW,

'I' TO RANGE_LANGU_WA-HIGH.

APPEND RANGE_LANGU_WA TO RANGE_LANGU.

MOVE: 'EQ' TO RANGE_LANGU_WA-OPTION,

'E' TO RANGE_LANGU_WA-LOW.

APPEND RANGE_LANGU_WA TO RANGE_LANGU.

SUBMIT REPORT00

USING SELECTION-SET 'VARIANT1'

WITH MSG BETWEEN MSG_FR AND MSG_TO

WITH LANGU IN RANGE_LANGU.

In REPORT00, all parameters and SELECT-OPTIONS take their values from the variant VARIANT1.Only MSG and LANGU take the values that are explicitly passed.

Examples

2. Combination of variant, WITH SELECTION-TABLE, and explicit WITH clauses.

DATA: SELTAB TYPE TABLE OF RSPARAMS,

SELTAB_WA LIKE LINE OF SELTAB.

MOVE: 'LANGU' TO SELTAB_WA-SELNAME,

'S' TO SELTAB_WA-KIND, " SELECT-OPTION

'I' TO SELTAB_WA-SIGN,

'BT' TO SELTAB_WA-OPTION,

'D' TO SELTAB_WA-LOW,

'I' TO SELTAB_WA-HIGH.

APPEND SELTAB_WA TO SELTAB.

MOVE: 'E' TO SELTAB_WA-SIGN,

'EQ' TO SELTAB_WA-OPTION,

'F' TO SELTAB_WA-LOW,

SPACE TO SELTAB_WA-HIGH.

APPEND SELTAB_WA TO SELTAB.

CLEAR SELTAB_WA.

MOVE: 'ARBGB' TO SELTAB_WA-SELNAME,

'P' TO SELTAB_WA-KIND, " PARAMETER

'XX' TO SELTAB_WA-LOW.

APPEND SELTAB_WA TO SELTAB.

SUBMIT REPORT00

USING SELECTION-SET 'VARIANT1'

WITH ARBGB CP 'A*'

WITH SELECTION-TABLE SELTAB

AND RETURN.

In REPORT00, all parameters and SELECT-OPTIONS take their contents from the variant VARIANT1except LANGU, which takes its contents from SELTAB, and ARBGB, which takes the value that was explicitly passed.

Former Member
0 Kudos

hi,

use submit 'report name' 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.

maintanin f4 help for file in the selection screen.

u can use these statements in the selection-screen

PARAMETERS: P_FILE TYPE IBIPPARMS-PATH.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

CALL FUNCTION 'F4_FILENAME'

  • EXPORTING

  • PROGRAM_NAME = SYST-CPROG

  • DYNPRO_NUMBER = SYST-DYNNR

  • FIELD_NAME = ' '

IMPORTING

FILE_NAME = P_FILE

.

Former Member
0 Kudos

Hi HEM,

SUBMIT is used to call a report directly.

To pass the Parameters using SUBMIT statement, In the called program Aat least one parameter should be declared with NO-DISPLAY option. if it is there u can pass the values as follows...

SUBMIT report [VIA SELECTION-SCREEN]

[USING SELECTION-SET var]

[WITH sel criterion]

[WITH FREE SELECTIONS freesel]

[WITH SELECTION-TABLE rspar]

[AND RETURN].

If U can not pass the values,

use SET PARAMETER ID statement.

U can pass the values t\o any Program. but U should know the Parameter Id of that particular field.

Hope it helps U.

Reward me if it is useful.