2 Replies Latest reply: Jan 6, 2011 8:04 AM by fenny bautista RSS

[HELP] - BAPI_PRODORDCONF_CREATE_TT

Adelmo Silva
Currently Being Moderated

Hello SAP Gurus,

 

I am using BAPI_PRODORDCONF_CREATE_TT and BAPI_PRODORDCONF_GET_TT_PROP to simulate transaction CO11N.

 

There is the sample code:

 

CALL FUNCTION 'BAPI_PRODORDCONF_GET_TT_PROP'
     EXPORTING
       PROPOSE                  = i_propose
*   IMPORTING
*     RETURN                   =
      TABLES
        TIMETICKETS              = i_timetickets
        GOODSMOVEMENTS           = i_GOODSMOVEMENTS
        LINK_CONF_GOODSMOV       = i_LINK_CONF_GOODSMOV
        DETAIL_RETURN            = i_DETAIL_RETURN.
 
loop at i_GOODSMOVEMENTS.
    SELECT * FROM  MARA
               WHERE  MATNR  = i_GOODSMOVEMENTS-MATERIAL
               AND    MTART  = 'ZPA1'.
        ENDSELECT.
        if sy-subrc = 0.
          i_GOODSMOVEMENTS-batch = texto_numero_serie.
          modify i_GOODSMOVEMENTS INDEX sy-tabix.
        endif.
  endloop.
 
CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'
    EXPORTING
       POST_WRONG_ENTRIES       = '2'
*     TESTRUN                  =
*   IMPORTING
*     RETURN                   =
      TABLES
        TIMETICKETS              = i_timetickets
        GOODSMOVEMENTS           = i_GOODSMOVEMENTS
        LINK_CONF_GOODSMOV       = i_LINK_CONF_GOODSMOV
        DETAIL_RETURN            = i_DETAIL_RETURN.
 
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
     EXPORTING
       WAIT          = 'X'
*   IMPORTING
*     RETURN        =
              .

 

I am using network orders and I am making the confirmation for the top order. The problem is in goods movements, I am getting the error M7349 "Content of order 198: T_PA_01 transferred to interface (IMSEG): MATERIAL".

 

Can someone help me with this? Thanks in advance.

 

Cheers,

  • Re: [HELP] - BAPI_PRODORDCONF_CREATE_TT
    Adelmo Silva
    Currently Being Moderated

    Problem no longer exists.

     

    Thank you all.

     

    Adelmo

    • Re: [HELP] - BAPI_PRODORDCONF_CREATE_TT
      fenny bautista
      Currently Being Moderated

      Hi,

      I'm having problem regarding BAPI_PRODORDCONF_CREATE_TT. I have a return error 'confirmations are incorrect'.

      Please help.

      Here's the sample code.

       

       

      data: it_data type table of tb_data,

        wa_data type tb_data,

        v_return TYPE BAPIRET1,

        propose TYPE BAPI_PP_CONF_PROP.

       

      >>>>>>

        clear wa_data.

        loop at it_data into wa_data.

          clear: wa_timetickets, wa_goodsmovements, wa_link_conf_goodsmov.

       

      *

          wa_timetickets-orderid = wa_data-orderid.

          wa_timetickets-operation = wa_data-operation.

          wa_timetickets-fin_conf = 'X'.

          wa_timetickets-clear_res = 'X'.

          wa_timetickets-postg_date = wa_data-postg_date.

          wa_timetickets-yield = wa_data-yield.

       

          wa_goodsmovements-material = wa_data-material.

          wa_goodsmovements-plant = wa_data-plant.

          wa_goodsmovements-stge_loc = wa_data-stge_loc.

          wa_goodsmovements-batch = wa_data-batch.

          wa_goodsmovements-move_type = wa_data-move_type.

          wa_goodsmovements-entry_qnt = wa_data-entry_qnt.

          wa_goodsmovements-entry_uom = wa_data-entry_uom.

          wa_goodsmovements-orderid = wa_data-gd_orderid.

       

          wa_link_conf_goodsmov-index_confirm = wa_data-index_confirm.

          wa_link_conf_goodsmov-index_goodsmov = wa_data-index_goodsmov.

       

       

          append wa_timetickets to it_timetickets.

          append wa_goodsmovements to it_goodsmovements.

          append wa_link_conf_goodsmov to it_link_conf_goodsmov.

       

        endloop.

       

       

          PROPOSE-ACTIVITY = 'X'.

          v_tabix = v_tabix + 1.

          CALL FUNCTION 'BAPI_PRODORDCONF_GET_TT_PROP'

           EXPORTING

             PROPOSE                  = propose

           IMPORTING

             RETURN                   = v_return

            TABLES

             TIMETICKETS              = it_timetickets

             GOODSMOVEMENTS           = it_goodsmovements

             LINK_CONF_GOODSMOV       = it_link_conf_goodsmov

      •       DETAIL_RETURN            =

                    .

          MESSAGE i398(00) with 'TYPE:' v_return-type '>' v_return-message.

               

          CLEAR v_return.

          CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'

           EXPORTING

             POST_WRONG_ENTRIES       = '2'

             TESTRUN                  = ''

      IMPORTING

         RETURN                   = v_return

            TABLES

                 TIMETICKETS              = it_timetickets

                 GOODSMOVEMENTS           = it_goodsmovements

                 LINK_CONF_GOODSMOV       = it_link_conf_goodsmov

      •   DETAIL_RETURN            =

                    .

          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

           EXPORTING

             WAIT          = 'X'

      • IMPORTING

      •   RETURN        =

                    .

       

          MESSAGE i398(00) with 'TYPE:' v_return-type '>' v_return-message.

Actions