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

What does the following Code will do

Former Member
0 Likes
1,432

Hi all,

What does the following Code will do ?

AT SELECTION-SCREEN . " OUTPUT.

IF sscrfields-ucomm = 'FC01'.

SUBMIT zfreightone AND RETURN.

ELSE.

ENDIF.

Thanks in advance

Sri...

3 REPLIES 3
Read only

Former Member
0 Likes
915

HI

AT SELECTION-SCREEN . " OUTPUT.

IF sscrfields-ucomm = 'FC01'.

SUBMIT zfreightone AND RETURN.

ELSE.

ENDIF.

The basic form of the selection screen events is the AT SELECTION-SCREEN event. This event occurs after the runtime environment has passed all input data from the selection screen to the ABAP program. The other selection screen events allow programmers to modify the selection screen before it is sent and specifically check user input.

The SUBMIT statement executes a report from within a report. i.e. you could have a drill-down which

calls another report.

sy-ucomm is for doing the functions what the user wishes to do at that particular event. You use it in menus and other place . this mainly in using <pfstatus>

here

when ever you press the field in your program at run time,

i will navigate to another report based on your if statement

here if the field you press has an entry in your screen fields then it will navigate to that report else it will terminate the program.

here 'FC01' may be some button if you press it if any code exists for it it will navigate to that report based on user commond( sy-ucomm )

*********please reward points if the information is helpful to you************

Read only

Former Member
0 Likes
915

Hi Sri,

There must be some push button on the selection scrren whose OK CODE is FC01. So when that push button is clicked the program will call the another program zfreightone.

Reward points if useful.

Regards,

Atish

Read only

Former Member
0 Likes
915

AT SELECTION-SCREEN . " OUTPUT.

IF sy-ucomm = 'FC01'.

SUBMIT zfreightone AND RETURN.

ELSE.

ENDIF.

use sy-ucomm

so that when systems variable changes to value fc01

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

thnkx

bhanu