[Newbie] Getting Data from a BROWSE

Doc

New Member
Hi,

I have a window with a browse component which returns the result of a query.

I also have a button which should run an update query on another table using the first field of my browse in the where clause.

But now the big question, how does this need to be done? :confused:

Greetings,
Paul
 

bertnaik

New Member
Hope I have understood your question.

A browse lists the result of the query (customer).
The button needs to know the contents of a line in the browse.

So, the code for the button (ON CHOOSE OF BUTTON) might be:

DEF VAR cust_num LIKE customer.cust-num NO-UNDO.

IF AVAILABLE customer THEN DO:
cust_num = customer.cust-num.
RUN update_query (cust_num).
END.

------
procedure update_query.

INPUT PARAM cust_num LIKE customer.cust-num NO-UNDO.

FIND FIRST customer
where customer.cust-num = cust_num NO-ERROR.
IF AVAILABLE customer THEN
UPDATE customer.

end.
 
Top