Posted: Mon Feb 01, 2010 2:19 pm Post subject: Пакетный ввод в транзакции migo
Здравствуйте!
Проблема состоит в следующем: необходимо заполнить все поля проводки переноса программно. При этом не получается заполнить поле GODYNPRO-CHARG. Вылазит ошибка: "Недопустимый ввод".
****************alv_user_command*********************
form alv_user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
case r_ucomm.
when 'WROUT'.
refresh migo_bdc_tab.
Попробывал использовать BAPI_GOODSMVT_CREATE, тоже не получается. Пишет, что движения материала с видом движения 961 невозможно. Код следующий:
BHeader type BAPI2017_GM_HEAD_01,
BHeaderR type BAPI2017_GM_HEAD_RET,
BItems type BAPI2017_GM_ITEM_CREATE occurs 10 WITH HEADER LINE,
BReturn type BAPIRET2 occurs 10 WITH HEADER LINE.
****************alv_user_command*********************
form alv_user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
case r_ucomm.
when 'WROUT'.
perform make_movement.
endcase.
endform.
****************make_movement*********************
form make_movement.
perform make_header.
perform make_items.
loop at BReturn.
if BReturn-TYPE = 'E'.
MESSAGE ID BRETURN-ID type BRETURN-TYPE number BRETURN-NUMBER
WITH BRETURN-MESSAGE_V1 BRETURN-MESSAGE_V2
BRETURN-MESSAGE_V3 BRETURN-MESSAGE_V4.
endif.
endloop.
endform.
С помощью BAPI_GOODSMVT_CREATE невозможно провести 961 движение. Не одна из транзакций, используемых в BAPI_GOODSMVT_CREATE, не поддерживает этот вид движения.
Age: 46 Joined: 05 Nov 2007 Posts: 725 Location: КраснАдар
Posted: Tue Feb 02, 2010 12:23 pm Post subject:
У меня формируется документ по 04 типу.
Code:
TABLES: mara, mseg.
PARAMETERS: p_matnr TYPE matnr OBLIGATORY,
p_werks TYPE werks_d OBLIGATORY,
p_lgort TYPE lgort_d OBLIGATORY,
p_aufnr TYPE aufnr,
p_test AS CHECKBOX,
p_code TYPE gm_code DEFAULT '04'.
DATA: gs_code TYPE bapi2017_gm_code,
header TYPE bapi2017_gm_head_01,
items TYPE TABLE OF bapi2017_gm_item_create,
item TYPE bapi2017_gm_item_create,
return TYPE TABLE OF bapiret2.
START-OF-SELECTION.
SELECT SINGLE * FROM mara WHERE matnr = p_matnr.
SELECT SINGLE * FROM mseg WHERE matnr = p_matnr
AND werks = p_werks
AND lgort = p_lgort.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.