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

Selection OPTION: Date input problem in Module POOL through Subscreen

Former Member
0 Likes
2,318

Dear ALL,

Being new to ABAP, I am struck in a Problem.

Requirement:

I want an option on the Screen( My Screen 9000) for Date Range. Through this Date-Range I want to filter and pull some data from

Database.

As Date Range Selection option is possible only through Sub-Screen integration. Hence I integrated a Sub-Screen 400 (as below) and named the Sub-Screen area as SEL on my screen.

Problem: As soon as I enter the dates on the screen, then those dates are not taken up by the code.

During debugging I saw the the S_datum-low and S_datum-high are empty (in fact 00000000)

The code follows:

PROCESS BEFORE OUTPUT.

MODULE STATUS_9000.

  Call SUBSCREEN SEL  INCLUDING sy-repid '400'.

*

PROCESS AFTER INPUT.

  MODULE USER_COMMAND_9000.

**********************************************************************************************

DATA:  gv_datum     Type   dats,

SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.

    SELECT-OPTIONS: s_datum FOR gv_datum.

SELECTION-SCREEN END OF SCREEN 400 .

Plz help where I am missing something.

Regards

Chandan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,084

Call the subscreen during the AT SELECTION-SCREEN event.

SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.

SELECT-OPTIONS: s_datum FOR gv_datum.

SELECTION-SCREEN END OF SCREEN 400 .

AT SELECTION-SCREEN.

   CALL SCREEN 100.

*&---------------------------------------------------------------------*

*&      Module  STATUS_0100  OUTPUT

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

MODULE status_0100 OUTPUT.

   SET PF-STATUS '0100'.

*  SET TITLEBAR 'xxx'.

ENDMODULE.                 " STATUS_0100  OUTPUT

*&---------------------------------------------------------------------*

*&      Module  USER_COMMAND_0100  INPUT

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

MODULE user_command_0100 INPUT.

   CASE sy-ucomm.

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

       LEAVE TO SCREEN 0.

   ENDCASE.

ENDMODULE.                 " USER_COMMAND_0100  INPUT

15 REPLIES 15
Read only

Former Member
0 Likes
2,085

Call the subscreen during the AT SELECTION-SCREEN event.

SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.

SELECT-OPTIONS: s_datum FOR gv_datum.

SELECTION-SCREEN END OF SCREEN 400 .

AT SELECTION-SCREEN.

   CALL SCREEN 100.

*&---------------------------------------------------------------------*

*&      Module  STATUS_0100  OUTPUT

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

MODULE status_0100 OUTPUT.

   SET PF-STATUS '0100'.

*  SET TITLEBAR 'xxx'.

ENDMODULE.                 " STATUS_0100  OUTPUT

*&---------------------------------------------------------------------*

*&      Module  USER_COMMAND_0100  INPUT

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

MODULE user_command_0100 INPUT.

   CASE sy-ucomm.

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

       LEAVE TO SCREEN 0.

   ENDCASE.

ENDMODULE.                 " USER_COMMAND_0100  INPUT

Read only

0 Likes
2,084

Dear Aaron,

Thanks for ur reply.

What do u mean by this : "Call the subscreen during the AT SELECTION-SCREEN event.".

But "At SELECTION-SCREEN" event you are calling Screen 100. and not the sub-screen (Screen 400)

AT SELECTION-SCREEN.

   CALL SCREEN 100.


Regards

Chandan

Read only

0 Likes
2,084

Yes, I apologize.  I should have said to call the screen not subscreen. 

Read only

0 Likes
2,084

Hi,

Ok I understood and tried that, but it doesn't works. still in debugging s_datum-low and s_datum-high are 00000000 .

Any more ideas!

Regards

Chandan

Read only

0 Likes
2,084

Can you paste all of your code?  I have what I pasted above in a test program and it works.

Read only

0 Likes
2,084

Oh, I see the difference.  In my test program I defined S_BUDAT as seen below.

TABLES: vbak.

SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.

SELECT-OPTIONS: s_datum FOR vbak-erdat.

SELECTION-SCREEN END OF SCREEN 400 .




Read only

0 Likes
2,084

Hi,

As for practice I am using minsap version of ABAP so in this version vbak table is not available. Hence I can't use the above table in my code.

Regards

Chandan

Read only

0 Likes
2,084

Any table with a date field would work.

Read only

0 Likes
2,084

Hi,

Thanks. I have SFLIGH table in my version. So the field SFLIGHT-FDATE would work?

Regards

Chandan

Read only

0 Likes
2,084

Hi,

No I tries SFLIGHT-FLDATE. It doesn't works.

My code is too long. I can post it if you want. and highlight the syntaxes that we need in BOLD.

Regards

Read only

0 Likes
2,084

Hi chandan,

You said in MPP the entered date values become 000000. so first you have to capture the entered screen values using this function module    'DYNP_VALUES_READ'.  because you use SELECT-OPTION for date field. so you can use this function module (PROCESS ON VALUE  REQUEST FOR ...............) to capture the entered date-low and date-high .

Read only

bernat_loscos
Explorer
0 Likes
2,084

Hi Chandan.

You can try to add this line in your PAI 9000... and check if work correctly..

PROCESS BEFORE OUTPUT.

MODULE STATUS_9000.

  Call SUBSCREEN SEL  INCLUDING sy-repid '400'.

*

PROCESS AFTER INPUT.

Call SUBSCREEN SEL

  MODULE USER_COMMAND_9000.

Regards.

Read only

0 Likes
2,084

Ah, that must be what he is missing.  I have that in my screen and forgot to mention it.

Read only

0 Likes
2,084

Hi Loscos,

Thanks.

You are right. After I introduced :

CALL SUBSCREEN SEL in PAI of LOGIC of the screen, what I see in debugging mode that

S_datum-low and S_datum-high are populated but my main progg. of Screen 9000 doesn't gets executed. Even the back arrow doesn't works.

Something more seems missing to enabale execution of code of Screen 9000.

Regards

Chandan

Read only

0 Likes
2,084

This link may be help you to resolve the problem...

http://help.sap.com/saphelp_470/helpdata/es/9f/dbabfe35c111d1829f0000e829fbfe/content.htm

Regards !!