Skip to Content
0

Refresh_table_display working only once???

Jan 03, 2017 at 04:45 AM

31

avatar image
Former Member

I have 3 buttons with different sy-ucomm Approve,Hold,Reject.on clicking on approve Traffic light red should appear dynamically,on hold yellow should appear,on red reject should appear.

The question is data is updating in the table but on refreshing on alv at that time using refresh_table_display.

CALL METHOD GRID->CHECK_CHANGED_DATA.
CASE OK_CODE.

CALL METHOD GRID->REFRESH_TABLE_DISPLAY.


WHEN 'APPROVE'.
PERFORM APPROVE.
CALL METHOD GRID->REFRESH_TABLE_DISPLAY.

WHEN 'HOLD'.
PERFORM HOLD.
CALL METHOD GRID->REFRESH_TABLE_DISPLAY.

WHEN 'REJECT'.
PERFORM REJECT.
CALL METHOD GRID->REFRESH_TABLE_DISPLAY.

ENDCASE.

form approve.

READ TABLE IT_FINAL INTO WA_FINAL WITH KEY CHECK = 'X'.
IF SY-SUBRC EQ 0.

LOOP AT IT_FINAL INTO WA_FINAL WHERE CHECK = 'X'. .
WA_FINAL-STATUS = 'APPROVE'.
WA_FINAL-LIGHTS = '@08@'.
MODIFY IT_FINAL FROM WA_FINAL .
ENDLOOP.

MOVE-CORRESPONDING WA_FINAL TO WA_FINAL2.
UPDATE ZLOAN SET STATUS = WA_FINAL2-STATUS
LIGHTS = WA_FINAL2-LIGHTS
WHERE ACNO = WA_FINAL2-ACNO.
DATA::WA_FINAL_Z TYPE ZPAYMENT.
MOVE-CORRESPONDING:WA_FINAL TO WA_FINAL_Z.
INSERT INTO ZPAYMENT VALUES WA_FINAL_Z.
UPDATE ZPAYMENT SET STATUS = WA_FINAL2-STATUS
WHERE ACNO = WA_FINAL2-ACNO.

MESSAGE 'The Loan has been Approved' TYPE 'S'.
CALL METHOD GRID->REFRESH_TABLE_DISPLAY.
ELSE.
MESSAGE 'Please select the Checkbox' TYPE 'E' DISPLAY LIKE 'I'.
ENDIF.

endform.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers