Skip to Content
author's profile photo Former Member
Former Member

What does the following Code will do

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...

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 02, 2007 at 06:11 AM

    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************

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 02, 2007 at 06:13 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 02, 2007 at 06:18 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.