Skip to Content
2
Mar 07 at 03:38 AM

Do 10 Times

117 Views

Hi All,

Good day, I need opinion on this DO X Times logic.

Recently we facing many implementation using this syntax. Reason was , SAP database not updating immediately even after TRANSACTION COMMIT with WAIT.

For example, after called BAPI_PRODORD_CHANGE to change the Production Order Document and called BAPI_TRANSACTION_COMMIT with parameter = WAIT.

Unfortunately Total Order Quantity (AFKO-gamng) still not immediately updated. So developer need to

Do 10 Times,

CLEAR lv_gamng.
SELECT SINGLE
gamng
FROM afko
INTO @lv_gamng
WHERE aufnr = @vl_orderno.
IF l_gamng = iv_order-qty_assigned.
EXIT.
ENDIF.
ENDDO.

I would like to double check, any other alternative solution instead of using DO X Time ?

Many thanks.

Best Regards,

CTK