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

submit and first screen?

Former Member
0 Likes
1,225

hi friends ı want to open a main program with submit properties in click.

what do I do ?

thanks.

3 REPLIES 3
Read only

Former Member
0 Likes
915

Hi

From list output of one report u want to submit to another program, do processing and come back main program, is this the issue ?

Read only

Former Member
0 Likes
915

use user-commands in your program.

at user-command.

case sy-ucomm.

when 'SUBMIT'.

/////write the code to call program

endcase.

Read only

Former Member
0 Likes
915

Hi Emrah,

please read this...it will give you good idea.

SUBMIT...

.

These additions have the following effects:

· VIA SELECTION-SCREEN

The selection screen of the called executable program appears. If you transfer values to the program using one or more of the other options, the corresponding input fields in the selections screen are filled. The user can change these values. By default, the system does not display a selection screen after SUBMIT.

· USING SELECTION-SET

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.

For more information on these additions, refer to the keyword documentation.

Except for WITH SELECTION-TABLE, you can use any of the above options several times and in any combination within a SUBMITstatement. In particular, you can use the WITH sel addition several times for one single criterion sel. The only combination possible for the WITH SELECTION-TABLE addition is USING SELECTION-SET.

If the input fields on the selection screen are linked to SPA/GPA parameters, you can also use this technique to pass values to the selection screen (see Passing Data Between Programs).

The following executable program creates a selection screen containing the parameter paramet and the selection criterion selecto:

REPORT demo_program_submit_rep1.

DATA number TYPE i.

PARAMETERS paramet(14) TYPE c.

SELECT-OPTIONS selecto FOR number.

The program DEMOdemo_program_submit_rep1 is called by the following program using various parameters:

REPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.

DATA: int TYPE i,

rspar TYPE TABLE OF rsparams,

wa_rspar LIKE LINE OF rspar.

RANGES seltab FOR int.

WRITE: 'Select a Selection!',

/ '----

-


'.

SKIP.

FORMAT HOTSPOT COLOR 5 INVERSE ON.

WRITE: 'Selection 1',

/ 'Selection 2'.

AT LINE-SELECTION.

CASE sy-lilli.

WHEN 4.

seltab-sign = 'I'. seltab-option = 'BT'.

seltab-low = 1. seltab-high = 5.

APPEND seltab.

SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN

WITH paramet eq 'Selection 1'

WITH selecto IN seltab

WITH selecto ne 3

AND RETURN.

WHEN 5.

wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.

wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.

wa_rspar-low = 14. wa_rspar-high = 17.

APPEND wa_rspar TO rspar.

wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.

wa_rspar-low = 'Selection 2'.

APPEND wa_rspar TO rspar.

wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.

wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.

wa_rspar-low = 10.

APPEND wa_rspar TO rspar.

SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN

WITH SELECTION-TABLE rspar

AND RETURN.

ENDCASE.

After you start the program, a basic list appears and clicking the hotspots displays the selection screen of rep1 filled with different values.

For both calls of demo_program_submit_rep1, the system transfers values that lead to two-line selection tables selecto. The second line appears in the respective dialog box Multiple Selection for Selecto. Without the VIA SELECTION-SCREEN option of the SUBMIT statement, paramet and selecto would be filled accordingly in demo_program_submit_rep1, but they would not be displayed.

Regards,

venkat