SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

BAPI_GOODSMVT_CREATE для 311 ВДв



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
dev403k
Участник
Участник



Joined: 15 Jun 2010
Posts: 13

PostPosted: Tue Apr 26, 2011 3:08 pm    Post subject: BAPI_GOODSMVT_CREATE для 311 ВДв Reply with quote

Программно создаю документ перемещения по 311 ВДв с помощбю ФМ BAPI_GOODSMVT_CREATE.
Не могу победить ошибку: M7300 - Позиции не перенесены.
Будем благодарны за подсказку:

Code:
gmhead-pstng_date = zw_move_stock-dtrack."'20110111'.
  gmhead-doc_date   = zw_move_stock-dtrack."'20110111'.
  gmhead-header_txt = 'n1'.
  gmhead-pr_uname   = sy-uname.                  "полльзователь
  gmcode-gm_code     = '04'.

  itab-material      = zw_move_stock-matnr.             "материал
  itab-entry_qnt    = zw_move_stock-ttrack.             "количество
  itab-plant           = '0010'.                                      "завод
  itab-stge_loc      = zw_move_stock-lgort.                "Склад
  itab-move_stloc  = zw_move_stock-umlgo.             "Склад получ
  itab-entry_uom   = 'TO'.                                        " Единица измерения ввода ('TO')
  itab-move_type   = '311'.                                       "в/о
  itab-move_mat    = zw_move_stock-matnr.             "материал
  itab-move_plant   = '0010'.                                    "завод

  CALL FUNCTION 'BAPI_GOODSMVT_CREATE'                         " Вызов ФМ по загрузке поступления материалов на склад
     EXPORTING
       goodsmvt_header             = gmhead
       goodsmvt_code               = gmcode
     IMPORTING
       materialdocument =  document
       matdocumentyear  =  documentyear
     TABLES
       goodsmvt_item               = itab
       return                      = errmsg .
Back to top
View user's profile Send private message
Sed0Y
Специалист
Специалист


Age: 41
Joined: 17 Mar 2010
Posts: 88
Location: Ukraine - Kiev

PostPosted: Tue Apr 26, 2011 5:44 pm    Post subject: Reply with quote

укажите код транзакции для движения материала BAPI

Code:
  CALL FUNCTION 'BAPI_GOODSMVT_CREATE' 
     EXPORTING
       goodsmvt_header             = gmhead
      GOODSMVT_CODE                 = 'тут номер'  " <---
Back to top
View user's profile Send private message
Dmitriy
Аналитик
Аналитик


Age: 47
Joined: 14 Nov 2008
Posts: 300
Location: Russia

PostPosted: Tue Apr 26, 2011 5:47 pm    Post subject: Reply with quote

dev403k wrote:
Не могу ... M7300 - Позиции не перенесены. Будем...

Будем!
Sed0Y wrote:
укажите код транзакции для движения материала BAPI

Code:
gmcode-gm_code     = '04'.

Exclamation

_________________
ABAP/4 You
Back to top
View user's profile Send private message
dev403k
Участник
Участник



Joined: 15 Jun 2010
Posts: 13

PostPosted: Wed Apr 27, 2011 11:51 am    Post subject: Reply with quote

Спасибо всем.
Я разобралась. Банально, но забыла поставить
Code:
APPEND ITAB.
Иногда такое случается. Embarassed
Back to top
View user's profile Send private message
Dmitriy
Аналитик
Аналитик


Age: 47
Joined: 14 Nov 2008
Posts: 300
Location: Russia

PostPosted: Wed Apr 27, 2011 1:11 pm    Post subject: Reply with quote

dev403k wrote:
Code:
APPEND ITAB.
Embarassed

Лучше не используйте HEADER LINE таблицы как рабочую область. Народ, кстати, по началу путается ещё вот с этим:
Quote:
If at an operand position of an ABAP statement, you specify the name of internal table itab, it depends on the statement whether the table body or the header line are used. As a rule, all table-specific statements such as SORT or LOOP use the internal table, while all other statements use the header line. Exceptions are - among others - the statements IMPORT and EXPORT.

To address the table body instead of the header line in a statement, you can append [] to the name (or a field symbol or dereferenced data reference):

... itab[] ...

For internal tables without header line, the table body is always used. An internal table with a header line can not be a component of a structure or a row of another internal table.

Note
These statements for processing individual table rows have short forms that implicitly use the header line as work area. These short forms are allowed only outside of ABAP Objects.

_________________
ABAP/4 You
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
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.