Application Development 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: 

Reg: Dialogue program

Former Member
0 Kudos

Hi,

Please explain me the scenario where I should have input selection screen and output will be on the created screen (means suppose screen no 1001).

Create a button (PUSH) on application toolbar of screen 1001 and display the new output on screen 1002 (created) when I click on button (PUSH).

Please tell me the code as I am new to ABAP.

Waiting for your valuable reply.

Regards

Silpa.

1 ACCEPTED SOLUTION

I355602
Advisor
Advisor
0 Kudos

Hi,

Seems that you haven't searched on SCN.....

Refer:-

Create a pf-status in SE41 with a button with function code NEXT used to jump to next screen.

To go to screen from 8001 to 8002, when user clicks push button on screen 8001.

At screen flow-logic


PROCESS BEFORE OUTPUT.
  MODULE status_8001.
 
PROCESS AFTER INPUT.
  MODULE user_command_8001.

In PBO


*&---------------------------------------------------------------------*
*&      Module  STATUS_8001  OUTPUT
*&---------------------------------------------------------------------*
MODULE status_8001 OUTPUT.

  SET PF-STATUS 'ZPF_STAT'. "<--apply your created pf-status

ENDMODULE.                 " STATUS_8001  OUTPUT

In PAI


*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_8001  INPUT
*&---------------------------------------------------------------------*
MODULE user_command_8001 INPUT.

  CASE sy-ucomm.
    WHEN 'NEXT'.
      SET SCREEN '8002'.
      LEAVE SCREEN. "<--go to screen 8002
  ENDCASE.

ENDMODULE.                 " USER_COMMAND_8001  INPUT

Hope this helps you.

Regards,

Tarun

4 REPLIES 4

Former Member
0 Kudos

Hi,

First go to se41 menu painter and create the Push Buttons

or go to your screen layout and add push button s for PUSH and assign Function code for that..

and write the Logic..in the PAI..


PROCESS AFTER INPUT.
* Main Flow Logic
  MODULE user_command_1000.  

MODULE user_command_1000 INPUT.

* free,clear and refresh all tables and variables
  PERFORM f_free_clear_refresh.

  CASE ok_code.
    WHEN 'PUSH'.
      LEAVE TO SCREEN 1010.
    WHEN 'ENTER'.
      LEAVE TO SCREEN 1020.
    WHEN 'BACK'.
      LEAVE TO SCREEN 2010.
    WHEN 'EXIT' OR 'CANCEL'.
      LEAVE PROGRAM.
ENDCASE.
ENDMODULE.                 " USER_COMMAND_1000  INPUT

regards,

Prabhudas

Former Member
0 Kudos

Hi,

First Create a Report, for example: "ZTEST_GUI_EXAMPLE"

&----


*& Report ZTEST_GUI_EXAMPLE

*&

&----


*&

*&

&----


REPORT ZTEST_GUI_EXAMPLE.

data: OK_CODE type sy-ucomm.

INCLUDE ZTEST_GUI_EXAMPLE_STATUS_10O01.

INCLUDE ZTEST_GUI_EXAMPLE_USER_COMMI01.

START-OF-SELECTION.

call SCREEN 1001.

Then in screen 1001, create the push button in the layout amd assign FCODE = "NEXT". Here, uncomment the "MODULE USER_COMMAND_1001." and double click on it to enter the pai code.

PROCESS BEFORE OUTPUT.

MODULE STATUS_1001.

*

PROCESS AFTER INPUT.

MODULE USER_COMMAND_1001.

The module User_command will look like:

MODULE USER_COMMAND_1001 INPUT.

CASE ok_code.

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

LEAVE TO SCREEN 0.

WHEN 'NEXT'.

call SCREEN 1002.

ENDCASE.

ENDMODULE. " USER_COMMAND_1001 INPUT

Hope this helps

Suman

Former Member
0 Kudos

hi

go to SE51 create 2 screens 1001 & 1002

and by default u will get both PBO & PAI events for both the screens

double click on the PBO event of screen 1001 & in that uncomment SET PF-STATUS 'XXXX'

& again double click on it to create Menu painter, it will take you to Tcode SE41

in SE41 u can see user interface in that on the Application toolbar try to create your PUSH button

with function type 'E'.

double click on PAI of screen 1001 in that write the code

case sy-ucomm.

when 'EXIT' or 'BACK'.

leave program.

when 'PUSH'.

leave to screen '1002'.

endcase.

Regards

I355602
Advisor
Advisor
0 Kudos

Hi,

Seems that you haven't searched on SCN.....

Refer:-

Create a pf-status in SE41 with a button with function code NEXT used to jump to next screen.

To go to screen from 8001 to 8002, when user clicks push button on screen 8001.

At screen flow-logic


PROCESS BEFORE OUTPUT.
  MODULE status_8001.
 
PROCESS AFTER INPUT.
  MODULE user_command_8001.

In PBO


*&---------------------------------------------------------------------*
*&      Module  STATUS_8001  OUTPUT
*&---------------------------------------------------------------------*
MODULE status_8001 OUTPUT.

  SET PF-STATUS 'ZPF_STAT'. "<--apply your created pf-status

ENDMODULE.                 " STATUS_8001  OUTPUT

In PAI


*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_8001  INPUT
*&---------------------------------------------------------------------*
MODULE user_command_8001 INPUT.

  CASE sy-ucomm.
    WHEN 'NEXT'.
      SET SCREEN '8002'.
      LEAVE SCREEN. "<--go to screen 8002
  ENDCASE.

ENDMODULE.                 " USER_COMMAND_8001  INPUT

Hope this helps you.

Regards,

Tarun