Application Development and Automation 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: 
Read only

Module Pool

Former Member
0 Likes
714

Hi,

I have created a module pool screen, the flow logic is as follows

PROCESS BEFORE OUTPUT.

MODULE billet_stage_init.

LOOP AT it_billet_stage

INTO wa_billet_stage

WITH CONTROL billet_stage

CURSOR billet_stage-current_line.

MODULE billet_stage_move.

MODULE billet_stage_get_lines.

ENDLOOP.

MODULE status_0200 .

PROCESS AFTER INPUT.

MODULE exit_screen AT EXIT-COMMAND.

MODULE GRADING.

CHAIN.

FIELD : yorder-zheat,

yorder-zshift,

yorder-ZPROPOSED_DATE,

zbillet_data-TOT_BILLET_NOS_I.

MODULE check_value.

ENDCHAIN.

LOOP AT it_billet_stage.

CHAIN.

FIELD yorder-aufnr.

FIELD yorder-zbal_qty.

FIELD yorder-zqty.

FIELD yorder-kdauf.

ENDCHAIN.

ENDLOOP.

when I am debugging the cursor is not going into MODULE GRADING. Can anybody say what might be the reason.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
679

hi, can u rearrange the PAI code as below:

PROCESS AFTER INPUT.

CHAIN.

FIELD : yorder-zheat,

yorder-zshift,

yorder-ZPROPOSED_DATE,

zbillet_data-TOT_BILLET_NOS_I.

MODULE check_value.

ENDCHAIN.

LOOP AT it_billet_stage.

CHAIN.

FIELD yorder-aufnr.

FIELD yorder-zbal_qty.

FIELD yorder-zqty.

FIELD yorder-kdauf.

ENDCHAIN.

ENDLOOP.

MODULE GRADING.

MODULE user_command_0100 .

MODULE exit_screen AT EXIT-COMMAND.

in your code i dint find the module user_command, what about it?

and also check the relevant Include of module GRADING is active?

murashali...

6 REPLIES 6
Read only

Former Member
0 Likes
679

MODULE exit_screen AT EXIT-COMMAND because of this it is comming out of program. Implement your logic MODULE GRADING.

before it MODULE exit_screen AT EXIT-COMMAND.

If still it will not work then just write

MODULE exit_screen and inside it write code as

CASE sy-ucomm.

When 'EXIT'.

Leave to screen 0.

ENDCASE.

Hope this will solve your problem

Read only

0 Likes
679

Thanks for your quick response,

I tried by keeping the MODULE GRADING. above

MODULE exit_screen AT EXIT-COMMAND even though it is not going into it. I even commented MODULE exit_screen AT EXIT-COMMAND and tried it is not working, Please help me.

Read only

Former Member
0 Likes
679

if the button you used to execute the screen is a type of "E"xit, it will go to the EXIT exit_screen

Read only

Former Member
0 Likes
679

Are you sure you have some code in the module-endmodule of the module GRADING and the code is active?

Regards,

Ravi

Read only

Former Member
0 Likes
680

hi, can u rearrange the PAI code as below:

PROCESS AFTER INPUT.

CHAIN.

FIELD : yorder-zheat,

yorder-zshift,

yorder-ZPROPOSED_DATE,

zbillet_data-TOT_BILLET_NOS_I.

MODULE check_value.

ENDCHAIN.

LOOP AT it_billet_stage.

CHAIN.

FIELD yorder-aufnr.

FIELD yorder-zbal_qty.

FIELD yorder-zqty.

FIELD yorder-kdauf.

ENDCHAIN.

ENDLOOP.

MODULE GRADING.

MODULE user_command_0100 .

MODULE exit_screen AT EXIT-COMMAND.

in your code i dint find the module user_command, what about it?

and also check the relevant Include of module GRADING is active?

murashali...

Read only

Former Member
0 Likes
679

Hi Ranjith,

First of all, it is not clear from your problem description that how you are going into debugging. I mean what are you doing to trigger PAI.

If you are pressing a button with function type 'E' (and looks like thats the problem), then system first looks for a PAI module with AT EXIT-COMMAND. This is how the system is designed and works. EXIT and CANCEL are such functions in the standard toolbar.

In your case, it finds the module EXIT_SCREEN and if there is code for coming out of the program in this module, it comes out.

Rearranging other PAI modules aboe EXIT_SCREEN will not help as for function codes of function type 'E', system goes first to the AT EXIT-COMMAND module as it wants to come out of the program without doing any further processing.

Please elaborate.

Thanks

Sanjeev