Selection screen is not executed - report

I'm getting no errors when I activate my abap program but when I try to execute this nothing happens. I previously tried it and it worked. This fragment of code for example was ok before but now it doesn't do anything.
REPORT Z_xx
DATA: lv_response1 TYPE flag,
lv_response2 TYPE flag,
lv_response3 TYPE flag.
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-t01.
PARAMETERS: s1 RADIOBUTTON GROUP g1,
s2 RADIOBUTTON GROUP g1,
s3 RADIOBUTTON GROUP g1,
s4 RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN END OF SCREEN 100.

It is because you defined your radiogroup inside screen 100, and you are executing (implicitly) standard selection screen 1000 which is empty. To use your parameters call your screen 100 like this
CALL SELECTION-SCREEN 100.
Read more about selection screens here to produce functional code.

Related

Multiple altair charts generated by the same cell

I have a list of pandas dataframes I named entries, which I want to visualize after running code from the same cell. Below is the code I used :
alt.data_transformers.disable_max_rows()
for entry in entries :
entry['ds'] = entry.index
entry['y'] = entry['count']
entry['floor'] = 0
serie = alt.Chart(entry).mark_line(size=2, opacity=0.7, color = 'Black').encode(
x=alt.X('ds:T', title ='date'),
y='y'
).interactive().properties(
title='Evolution of '+entry.event.iloc[0]+' events over time'
)
alt.layer(serie)\
.properties(width=870, height=450)\
.configure_title(fontSize=20)
When i run the same code out of the 'for' loop, I get to see the one chart that corresponds to one dataframe, but once I run the code above, I don't get any graphs at all.
Does anyone know why It's not working or how to solve this issue?
TLDR: use chart.display()
Unless a chart appears at the end of the cell, you must manually display it.
By analogy, if you run
x + 1
by itself, Python will display the result. However, if you run
for x in range(10):
x + 1
Python will not display anything, because the last statement in the cell (in this case the for loop) has no return value to display. Instead you have to write
for x in range(10):
print(x + 1)
For altair, the mechanism is similar: if the chart is defined in the last statement in the cell, it will be automatically displayed. Otherwise, you have to manually trigger the display, which you can do using the display method:
for i in range(10:
chart = alt.Chart(...)
chart.display()
For more information on display troubleshooting in Altair, see https://altair-viz.github.io/user_guide/troubleshooting.html

How to fix List Box returning null value using UIA wrapper

I want to access text values from a List BOX (pywinauto uia wrapper)that is nested inside LIST view inside the application used.
code snippet:
#upper window
up_window.ListView.wait('visible').Select('Enforcement').click_input(double=True)
time.sleep(5)
#after this enforcement window opens and i need to select the third tab which is performed below and its working fine.
enfwin = guilib.get_window('Enforcement', backend='uia')
# guilib is user defined library which will retun the window handle
if enf_win.TabControl.get_selected_tab() != 2:
log.debug("Clicking on 'Targets' tab in Enforcement window")
enf_win.TabControl`enter code here`.wait('enabled', timeout=60).select(2)
time.sleep(30)
list_rows = enf_win.ListBox.wait('ready', timeout=60).texts()
dcs_win.ListView.wait('visible').Select('Enforcement').click_input(double=True)
time.sleep(5)
enf_win = guilib.get_window('Enforcement', backend='uia')
if enf_win.TabControl.get_selected_tab() != 2:
log.debug("Clicking on 'Targets' tab in Enforcement window")
enf_win.TabControl.wait('enabled', timeout=60).select(2)
time.sleep(30)
list_rows = enf_win.ListBox.wait('ready', timeout=60).texts()
The problem here is, when I am calling this function two times from script, 1 st run its fetching the list_rows whereas in second run its returning blank. It seems like it needed some time in between. But increasing time is not helping.
Please suggest if any modification I need to do to fetch list box value each time.

Split screens with ALV Grid and Tabstrip control

I would like to ask about proper way to split following screens in ALV:
1st screen with type CL_GUI_ALV_GRID
2nd screen is subscreen with Tab strip control
Using docker there are issues with resizing of screen during the runtime. I am not able to provide ratio for both screen.
Is there a way to use CL_GUI_SPLITTER_CONTAINER also for the screen with Tab strip control ?
Thank you !
The following code reacts to a change of the window height. It does not react to a window width, that's a limit of Dynpro, so most of time it will react to Windows buttons minimize and restore, unless the window is the exact half left or half right of the monitor (combined keys Windows+Left and Windows+Right). SY-SCOLS and SY-SROWS are the only way I know to get the window size when a dynpro screen is displayed, but probably there are other ways.
DATA go_docking TYPE REF TO cl_gui_docking_container.
DATA ok_code TYPE syucomm.
DATA ratio TYPE i VALUE 70.
DATA pixels_by_sy_scol TYPE p DECIMALS 2.
CALL SCREEN 100.
MODULE pbo OUTPUT.
IF go_docking IS INITIAL.
CREATE OBJECT go_docking
EXPORTING
repid = sy-repid
dynnr = sy-dynnr
side = cl_gui_docking_container=>dock_at_left
ratio = ratio.
go_docking->get_extension( IMPORTING extension = DATA(extension) ).
cl_gui_cfw=>flush( ). " to calculate the extension (by default in pixels)
pixels_by_sy_scol = extension * 100 / ratio / sy-scols.
ELSE.
go_docking->set_extension( sy-scols * pixels_by_sy_scol * ratio / 100 ).
ENDIF.
ENDMODULE.

How to make an existing frame responsive in Openedge,progress 4gl

I've an old desktop application developed in progress 4gl.There is a frame contained in a progress window now my task is to make the frame responsive ie based on the size of its container window the frame should resize dynamically.Is it possible in Progress any workaround will be appreciated.Thanks
Once the frame has been "realized" you cannot change its height or width.
Prior to that you can manipulate the geometry via the frame handle.
To change things after the frame has been displayed you will basically need to build a new frame to replace the old one.
I'll assume you don't own the source code. If your window hasn't been set as RESIZE, then there's really no luck.
Otherwise, I created this simple program, which should make it possible to manipulate the window and the frame inside it. Now remember: All fields will have to be manually repositioned inside the frame. You also might want to set session:suppress-warnings to YES before you get this running, because every time a widget doesn't fit the frame, OpenEdge will let you know about it. You might need to cycle all objects inside the frame's field-group, to make it happen. And remember to get fill-ins side-label-handle to move them too, otherwise the fill-in itself moves, but the text stays. It's a lot of work.
So without further ado, the code:
DEFINE VARIABLE hProgram AS HANDLE NO-UNDO.
DEFINE VARIABLE hWindow AS HANDLE NO-UNDO.
DEFINE VARIABLE hFrame AS HANDLE NO-UNDO.
run <ProgramNameGoesHere> persistent set hProgram.
run enable_UI in hProgram.
assign hWindow = hProgram:current-window
hFrame = hWindow:first-child.
/* Resize Variables */
DEFINE VARIABLE dWinXC AS DECIMAL NO-UNDO.
DEFINE VARIABLE dWinYC AS DECIMAL NO-UNDO.
/* /Resize Variables */
ON WINDOW-RESIZED OF hWindow
DO:
/* Defining a minimum size here */
if hWindow:width-chars < 74 or
hWindow:HEIGHT-CHARS < 22 then return no-apply.
run piResize.
END.
procedure piResize:
def var dXC AS DECIMAL NO-UNDO.
def var dYC AS DECIMAL NO-UNDO.
/**--------------------------------- Screen Size ----------------------------**/
assign dXC = dWinXC - hWindow:width-chars
dYC = dWinYC - hWindow:height-chars
dWinXC = hWindow:width-chars
dWinYC = hWindow:HEIGHT-CHARS
/**-------------------------- Objects on Screen -----------------------------**/
hFrame:width = hWindow :WIDTH
hFrame:height = hWindow :HEIGHT no-error.
/**-------------------------------- Frame Sizes -----------------------------**/
ASSIGN hFrame:width = hWindow:width
hFrame:height = hWindow:HEIGHT no-error.
end procedure.
wait-for 'close' of hProgram.
Now, I don't know if this does you any good, since you can't probably interfere with behavior at will. Notice the inclusion of a trigger overrides whatever was there before (since your window did not resize, I don't think it will harm it. But doing that for a widget that already has an event procedure will cause it to stop doing what it currently does (unless you can code it, but again I don't think you have the code).
I apologize for the code not being just the genius patch that Stack Overflow loves so much, but it's a complex issue. Hope it helps.
Oh, and this was made using Progress 10.2B. I imagine if your code is previous to v8, you might be out of luck.

Assembly static code with changing the variables

OK, so I wrote some code: the code needs to print 10 without changing actually the code, just the variables, I wrote it this way but it doesn't work for me, any help? Edit: it has to be with two variables!
//this two lines should be change
num1_ptr dw 10
num1_ptr_ptr dw offset num1_ptr
//no touch this four lines!
mov bx,num1_ptr_ptr
mov bx,[bx]
mov ax,[bx]
call print_function
If this is MASM (mov bx,num1_ptr_ptr does fetch the value, not address), and you "can change these two lines", then maybe this "hack" would do (introducing third value by defining two words at first line):
num1_ptr dw 10, offset num1_ptr
num1_ptr_ptr dw offset num1_ptr+2

Resources