2014 Jul 17 4:31 AM
Hi,
There are four fields in Input Screen => Purchase Order , Vendor , Invoice no, Invoice Date in Module Pool Screen . User can pass only single inputs( one purchase Order , one vendor , one invoice no & Date at one time ) , Requirement is need to change the Purchase Order field to accept input in a Range . Actually for input fields there is no code written in SE38, inputs are controlled through Screen Painter (SE51), I tried to add below code in SE38 and modified coding in screen painter SE51
Coding added in SE38.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
SELECT-OPTIONS PurOrder FOR ekko-ebeln.
SELECTION-SCREEN END OF SCREEN 100.
Coding and Screen modification in SE51
New sub screen 100 created under Screen 9001
PROCESS BEFORE OUTPUT.
MODULE status_9001.
CALL SUBSCREEN select INCLUDING sy-repid '100'. " New lines added
After execution , i am able to view the new fields as
Purorder XXXXXXXXXXXX XXXXXXXXXXXXXXXX =
I am able to pass input the values at Run time , but the values are not storing in the variable , Tried to check in Debugger and noticed values are not stored in input field.
How to fix this issue. Can you any suggest pl.
BR,
Murali
2014 Jul 17 4:49 AM
Hi,
Why are you talking about se38 while doing a module pool...
This is the way to have a select option in a module pool screen...
*&---------------------------------------------------------------------*
*& Include ZSELOPT_IN_MP_TOP Module Pool ZSELOPT_IN_MP
*&
*&---------------------------------------------------------------------*
PROGRAM zselopt_in_mp.
TABLES ekko.
*** at top include***
SELECTION-SCREEN BEGIN OF SCREEN 9001 AS SUBSCREEN.
SELECT-OPTIONS so_ebeln FOR ekko-ebeln.
SELECTION-SCREEN END OF SCREEN 9001.
****At Normal Screen(9000) with Subscreen Area 'sub'.
PROCESS BEFORE OUTPUT.
* MODULE STATUS_9000.
call SUBSCREEN sub INCLUDING sy-cprog '9100'.
PROCESS AFTER INPUT.
* MODULE USER_COMMAND_9000.
CALL SUBSCREEN sub.
Regards
Sreekanth
2014 Jul 17 6:20 AM
Hi Sreenkath,
As you said , already i have entered the Coding in Top Include only (may be wrongly mentioned as SE38) . As suggested modification done in Module Pool Screen , but system never moves to next process . There are some coding written under MODULE STATUS_9000 (Before Input) . and MODULE USER_COMMAND_9000 (After input). Those to be executed to get the final output , if we block those lines , system will not process to next line.
Without blocking those lines , Can i able to get the values entered in subscreen fields to internal variables.
BR,
Murali
2014 Jul 17 6:46 AM
So, are u able to view the subscreen with select option?
Remember, only after the line CALL SUBSCREEN 'sub' in PAI the screen field values is available in program variable.
Do like this..
Consider the order of each line...
PROCESS AFTER INPUT.
CALL SUBSCREEN 'sub' .
MODULE USER_COMMAND_9000.