cancel
Showing results for 
Search instead for 
Did you mean: 

Call screen from PAI of another screen

dpto_informatica
Explorer
0 Kudos
413

I've created my program with two dynpro.

At the beggining shows an screen to view an OO ALV with two buttons, when i've push the second i want to show the second screen just using the CALL SCREEN '1200'.  But i'm still watching the first screen.

DYNPRO 1100:

  PROCESS BEFORE OUTPUT.
    MODULE STATUS_1100.
    MODULE SEL_DATA_1100.
    MODULE SHOW_DATA_1100.

  PROCESS AFTER INPUT.
    MODULE USER_COMMAND_1100.

 

With this button cod function TOTPRIM:

dpto_informatica_0-1723114045968.png

In the USER_COMMAND_1100 of the PAI:

 

  CASE sy-ucomm.
      WHEN 'TOTPRIM'.
        CALL SCREEN '1200'.
    ENDCASE.

 

What i'm doing wrong.

Thanks in advance.

Sandra_Rossi
Active Contributor
0 Kudos
Impossible to say precisely without reproducible code. Many bugs in your program may correspond to this symptom.
Sandra_Rossi
Active Contributor
0 Kudos
The button image doesn't look like an SAP GUI screenshot, and not even a button from OO ALV. As you don't say exactly what is your global code, my two cents: either you are using an ALV Grid with parent CL_GUI_CONTAINER=>SCREEN0 or alike, without freeing it, or you do a SUPPRESS DIALOG or LEAVE SCREEN or alike in the display of screen 1200.
Sandra_Rossi
Active Contributor
0 Kudos
All your code till now is fine, no reason to not display the screen 1200. By the way, you have debugged your program, so you are sure that you are entering the PBO of screen 1200, right?
Sandra_Rossi
Active Contributor
0 Kudos
You are saying now "After the CALL SCREEN '1200' on the PAI it goes to the PBO of the 1100 dynpro and not to the 1200 dynpro PBO" (2), but the initial question was different "when i've push the second i want to show the second screen just using the CALL SCREEN '1200'. But i'm still watching the first screen." (1). What is the actual question, (1) or (2)?
dpto_informatica
Explorer
0 Kudos
Both are the same. If it goes to the 1100 dynpro PBO it will show the 1100 dynpra, that is the first screen. And i need to go to 1200 pbo dynpro to show the 1200 dynpro
Sandra_Rossi
Active Contributor
0 Kudos
Better focus on just one case otherwise it's difficult to understand. I think that the discussion will be endless, so either ask a fellow programmer in your company (or anyone you can discuss with), or create a test program where you can reproduce the error, and post the whole code here. Thank you.
View Entire Topic
dpto_informatica
Explorer
0 Kudos

I'm doing by this way on 1100 dynpro:

    CREATE OBJECT g_container_1100
      EXPORTING
        container_name 'CONTAINERCUSTO'.
 

 

  CREATE OBJECT g_grid1_1100
      EXPORTING
        i_parent g_container_1100.
 

 

  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
      i_structure_name        'ZED'
    CHANGING
      ct_fieldcat             ls_fieldcat_1100
    EXCEPTIONS
      inconsistent_interface  1
      program_error           2
      OTHERS                  3.
 

 

  CALL METHOD g_grid1_1100->set_table_for_first_display
      EXPORTING
        i_save                        'A'
        is_layout                     g_layout_1100
        is_variant                    gv_variant_1100
        "it_toolbar_excluding = lt_exclude[]
      CHANGING
        it_outtab                     t_total[]
        it_fieldcatalog               ls_fieldcat_1100
      EXCEPTIONS
        invalid_parameter_combination 1
        program_error                 2
        too_many_lines                3
        OTHERS                        4.
 

Sandra_Rossi
Active Contributor
0 Kudos
Please don't post an answer, which is reserved to propose a solution. Instead click on "Show replies" and then "Comment".
dpto_informatica
Explorer
0 Kudos
After the CALL SCREEN '1200' on the PAI it goes to the PBO of the 1100 dynpro and not to the 1200 dynpro PBO.
Sandra_Rossi
Active Contributor
0 Kudos
Thanks, but I don't mean "Replies" of an Answer, I mean "Replies" of the Question.
dpto_informatica
Explorer
0 Kudos
After the CALL SCREEN '1200' on the PAI it goes to the PBO of the 1100 dynpro and not to the 1200 dynpro PBO.