cancel
Showing results for 
Search instead for 
Did you mean: 

mass creation of Product version through interface

maheshkumar_komatineni
Active Participant
0 Kudos

Hi Friends,

we are in a implementation project we have interface for product version ,could you let me know the best Mathod c=for PV creation. BPI, FM or BDC.

Thanks & regards,

Mahesh kumar,

View Entire Topic
beyhan_meyrali
Active Contributor
0 Kudos

Hi,

You can use code below.


"If Rem
LS_MKAL-SERKZ = 'X'.

        CALL FUNCTION 'FV_PROD_VERS_MAINTAIN'
          EXPORTING
            IS_MKAL = LS_MKAL
          TABLES
            RETURN  = LT_RET.

        LOOP AT LT_RET TRANSPORTING NO FIELDS WHERE type ca 'EAX'.
          EXIT.
        ENDLOOP.
        IF SY-SUBRC = 0.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
            IMPORTING
              RETURN = LS_RETURN.

        ELSE.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              WAIT   = 'X'
            IMPORTING
              RETURN = LS_RETURN.
        ENDIF.