Skip to Content
author's profile photo Former Member
Former Member

Good Receipt w.r.t Handling Units(outbound delivery)

Hi everyone,

i am doing a BDC for MIGO t-code....to create Good Receipt w.r.t Handling Units(outbound delivery).....

While executing the Pgm....if some other user has opened the MIGO t-code in DISPLAY mode then that pgm is not able to call the MIGO t-code...to create Good Receipt w.r.t outbound delivery.....

As this bdc pgm is witten to create the good receipt i.e. why it is not allowing to create the receipt as already someone else has opened it in DISPLAY mode....

The following code is to create Good Receipt w.r.t outbound delivery handling unit

perform bdc_field using 'GODYNPRO-ACTION'

'A01'. -


Good receipt

perform bdc_field using 'GODYNPRO-REFDOC'

'R05'.-----outbound delivery

PLease if somebody can help me out with this code...or can send me any program related to this pgm.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2008 at 12:46 PM

    hi,

    dont write bdc for migo.

    use bapi.

    &----


    *& Report ZRPT_SUB_KO01GOODSMOVEMENT

    *&

    &----


    *&

    *&

    &----


    REPORT ZRPT_SUB_KO01GOODSMOVEMENT.

    PARAMETERS : P_BAG(17) TYPE C,

    P_ZZORG LIKE zaUFK-ZZORG,

    P_MATNR LIKE MARA-MATNR,

    P_WERKS LIKE AUFK-WERKS,

    P_WERK LIKE AFPO-PWERK,

    P_DATE LIKE MKPF-BUDAT,

    P_LGORT LIKE GOITEM-LGOBE.

    DATA : BDC_DATA TYPE STANDARD TABLE OF BDCDATA. "internla table for bdc data

    DATA : WA_BDC_DATA TYPE BDCDATA . "work area for bdc data

    DATA : T_XMSEG TYPE MSEG.

    DATA : T_XMKPF TYPE MKPF.

    DATA : V_BAGS1(17) TYPE C.

    DATA : BEGIN OF WA_MB1B,

    ZZGCODE TYPE ZMIGO-ZZGCODE,

    ZZGBAGS TYPE ZMIGO-ZZGBAGS,

    WERKS TYPE AUFK-WERKS,

    LGORT TYPE VBRP-LGORT,

    ZZORG TYPE zAUFK-ZZORG,

    END OF WA_MB1B.

    DATA : V_MATERIAL TYPE BAPI2017_GM_HEAD_RET-MAT_DOC.

    data : v_date(10) type c.

    DATA : T_GOODSMVT_HEADER TYPE BAPI2017_GM_HEAD_01,

    T_GOODSMVT_CODE TYPE BAPI2017_GM_CODE,

    T_GOODSMVT_ITEM TYPE STANDARD TABLE OF BAPI2017_GM_ITEM_CREATE,

    T_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.

    DATA : WA_GOODSMVT_ITEM TYPE BAPI2017_GM_ITEM_CREATE.

    DATA : BEGIN OF S_MARA,

    MEINS LIKE MARA-MEINS,

    END OF S_MARA.

    DATA : MATERIALDOCUMENT TYPE BAPI2017_GM_HEAD_RET-MAT_DOC.

    *FORM GOODSMOVEMENT TABLES T_RETURN

    • USING WA_MB1B LIKE WA_MB1B.

    SELECT SINGLE MEINS

    FROM MARA

    INTO S_MARA

    WHERE MATNR = P_MATNR.

    CONCATENATE p_date6(2) p_date4(2) p_date+0(4) INTO V_DATE SEPARATED BY '.'.

    T_GOODSMVT_HEADER-PSTNG_DATE = P_DATE.

    T_GOODSMVT_HEADER-DOC_DATE = P_DATE.

    T_GOODSMVT_CODE-GM_CODE = '04'.

    WA_GOODSMVT_ITEM-MATERIAL = P_MATNR. "'000000000000001556'.

    WA_GOODSMVT_ITEM-PLANT = P_WERK. " '1000'.

    WA_GOODSMVT_ITEM-STGE_LOC = P_LGORT. " '0001'.

    WA_GOODSMVT_ITEM-MOVE_TYPE = 'Z42'.

    WA_GOODSMVT_ITEM-VENDOR = P_ZZORG. "'0000100224'.

    WA_GOODSMVT_ITEM-ENTRY_QNT = P_BAG. " '1'.

    WA_GOODSMVT_ITEM-ENTRY_UOM = S_MARA-MEINS.

    WA_GOODSMVT_ITEM-ENTRY_UOM_ISO = S_MARA-MEINS.

    WA_GOODSMVT_ITEM-MOVE_PLANT = P_WERKS.

    APPEND WA_GOODSMVT_ITEM TO T_GOODSMVT_ITEM.

    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

    EXPORTING

    GOODSMVT_HEADER = T_GOODSMVT_HEADER

    GOODSMVT_CODE = T_GOODSMVT_CODE

    IMPORTING

    MATERIALDOCUMENT = V_MATERIAL

    TABLES

    GOODSMVT_ITEM = T_GOODSMVT_ITEM

    RETURN = T_RETURN.

    BREAK shailajaa.

    EXPORT t_return to MEMORY ID '123'.

    EXPORT V_MATERIAL TO MEMORY ID 'MAT'.

    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

    EXPORTING

    WAIT = ' '.

    *ENDFORM.

    see this example.

    reward points if usefull..

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.