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

CALL SELECTION SCREEN problem

Hello!

I have a problem. In my riport I have a selection screen (1000), a main screen (2000), and a screen (400) this is called inside a loop, to fill some datas when you hit the print button.

CLEAR L_TOTAL.

SORT LT_EBAN BY BNFPO.

LOOP AT LT_EBAN.

GT_ITEM2-FIELD01 = SY-TABIX.

GT_ITEM2-FIELD02 = LT_EBAN-MATNR.

*---Part name, Type, Maker

SPLIT LT_EBAN-TXZ01 AT ',' INTO GT_ITEM2-FIELD03 GT_ITEM2-FIELD04 GT_ITEM2-FIELD05.

CONCATENATE GT_ITEM2-FIELD03 '/' GT_ITEM2-FIELD04 INTO DESCR.

ITEM = LT_EBAN-BNFPO.

CALL SCREEN 400 STARTING AT 20 7 ENDING AT 60 18.

*---Machine

GT_ITEM2-FIELD06 = ST_400-MACHINE.

....

After this, i could not use the LEAVE TO SCREEN 0, because it's not going back to secreen '2000' , I'm getting a blank 400 screen.

Thatswhy I used CALL SCREEN '2000', and it's fine.

But in the case of the Selection screen (1000) something is wrong.

On the screen 2000 I using this logic.

MODULE EXIT_2000 INPUT.

CASE OK_CODE.

WHEN 'BACK' OR 'EXIT'.

CLEAR OK_CODE.

CALL SELECTION-SCREEN '1000'.

LEAVE PROGRAM.

WHEN 'CANC'.

PERFORM EXIT_PROGRAM.

LEAVE PROGRAM.

ENDCASE.

CLEAR OK_CODE.

ENDMODULE. " exit_2000 INPUT

With this logic, the program is going to the SELECTION-SCREEN, when I hit the back button, and when we are already on the SELECTION-SCREEN, it's leaving the program. This is also ok.

But when I hit the back button, and on the SELECTION-SCREEN I want to run the program again, it's not going to the program logic, it's jumping to this CALL SELECTION-SCREEN '1000', and leaving of course.

START-OF-SELECTION.

PERFORM DSP1_PROC.

IF GT_DISPLAY[] IS INITIAL.

MESSAGE S208(00) WITH 'No data.'.

EXIT.

ENDIF.

IF S_RET = '1'.

MESSAGE I208 WITH 'Document not found'.

S_RET = ' '.

ELSE.

S_RET = ' '.

CALL SCREEN '2000'.

ENDIF.

So my question is, that the above logic, when I running the program first time It's working good, at the START-OF-SELECTION, but when I trying to runnig from the SELECTION-SCREEN "second time", from the START-OF-SELECTION it's jumping to the CALL SELECTION-SCREEN '1000'. How can I avoid this. I want that from the START-OF-SELECTION, never go to the CALL SELECTION-SCREEN '1000'.

Thank You

Edited by: Roland on Dec 5, 2011 11:27 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2011 at 11:06 AM

    Hi,

    Try using

    SET SCREEN '0'.

    LEAVE SCREEN.

    when you are in screen 2000 to return to the selection screen

    Regards,

    Sharin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 15, 2011 at 03:01 PM

    Hi,

    According to me Sharin has pointed the issue...

    You should only use leave to screen 0 when leaving screens (2000+400) instead of call screen again...

    The flow should be something like:

    - start-of-program

    - call screen 2000

    - call screen 400 (module 2000 pai)

    - leave to screen 0 (module 400 pai)

    - leave to screen 0 (module 2000 pai on exit)

    The call selection screen statement or call screen 2000 in pai of screen 400 should not be used, so that the screens flow is respected.

    Kr,

    Manu.

    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.