‎2005 Apr 06 2:50 PM
Hi, In my program i used a default seelction screen and 5 user defined selection screen. Based on the selections made in default selection screen, it should go to the corresponding user defined screen.
and the problem iam getting if i press enter jey insted of F8.
""Selection screen ZP2I_MASSCHANGE_TEMP1 1000 was
not called using CALL SELECTION-SCREEN"""
the code is as follows.
************************************************************************
A T S E L E C T I O N-S C R E E N
************************************************************************
*AT SELECTION-SCREEN.
AT SELECTION-SCREEN ON RADIOBUTTON GROUP rgp1.
CHECK SY-UCOMM EQ 'ONLI' OR SY-UCOMM EQ 'CRET' .
Download
IF r_dwnld = c_check.
Material Screen Call
IF r_matplt = c_check.
CLEAR p_werks7.
sree = 'A'.
CALL SELECTION-SCREEN 170.
ENDIF.
Material Storage Screen Call
IF r_matstr = c_check.
CLEAR p_werks1.
sree = 'B'.
CALL SELECTION-SCREEN 110.
ENDIF.
Material Handling Screen Call
IF r_mathan = c_check.
CLEAR p_werks2.
sree = 'C'.
CALL SELECTION-SCREEN 120.
ENDIF.
Material Pick/Up Delivery Screen Call
IF r_pcdt = c_check.
CLEAR p_werks3.
sree = 'D'.
CALL SELECTION-SCREEN 130.
ENDIF.
Material Inboundlogistics Screen Call
IF r_inlogs = c_check.
CLEAR p_werks4.
sree = 'E'.
CALL SELECTION-SCREEN 140.
ENDIF.
Material Packaging Screen Call
IF r_pkng = c_check.
CLEAR p_werks5.
sree = 'F'.
CALL SELECTION-SCREEN 150.
ENDIF.
ENDIF.
Upload Screen Call
IF r_upld = c_check.
IF ( r_matplt = c_check OR
r_matstr = c_check OR
r_mathan = c_check OR
r_pcdt = c_check OR
r_inlogs = c_check OR
r_pkng = c_check ).
CLEAR p_uload.
sree = 'G'.
CALL SELECTION-SCREEN 160.
ENDIF.
ENDIF.
************************************************************************
s T A R T - O F - S E L E C T I O N
************************************************************************
START-OF-SELECTION.
DOWNLOAD
CASE sree.
WHEN 'A'.
Select Material Details
PERFORM get_material_data.
IF NOT tbl_matplt[] IS INITIAL.
IF p_dalv7 = c_check.
Display list in ALV
PERFORM setup_alv_report.
ELSE.
Download Storage data into local file
PERFORM download_file USING p_matdet.
ENDIF.
ELSE.
MESSAGE s020.
ENDIF.
CALL SELECTION-SCREEN 170.
Select Material storage data
WHEN 'B'.
PERFORM get_storage_data.
IF NOT tbl_matstr[] IS INITIAL.
IF p_dalv1 = c_check.
Display list in ALV
PERFORM setup_alv_report.
ELSE.
Download Storage data into local file
PERFORM download_file USING p_matstr.
ENDIF.
ELSE.
MESSAGE s020.
ENDIF.
CALL SELECTION-SCREEN 110.
Select Material Handling data
WHEN 'C'.
PERFORM get_materialhandling.
IF NOT tbl_mathand[] IS INITIAL.
IF p_dalv2 = c_check.
Display list in ALV
PERFORM setup_alv_report.
ELSE.
Download Material Handling data into local file
PERFORM download_file USING p_mathan.
ENDIF.
ELSE.
MESSAGE s020.
ENDIF.
CALL SELECTION-SCREEN 120.
Select Pick/Up DayTime data
WHEN 'D'.
PERFORM get_pickup_delivery.
IF NOT tbl_pcdel[] IS INITIAL.
IF p_dalv3 = c_check.
Display list in ALV
PERFORM setup_alv_report.
ELSE.
Download Pick/Up DayTime data into local file
PERFORM download_file USING p_pcdt.
ENDIF.
ELSE.
MESSAGE s020.
ENDIF.
CALL SELECTION-SCREEN 130.
Select Inbound Logistics data
WHEN 'E'.
PERFORM get_inboundlogistics.
IF NOT tbl_inlog[] IS INITIAL.
IF p_dalv4 = c_check.
Display list in ALV
PERFORM setup_alv_report.
ELSE.
Download Inbound Logistics data into local file
PERFORM download_file USING p_inlogs.
ENDIF.
ELSE.
MESSAGE s020.
ENDIF.
CALL SELECTION-SCREEN 140.
Select Packaging data
WHEN 'F'.
PERFORM get_packaging.
IF NOT tbl_pkng[] IS INITIAL.
IF p_dalv5 = c_check.
Display list in ALV
PERFORM setup_alv_report.
ELSE.
Download Packaging data into local file
PERFORM download_file USING p_pkng.
ENDIF.
ELSE.
MESSAGE s020.
ENDIF.
CALL SELECTION-SCREEN 150.
WHEN 'G'.
Material Details data upload
IF r_matplt = c_check.
Free memory IDs corresponding to upload tables
PERFORM free_memory.
Upload Material details from local file
PERFORM load_file USING p_uload.
Prepare data
PERFORM prepare_mat_data.
Get actual Material Details from ZP2_MATPLT
PERFORM get_old_material_data.
Validate new data against database entries
PERFORM validate_material_data.
Check Plant authorization
Move plants to itab.
REFRESH tbl_plts.
LOOP AT tbl_matplt.
tbl_plts-werks = tbl_matplt-werks.
APPEND tbl_plts.
CLEAR tbl_plts.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM tbl_plts
COMPARING werks.
Check authoriztions
PERFORM check_plant_authorization1 TABLES tbl_plts.
REFRESH tbl_plts.
IF p_trun IS INITIAL.
Modify material data
PERFORM modify_zp2_matplt.
ENDIF.
Material Storage data upload
IF r_matstr = c_check.
Free memory IDs corresponding to upload tables
PERFORM free_memory.
Upload material storage data from local file
PERFORM load_matstr_data USING p_uload.
PERFORM load_file USING p_uload.
Get the material storage data from database
PERFORM get_old_storage_data.
Get material plant data for the corresponding
Storage data.
PERFORM get_matplt_data_storage.
Get data from table fields
PERFORM get_tblfld_values.
Validate data against database entries
PERFORM validate_storage_data.
Check Plant authorization
Move plants to itab.
REFRESH tbl_plts.
LOOP AT tbl_matstr.
tbl_plts-werks = tbl_matstr-werks.
APPEND tbl_plts.
CLEAR tbl_plts.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM tbl_plts
COMPARING werks.
Check authoriztions
PERFORM check_plant_authorization1 TABLES tbl_plts.
REFRESH tbl_plts.
IF p_trun IS INITIAL.
Modify material storage data
PERFORM modify_zp2matstr_table.
ENDIF.
ENDIF.
Material Handling data upload
IF r_mathan = c_check.
Free memory IDs corresponding to upload tables
PERFORM free_memory.
Upload material Handling data from local file
PERFORM load_file USING p_uload.
Get the material Handling data from database
PERFORM get_old_materialhandling.
Get material plant data for the corresponding
handling data.
PERFORM get_matplt_data_handling.
Validate data against database entries
PERFORM validate_handling_data.
Check Plant authorization
Move plants to itab.
REFRESH tbl_plts.
LOOP AT tbl_mathand.
tbl_plts-werks = tbl_mathand-werks.
APPEND tbl_plts.
CLEAR tbl_plts.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM tbl_plts
COMPARING werks.
Check authoriztions
PERFORM check_plant_authorization1 TABLES tbl_plts.
REFRESH tbl_plts.
IF p_trun IS INITIAL.
Modify material handling data
PERFORM modify_zp2mathand_table.
ENDIF.
ELSEIF sy-ucomm = c_s.
LEAVE SCREEN.
ENDIF.
Material Pick/Up DayTime data upload
IF r_pcdt = c_check.
Free memory IDs corresponding to upload tables
PERFORM free_memory.
Upload Pick/Up DayTime file data from local file
PERFORM load_file USING p_uload.
Get the Pick/Up DayTime data from database
PERFORM get_old_pickup_delivery.
Get Inbound logistics data corresponding to handling
PERFORM get_inlogs_pcdel.
Validate data against database entries
PERFORM validate_pcdel_data.
Check Plant authorization
Move plants to itab.
REFRESH tbl_plts.
LOOP AT tbl_pcdel.
tbl_plts-werks = tbl_pcdel-werks.
APPEND tbl_plts.
CLEAR tbl_plts.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM tbl_plts
COMPARING werks.
Check authoriztions
PERFORM check_plant_authorization1 TABLES tbl_plts.
REFRESH tbl_plts.
IF p_trun IS INITIAL.
Modify Pick/Up DayTime table
PERFORM modify_zp2pcdt_table.
ENDIF.
ELSEIF sy-ucomm = c_s.
LEAVE SCREEN.
ENDIF.
Material Inbound Logistics data upload
IF r_inlogs = c_check.
Free memory IDs corresponding to upload tables
PERFORM free_memory.
Upload Inbound Logistics file data from local file
PERFORM load_file USING p_uload.
Get the Inbound Logistics data from database
PERFORM get_old_inboundlogistics.
Get data from table fields
PERFORM get_tblfld_values.
Get Vendor data
PERFORM get_vendor_inlog.
Get material plant data for the corresponding
Inboundlogistics data.
PERFORM get_matplt_data_inlog.
Validate data against database entries
PERFORM validate_inlog_data.
Check Plant authorization
Move plants to itab.
REFRESH tbl_plts.
LOOP AT tbl_inlog.
tbl_plts-werks = tbl_inlog-werks.
APPEND tbl_plts.
CLEAR tbl_plts.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM tbl_plts
COMPARING werks.
Check authoriztions
PERFORM check_plant_authorization1 TABLES tbl_plts.
REFRESH tbl_plts.
IF p_trun IS INITIAL.
Modify Inbound Logistics table
PERFORM modify_zp2inlog_table.
ENDIF.
ENDIF.
Packaging data upload
IF r_pkng = c_check.
Free memory IDs corresponding to upload tables
PERFORM free_memory.
Upload Packaging file data from local file
PERFORM load_file USING p_uload.
Get the Packaging data from database
PERFORM get_old_packaging.
Get material plant data for the corresponding
Packaging data.
PERFORM get_matplt_data_pkng.
Get Vendor data
PERFORM get_vendor_pkng.
Get data from table fields
PERFORM get_tblfld_values.
Load Primary container reference data
PERFORM primary_container_data.
Validate data against database entries
PERFORM validate_packaging_data.
Check Plant authorization
Move plants to itab.
REFRESH tbl_plts.
LOOP AT tbl_pkng.
tbl_plts-werks = tbl_pkng-werks.
APPEND tbl_plts.
CLEAR tbl_plts.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM tbl_plts
COMPARING werks.
Check authoriztions
PERFORM check_plant_authorization1 TABLES tbl_plts.
REFRESH tbl_plts.
IF p_trun IS INITIAL.
Modify Packaging data
PERFORM modify_zp2pckg_table.
ENDIF.
ENDIF.
ENDIF.
IF p_trun = c_check.
*
Display the Error list
PERFORM display_result.
CALL SELECTION-SCREEN 160.
ENDIF.
ENDCASE.
Another problem is If i press BACK on the report output, it is coming to the default selection screen. and my requirement is, it should come to the corressponding user defined selection screen and not the default selection screen.
PLz help me in this regard.. Iam breaking my heading, but could not able to solve it.
Thanks in advance
sree
‎2005 Apr 06 3:12 PM
Hello,
You must have defined user command for the radio button. This is not required. Just try putting it in at selection screen. AT SELECTION-SCREEN ON RADIOBUTTON GROUP rgp1.
the moment the user clicks the radio button it will go to this event and call the screen. Just use AT SELECTION-SCREEN.
Regards,
Shekhar Kulkarni
‎2005 Apr 06 4:06 PM
When the user exits using F3, your program is restarted and the default selection screen is displayed. If you want the user defined selection screen to be redisplayed, then you need to put the CALL SELECTION-SCREEN command in a DO loop until you decide to exit based on the users actions.
‎2005 Apr 06 4:20 PM
Hi Sree,
Can you please post your selection screen definition?
Regards,
Srinivas