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

OK_CODE not read in SAPLMOB subscreen

Former Member
0 Likes
1,495

Hello,

I have created a screen-exit for SAPLMOB.

My new screen is copied from SAPLMOB/2302 to SAPLXRLF/1302 , i have deleted the OK_CODE name in sub-screen.

But when i push a button in the new screen , i dont have any action and i see in debug no date into SY-UCOMM and OK_CODE.

Any idea  ?

Regards

David.

7 REPLIES 7
Read only

Abhijit74
Active Contributor
0 Likes
1,316

Hello,

Could you please elaborate your problem little bit? Why you have deleted the OK_CODE from your sub screen? Then how it is going to determined what action to perform?

Keep Ok_CODE in your sub screen as well as declare it into your program.

Thanks & Regards,

Abhijit

Read only

Former Member
0 Likes
1,316

Step done :

1. Copied physical screen 2402 (SAPLLMOB) to screen 1402(SAPLXLRF)

2. Changed the screen to subscreen and removed the OK_CODE from the element list.

3. Created the project ZXXXX and assigned user exit MWMRF402 to this project.

4. In the components of the project assigned 1402(SAPLXLRF) to 1402((SAPLLMOB).

5. Assigned the screen 1402 to logical screen 0402 in the config.

PBO-PAI of the subscreen

PROCESS BEFORE OUTPUT.
*  MODULE STATUS_SCREEN_GROUP3.
   MODULE TAP_DISPLAY.
   MODULE SPECIAL_FIELD_OUTPUT.
   MODULE DISABLE_PB_BQUIT.
   MODULE SET_VALUES.
   MODULE SET_CURSOR.

PROCESS AFTER INPUT.
*  MODULE EXIT_COMMANDS AT EXIT-COMMAND.
*  FIELD OK_CODE:
*                 MODULE MODIFY_TAP,
*                 MODULE USER_COMMANDS.


And when i activate and use the transaction LM06 , the OK_CODE is empty ( and SY-UCOMM too ) . So i cannot do anything.


Thx & Regards.

David.

Read only

0 Likes
1,316

Hi David

If you check the EXIT_SAPLLMOB_290 inside this exit. It has import parameter I_SCREEN_FCODE which you can use i believe.

Nabheet

Read only

Former Member
0 Likes
1,316

Hey David,

                 Do not remove the OK_CODE and you cant handle the OK_CODE using the command "FIELD OK_CODE",

Instead create a mode there inside the module, move SY-UCOMM to OK_CODE and then put up a CASE statement which WHEN statements specifying what you want to do.

Eg: PROCESS AFTER INPUT.

       MODULE AFTER_ACTION

MODULE AFTER_ACTION_9001_INPUT

    OK_CODE = SY-UCOMM.

CASE OK_CODE.

   when.....

ENDCASE.

Hope this helps!

Happy coding,

Santhosh Yadav

Read only

Former Member
0 Likes
1,316

I can't keep the OK_CODE in the subscreen. It's normaly not a problem but it's declared in the Main Screen.

My major problem , is that the SY-UCOMM is not filled.

I can see in debug after push a button. I see nothing in SY-UCOMM or in OK_CODE. So the parameter i_screen_fcode is not filled too.

Read only

0 Likes
1,316

David when you custom sub screen is called this exit must be called so that you can pass data to sub screen right..what is the F code passed at this time..?

Nabheet

Read only

Former Member
0 Likes
1,316

In the main screen i have : ( SAPLMOB / 1402 )

PROCESS BEFORE OUTPUT.
   MODULE STATUS_SCREEN_GROUP3.
   MODULE TAP_DISPLAY.
   MODULE SPECIAL_FIELD_OUTPUT.
   MODULE DISABLE_PB_SAVE.
   MODULE SET_VALUES.
   MODULE SET_CURSOR.
   MODULE DATA_TO_EXIT0402.
   CALL CUSTOMER-SUBSCREEN EXIT0101
          INCLUDING 'SAPLXLRF' SCRN_DATA-SCRND_USCRN.

*
PROCESS AFTER INPUT.
   CALL CUSTOMER-SUBSCREEN EXIT0101.
   MODULE DATA_FROM_EXIT0402.
   MODULE EXIT_COMMANDS AT EXIT-COMMAND.
   FIELD OK_CODE:
                  MODULE MODIFY_TAP,



My customer subscreen is in SAPXLRF / 1402


In the first call off my subscreen i can see the sy-ucomm filled , but after when i push a button , the sy-ucomm is not filled ,  i can see that directly in the main screen .


But a important information. I just make a test .The problem is only with my push-button because if in type the ok_code manually i have the sy-ucomm filled.


The push-button are managed in a Gui Status LMOB_GROUP3


MODULE STATUS_SCREEN_GROUP3 OUTPUT.
   SET PF-STATUS 'LMOB_GROUP3'.
   SET TITLEBAR SY-DYNNR.

ENDMODULE.