Skip to Content
avatar image
Former Member

BAPI_PRODORDCONF_CREATE_HDR

Dear All,

Why is this function not failed when I am locking one of the material ?

<b>It's a contradiction</b>, when I did prod. order confirmation using CO15. CO15 failed the confirmation when one of the components is locked.

What's wrong with this function ? Please help me...

Thank you in advance,

Sandi

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    May 22, 2006 at 06:01 AM

    Hai Sandi

    Data : CO_TAB LIKE BAPI_PP_HDRLEVEL OCCURS 0 WITH HEADER LINE,

    GM_TAB LIKE BAPI2017_GM_ITEM_CREATE OCCURS 0 WITH HEADER LINE,

    LI_TAB LIKE BAPI_LINK_CONF_GOODSMOV OCCURS 0 WITH HEADER LINE,

    RE_TAB LIKE BAPI_CORU_RETURN OCCURS 0 WITH HEADER LINE,

    E_RETURN LIKE BAPIRET1 STRUCTURE BAPIRET1,

    I_FLG_REFRESH LIKE RC27X-FLG_SEL OPTIONAL.

    CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_HDR'

    EXPORTING

    POST_WRONG_ENTRIES = I_FLG_POST_WRONG_ENTRIES

    • TESTRUN =

    IMPORTING

    RETURN = E_RETURN

    TABLES

    ATHDRLEVELS = CO_TAB

    GOODSMOVEMENTS = GM_TAB

    LINK_CONF_GOODSMOV = LI_TAB

    DETAIL_RETURN = RE_TAB.

    IF NOT RE_TAB[] IS INITIAL.

    READ TABLE RE_TAB WITH KEY TYPE = 'E'.

    IF SY-SUBRC IS INITIAL.

    E_DETAIL_RETURN = RE_TAB.

    ELSE.

    READ TABLE RE_TAB WITH KEY TYPE = 'I'.

    E_DETAIL_RETURN = RE_TAB.

    ENDIF.

    ENDIF.

    • posting!

    COMMIT WORK AND WAIT.

    ENDIF.

    Thanks & regards

    Sreeni

    Add comment
    10|10000 characters needed characters exceeded