锁PO和SO
锁PO
CALL FUNCTION 'ENQUEUE_EMEKKOE'
锁PO CALL FUNCTION 'ENQUEUE_EMEKKOE' EXPORTING EBELN = LS_DOCNO-VGBEL EXCEPTIONS FOREIGN_LOCK = 1 SYSTEM_FAILURE = 2. IF SY-SUBRC <> 0. CALL FUNCTION 'BALW_BAPIRETURN_GET2' EXPORTING TYPE = SY-MSGTY CL = SY-MSGID NUMBER = SY-MSGNO PAR1 = SY-MSGV1 PAR2 = SY-MSGV2 PAR3 = SY-MSGV3 PAR4 = SY-MSGV4 IMPORTING RETURN = LS_RETURN. APPEND LS_RETURN TO RETURN. ENDIF. 锁SO CALL FUNCTION 'ENQUEUE_EVVBAKE' EXPORTING VBELN = LS_DOCNO-VGBEL EXCEPTIONS FOREIGN_LOCK = 1 SYSTEM_FAILURE = 2. IF SY-SUBRC <> 0. CALL FUNCTION 'BALW_BAPIRETURN_GET2' EXPORTING TYPE = SY-MSGTY CL = SY-MSGID NUMBER = SY-MSGNO PAR1 = SY-MSGV1 PAR2 = SY-MSGV2 PAR3 = SY-MSGV3 PAR4 = SY-MSGV4 IMPORTING RETURN = LS_RETURN. APPEND LS_RETURN TO RETURN. ENDIF.
I