Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI BAPI_GOODSMVT_CREATE

Former Member
0 Kudos

Hi All,

I am using the BAPI_GOODSMVT_CREATE to post the GR with inbound delivery document.

We have ECC(Data) and EP(Development) system.

In ECC system, if I run the BAPI_GOODSMVT_CREATE, then the document is posted successfully.

But if I try to post the document in EP system, I am getting the error as shown below.

Entry #####EA EA LFA1  does not exist in  (check entry)

Also, find below is my code for reference.

  w_bapi2017_gm_head_01-pstng_date      = '20130311'."sy-datum.
   w_bapi2017_gm_head_01-doc_date        = '20130311'."sy-datum.
   w_bapi2017_gm_head_01-ref_doc_no      = ls_asn_header_det-vbeln.   "Inbound delivery number
   w_bapi2017_gm_head_01-pr_uname        = sy-uname.
   w_bapi2017_gm_head_01-header_txt      = ls_asn_header_det-invoice.
   w_bapi2017_gm_head_01-ver_gr_gi_slip  = '1'.
   w_bapi2017_gm_head_01-ver_gr_gi_slipx = 'X'.

   w_bapi2017_gm_code-gm_code = '01'.

LOOP AT lt_asn_item_det INTO ls_asn_item_det.


       w_bapi2017_gm_item_create-material          = ls_asn_item_det-matnr.
       w_bapi2017_gm_item_create-plant             = ls_asn_header_det-plant.
       w_bapi2017_gm_item_create-stge_loc          = ls_asn_header_det-lgort.
       w_bapi2017_gm_item_create-move_type         = '103'.
       w_bapi2017_gm_item_create-vendor            = ls_asn_header_det-lifnr.
       w_bapi2017_gm_item_create-entry_qnt         = ls_asn_item_det-menge.
       w_bapi2017_gm_item_create-entry_uom         = ls_asn_item_det-meins.
        w_bapi2017_gm_item_create-orderpr_un_iso    = ls_asn_item_det-meins.
       w_bapi2017_gm_item_create-po_number         = ls_asn_item_det-ebeln.
       w_bapi2017_gm_item_create-po_item           = ls_asn_item_det-ebelp.
       w_bapi2017_gm_item_create-item_text         = ls_asn_item_det-txz01.
       w_bapi2017_gm_item_create-gr_rcpt           = ls_asn_header_det-wempf.
       w_bapi2017_gm_item_create-mvt_ind           = 'B'.


        APPEND w_bapi2017_gm_item_create TO it_bapi2017_gm_item_create.
       CLEAR  w_bapi2017_gm_item_create.


   ENDLOOP.

     CALL FUNCTION 'BAPI_GOODSMVT_CREATE' DESTINATION 'ECC_STACK'
       EXPORTING
         goodsmvt_header  = w_bapi2017_gm_head_01
         goodsmvt_code    = w_bapi2017_gm_code
         testrun          = ' '
       IMPORTING
         goodsmvt_headret = w_goodsmvt_headret
         materialdocument = w_materialdocument
         matdocumentyear  = w_matdocumentyear
       TABLES
         goodsmvt_item    = it_bapi2017_gm_item_create
         return           = it_bapiret2.

     IF it_bapiret2 IS INITIAL.
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
     ELSE.

     ENDIF.

Please guide me on the above issue

With Regards,

Gurulakshmi

6 REPLIES 6

former_member182465
Active Participant
0 Kudos

Can you cross check once by going into table LFA1 and check whether that vendor no exists in destination system?

Former Member
0 Kudos

Hi Gurulakshmi,

To post, you should have visibility of this Vendor from EP.

Regards

John

krishna_k19
Contributor
0 Kudos

Hi ,

  Pls check whether that vendor is present in Development system or not and what and all configuration is present in ECC System those things have to check in EP system also.

Debugg once where that error is coming you can come to know whats the exact problem.

Regards,

Krishna

former_member184569
Active Contributor
0 Kudos

Check this thread.

http://scn.sap.com/thread/64371

Former Member
0 Kudos

hello,

As you are able to post in ECC directly, and getting error while posting from EP.

my suggestion would to pass the internal represetation of data to BAPI

Former Member
0 Kudos

Hi all,

I have Resolved the Issue.

I have made some mistake in passing data to BAPI

Thank you all for the suggestions.

With Regards,

Gurulakshmi