2006 Aug 25 6:45 PM
hi all,
i need to give a pop up screen before the selection screen which will take the value for the number of records to be displayed. how to do this ?
thanks,
Amit
2006 Aug 25 6:51 PM
You could do something like this.
report zrich_0001.
data: value1 type spop-varvalue1.
data: answer type c.
parameters: p_check type c.
load-of-program.
check sy-ucomm = space.
call function 'POPUP_TO_GET_ONE_VALUE'
exporting
textline1 = 'Number of Records:'
* TEXTLINE2 = ' '
* TEXTLINE3 = ' '
titel = 'Number of Records'
valuelength = '5'
importing
answer = answer
value1 = value1.
start-of-selection.
But I really don't understand your requirement. Why not ask for this value on the selection screen itself?
Regards,
Rich Heilman
hi all,
i need to give a pop up screen before the selection screen which will take the value for the number of records to be displayed. how to do this ?
thanks,
Amit
2006 Aug 25 6:49 PM
Hi,
Create 1st program :
Report Zfirst.
Use POp up FM.
If <Condition >
Submit <Zsecond> via selection-screen.
endif.
Report Zsecond.
Here give selection screen commands.
Best regards,
Prashant
2006 Aug 25 6:51 PM
You could do something like this.
report zrich_0001.
data: value1 type spop-varvalue1.
data: answer type c.
parameters: p_check type c.
load-of-program.
check sy-ucomm = space.
call function 'POPUP_TO_GET_ONE_VALUE'
exporting
textline1 = 'Number of Records:'
* TEXTLINE2 = ' '
* TEXTLINE3 = ' '
titel = 'Number of Records'
valuelength = '5'
importing
answer = answer
value1 = value1.
start-of-selection.
But I really don't understand your requirement. Why not ask for this value on the selection screen itself?
Regards,
Rich Heilman
2006 Aug 25 7:06 PM
thanks rich.
can we 1)change the format of the popup
2)make the field mandatory
2006 Aug 25 7:13 PM
2006 Aug 25 7:15 PM
2006 Aug 25 7:16 PM
You can make the field required like this with this function module.
report zrich_0001.
data: value1 type spop-varvalue1.
data: answer type c.
data: ival type table of sval with header line.
parameters: p_check type c.
load-of-program.
ival-tabname = 'SYST'.
ival-fieldname = 'SROWS'.
<b> ival-field_obl = 'X'. " Required Field</b>
append ival.
call function 'POPUP_GET_VALUES'
exporting
* NO_VALUE_CHECK = ' '
popup_title = 'Number of Records:'
* START_COLUMN = '5'
* START_ROW = '5'
* IMPORTING
* RETURNCODE =
tables
fields = ival.
start-of-selection.
write:/ value1.
Regards,
Rich Heilman
2006 Aug 25 7:36 PM
It appears that there may be a limitation to this function module, as the field must be of character type. So you will need to find a table-field combination which will give you a character field with a description like "lines" or "rows" or whatever you want.
report zrich_0001.
data: ival type table of sval with header line.
parameters: p_check type c.
load-of-program.
<b> ival-tabname = 'MARA'.
ival-fieldname = 'MAGRV'.</b>
ival-field_obl = 'X'. " Required Field
append ival.
call function 'POPUP_GET_VALUES'
exporting
popup_title = 'Number of Records:'
tables
fields = ival.
start-of-selection.
read table ival index 1.
write:/ ival-value.
Regards,
Rich Heilman
2006 Aug 25 7:47 PM
For example, this structure field seems to be a good fit.
report zrich_0001.
data: ival type table of sval with header line.
parameters: p_check type c.
load-of-program.
<b> ival-tabname = 'YBAPIPQMPR'.
ival-fieldname = '2NMAXR'.</b>
ival-field_obl = 'X'. " Required Field
append ival.
call function 'POPUP_GET_VALUES'
exporting
popup_title = 'Number of Records:'
tables
fields = ival.
start-of-selection.
read table ival index 1.
write:/ ival-value.
Please be sure to award points for helpful answers and mark your post as solved when solved completely. Thanks
Regards,
Rich Heilman
2006 Aug 28 9:06 AM
Thanks Rich for all the inputs .
whenever i find time i will help others on SDN . You are my inspiration .
Thanks again
2006 Aug 25 6:52 PM
Hi,
Do this in the initlalize event..For the popup use 'REUSE_ALV_POPUP_TO_SELECT'..
Thanks,
Naren
2006 Aug 25 6:53 PM
U can call in the INITIALIZATION event.
But I think the better option will be, to display the pop-up after the user enters the value in the selection screen.
Or U can make a parameter like p_rec type i. And user has to enter the number of records to be displayed.
Regards,
Prakash.
2006 Aug 25 7:21 PM
Hi,
Try this..
SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
PARAMETERS: NUMBER TYPE NUM6 OBLIGATORY.
SELECTION-SCREEN END OF SCREEN 500.
LOAD-OF-PROGRAM.
CALL SELECTION-SCREEN 500 STARTING AT 10 10.
Thanks,
Naren
Message was edited by: Narendran Muthukumaran
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |