Application Development 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: 

latest version

Former Member
0 Kudos

Hi,

I have a custom inforstructure, i am creating a BDC to update the MC93 transaction. is there any FM to get the latest version from the inforstructure.

Best Regards,

Suri

2 REPLIES 2

Former Member
0 Kudos

Hello,

Take a look at table P44V.

Regards,

John.

ferry_lianto
Active Contributor
0 Kudos

Hi Suresh,

Please check table P44V for planning version.

Also use this FM MCS_DYNPRO_PLAN2_GET to get dynpro screen number for your BDC codes. The dynpro screen number will be different in DEV, QA and PROD systems.


  data: c_gstru       like p44v-gstru value 'S876',
        c_keydynp_typ like mcdyntypen-mcdytyp value '1',
        c_plan_repid  like sy-repid value 'SAPMMCP6'.

  data: sav_key_dynnr(4).

  ...

  clear: sav_key_dynnr.

  call function 'MCS_DYNPRO_PLAN2_GET'
       exporting
            i_mcdytyp  = c_keydynp_typ
            i_gstru    = c_gstru
            i_progname = c_plan_repid
       importing
            e_dynnr    = sav_key_dynnr
       exceptions
            not_found  = 01.
  ...

form change_dp_forecast.
  data: la_rmcp2-awahl(15) value 'RMCP2-AWAHL(01)',
        la_vrsio(2) type n.

  clear: i_p44v, la_vrsio.
  refresh i_p44v.
  select * into table i_p44v from p44v where gstru = c_gstru.

  read table i_p44v with key vrsio = c_dp.
  la_vrsio = sy-tabix.
  move la_vrsio to la_rmcp2-awahl+12(2).

  refresh: bdcdata.
  perform bdc_dynpro using:  'SAPMMCP6'     '0110'.
  perform bdc_field  using:  'BDC_CURSOR'   'RMCP2-SCTYP',
                             'BDC_OKCODE'   '/00',
                             'RMCP2-SCTYP'  'Z_S876'.

  perform bdc_dynpro using:  'SAPMMCP6'     sav_key_dynnr.
  perform bdc_field  using:  'BDC_CURSOR'   'S876-PKUNAG',
                             'BDC_OKCODE'   '=IAKT',
                             'S876-PKUNAG'  p_pkunag,
                             'S876-WERKS'   p_werks,
                             'S876-MATNR'   p_matnr.

  perform bdc_dynpro using:  'SAPLMCP6'     '0175'.
  perform bdc_field  using:  'BDC_CURSOR'   'RMCP2-AWAHL(01)',
                             'BDC_OKCODE'   '=CONT',
                             la_rmcp2-awahl 'X'.

  call transaction 'MC94' using    bdcdata
                          update   'S'
                          mode     'E'.

endform.                    " change_dp_forecast

Regards,

Ferry Lianto