Application Development and Automation 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: 
Read only

Call BDC through report.

Former Member
0 Likes
785

Hi experts,

I want to call BDC for MIGO through report . I had collected required the data in internal table now i want to call the BDC by using call transaction method and update the data using internal table. I used the SUBMIT command to call the bdc but default selection screen comes.

How to suppress the selection screen of bdc ?

Hi experts,

I want to call BDC for MIGO through report . I had collected required the data in internal table now i want to call the BDC by using call transaction method and update the data using internal table. I used the SUBMIT command to call the bdc but default selection screen comes.

How to suppress the selection screen of bdc ?

5 REPLIES 5
Read only

Former Member
0 Likes
742

Hi,

You can't use BDC for MIGO transaction since it was Enjoy SAP transaction. You can find the BAPI to achieve your requirement.

Please check this link:

Regards,

~Satya

Read only

Former Member
0 Likes
742

If you can send the selection screen parameters from your calling program then the problem will be solved......press F1 on submit command and proceed..

Read only

Former Member
0 Likes
742

Hi,

BDC for enjoy SAP transaction is not at all preferable like MIGO, instead you can go for BAPI BAPI_GOODSMVT_CREATE.

Thanks,

Asit Purbey.

Read only

Former Member
0 Likes
742

Hi Abhishek ingole,

Use BAPIs instead of BDC for MIGO...

BAPI_PO_CREATE --> To create Purchase Order
BAPI_PO_CHANGE --> To change Purchase Order
BAPI_PO_GETDETAIL --> Todisplay Purchase Order

BAPI_GOODSMVT_CREATE

Refer below code and modify it according to your req.

* Structures for BAPI
DATA: GM_HEADER  TYPE BAPI2017_GM_HEAD_01.
DATA: GM_CODE    TYPE BAPI2017_GM_CODE.
DATA: GM_HEADRET TYPE BAPI2017_GM_HEAD_RET.
DATA: GM_ITEM    TYPE TABLE OF
                 BAPI2017_GM_ITEM_CREATE WITH HEADER LINE.
DATA: GM_RETURN  TYPE BAPIRET2 OCCURS 0 WITH HEADER LINE.
DATA: GM_RETMTD  TYPE BAPI2017_GM_HEAD_RET-MAT_DOC.
 
CLEAR: GM_RETURN, GM_RETMTD. REFRESH GM_RETURN.
 
* Setup BAPI header data.
GM_HEADER-PSTNG_DATE = SY-DATUM.
GM_HEADER-DOC_DATE   = SY-DATUM.
GM_CODE-GM_CODE      = '04'.                                " MB1A
 
* Write 971 movement to table
CLEAR GM_ITEM.
MOVE '412'                 TO GM_ITEM-MOVE_TYPE     .
MOVE 'Q'                 TO GM_ITEM-SPEC_STOCK.
MOVE '3800533484'  TO GM_ITEM-MATERIAL.
MOVE '1'     TO GM_ITEM-ENTRY_QNT.
*MOVE 'PC'    TO GM_ITEM-ENTRY_UOM.
MOVE '1060'  TO GM_ITEM-PLANT.
MOVE '0007'  TO GM_ITEM-STGE_LOC.
*MOVE '0901'   TO GM_ITEM-MOVE_REAS.
MOVE 'P203601001' TO GM_ITEM-WBS_ELEM.
MOVE 'P203601001' TO GM_ITEM-VAL_WBS_ELEM.
 
APPEND GM_ITEM.
 
* Call goods movement BAPI
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
     EXPORTING
          GOODSMVT_HEADER  = GM_HEADER
          GOODSMVT_CODE    = GM_CODE
     IMPORTING
          GOODSMVT_HEADRET = GM_HEADRET
          MATERIALDOCUMENT = GM_RETMTD
     TABLES
          GOODSMVT_ITEM    = GM_ITEM
          RETURN           = GM_RETURN.
 
IF NOT GM_RETMTD IS INITIAL.
  COMMIT WORK AND WAIT.
  CALL FUNCTION 'DEQUEUE_ALL'.
ELSE.
  COMMIT WORK AND WAIT.
  CALL FUNCTION 'DEQUEUE_ALL'.
ENDIF.
 
WRITE:/ GM_RETMTD.
 
LOOP AT GM_RETURN.
  WRITE:/ GM_RETURN.
ENDLOOP.

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7

Read only

Former Member
0 Likes
742

Hi,

You can not write BDC for MIGO transaction. I suggest you to search is there any BAPI.

And also check this BAPI 'BAPI_PO_CREATE '

Regards,

Jyothi CH.

Edited by: Jyothi Chinnabathuni on Mar 16, 2009 11:15 AM