People,
I have doubt about Release Strategies in Contracts and Purchase Orders.
Our configuration:
Basic Strategy:
Release Group W0
Release Strategy 01
Advanced Strategy:
Release Group WC
Release Strategy AC
The Classification of "Advanced Strategy" has EKKO-USRC1 = 3.
The scenario is:
The contract starts in '01' strategy. When it is approved in ME35 transaction, the program must check some conditions and then put the contract in 'AC' strategy.
My question is: how can I do this? I noticed that ME35 calls the exit EXIT_SAPLEBND_002. Anyone here is in same situation?
Thanks a lot!!!
Hi,
Sample Code:
DATA : it_bekpo1 LIKE it_bekpo WITH HEADER LINE, lv_flag. CLEAR : lv_flag. it_bekpo1[] = it_bekpo[]. CLEAR it_bekpo1. * excluded from the Release Strategy check. READ TABLE it_bekpo1 INDEX 1. IF it_bekpo1-ebeln+0(2) EQ 'IT'. e_cekko-usrc1 = 'Y'. ELSE. READ TABLE it_bekpo1 WITH KEY loekz = '' konnr = ''. IF sy-subrc EQ 0 . e_cekko = i_cekko. e_cekko-usrc1 = 'N'. ELSE. LOOP AT it_bekpo1 WHERE loekz NE 'X'. IF it_bekpo1-konnr IS INITIAL. lv_flag = 'X'. EXIT. ENDIF. ENDLOOP. IF lv_flag <> 'X'. e_cekko = i_cekko. e_cekko-usrc1 = 'Y'. ENDIF. ENDIF. ENDIF.
I hope this may helpfull.
Thanks,
AMS
Add a comment