BAPI to update Forecast values? (important, asap)

Hi,
Is a BAPI available to update forecast values?
This is very important and needed asap.
Points will be rewarded and answers will be highly appreciated.
Thanks,
John

I think there is no BAPI or FM to update forecase values,i did bdc for this ,
See the below program ,i used MD61 transaction.
Report     : ZMPPC015
Type       : Data upload
Author     : Seshu Maramreddy
Date       : 05/26/2005
Transport  : DV3K920025
Transaction: ??
Description: This ABAP/4 Program to Create Planned Independent
             Requirement for SMI plants using MD61 Transaction.
             It accepts tab-delimited spreadsheet input and
             creates BDC sessions.
report zmppc015 no standard page heading
                line-size 120
                line-count 55
                message-id zz.
Constants
constants : c_x type c value 'X'," Dynbegin
            c_tcode type tstc-tcode value 'MD61'." Transaction Code
Variables
data : v_lines_in_xcel like sy-tabix,
       l_tabix like sy-tabix,
       v_trans_in_ssn type i,
       v_ssnnr(4) type n," Counter
       v_ssnname like apqi-groupid,
       v_matnr(18) type c. " Material Number
Internal Tables
Internal table for file
data : begin of t_file occurs 0,
       matnr(18) type c,   " Material Number
       berid(10) type c,    " MRP Area
       PLNMG01(17) type n, " Forecast Month -01
       PLNMG02(17) type n, " Forecast Month -02
       PLNMG03(17) type n, " Forecast Month -03
       PLNMG04(17) type n, " Forecast Month -04
       PLNMG05(17) type n, " Forecast Month -05
       PLNMG06(17) type n, " Forecast Month -06
       PLNMG07(17) type n, " Forecast Month -07
       PLNMG08(17) type n, " Forecast Month -08
       PLNMG09(17) type n, " Forecast Month -09
       PLNMG10(17) type n, " Forecast Month -10
       PLNMG11(17) type n, " Forecast Month -11
       PLNMG12(17) type n, " Forecast Month -12
       WERKS(4) TYPE C,    " Plant
       end of t_file.
Internal table for BDCDATA Structure
data : begin of itab_bdc_tab occurs 0.
        include structure bdcdata.
data : end of itab_bdc_tab.
Selection-screen
selection-screen: skip 3.
selection-screen: begin of block id1 with frame.
parameters: p_name        like rlgrap-filename
                          default 'C:\My Documents\InputFile.txt'
                          obligatory,
bdc session name prefix
            p_bdcpfx(6)   default 'ZPIRCT'
                          obligatory,
number for transction per BDC session
            p_trnssn      type i
                          default 2000 obligatory,
retain the BDC session after successfull execution
            p_keep        like apqi-qerase
                          default c_x,
user who will be executing BDC session
            p_uname       like apqi-userid
                          default sy-uname
                          obligatory.
selection-screen : skip 1.
Requirement type
parameters : p_bedae like t459u-bedae,
From Date
             p_date like sy-datum default sy-datum obligatory.
selection-screen: end of block id1.
at selection-screen on value-request for p_name.
F4 value for Input file
  perform filename_get.
main processing
start-of-selection.
To get the data from file to Internal table
  perform getdata_fromfile.
  loop at t_file.
  hang on to xcel line num
    l_tabix = sy-tabix.
  if num-of-trnas-in-session = 0, create new BDC session
    if v_trans_in_ssn is initial.
      perform bdc_session_open.
    endif.
  begin new bdc script for rtg create trans
  fill in bdc-data for prod.version maintenance screens
    perform bdc_build_script.
  insert the bdc script as a BDC transaction
    perform bdc_submit_transaction.
  keep track of how many BDC transactions were inserted in the BDC
  session
    add 1 to v_trans_in_ssn.
  if the user-specified num of trans in BDC session is reached OR
  if end of input file is reached, close the BDC session
    if v_trans_in_ssn = p_trnssn or
       l_tabix = v_lines_in_xcel.
      perform bdc_session_close.
      clear v_trans_in_ssn.
    endif.
clear t_file.
  endloop.
top-of-page.
  call function 'Z_HEADER'
EXPORTING
  FLEX_TEXT1       =
  FLEX_TEXT2       =
  FLEX_TEXT3       =
*&      Form  filename_get
      F4 Value for input file
FORM filename_get.
  CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
            DEF_PATH         = 'C:\Temp\ '
            MASK             = ',.,..'
            MODE             = 'O'
            TITLE            = 'Select File '(007)
       IMPORTING
            FILENAME         = p_name
       EXCEPTIONS
            INV_WINSYS       = 1
            NO_BATCH         = 2
            SELECTION_CANCEL = 3
            SELECTION_ERROR  = 4
            OTHERS           = 5.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
ENDFORM.                    " filename_get
*&      Form  getdata_fromfile
      Upload the data from file to Internal table
FORM getdata_fromfile.
  CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
            FILENAME                = p_name
            FILETYPE                = 'DAT'
       TABLES
            DATA_TAB                = t_file
       EXCEPTIONS
            CONVERSION_ERROR        = 1
            FILE_OPEN_ERROR         = 2
            FILE_READ_ERROR         = 3
            INVALID_TYPE            = 4
            NO_BATCH                = 5
            UNKNOWN_ERROR           = 6
            INVALID_TABLE_WIDTH     = 7
            GUI_REFUSE_FILETRANSFER = 8
            CUSTOMER_ERROR          = 9
            OTHERS                  = 10.
  if sy-subrc eq 0.
    sort t_file by matnr .
    delete t_file where matnr = ''.
    clear v_lines_in_xcel.
    describe table t_file lines v_lines_in_xcel.
    if v_lines_in_xcel is initial.
      write: / 'No data in input file'.
      stop.
    endif.
  else.
    write:/ 'Error reading input file'.
    stop.
  endif.
ENDFORM.                    " getdata_fromfile
*&      Form  bdc_session_open
      BDC_OPEN_GROUP
FORM bdc_session_open.
create bdc session name = prefix-from-selectn-screen + nnnn
  add 1 to v_ssnnr.
  concatenate p_bdcpfx v_ssnnr into v_ssnname.
  CALL FUNCTION 'BDC_OPEN_GROUP'
       EXPORTING
            CLIENT              = SY-MANDT
            GROUP               = v_ssnname
            KEEP                = p_keep
            USER                = p_uname
       EXCEPTIONS
            CLIENT_INVALID      = 1
            DESTINATION_INVALID = 2
            GROUP_INVALID       = 3
            GROUP_IS_LOCKED     = 4
            HOLDDATE_INVALID    = 5
            INTERNAL_ERROR      = 6
            QUEUE_ERROR         = 7
            RUNNING             = 8
            SYSTEM_LOCK_ERROR   = 9
            USER_INVALID        = 10
            OTHERS              = 11.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " bdc_session_open
*&      Form  bdc_build_script
      BDC Script
FORM bdc_build_script.
Local Variables
  DATA : l_frdat(8) type c,  " From Date
         l_todat(8) type c,  " To Date
         l_frdat1(4) type c, " Year
         l_frdat2(2) type c, " Month
         l_frdat3(2) type c, " Day
         l_tdate like sy-datum, " Subtract date(1)
         l_todat1(4) type c,    " Year
         l_todat2(2) type c,    " Month
         l_todat3(3) type c.    " Day
   Get the material number from tables ZMSMI_FERR_RAW,
   ZMSMI_SNAP_RAW and ZMSMI_SIMP_RAW
  perform get_matnr.
Screen 0100.
  perform bdc_screen using  'SAPMM60X'     '0100'.
  perform bdc_field  using  'BDC_OKCODE'   '/EBDPT'.
  perform bdc_field  using  'AM60X-MATAW'  'X'.
  perform bdc_field  using  'AM60X-MATNR'  T_FILE-MATNR.
  perform bdc_field  using  'AM60X-PRGRP'  SPACE.
  perform bdc_field  using  'AM60X-PBDNR'  SPACE.
  perform bdc_field  using  'RM60X-BERID'  T_FILE-BERID.
  perform bdc_field  using  'AM60X-WERKS'  SPACE.
  perform bdc_field  using  'RM60X-VERSB'  '00'.
Converted the date as per MD61 Transaction.
From date
  l_frdat1 =  p_date+0(4).
  l_frdat2 =  p_date+4(2).
  l_frdat3 =  p_date+6(2).
  concatenate l_frdat2 l_frdat3 l_frdat1 into l_frdat.
To Date
  l_tdate = p_date - 1.
  l_todat1 =  l_tdate+0(4) + 1.
  l_todat2 =  l_tdate+4(2).
  l_todat3 =  l_tdate+6(2).
  concatenate l_todat2 l_todat3 l_todat1 into l_todat.
  perform bdc_field  using  'RM60X-DATVE'  l_frdat.
  perform bdc_field  using  'RM60X-DATBE'  l_todat.
  perform bdc_field  using  'RM60X-ENTLU'  'M'.
Screen 0127
  perform bdc_screen using  'SAPMM60X'     '0127'.
  perform bdc_field  using  'BDC_OKCODE'   '=WEIT'.
  if p_bedae is initial.
    perform bdc_field  using  'T459U-BEDAE'  space.
  else.
    perform bdc_field  using  'T459U-BEDAE'  P_BEDAE.
  endif.
Screen 0100.
  perform bdc_screen using  'SAPMM60X'     '0100'.
  perform bdc_field  using  'BDC_OKCODE'   '/00'.
  perform bdc_field  using  'AM60X-MATAW'  'X'.
  perform bdc_field  using  'AM60X-MATNR'  T_FILE-MATNR.
  perform bdc_field  using  'AM60X-PRGRP'  SPACE.
  perform bdc_field  using  'AM60X-PBDNR'  SPACE.
  perform bdc_field  using  'RM60X-BERID'  T_FILE-BERID.
  perform bdc_field  using  'AM60X-WERKS'  SPACE.
  perform bdc_field  using  'RM60X-VERSB'  '00'.
  perform bdc_field  using  'RM60X-DATVE'  l_frdat.
  perform bdc_field  using  'RM60X-DATBE'  l_todat.
  perform bdc_field  using  'RM60X-ENTLU'  'M'.
Screen 0200
  perform bdc_screen using  'SAPLM60E'     '0200'.
  perform bdc_field  using  'BDC_OKCODE'   '=S+'.
  perform bdc_field  using  'RM60X-PLN01(01)'  T_FILE-PLNMG01.
  perform bdc_screen using  'SAPLM60E'     '0200'.
  perform bdc_field  using  'BDC_OKCODE'   '=S+'.
  perform bdc_field  using  'RM60X-PLN01(01)'  T_FILE-PLNMG02.
  perform bdc_screen using  'SAPLM60E'     '0200'.
  perform bdc_field  using  'BDC_OKCODE'   '=S+'.
  perform bdc_field  using  'RM60X-PLN01(01)'  T_FILE-PLNMG03.
  perform bdc_screen using  'SAPLM60E'     '0200'.
  perform bdc_field  using  'BDC_OKCODE'   '=S+'.
  perform bdc_field  using  'RM60X-PLN01(01)'  T_FILE-PLNMG04.
  perform bdc_screen using  'SAPLM60E'     '0200'.
  perform bdc_field  using  'BDC_OKCODE'   '=S+'.
  perform bdc_field  using  'RM60X-PLN01(01)'  T_FILE-PLNMG05.
  perform bdc_screen using  'SAPLM60E'     '0200'.
  perform bdc_field  using  'BDC_OKCODE'   '=S+'.
  perform bdc_field  using  'RM60X-PLN01(01)'  T_FILE-PLNMG06.
  perform bdc_screen using  'SAPLM60E'     '0200'.
  perform bdc_field  using  'BDC_OKCODE'   '=S+'.
  perform bdc_field  using  'RM60X-PLN01(01)'  T_FILE-PLNMG07.
  perform bdc_screen using  'SAPLM60E'     '0200'.
  perform bdc_field  using  'BDC_OKCODE'   '=S+'.
  perform bdc_field  using  'RM60X-PLN01(01)'  T_FILE-PLNMG08.
  perform bdc_screen using  'SAPLM60E'     '0200'.
  perform bdc_field  using  'BDC_OKCODE'   '=S+'.
  perform bdc_field  using  'RM60X-PLN01(01)'  T_FILE-PLNMG09.
  perform bdc_screen using  'SAPLM60E'     '0200'.
  perform bdc_field  using  'BDC_OKCODE'   '=S+'.
  perform bdc_field  using  'RM60X-PLN01(01)'  T_FILE-PLNMG10.
  perform bdc_screen using  'SAPLM60E'     '0200'.
  perform bdc_field  using  'BDC_OKCODE'   '=S+'.
  perform bdc_field  using  'RM60X-PLN01(01)'  T_FILE-PLNMG11.
  perform bdc_screen using  'SAPLM60E'     '0200'.
  perform bdc_field  using  'BDC_OKCODE'   '=SICH'.
  perform bdc_field  using  'RM60X-PLN01(01)'  T_FILE-PLNMG12.
ENDFORM.                    " bdc_build_script
*&      Form  get_matnr
      Get the material number from tables ZMSMI_FERR_RAW,
      ZMSMI_SNAP_RAW and ZMSMI_SIMP_RAW
FORM get_matnr.
  clear v_matnr.
  case t_file-werks.
    when '0101'.
      select single cmatnr from zmsmi_simp_raw
             into v_matnr  where matnr = t_file-matnr.
      if sy-subrc eq 0.
        clear t_file-matnr.
        t_file-matnr = v_matnr.
      endif.
    when '0103'.
      select single cmatnr from zmsmi_ferr_raw
             into v_matnr  where matnr = t_file-matnr.
      if sy-subrc eq 0.
        clear t_file-matnr.
        t_file-matnr = v_matnr.
      endif.
    when '0102' or '0110' or '0111' or '0112' or '0113'
         or '0114' or '0115' or '0116' or '0117'.
      select single cmatnr from zmsmi_snap_raw
             into v_matnr  where matnr = t_file-matnr.
      if sy-subrc eq 0.
        clear t_file-matnr.
        t_file-matnr = v_matnr.
      endif.
  endcase.
ENDFORM.                    " get_matnr
*&      Form  bdc_screen
      BDC Script for Screen fields
     -->P_PROG   Program name
     -->P_SCRN   Screen Number
FORM bdc_screen USING    p_prog
                         p_scrn.
  clear itab_bdc_tab.
  itab_bdc_tab-program = p_prog.
  itab_bdc_tab-dynpro = p_scrn.
  itab_bdc_tab-dynbegin = c_x.
  append itab_bdc_tab.
ENDFORM.                    " bdc_screen
*&      Form  bdc_field
      BDC Script for Screen fileds
     -->P_NAM   Field name
     -->P_VAL   Field value
FORM bdc_field USING    p_nam
                        p_val.
  clear itab_bdc_tab.
  itab_bdc_tab-fnam = p_nam.
  itab_bdc_tab-fval = p_val.
  append itab_bdc_tab.
ENDFORM.                    " bdc_screen
*&      Form  bdc_submit_transaction
      BDC_INSERT Function Module
FORM bdc_submit_transaction.
Load BDC script as a trqansction in BDC session
  call function 'BDC_INSERT'
       EXPORTING
            tcode          = c_tcode
       TABLES
            dynprotab      = itab_bdc_tab
       EXCEPTIONS
            internal_error = 01
            not_open       = 02
            queue_error    = 03
            tcode_invalid  = 04.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  refresh itab_bdc_tab.
ENDFORM.                    " bdc_submit_transaction
*&      Form  bdc_session_close
      text
FORM bdc_session_close.
  CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
  NOT_OPEN          = 1
  QUEUE_ERROR       = 2
  OTHERS            = 3
  skip 2.
  if sy-subrc ne 0.
    write: / 'Error Closing BDC Session ' , 'RETURN CODE: ', sy-subrc.
  else.
    write : /  'Session created:', v_ssnname,
            50 '# of transactions:', v_trans_in_ssn.
  endif.
ENDFORM.                    " bdc_session_close
Reward Points if it is helpful
Thanks
Seshu

Similar Messages

  • To update conditiontype values using change BAPI of sales order

    Hi Gurus,
    i am using the standard bapi 'BAPI_SALESORDER_CHANGE' and i am passing the values for the conditiontypes as follows.......
    vbeln is my sales order number..
    wa_conditions_in-itm_number = '00010'.
    wa_conditions_in-cond_count = '01'.
    wa_conditions_in-cond_type = 'ZCUS'.
    wa_conditions_in-applicatio = 'V'.
    wa_conditions_in-cond_value =  '1000.00'.
    wa_conditions_in-currency = 'INR'.
    wa_conditions_in-cond_p_unt = '1'.
    wa_conditions_inx-itm_number = '00010'.
    wa_conditions_inx-cond_count = '01'.
    wa_conditions_inx-cond_type = 'ZCUS'.
    wa_conditions_inx-updateflag = 'U'.
    wa_conditions_inx-cond_value = 'X'.
    wa_conditions_inx-currency = 'X'.
    wa_conditions_inx-cond_p_unt = 'X'.
        APPEND wa_conditions_in TO conditions_in.
        APPEND wa_conditions_inx TO conditions_inx.
    CLEAR : order_header_in, order_header_inx.
    order_header_in1-purch_no_c = 'Order'.
    order_header_inx1-purch_no_c = 'X'.
    order_header_in1-purch_no_s = 'Order'.
    order_header_inx1-purch_no_s = 'X'.
    order_header_inx1-updateflag = 'U'.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        salesdocument               = vbeln
        order_header_in             = order_header_in1
        order_header_inx            = order_header_inx1
      SIMULATION                  =
      BEHAVE_WHEN_ERROR           = ' '
      INT_NUMBER_ASSIGNMENT       = ' '
      LOGIC_SWITCH                =
      TABLES
        return                      = return
       conditions_in               = conditions_in
       conditions_inx              = conditions_inx
      EXTENSIONIN                 =
    while executing in the order it is not updating the value for the condition type 'ZCUS' and it is inserting as new record.
    Please help me in this regard.
    Thanks & Regards,
    R.P.Sastry

    HI,
    Take the below sample code. for example and try to use like that.
    REPORT ZTEST_BAPI .
    Data: salesd like BAPIVBELN-VBELN.
    data: it_BAPISDH1 type BAPISDH1.
    data: it_BAPISDH1X type BAPISDH1X.
    data: it_BAPIPARNR type BAPIPARNR occurs 0 with header line.
    data: it_BAPIRET2 type BAPIRET2 occurs 0 with header line.
    data: it_BAPIPARNRC type BAPIPARNRC occurs 0 with header line.
    data: it_BAPISDITMX type BAPISDITMX occurs 0 with header line.
    data: it_BAPISDITM type standard table of BAPISDITM with header line.
    constants: c_bp(2) type c value 'BP'.
    it_BAPISDH1X-UPDATEFLAG = 'U'.
    it_BAPISDH1X-SALES_ORG = 'X'.
    it_BAPISDH1X-DISTR_CHAN = 'X'.
    it_BAPISDH1X-DIVISION = 'X'.
    it_BAPISDH1X-PURCH_NO_C = 'X'.
    it_BAPISDH1X-CUST_GROUP = 'X'.
    it_BAPISDH1-SALES_ORG = '1000'.
    it_BAPISDH1-DISTR_CHAN = '01'.
    it_BAPISDH1-DIVISION = '00'.
    it_BAPISDH1-PURCH_NO_C = 'Test1'.
    it_BAPIPARNR-PARTN_ROLE = 'RE'.
    it_BAPIPARNR-PARTN_NUMB = '0000000171'.
    it_BAPIPARNR-ITM_NUMBER = '00000'.
    append it_BAPIPARNR.
    it_BAPIPARNR-PARTN_ROLE = 'RE'.
    it_BAPIPARNR-PARTN_NUMB = '0000000179'.
    it_BAPIPARNR-ITM_NUMBER = '000000'.
    append it_BAPIPARNR.
    it_BAPIPARNRC-DOCUMENT = '000000375'.
    it_BAPIPARNRC-ITM_NUMBER = '000000'.
    it_BAPIPARNRC-UPDATEFLAG = 'U'.
    it_BAPIPARNRC-PARTN_ROLE = 'WE'.
    it_BAPIPARNRC-P_NUMB_OLD = '0000000171'.
    it_BAPIPARNRC-P_NUMB_NEW = '0000000179'.
    it_BAPIPARNRC-ADDRESS = '26324'.
    it_BAPIPARNRC-ADDR_LINK = '0000000003'.
    it_BAPIPARNRC-REFOBJTYPE = 'BUS2032'.
    it_BAPIPARNRC-REFOBJKEY = '000000375'.
    append it_BAPIPARNRC.
    data PARTNERADDRESSES like BAPIADDR1 occurs 0 with header line.
    PARTNERADDRESSES-ADDR_NO = '0000000003'.
    PARTNERADDRESSES-NAME = 'Test Cust'.
    PARTNERADDRESSES-STREET = '222nd AVE'.
    PARTNERADDRESSES-NAME_2 = 'NEW Bldg A2'.
    PARTNERADDRESSES-CITY = 'MILPITAS'.
    PARTNERADDRESSES-REGION = 'CA'.
    PARTNERADDRESSES-POSTL_COD1 = '950351'.
    PARTNERADDRESSES-COUNTRY = 'IN'.
    PARTNERADDRESSES-LANGU = 'E'.
    APPEND PARTNERADDRESSES. CLEAR PARTNERADDRESSES.
    it_BAPISDITMX-ITM_NUMBER = '00010'.
    it_BAPISDITMX-UPDATEFLAG = 'U'.
    it_BAPISDITMX-MATERIAL = 'X'.
    it_BAPISDITMX-CUST_GROUP = 'X'.
    append it_BAPISDITMX.
    it_BAPISDITM-ITM_NUMBER = '00010'.
    it_BAPISDITM-MATERIAL = '946'.
    append it_BAPISDITM.
    break-point.
    salesd = '0000000375'.
    call function 'BAPI_SALESORDER_CHANGE'
    exporting
    salesdocument = salesd
    ORDER_HEADER_IN = it_BAPISDH1
    order_header_inx = it_BAPISDH1X
    SIMULATION =
    BEHAVE_WHEN_ERROR = ' '
    INT_NUMBER_ASSIGNMENT = ' '
    LOGIC_SWITCH =
    tables
    ORDER_ITEM_IN = it_BAPISDITM
    ORDER_ITEM_INX = it_BAPISDITMX
    PARTNERS = it_BAPIPARNR
    return = it_BAPIRET2
    PARTNERCHANGES = it_BAPIPARNRC
    PARTNERADDRESSES = PARTNERADDRESSES
    ORDER_CFGS_REF =
    ORDER_CFGS_INST =
    ORDER_CFGS_PART_OF =
    ORDER_CFGS_VALUE =
    ORDER_CFGS_BLOB =
    ORDER_CFGS_VK =
    ORDER_CFGS_REFINST =
    SCHEDULE_LINES =
    SCHEDULE_LINESX =
    ORDER_TEXT =
    ORDER_KEYS =
    CONDITIONS_IN =
    CONDITIONS_INX =
    EXTENSIONIN =
    If sy-subrc = 0. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT =
    IMPORTING
    RETURN =
    . endif.
    You need to sepaeately use the *Update* and *Change*  and *Insert* flags while filling the data
    Thanks!
    Edited by: Mr. M on Jan 9, 2009 6:23 PM

  • Error while updating the forecast value in M.Master through RMDATIND

    Hi All
    Good Day
      In my custom Program I am using the three structures bgr00,bmm00,bmmh1 & bmmh3 and through rmdatind(Direct input method) program, i am trying to update the forecast value in material master data
    and i am getting error message as Specify a tracking limit and i have taken the tracking limit as 4 in my program.
    Actually there are 2 fields exists for tracking limit in structure bmmh1
    1.SIGGR and
    2.SIGG2
    I had given the  input as 4 for these 2 fields but I am getting the same error message Specify a tracking limit
    Can anyone please help me in this case.
    Thanks in advance.
    Cheers
    Vallabhaneni

    debug your program.
    Compare the field content of the value in the field you submitted with the content in field that is checked  when message M3 456 is issued.

  • Problem while updating the forecast value in m.master by direct input menth

    Hi All
      Good Day
      I am updating the forecast value in material master by direct input method.
    my program is working fine when I am running it online.
    but when i am runnig in back ground I am getting one error which is mentioned below
                                                                                    Job ZM_OPTIMIZA_UPLOAD: Data does not match the job definition; job terminated    BD    078     E    
    Please anyone can help ne in above case.
    Thanks in advance.
    Cheers
    Vallabhaneni

    Hi Hakim
    How are you
    Thanks for your valuable suggestion.
    I am executing my program in background with bmv0 transaction with variant, in development I can run this job in background with out any logical errors but in QA I am getting errors.
    Can you please help me in the above case.
    In Bmv0 transaction first I defined the job and in  program rmdatind (execute) screen first I mentioned the Max. no of logical errors as 500 and Transactions per commit unit as 500 and I run the program in background in bmv0 transaction and I am getting the message background job terminated immediately
    Because of this again I changed the Max. no of logical errors 500 to 99999 and transaction per commit unit 500 to 999999 and then i scheduled my program in background.
    Alomost it ran for 27 hours and then it has given the message background job terminated.
    Job log entries are as follows.
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040840; material number SUJ82J8400; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040840: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040841; material number SUJ84G3001; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040841: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040842; material number SUJ84G3002; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040842: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040843; material number SUJ86G0100; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040843: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040844; material number SUJ86G0300; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040844: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040845; material number SUJ86G0900; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040845: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040846; material number SUJ86G9600; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040846: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040847; material number SUJ86G9601; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040847: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040848; material number SUJ86J0000; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040848: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:20:54  Transaction 0000040848 completed Mat. no.  No. of log. errors 0000040848  
    22.12.2008  11:21:30  ABAP/4 processor: TSV_TNEW_PAGE_ALLOC_FAILED                              
    22.12.2008  11:21:30  Job cancelled      
    I know it has taken long time to process the job  because of I changed the transactions per commit unit (500 to 999999) it kills the system
    But I am supposed to provide some number < 999999 in transactions per commit unit
    actually I haven't tried like I said above < 999999 because i don't have any hopes.
    Please look at this problem and help me in this case.
    Thanks in advance.
    Vallabhaneni

  • (Administration - Marketing - Import), you can set a parameter value "Import mode" for what to do in case of duplication as "update existing records", "Import new records". The final report of this import is presented as a text file that can be viewed in

    Administration - Marketing -> Import, you can set a parameter value "Import mode" for what to do in case of duplication as "update existing records", "Import new records". The final report of this import is presented as a text file that can be viewed in Business Administration - Marketing -> Import -> Exceptions. Whatever the exception, including duplication import occurs during import and recorded in a text file.   What are the fields that determine the duplicity? How I can I can change those?

    You will be returned anything that is in the option's value parameter. What is displayed in the dropdown and what is put in the value attribute do NOT need to be the same, so maybe you should start there.

  • BAPI/FM to update Characteristics value

    Hi,
    Is there any BAPI/FM to update Characteristics value entered in class overview in transaction IQ02.
    Regards,
    Mukesh Kumar

    Hi,
    Use below BAPI..
    CALL FUNCTION 'BAPI_CHARACT_CREATE'
           EXPORTING
             CHARACTDETAIL       = HEAD_CHAR
    *       CHANGENUMBER        =
    *       KEYDATE             = SY-DATUM
           TABLES
             CHARACTDESCR        = DESC
    *        CHARACTVALUESNUM    = VALUN
    *        CHARACTVALUESCHAR   = VALUC
    **       CHARACTVALUESCURR   =
    *        CHARACTVALUESDESCR  = CHDES
    *       CHARACTREFERENCES   =
    *       CHARACTRESTRICTIONS =
             RETURN              = RETN.
    Arivazhagan S

  • BAPI to update EIKP (Foreign Trade: Export/Import Header Data)

    Hello,
    Is there any BAPI to update EIKP (Foreign Trade: Export/Import Header Data) table fields.
    Thank you.
    Best Regards,
    Sreenivas.

    Hi Sreenivas
    Try the FM EXPIMP_POSTING
    Pushpraj

  • BAPI to update EIKP (Foreign Trade: Export/Import Header Data) data

    Hello,
    Is there any BAPI to update EIKP (Foreign Trade: Export/Import Header Data) table fields.
    Thank you.
    Best Regards,
    Sreenivasa Chary Bathoju.

    Dear Sreeninvas,
    You can you BAPI_PO_CHANGE to change EIKP data. and all purchase order related data.
    Thank you.
    Best Regards,
    Sasidhar Reddy Matli.

  • FM/BAPI to update sales order item characteristic values

    Hi experts,
    I have an urgent requirement on changing the characteristic values of a sales order item (VA01/VA02). Is there any FM or BAPI to update the characteristc values?
    Points will be awarded.
    Regards,
    Leo

    Hi,
    I need an FM/BAPI that can be run inside user exit USEREXIT_SAVE_DOCUMENT_PREPARE to update the item configuration. I tried the FM you have given me but it didn't work. If you have sample codes that can update the configuration values of the sales order item, it will help me a lot. Thanks!
    Regards,
    Leo

  • Program updating the value with succeeding 0

    Hi
    We have got a problem.
    We have developed a program to update the value of the condition type. The upload file will have the SO, line item, condition type and value.
    In the background, the sales order change BAPI is called and the value of the condition type is updated. There is no bug in the program for this functionality with reference to the problem.
    When I upload, the value is getting uploaded correctly. But for some users, the value is updated with an additional 0 at the end. For example if 78 is the value of a condition type, the update happens as 780. The strange behaviour is that if I take that user id and password and upload in my laptop, the value is correctly uploaded without any addtional 0.
    We have checked the user profile of all the problamatic users. They are fine. The xls sheet decimal notation is checked and they are also fine. There is no bug in the program, as it is working fine for many users.
    What else should I be checking to solve this issue. An ABAPer advised to check the GUI level difference. I dont know how to do that but there should not be any such difference in the GUI versions for the users.
    Can somebody put some light on this issue.

    Hi Navaneetha,
    The Excel version is the same for you and the user?
    Can the same be debugged and rectified?
    Regards
    Saurabh

  • BAPI to update a single characteristic in IE02

    Hi,
          I am trying to update a single characteristic in IE02.I am able to do that with the BAPI "BAPI_OBJCL_CHANGE",but this BAPI is updating only 1 characteristic and is initializing all the remaining characteristcs.
          Any pointers on this is highly appreciable.
    Navin

    Hi,
    the documentation of the bapi says:
    Caution
    This BAPI only changes the parameters of an existing assignment (or creates a whole new assignment), but it does not delete the assignment to a class and replace it with an assignment to another class. If you want to reassign an object, the old assignments must be read with BAPI_OBJCL_GETCLASSES and deleted with BAPI_OBJCL_DELETE, then the new assignments must be created with BAPI_OBJCL_CREATE.
    The information transferred by this BAPI replaces all old information. An empty field means "delete entry!", not "no change".
    This BAPI does not change the database. To change the database, call BAPI BapiService.TransactionCommit afterwards.
    You can only use this BAPI for objects that are not classes!
    This BAPI only processes assigned values for classification - not for configuration
    so i guess you have to pass all information you do not want to lose.
    i´ve  found this as well:
    http://www.sapfans.com/forums/viewtopic.php?t=125320
    Best regards.
    Edited by: Pablo Casamayor on Jan 2, 2009 7:08 PM

  • Error while udating the forecast value in M.master through RMDATIND Program

    If anyone knows please respond urgently.
    Thanks in advance.
    Cheers
    Vallabhaneni
    Hi All
    Good Day
      In my custom Program I am using the three structures bgr00,bmm00,bmmh1 & bmmh3 and through rmdatind(Direct input method) program, i am trying to update the forecast value in material master data
    and i am getting error message as Specify a tracking limit and i have taken the tracking limit as 4 in my program.
    Actually there are 2 fields exists for tracking limit in structure bmmh1
    1.SIGGR and
    2.SIGG2
    I had given the  input as 4 for these 2 fields but I am getting the same error message Specify a tracking limit
    Can anyone please help me in this case.
    Thanks in advance.
    Cheers
    Vallabhaneni

    debug your program.
    Compare the field content of the value in the field you submitted with the content in field that is checked  when message M3 456 is issued.

  • How to update field values in a database table using module pool prg?

    hi
    how to update field values in a database table using module pool prg?
    we created a customized table, and we put 2 push buttons in screen painter update and display.
    but update is not working?
    data is enter into screen fields and to internal table, but it is not updated in database table.
    thanks in adv
    vidya

    HI,
    we already used the update statement. but its not working.
    plz check this.
    *& Module Pool       ZCUST_CALL_REC
    PROGRAM  ZCUST_CALL_REC.
    TABLES: ZCUST_CALL_REC,ZREMARKS.
    data:  v_kun_low like ZCUST_CALL_REC-kunnr ,
           v_kun_high like ZCUST_CALL_REC-kunnr,
           v_bud_low like ZCUST_CALL_REC-budat,
           v_bud_high like ZCUST_CALL_REC-budat.
    ranges r_kunnr for ZCUST_CALL_REC-kunnr  .
    ranges r_budat for zcust_call_rec-budat.
    DATA: ITAB TYPE STANDARD TABLE OF ZCUST_CALL_REC WITH HEADER LINE,
          JTAB TYPE STANDARD TABLE OF ZREMARKS WITH HEADER LINE.
    *data:begin of itab occurs 0,
        MANDT LIKE ZCUST_CALL_REC-MANDT,
        kunnr like ZCUST_CALL_REC-kunnr,
        budat like ZCUST_CALL_REC-budat,
        code like ZCUST_CALL_REC-code,
        remarks like ZCUST_CALL_REC-remarks,
        end of itab.
    *data:begin of Jtab occurs 0,
        MANDT LIKE ZCUST_CALL_REC-MANDT,
        kunnr like ZCUST_CALL_REC-kunnr,
        budat like ZCUST_CALL_REC-budat,
        code like ZCUST_CALL_REC-code,
        remarks like ZCUST_CALL_REC-remarks,
        end of Jtab.
    CONTROLS:vcontrol TYPE TABLEVIEW USING SCREEN '9001'.
    CONTROLS:vcontrol1 TYPE TABLEVIEW USING SCREEN '9002'.
    *start-of-selection.
    *&      Module  USER_COMMAND_9000  INPUT
          text
    MODULE USER_COMMAND_9000 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    WHEN 'ENQUIRY'.
    perform multiple_selection.
    perform append_CUSTOMER_code.
    PERFORM SELECT_DATA.
    call screen '9001'.
    WHEN 'UPDATE'.
          perform append_CUSTOMER_code.
          PERFORM SELECT_DATA.
          call screen '9002'.
          perform update on commit.
    WHEN 'DELETE'.
          perform append_CUSTOMER_code.
          PERFORM SELECT_DATA.
          call screen '9002'.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Module  STATUS_9000  OUTPUT
          text
    MODULE STATUS_9000 OUTPUT.
      SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9001  INPUT
          text
    MODULE USER_COMMAND_9001 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    endcase.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT
    *&      Module  STATUS_9001  OUTPUT
          text
    MODULE STATUS_9001 OUTPUT.
      SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    move itab-MANDT   to zcust_call_rec-MANDT.
    move itab-kunnr   to zcust_call_rec-kunnr.
    move itab-budat   to zcust_call_rec-budat.
    move itab-code    to zcust_call_rec-code.
    move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    *&      Module  USER_COMMAND_9002  INPUT
          text
    module  USER_COMMAND_9002 input.
    CASE sy-ucomm.
       WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          SET SCREEN 0.
          LEAVE SCREEN.
          CLEAR sy-ucomm.
       WHEN 'UPDATE'.
             perform move_data.
         UPDATE ZCUST_CALL_REC FROM TABLE ITAB.
            IF SY-SUBRC = 0.
               MESSAGE I000(0) WITH 'RECORDS ARE UPDATED'.
             ELSE.
               MESSAGE E001(0) WITH 'RECORDS ARE NOT UPDATED'.
            ENDIF.
      WHEN 'DELETE'.
             perform move_data.
             DELETE ZCUST_CALL_REC FROM TABLE ITAB.
              IF SY-SUBRC = 0.
               MESSAGE I000(0) WITH 'RECORDS ARE DELETED'.
             ELSE.
               MESSAGE E001(0) WITH 'RECORDS ARE NOT DELETED'.
            ENDIF.
    endcase.
    endmodule.                 " USER_COMMAND_9002  INPUT
    *&      Module  STATUS_9002  OUTPUT
          text
    module STATUS_9002 output.
      SET PF-STATUS 'ZCUSTOMER1'.
    SET TITLEBAR 'xxx'.
    endmodule.                 " STATUS_9002  OUTPUT
    *&      Module  update_table  OUTPUT
          text
    module update_table output.
         move itab-MANDT   to zcust_call_rec-MANDT.
         move itab-kunnr   to zcust_call_rec-kunnr.
         move itab-budat   to zcust_call_rec-budat.
         move itab-code    to zcust_call_rec-code.
         move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    endmodule.                 " update_table  OUTPUT
    ***Selection Data
    FORM SELECT_DATA.
    SELECT  mandt kunnr budat code remarks  FROM zcust_call_rec INTO
                            table itab
                             WHERE kunnr IN r_kunnr AND BUDAT IN R_BUDAT.
    ENDFORM.
    ****append vendor code
    FORM APPEND_CUSTOMER_CODE.
    clear r_kunnr.
    clear itab.
    clear r_budat.
    refresh r_kunnr.
    refresh itab.
    refresh r_kunnr.
    IF r_kunnr  IS INITIAL
                  AND NOT v_kun_low IS INITIAL
                   AND NOT v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                  EXPORTING
                                      input         = v_kun_high
                                  IMPORTING
                                      OUTPUT        = r_kunnr-high.
                     r_kunnr-option = 'BT'.
                     r_kunnr-sign = 'I'.
                     append r_kunnr.
       PERFORM V_BUDAT.
    ELSEIF r_kunnr  IS INITIAL
                  AND NOT v_kun_low IS INITIAL
                   AND  v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                    r_kunnr-SIGN = 'I'.
                    r_kunnr-OPTION = 'EQ'.
                    APPEND r_kunnr.
       PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
                  AND  v_kun_low IS INITIAL
                   AND NOT v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                    r_kunnr-SIGN = 'I'.
                    r_kunnr-OPTION = 'EQ'.
                    APPEND r_kunnr.
          PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
                  AND  v_kun_low IS INITIAL
                   AND  v_kun_high IS INITIAL.
                        IF SY-SUBRC = 0.
                             MESSAGE I003(0) WITH 'ENTER CUSTOMER NUMBER'.
                              CALL SCREEN '9000'.
                        ENDIF.
    PERFORM V_BUDAT.
    ENDIF.
    ENDFORM.
    FORM V_BUDAT.
    IF  R_BUDAT IS INITIAL
                   AND NOT v_BUD_low IS INITIAL
                   AND NOT v_BUD_high IS INITIAL.
                     r_budat-low = v_bud_low.
                     r_budat-high = v_bud_high.
                     r_budat-option = 'BT'.
                     r_budat-sign = 'I'.
                     append r_budat.
             ELSEIF  R_BUDAT IS INITIAL
                   AND NOT v_BUD_low IS INITIAL
                   AND  v_BUD_high IS INITIAL.
                     r_budat-low = v_bud_low.
                     r_budat-high = v_bud_high.
                     r_budat-option = 'EQ'.
                     r_budat-sign = 'I'.
                     append r_budat.
             ELSEIF  R_BUDAT IS INITIAL
                   AND  v_BUD_low IS INITIAL
                   AND NOT v_BUD_high IS INITIAL.
                     r_budat-HIGH = v_bud_HIGH.
                     r_budat-option = 'EQ'.
                     r_budat-sign = 'I'.
                     append r_budat.
              ELSEIF  R_BUDAT IS INITIAL
                   AND  v_BUD_low IS INITIAL
                   AND  v_BUD_high IS INITIAL.
                   IF SY-SUBRC = 0.
                       MESSAGE I002(0) WITH 'ENTER POSTING DATE'.
                      CALL SCREEN '9000'.
                    r_budat-low = ''.
                    r_budat-option = ''.
                    r_budat-sign = ''.
                    ENDIF.
            ENDIF.
    ENDFORM.
    *&      Form  update
          text
    -->  p1        text
    <--  p2        text
    form update .
    commit work.
    endform.                    " update
    *&      Form  move_data
          text
    -->  p1        text
    <--  p2        text
    form move_data .
       clear itab.
      refresh itab.
           move-corresponding  zcust_call_rec to itab.
           MOVE ZCUST_CALL_REC-MANDT   TO ITAB-MANDT.
           MOVE ZCUST_CALL_REC-KUNNR   TO ITAB-KUNNR.
           MOVE ZCUST_CALL_REC-BUDAT   TO ITAB-BUDAT.
           MOVE ZCUST_CALL_REC-CODE    TO ITAB-CODE.
           MOVE ZCUST_CALL_REC-REMARKS TO ITAB-REMARKS.
         APPEND ITAB.
         delete itab where kunnr is initial.
    endform.                    " move_data
    thanks in adv
    vidya

  • In SOP- transfer forecasted values from material master to info structure?

    Hi All,
    I wanted to test out a few scenarios. Do you know the answers  / can you help simulate and check the below?
    1.     If I run the forecast using different models for different materials using the total forecast run (MP38), the forecast values will get updated in the material master. Can I get these values transferred directly into the SOP (standard or flexible), without re-running the forecast in SOP? What I am looking at is a possible scenario where individual materials have different forecast model, so do not want to run forecast from SOP using one model for all.
    2.       Can you have the capability of selecting diff model (say based on material master data) in SOP for diff materials? When I ran SOP, the model I specify there for forecasting is applied for all materials
    3.       If I upload historical values/forecasted values in the material master, can I directly transfer them to SOP without any change to the value?
    Appreaciate your inputs.

    Hi All,
    I wanted to test out a few scenarios. Do you know the answers  / can you help simulate and check the below?
    1.     If I run the forecast using different models for different materials using the total forecast run (MP38), the forecast values will get updated in the material master. Can I get these values transferred directly into the SOP (standard or flexible), without re-running the forecast in SOP? What I am looking at is a possible scenario where individual materials have different forecast model, so do not want to run forecast from SOP using one model for all.
    2.       Can you have the capability of selecting diff model (say based on material master data) in SOP for diff materials? When I ran SOP, the model I specify there for forecasting is applied for all materials
    3.       If I upload historical values/forecasted values in the material master, can I directly transfer them to SOP without any change to the value?
    Appreciate your inputs.

  • COPA -update new value field

    Hi All,
    We have 3 revenue value fields and created new value field to capture total revenues for all 3 revenue value fields.
    only new sales orders total revenue value field is populated with revenues.how can we update old sales orders revenue value field information with total value field?
    Revenue A + Revenue B + Revenue C= Total revenue
    Thanks,
    Anusha

    Hi Anu
    KE4S is one option
    Another one is to do KE21n.. but that will be cumbersome.
    You can develop a custom program using Bapi to upload the values automatically
    Last option is to add those values in report manually or using key figure scheme ker1
    Br. Ajay M

Maybe you are looking for

  • Is there any way to print 6 Keynote slides in 2 columns on a page?

    I am using Keynote '08 and am trying to create a pdf file with 6 slides on each page, on two columns, in portrait format. Does anybody know how to do this?

  • Problem with DOM API

    Hi, I use org.w3c.dom to create an XML file. I need to configure "xmlns" into father and child tags, because I have to send my XML to a soap webservice, and the server arises "error in schema XML" if I put "xmlns" only in father, not in child. The pr

  • How are session timeouts handled

    Hi, Can anyone tell me how session timeouts are handled by the Servlet Engine. What is the exact role of the SessionInvalidator class. Are sessions correctly timed out by iAS, because I get strange behaviour in handling session timeouts in my applica

  • Financial Application Database Security in iOS 3 and iOS 4

    I have been looking from a long time for the Security Difference between iOS 3 and iOS 4. I have gone through with various official document but could not find the worth answer. Why did apple enhanced the security level in iOS 4 by using "NSFileProte

  • Calender:Obtaining days/weeks/months between a start & end Calendar range

    I have a startDate and endDate of Calendar type. From this start and end calendar values I want to obtain all the days/weeks/months. Eg Calendar beginDate; // is 14-Oct-2006 Calendar endDate; // is 20-Mar-2007 If I am looking at the months between th