You are on page 1of 8

Membuat Routine baru untuk create automatic

Inbound SPED
Tcode VOFM
1

2 Untuk SPED routine adalah 408 dan 409

Double click di dua nomor itu dan copy spec yang ada
*&--------------------------------------------------------------------*
*&
Form KOBED_408
*&--------------------------------------------------------------------*
*
text
*---------------------------------------------------------------------*
form kobed_408.
* SPE Output Control for Outbound Deliveries
constants: lc_gi_posted type wbstk value 'C'.

data: lt_return
lf_leave
ls_cd_docflow
lv_cdrel(1)
lv_noitem
lv_sped_rel

type
type
type
type
type
type

bapirettab,
xfeld,
/spe/cd_docflow_vb,
c,
c,
boolean.

"n_1879850
"n_1879850

* If in the current transaction a goods issue for a delivery is posted,


* then the output should be created
sy-subrc = 4.
clear lv_sped_rel.
* If receiving plant is initial the output should be created
* in case of supplier cross-docking only
if komkbv2-werks is initial.
call method /spe/cl_cd_docflow=>read_source
exporting
if_delivery
= komkbv2-vbeln
importing
es_cd_docflow = ls_cd_docflow
exceptions
no_cd_process = 1
others
= 2.
ENHANCEMENT-SECTION
EHP_KOBED_408_01 SPOTS ES_SAPLV61B_VN.
if sy-subrc ne 0.
sy-subrc = 4.
return.
endif.
if ls_cd_docflow-dlv_category ne '7'.
sy-subrc = 4.
return.
endif.
END-ENHANCEMENT-SECTION.
*$*$-Start: EHP_KOBED_408_01-------------------------------------------------------ENHANCEMENT 1 EHP_SFWS_LV61B408.
"active version
if sy-subrc ne 0.
*Check the 2-step stock transfer scenario in addition
perform spe_sped_relevancy in program sapmv50a
using komkbv2-vbeln
lv_sped_rel.
if lv_sped_rel is initial.
sy-subrc = 4.
return.

endif.
else.
if ls_cd_docflow-dlv_category ne '7'.
sy-subrc = 4.
return.
endif.
endif..
ENDENHANCEMENT.
*$*$-End:
EHP_KOBED_408_01-------------------------------------------------------endif.
* Check for cross-docking
clear lv_cdrel.
perform cd_relevance_check in program sapmv50a
using komkbv2-vbeln
lv_cdrel
lv_noitem.
* Not cross docking
if lv_cdrel is initial and
lv_noitem IS INITIAL.
* First check if the current status of delivery is 'GI posted',
if komkbv2-wbstk = lc_gi_posted.
*
check if the subsequent inbound exists
"v_n_1879850
perform check_subsequent_exist in program /spe/sto_id_processing
using komkbv2-vbeln 'X'
changing lt_return[] lf_leave.
if lf_leave is initial.
sy-subrc = 0.
else.
sy-subrc = 4.
endif.
"^_n_1879850
endif.
else.
sy-subrc = 4.
endif.
endform.
"KOBED_408
*&--------------------------------------------------------------------*
*&
Form KOBEV_408
*&--------------------------------------------------------------------*
*
text
*---------------------------------------------------------------------*

form kobev_408.
endform.

"KOBEV_408

Back dan scroll ke bawah untuk membuat routine nomor kepala


3 9xx

akan diminta access key (minta sama BASIS) setelah itu copy kan programnya plus ditamba
barunya.
Nomor routine yang sudah dibuat baru dimasukan ke dalam setingan output
4 routine SPED

5 Aktivasi routine via se38


RV80HGEN

You might also like