Quantcast
Channel: SCN: Message List - SAP Extended Warehouse Management (SAP EWM)
Viewing all articles
Browse latest Browse all 5578

Re: Inbound delivery: Overdelivery / sending process code I002 by ABAP

$
0
0

Dear experts I got it solved.

 

Basically it works as already suspected via sending a process code (not exception code). This can be reached by calling the service provider with the method EXECUTE to perform the action, e.g.

 

CALL METHOD lo_sp->/scdl/if_sp1_action~execute
     EXPORTING
       aspect       = '/SCDL/S_SP_A_ITEM'
       inkeys       = <lt_keys_work>
       inparam      = <ls_inparam>
       action       = '/SCDL/ACT_EXECUTE_ACTION'
*     relation_inkey     =
*     relation     =
     IMPORTING
       outrecords   = lt_outrecords
*     rejected     = lv_rejected
       return_codes = lt_return_codes
*     relation_outrecord = <ls_rel_outrecord>.


This will trigger an action for the delivery item. The type of action is then specified in the inparam which would look like this for the process code I002:


   ls_inparam-action_code = '028'. "delivery change
   CREATE DATA ls_inparam-action_control TYPE /scdl/bo_action_adjqty_str.
   ASSIGN ls_inparam-action_control->* TO <ls_pcode>.
   <ls_pcode>-prcode = 'I002'. "process code


It should run in this sequence:


  1. Set the warehouse number: /scwm/cl_tm=>set_lgnum( EXPORTING iv_lgnum = l_lgnum ).
  2. Create the service provider (in my case of type /scdl/cl_sp_prd_inb)
  3. Lock the delivery: CALL METHOD lo_sp->/scdl/if_sp1_locking~lock
  4. Select the aspect: CALL METHOD lo_sp->/scdl/if_sp1_aspect~select
  5. Call the method as shown above
  6. Save the transaction: CALL METHOD lo_sp->/scdl/if_sp1_transaction~save
  7. Unlock and clean-up: CALL METHOD lo_sp->/scdl/if_sp1_transaction~cleanup


I hope this might help anyone with a similar topic.


Gunter


Viewing all articles
Browse latest Browse all 5578

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>