2023 May 17 8:24 AM
Hello Experts, im trying to call some subscreens with a dropdown box. the problem is, the report will starts only if i but the variable gv_screen TYPE SY-DYNNR VALUE '0001'
with a screen name. and if i want to choose another option in the dropdown box in wont worke. can u guys assest me with this? main report:
DATA: gv_screen TYPE SY-DYNNR VALUE '0001'.
INCLUDE zwf10164_top.
PARAMETERS:
p_vbeln TYPE vbeln,
p_chgno TYPE zchangeno.
START-OF-SELECTION.
gv_vbeln = p_vbeln.
SET PARAMETER ID 'AUN' FIELD gv_vbeln.
CALL SCREEN 0100.
include:
MODULE get_data OUTPUT.
SELECT SINGLE FROM vbpa
FIELDS land1
WHERE vbeln = @gv_vbeln AND
parvw = 'ZZ'
INTO @gs_bottlr_data_s-land1.
ENDMODULE.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN'.
IF gs_bottlr_data_s-preform = '2'.
gv_screen = '0001'.
ELSEIF gs_bottlr_data_s-preform = '3'.
gv_screen = '0002'.
ELSEIF gs_bottlr_data_s-preform = '4'.
gv_screen = '0003'.
ELSEIF gs_bottlr_data_s-preform = '5'.
gv_screen = '0004'.
ENDIF.
ENDMODULE.
2023 May 17 8:48 AM
I can't understand what is the problem here. Are you trying to create a parameter with dropdown option but have no idea how?
2023 May 17 8:57 AM
the normal screen: 0100
subscreens: 0001, 0002, 0003, 0004.
so when is start the programm there is a dropdown box and if is select the first opstion it should call subscreen 0001 and the second option should call subscreen 0002 and so on...
but when i change the option it gives me a error that is the problem
2023 May 17 10:52 AM
is it run time error? please provide screenshot of it as it might give clearer information. Also, if possible, do provide the syntax for screen 0100 for both PBO and PAI.
Is the dropdown field name GS_BOTTLR_DATA_S-PREFORM? and is it being declared and used in screen 0100?
2023 May 17 12:17 PM
the dropdwon box names GS_BOTTLR_DATA_S-PREFORM.
error is : dynpro 0006 is not found even tho i dont have that dynpro
this is my include i did some updates:
this is from normal screen :
2023 May 19 3:14 AM
the error does not make sense indeed. It is impossible to change into unknown screen without any code interferences.
Have you tried to debug the moment you change the dropdown value to check at which point the gv_screen value changed into 0006?
2023 May 19 8:56 AM
It's not recommended to have duplicate code: it's the same to initialize GV_SCREEN in PBO and PAI. Anyway, you should initialize GV_SCREEN only in PBO.
2023 May 19 9:52 AM
xiswanto this is the problem, in user_command_0101 the gv_screen changes to the right screen but after the module ends the error comes. i cant track the gv_screen after this module.
2023 May 22 4:28 AM
aboooood did it changed into 0006 value or the correct screen value? also, try to rearrange the line position of the code below
PAI
MODULE user_command_0100.
MODULE user_command_0101.
CALL SUBSCREEN SUB
into these
PAI
CALL SUBSCREEN SUB
MODULE user_command_0100.
MODULE user_command_0101.
2023 May 22 8:26 AM
xiswanto i tried this before but didnt work. guess what, i just made a new report and mad a copy of the old report and now it works somehow 😕
2023 May 22 8:29 AM
2023 May 22 8:36 AM
aboooood Thanks for feedback. By the way, I see that xiswanto typed manually the code, so please in the future paste ABAP code as text instead of image, so that it's easier for anyone to rearrange your code.
2023 May 22 10:19 AM
2023 May 22 12:34 PM