2015 Jul 25 11:47 AM
Hi experts !
I want to create an outbound delivery for a document with 3 items , but for one of these items ,there is a problem for exp.After calling GN_DELIVERY_CREATE Function , the function create a document in likp with 2 items , but steel
there is a problem for the last item , a problem is : the function doesn't show which item have problem and for
which items it created a delivery , but there is a table xvbfs , whenever the function have a problem this
table is not empty and there is a record with status 'E' .
for solving this problem after calling the function I check is this table initial or not and if the table xvbfs is not initial
i try to roll back , but the roll back didn't work , and the record still exist in likp and lips table , the calling form of this
Function is like this :
CALL FUNCTION 'GN_DELIVERY_CREATE'
EXPORTING
vbsk_i = wa_vbsk
vbls_pos_rueck = 'X'
if_no_deque = 'X'
TABLES
xkomdlgn = it_komdlgn
xvbfs = it_vbfs
xvbls = it_vbls
xxlips = it_lips
it_gn_partner = it_partner.
P_ERR = Zkkk=>GET_Msg( P_VBFS = IT_VBFS ). " this method will return the error message
IF P_ERR IS NOT INITIAL.
ROLLBACK WORK .
LOOP AT P_ZMTC into wa.
ME->__MARK_AS_ERROR( P_ERR_MSG = P_ERR P_WA = WA ). " all records will update with 'E' status because I don't know which record
have a problem.
ENDLOOP.
ELSE.
thank you for the time .
2015 Jul 25 12:50 PM
Guys the answer was so easy :
CALL FUNCTION 'GN_DELIVERY_CREATE'
EXPORTING
vbsk_i = wa_vbsk
vbls_pos_rueck = 'X'
if_no_deque = 'X'
TABLES
xkomdlgn = it_komdlgn
xvbfs = it_vbfs " the items which has a problem
xvbls = it_vbls " the items which delivered without problem
xxlips = it_lips
it_gn_partner = it_partner.
2015 Jul 25 12:50 PM
Guys the answer was so easy :
CALL FUNCTION 'GN_DELIVERY_CREATE'
EXPORTING
vbsk_i = wa_vbsk
vbls_pos_rueck = 'X'
if_no_deque = 'X'
TABLES
xkomdlgn = it_komdlgn
xvbfs = it_vbfs " the items which has a problem
xvbls = it_vbls " the items which delivered without problem
xxlips = it_lips
it_gn_partner = it_partner.