cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_GOODSMVT_CREATE's date fields in parameter GOODSMVT_HEADER

dru_marcellana
Participant
0 Kudos

Hi all!

  I am using the BAPI_GOODSMVT_CREATE inside a JRA. I have a problem when I generate the request/response documents for this BAPI.

  The parameter GOODSMVT_HEADER has the following fields:

  • PSTNG_DATE
  • DOC_DATE
  • REF_DOC_NO
  • BILL_OF_LADING
  • GR_GI_SLIP_NO
  • PR_UNAME
  • HEADER_TXT
  • VER_GR_GI_SLIP
  • VER_GR_GI_SLIPX
  • EXT_WMS
  • REF_DOC_NO_LONG
  • BILL_OF_LADING_LONG
  • BAR_CODE

But the JRA block doesn't generate the right response parameters under INPUT>GOODSMVT_HEADER.

The fields

  • PSTNG_DATE
  • DOC_DATE are shown in request>INPUT bu not included in the node GOODSMVT_HEADER.

Has anyone encountered this?

MII is 12.1.7.50

Thanks!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Am New to MII,But i have tried goods movement using JCO and it worked fine.

In request of bapi you can give Posting Date as:when you post the document.

But in Response bapi you can see only MAT_DOC : It is unique Document number posted .

and DOC_YEAR : Year of document posted.

Hope below screenshot helps you.

Thanks

Supriya

agentry_src
Active Contributor
0 Kudos

Hi Supriya,

The dates need to be in standard SAP format (YYYYMMDD), not in xml format.  It also looks like you only have three fields populated, but that may be the limitation of the image.  Please go to either t-codes SE37 or BAPI in your ERP system and do some testing on which fields need to be populated. 

Most of the fields which need to be populated are not in the Header.  Please post your INPUT node links and your TABLES node links.  I would also download the SAP Function Modules project from SCN to see examples of how to correctly structure your GoodsMvt BAPI links.  It will save you a lot of re-inventing of the wheel.

Regards, Mike

Message was edited by: Michael Appleby

Former Member
0 Kudos

Hi Michael,

The complete inputs required are with INPUT node links and TABLES node links :

Input Node links :

SAP_JCo_Interface_0.Request{/BAPI_GOODSMVT_CREATE/INPUT/GOODSMVT_CODE/GM_CODE}:"02"

SAP_JCo_Interface_0.Request{/BAPI_GOODSMVT_CREATE/INPUT/GOODSMVT_HEADER/PSTNG_DATE} :datetoxmlformat(Transaction.docdt,"yyyy-MM-dd")

SAP_JCo_Interface_0.Request{/BAPI_GOODSMVT_CREATE/INPUT/GOODSMVT_HEADER/DOC_DATE} : datetoxmlformat(Transaction.docdt,"yyyy-MM-dd")

TABLES node links :

SAP_JCo_Interface_0.Request{/BAPI_GOODSMVT_CREATE/TABLES/GOODSMVT_ITEM/item/MATERIAL} : Transaction.Material

SAP_JCo_Interface_0.Request{/BAPI_GOODSMVT_CREATE/TABLES/GOODSMVT_ITEM/item/PLANT} : Transaction.plant

SAP_JCo_Interface_0.Request{/BAPI_GOODSMVT_CREATE/TABLES/GOODSMVT_ITEM/item/STGE_LOC} : Transaction.Stgloc

SAP_JCo_Interface_0.Request{/BAPI_GOODSMVT_CREATE/TABLES/GOODSMVT_ITEM/item/MOVE_TYPE} : Transaction.MvtType

SAP_JCo_Interface_0.Request{/BAPI_GOODSMVT_CREATE/TABLES/GOODSMVT_ITEM/item/ORDERID} : Transaction.order

SAP_JCo_Interface_0.Request{/BAPI_GOODSMVT_CREATE/TABLES/GOODSMVT_ITEM/item/MVT_IND} : "F"

SAP_JCo_Interface_0.Request{/BAPI_GOODSMVT_CREATE/TABLES/GOODSMVT_ITEM/item/ENTRY_QNT} : Transaction.Qty

SAP_JCo_Interface_0.Request{/BAPI_GOODSMVT_CREATE/TABLES/GOODSMVT_ITEM/item/ENTRY_UOM} : Transaction.UOM

Thanks

Supriya

agentry_src
Active Contributor
0 Kudos

I believe I have encountered that in the past.  I do not think you can assign a DOC_DATE as that is assigned internally.  I only think you can put an entry in the PSTNG_DATE field. 

I would check the documentation for the BAPI in either SE37 or BAPI as this is the only BAPI/RFC I have ever come across that had been properly documented. 

You can also functionally test this BAPI in either of those t-codes to see what the behavior is with those two fields populated or not.

Regards, Mike