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

Why is subscreen is not shown when program is called by transaction

Hi all,

I programmed a screen with a subscreen. On this subscreen a message protocol is kept.

Whenever I start the program in the workbench via F8 functionallity the subscreen's content is shown as it should. However, if I start this process via the program's transaction the subscreen is not displayed at all.

Can anybody help me on that? Why is there a difference between calls by transaction and calls out of the workbench?

Cheers mates,

Thomas

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 09:39 AM

    Hi Ralf, hi Jonathan,

    thanks for your answers.

    The structure of the REPORT (executable program - now I know) is as follows:

    REPORT xyz.

    TYPES: ...

    DATA: ...

    PERFORM subroutine. " within this subroutine "call screen 0100" is placed

    • call screen 0100 " this was the position before

    INCLUDE abz. "inside this include the subroutine is situated

    MODULE user_command_0100 INPUT.

    • PAI

    ...

    CASE ok_code.

    ...

    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.

    LEAVE PROGRAM.

    ENDCASE.

    ...

    MODULE status_0100 OUTPUT.

    • PBO

    --> I put START-OF-SELECTION in front of "PERFORM subroutine" --> No change. Subroutine was not called.

    --> I put LOAD-OF-PROGRAM in front of "PERFORM subroutine" --> The subroutine was called, when calling the program via TCODE. However, when pushing the BACK button LEAVE PROGRAM is called in PAI module and I get a short dump "Illegal interruption of the event LOAD-OF-PROGRAM".

    To me it seems that load-of-program is the better choice. But when does that block end? Or should something else than LEAVE PROGRAM. be used to exit the program?

    Thanks many times.

    Regards,

    Thomas

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Thanks a lot, Jonathan.

      That really did solve the prolem. I gotta say, that I did not create that tcode myself, so I wasn't aware what type of program was choosen in the beginning.

      So, thanks again - I grew a little smarter today.

      Cheers,

      Thomas

  • author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2007 at 10:54 PM

    I can't think of why there should be any difference unless you code for one e.g. I've had module pools which support both display and update depending on which Tcode invoked them, but that's obvious in the code. So I'd suggest a breakpoint in the first PBO logic of the dynpro that is invoked from the TCode and step through from there as to why the subscreen contents are not appearing in the main dynpro.

    Jonathan

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      OK, I'm a bit confused... in a "classic" module program you would normally have a structure of program includes something like this:

      SAPMZMYPROG   "main program that has include statements for following
        MZMYPROGTOP "where global data definitions are made
        MZMYPROGO01 "for PBO modules
        MZMYPROGI01 "for PAI module
        MZMYPROGF01 "for forms / subroutines

      {clearly they can get a lot more complex!)... and when you view SAPMZMYPROG in SE80 you'd also be able to see the screen definitions and PF status, titlebar etc. You'll also see transactions that you have defined that point to a screen in the module pool.

      However you can also define the same overall structure within one report program, as per the code example:

      Step loops

      {I wouldn't normally code them as reports, but for SDN it's easier}... in the report style, then SAP comes in through the usual events and so a "call screen" is required in the start of selection... however when you code the "classic" style (as above) then you should come straight into the PBO for the screen defined on the Tcode.

      So how have you structured your code?

      Jonathan

  • author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2007 at 03:24 PM

    hi,

    is it a modul pool or a report?

    then check the program events...when do you call the subscreen ?

    LOAD-OF-Program, initialization etc.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi,

      goto "GOTO->Attributes" to check the type of your program.

      if you can execute the program out of the workbench it is not a modul program!

      check also the screen number in die Attributes of the transaction.

      LOAD-OF-PROGRAM.

      This event keyword defines an event block whose event is triggered by the ABAP-runtime environment when an executable program, a module pool, a function group or a sub-routine pool is loaded in the internal session.

      The event LOAD-Of-PROGRAM should mainly be used to initialize global data when calling external procedures or Transactions.

      The transaction code of a dialog transaction is linked to a screen of an ABAP program. When the transaction is called, the respective program is loaded and the screen is called after the event LOAD-OF-PROGRAM.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 12:42 PM

    see in thread

    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.