‎2014 Jun 04 1:13 PM
Hi All,
I have a question re subscreen processing.
I have a variable 'PICK' in GUI status of mainscreen(0100) to trap for double click or F2.
I do a GET CURSOR and process the value for the main screen correctly.
This same idea does not seem to work (i.e. The get cursor part does not give me the field value and fieldname ) from the subscreen.
Any Ideas how to get this for the subscreen?
Note that the attributes field, responds to double click is checked for both main and subscreen.
(Code below)
Thanks Tony
MODULE user_command_0100 INPUT.
DATA: lv_field TYPE fieldname,
lv_value(10) TYPE c.
CASE gv_ok_code.
WHEN: 'BACK' OR 'EXIT' OR 'CANC'.
SET SCREEN 0.
WHEN 'PICK'.
GET CURSOR FIELD lv_field VALUE lv_value.
CASE lv_field. *
*These fields are on the mainscreen and the get cursor work OK
WHEN: 'GV_KUNNR1' OR 'GV_KUNNR2'.
SET PARAMETER ID 'BUK' FIELD gv_bukrs.
SET PARAMETER ID 'KUN' FIELD lv_value.
CALL TRANSACTION 'X' AND SKIP FIRST SCREEN.
*These fields are on the subscreen and the get cursor DOES NOT work OK
WHEN: 'GV_KUNNR1_LSTNR' OR 'GV_KUNNR2_LSTNR'.
SET PARAMETER ID 'BUK' FIELD gv_bukrs.
SET PARAMETER ID '/APFSS/LSTNR' FIELD lv_value.
CALL TRANSACTION 'Y' AND SKIP FIRST SCREEN.
ENDCASE.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100
‎2014 Jun 04 3:20 PM
Hi Tony,
Use GET CURSOR in the PAI of the subscreen & assign it to a global variable.
Then in the PAI i.e. USER_COMMAND_0100 module you can read the variable.
Thanks,
Sharath
‎2014 Jun 04 3:39 PM
‎2014 Jun 04 5:42 PM
Thanks for your prompt replies guys, but neither solution has worked, perhaps because I have tabs on my subscreens, see below. Get back to me if you have any other good ideas or need further info.
Thanks
Tony
‎2014 Jun 06 2:11 PM
Answer to 1
I hope you did not declare the function code associated to double-click as an exit function code, and that the module which manage the function code is not executed before the call subscreen
process after input.
module pai1 at exit-command.
call subscreen sub1.
call subscreen sub2.
module pai2.
Same logic (without user command management) in embedded subscreens.
Answer to 2 has already been provided by Sharath
Regards,
Raymond
‎2014 Jun 06 2:30 PM
the FIELD must be globally defined...and not local.
Can you check that the field defined is in the top include or in a global include of your module.
‎2014 Jun 23 10:28 AM
Thanks for all your replies, but I had all your suggested points covered. In the end I just attached a button adjacent to the field with an sy-ucomm assigned to it, and checked for that in the PAI of main screen. Best Regards Tony
‎2014 Jun 23 10:33 AM