ME_PRICING_INFORECORD Function Module for Past Values

Hello All,
I am developing a report to show the cost breakdown for Purchase Orders created for consignment inventory. The report displays fabircation costs and metal costs for consignment orders based on a withdrawal settlement material document. I pass the date of withdrawal (retrieved from RKWA table) and am expecting to get the condition values at a given time (withdrawal date) using the Function Module ME_PRICING_INFORECORD. When I get the results of the function module, I am getting the current metal condition values set up in the current validity period - as can be seen via MEK3 transaction (Vendor/Alloy-Specific Metal Prices option with condition group). I was hoping to get the condition values for any validity period, not just current. Any suggestions on how to resolve this issue?
Thanks in advance!

I treid to create FM but no luck
Try with LSMW - Object 0060 - RM06IBI0( Program )
I did LSMW for Purchase info record long back..
Reward Points if it is helpful
Thanks
Seshu

Similar Messages

  • Function module for retrieving values of the Characteristics?

    Hi,
    is there a function module for retrieving values of the Characteristics?
    will reward,
    regards,
    M.

    Hello,
    Check this.
        L_OBJECT = G_T_STPO-IDNRK.
    *--- Merkmale incl. Bewertung zum Objekt/Klassenart lesen ----------*
        CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
             EXPORTING
                  CLASSTEXT          = 'X'
                  CLASSTYPE          = '300'
                  FEATURES           = 'X'
                  LANGUAGE           = SY-LANGU
                  OBJECT             = L_OBJECT
                  INITIAL_CHARACT    = ' ' "keine unbewertete M.
                  OBJECTTABLE        = 'MARA'
                  KEY_DATE           = SY-DATUM
    *            NO_VALUE_DESCRIPT  =
                  CHANGE_SERVICE_CLF = 'X'
                  INHERITED_CHAR     = 'X'
             TABLES
                  T_CLASS            =  H_CLASS
                  T_OBJECTDATA       =  H_CLOBJDAT
             EXCEPTIONS
                  NO_CLASSIFICATION  = 1
                  NO_CLASSTYPES      = 2
                  INVALID_CLASS_TYPE = 3
                  OTHERS             = 4.
    Regards,
    Vasanth

  • Function Modules for indirect values

    What are the  function modules for indirect values?

    Hi,
    The SAP function module for indirect valuation of wages is RP_FILL_WAGE_TYPE_TABLE_EXT.
    Also, if indirect valuation is being used, the annual salary field ANSAL also may not be populated. Again, there are some SAP function modules to help us out:
    RP_ANSAL_FROM_PERNR - Use this one if all you have is PERNR
    RP_ANSAL_FROM_INFOTYPE - Good if you have already data for infotypes 0001 & 0008
    RP_ANSAL_FROM_WAGETYPES - It requires a list of wage types used in 8 .
    by
    Prasad gvk.

  • Function modules for converting Char value to hexadecimal value

    Hi All,
    Function modules for converting Char value to hexadecimal value.
    Thanks in advance

    Hi,
    use this function module:
    <b>RSS_UNIQUE_CONVERT_TO_HEX</b>
    regards
    Debjani
    Rewards point for helpful answer

  • Function module for reteriving Purchase order values

    hi,
    I there any function module for reteriving the Purchase order Values

    better to put ur logic /requirement on table EKKOEKPOEKBE.
    Regards
    Prabhu

  • Function Modules for Format Date, Month Name and Quarter value.

    Hi All,
    1. I am getting the date field from the Flatfile, so i need to format the date to YYYYMMDD. Is there any Function module for that in BW.
    2. Based on the above Formated Date i have to find out the Name of the Month like JANUARY, FEBUARY etc.
    3. Based on the same above Formated Date i need to find out the Quarter like 1, 2 etc.
    Could you please let me know if any function modules are there for the above questions in BW not in ABAP, why i mention is some Function modules are there in ABAP but not in BW.
    Thanks in advance.
    Regards,
    srinivas

    Hi ,
    1.If your input date format is MMDDYYYY then Use SDATE as conversion routine in trans strucutre to convert into YYYYMMDD.
    2.By passing year as input parameter for the following FM you would get all the months with text.Using READ statement in routine you can get month name
    MONTH_NAMES_GET
    3.For Quarters you can use the following FM:
    TSTR_PERIODS_QUARTERS
    hope it helps...
    regards,
    Raju

  • Z function modules for OLE

    Hi all,
    Is there any Z function modules for OLE, which will download the data directly to Excel with 2 sheets.
    Regards,
    Shalini

    Hi Shalini Reddy
    there is no FM  but code is there... u can see...
    *& Report  YOLE_FOR_EXCEL
    REPORT  yole_for_excel.
    *REPORT ZTEST_BYW.
    OLE specific include file
    INCLUDE ole2incl.
    INCLUDE excel__c.
    data definitions of OLE objects with type ole2_object
    PARAMETERS: p_filenm(80) LOWER CASE OBLIGATORY
    DEFAULT 'd:\temp\report_tsl.xls'.
    DATA: g_tmp_workbook TYPE ole2_object.
    DATA: g_tmp_worksheets TYPE ole2_object.
    DATA: g_tmp_worksheet1 TYPE ole2_object.
    DATA: g_tmp_worksheet2 TYPE ole2_object.
    DATA: g_pc_template LIKE rcgfiletr-ftappl
    VALUE 'd:\temp\mmr_rpt_tsl_tmp.xls'.
    DATA: g_excel TYPE ole2_object.
    DATA: g_workbooks TYPE ole2_object.
    DATA: g_workbook TYPE ole2_object.
    DATA: g_worksheets TYPE ole2_object.
    DATA: g_worksheet TYPE ole2_object.
    DATA: g_cell TYPE ole2_object.
    DATA: g_cell1 TYPE ole2_object.
    DATA: g_cell2 TYPE ole2_object.
    DATA: g_cellrange TYPE ole2_object.
    DATA: g_font TYPE ole2_object.
    DATA: g_interior TYPE ole2_object.
    DATA: g_borders TYPE ole2_object.
    DATA: g_first_ws VALUE 'Y'.
    DATA: g_row TYPE i.
    DATA: g_col TYPE i.
    definition of loop counter
    DATA: i TYPE i VALUE '5'.
    DATA: BEGIN OF t_sheet1 OCCURS 1,
    col1(10),
    col2(20),
    END OF t_sheet1.
    DATA: BEGIN OF t_sheet2 OCCURS 1,
    col1(10),
    col2(20),
    END OF t_sheet2.
    START-OF-SELECTION.
      PERFORM prepare_data.
      PERFORM download_to_excel.
    END-OF-SELECTION.
    call method of excel 'QUIT'.
    it is now possible to leave the EXCEL application
    remark: you have to go to the EXCEL application and answer the
    popup dialog screen
    *& Form PREPARE_DATA
    FORM prepare_data.
      t_sheet1-col1 = 'A1'.
      t_sheet1-col2 = 'A2'.
      APPEND t_sheet1.
      t_sheet1-col1 = 'B1'.
      t_sheet1-col2 = 'B2'.
      APPEND t_sheet1.
      t_sheet2-col1 = 'Y1'.
      t_sheet2-col2 = 'Y2'.
      APPEND t_sheet2.
      t_sheet2-col1 = 'Z1'.
      t_sheet2-col2 = 'Z2'.
      APPEND t_sheet2.
    ENDFORM. " PREPARE_DATA
    *& Form DOWNLOAD_TO_EXCEL
    FORM download_to_excel.
      PERFORM open_excel.
      PERFORM add_worksheet1.
      PERFORM add_worksheet2.
      PERFORM open_template_file.
      PERFORM close_excel.
      WRITE: / 'End of program'.
    ENDFORM. " DOWNLOAD_TO_EXCEL
    *& Form FILL_CELL
    *& FORM routine, which fills the specified cell in the EXCEL sheet
    *& with the given value
    FORM fill_cell USING i_row TYPE i
    i_col TYPE i
    i_value
    i_fontbold
    i_digit
    i_wraptext
    i_horizon_align
    i_vertical_align.
      DATA: l_str TYPE string.
      CALL METHOD OF g_excel 'CELLS' = g_cell
        EXPORTING #1 = i_row
        #2 = i_col.
      SET PROPERTY OF g_cell 'VALUE' = i_value.
      IF i_fontbold = 'X'.
        GET PROPERTY OF g_cell 'Font' = g_font.
        SET PROPERTY OF g_font 'Bold' = 1.
      ENDIF.
      IF NOT i_wraptext IS INITIAL.
        SET PROPERTY OF g_cell 'WrapText' = 1.
      ENDIF.
      IF NOT i_horizon_align IS INITIAL.
        IF i_horizon_align = 'L'.
          SET PROPERTY OF g_cell 'HorizontalAlignment' = xlleft.
        ELSEIF i_horizon_align = 'R'.
          SET PROPERTY OF g_cell 'HorizontalAlignment' = xlright.
        ELSEIF i_horizon_align = 'C'.
          SET PROPERTY OF g_cell 'HorizontalAlignment' = xlcenter.
        ENDIF.
      ENDIF.
      IF NOT i_vertical_align IS INITIAL.
        IF i_vertical_align = 'T'.
          SET PROPERTY OF g_cell 'VerticalAlignment' = xltop.
        ELSEIF i_vertical_align = 'B'.
          SET PROPERTY OF g_cell 'VerticalAlignment' = xlbottom.
        ELSEIF i_vertical_align = 'C'.
          SET PROPERTY OF g_cell 'VerticalAlignment' = xlcenter.
        ENDIF.
      ENDIF.
    To set number format for cell
      IF i_digit <> ''.
        IF i_value IS INITIAL AND i_digit <> '%'.
          SET PROPERTY OF g_cell 'VALUE' = ''.
        ELSE.
    Set number format for cell with number
          IF i_digit = '1'.
            SET PROPERTY OF g_cell 'NumberFormat' = '#,###.0 '.
          ELSEIF i_digit = '2'.
            SET PROPERTY OF g_cell 'NumberFormat' = '#,##0.00 '.
          ELSEIF i_digit = '%'.
            SET PROPERTY OF g_cell 'NumberFormat' = '#,##0.00% '.
          ELSE.
            SET PROPERTY OF g_cell 'NumberFormat' = '#,### '.
          ENDIF.
        ENDIF.
      ENDIF.
      ADD 1 TO i_col.
    ENDFORM.                    "FILL_CELL
    *& Form OPEN_EXCEL
    FORM open_excel.
      DATA: l_cnt TYPE i.
    create object excel of OLE class 'EXCEL.APPLICATION'
      CREATE OBJECT g_excel 'EXCEL.APPLICATION'.
      CALL METHOD OF g_excel 'WORKBOOKS' = g_workbooks.
      CALL METHOD OF g_workbooks 'ADD' = g_workbook.
      GET PROPERTY OF g_workbook 'Worksheets' = g_worksheets.
      GET PROPERTY OF g_excel 'ACTIVESHEET' = g_worksheet.
      SET PROPERTY OF g_excel 'DISPLAYALERTS' = 0.
      GET PROPERTY OF g_worksheets 'Count' = l_cnt.
      l_cnt = l_cnt - 1.
    Delete unwanted worksheets
      DO l_cnt TIMES.
        GET PROPERTY OF g_excel 'ACTIVESHEET' = g_worksheet.
        CALL METHOD OF g_worksheet 'DELETE'.
      ENDDO.
    ENDFORM. " OPEN_EXCEL
    *& Form CLOSE_EXCEL
    FORM close_excel.
      SET PROPERTY OF g_excel 'VISIBLE' = 1.
      CALL METHOD OF g_workbook 'SAVEAS'
        EXPORTING #1 = p_filenm.
    quit Excel and free all OLE objects
    call method of g_excel 'QUIT'.
      FREE OBJECT g_interior.
      FREE OBJECT g_borders.
      FREE OBJECT g_font.
      FREE OBJECT g_cell.
      FREE OBJECT g_cell1.
      FREE OBJECT g_cell2.
      FREE OBJECT g_cellrange.
      FREE OBJECT g_excel.
      FREE OBJECT g_workbooks.
      FREE OBJECT g_workbook.
      FREE OBJECT g_worksheets.
      FREE OBJECT g_worksheet.
    ENDFORM. " CLOSE_EXCEL
    *& Form ADD_WORKSHEET
    FORM add_worksheet USING i_name.
    Add new worksheet
      IF g_first_ws <> 'N'.
        g_first_ws = 'N'.
        GET PROPERTY OF g_excel 'ACTIVESHEET' = g_worksheet.
      ELSE.
        CALL METHOD OF g_worksheets 'Add' = g_worksheet.
      ENDIF.
      SET PROPERTY OF g_worksheet 'NAME' = i_name.
      g_row = 1.
      g_col = 1.
    ENDFORM. " ADD_WORKSHEET
    *& Form ADD_WORKSHEET1
    FORM add_worksheet1.
      PERFORM add_worksheet USING 'Test 1'.
    fill line in EXCEL sheet with headerlines of table columns
      g_col = 1.
      PERFORM fill_cell USING g_row g_col 'My First Worksheet' 'X' ''
      PERFORM merge_cell USING g_row 1 g_row 4.
      PERFORM set_border USING g_row 1 g_row 4 4 ''.
      ADD 1 TO g_row.
      g_col = 1.
      PERFORM fill_cell USING g_row g_col 'ID'(001) 'X' '' '' '' ''.
      PERFORM fill_cell USING g_row g_col 'Name'(002) 'X' '' '' '' ''.
      PERFORM fill_cell USING g_row g_col 'Telephon'(003) 'X' '' '' '' ''.
      PERFORM fill_cell USING g_row g_col 'Rabatt'(004) 'X' '' '' '' ''.
    loop at customr table and print values into EXCEL sheet
      ADD 1 TO g_row.
      LOOP AT t_sheet1.
        g_col = 1.
        PERFORM fill_cell USING g_row g_col t_sheet1-col1 '' '' '' '' ''.
        PERFORM fill_cell USING g_row g_col t_sheet1-col2 '' '' '' '' ''.
        ADD 1 TO g_row.
      ENDLOOP.
      g_col = 4.
      PERFORM set_border USING 1 1 g_row g_col '' 4.
    ENDFORM. " ADD_WORKSHEET1
    *& Form ADD_WORKSHEET2
    FORM add_worksheet2.
      PERFORM add_worksheet USING 'Test 2'.
    fill line in EXCEL sheet with headerlines of table columns
      g_col = 1.
      PERFORM fill_cell USING g_row g_col 'My Second Worksheet' 'X' ''
      PERFORM merge_cell USING g_row 1 g_row 4.
      PERFORM set_border USING g_row 1 g_row 4 1 'X'.
      PERFORM set_color USING g_row 1 g_row 4 'LT'.
      ADD 1 TO g_row.
      g_col = 1.
      PERFORM fill_cell USING g_row g_col 'ID'(001) 'X' '' '' '' ''.
      PERFORM fill_cell USING g_row g_col 'Name'(002) 'X' '' '' '' ''.
      PERFORM fill_cell USING g_row g_col 'Telephon'(003) 'X' '' '' '' ''.
      PERFORM fill_cell USING g_row g_col 'Rabatt'(004) 'X' '' '' '' ''.
    loop at customr table and print values into EXCEL sheet
      ADD 1 TO g_row.
      LOOP AT t_sheet2.
        g_col = 1.
        PERFORM fill_cell USING g_row g_col t_sheet2-col1 '' '' '' '' ''.
        PERFORM fill_cell USING g_row g_col t_sheet2-col2 '' '' '' '' ''.
        ADD 1 TO g_row.
      ENDLOOP.
      g_col = 4.
      PERFORM set_border USING 1 1 g_row g_col 2 'X'.
      ADD 4 TO g_row.
      g_col = 1.
      PERFORM fill_cell USING g_row g_col 'This is a wrap text' 'X' ''
      'X' 'C' 'T'.
      PERFORM fill_cell USING g_row g_col 'Vertical - Bottom' 'X' ''
      '' 'L' 'T'.
      ADD 4 TO g_row.
      g_col = 1.
      PERFORM fill_cell USING g_row g_col 'Amount 1' 'X' '' '' '' ''.
      PERFORM fill_cell USING g_row g_col '100.04' '' 'X' '' '' ''.
      ADD 1 TO g_row.
      g_col = 1.
      PERFORM fill_cell USING g_row g_col 'Amount 2' 'X' '' '' '' ''.
      PERFORM fill_cell USING g_row g_col '200.01' '' 'X' '' '' ''.
      ADD 1 TO g_row.
      g_col = 1.
      PERFORM fill_cell USING g_row g_col 'Total' 'X' '' '' '' ''.
      PERFORM fill_cell USING g_row g_col '=SUM(B13:B14)' 'X' 'X' '' '' ''.
      PERFORM fill_cell USING g_row g_col '0.00' 'X' 'X' '' '' ''.
      PERFORM copy_cell USING g_row 2 17 5 25 8.
    ENDFORm. " ADD_WORKSHEET2
    *& Form MERGE_CELL
    FORM merge_cell USING i_row1 i_col1
    i_row2 i_col2.
      CALL METHOD OF g_excel 'Cells' = g_cell1
        EXPORTING #1 = i_row1
        #2 = i_col1.
      CALL METHOD OF g_excel 'Cells' = g_cell2
        EXPORTING #1 = i_row2
        #2 = i_col2.
      CALL METHOD OF g_excel 'Range' = g_cellrange
        EXPORTING #1 = g_cell1
        #2 = g_cell2.
      CALL METHOD OF g_cellrange 'Merge'.
    ENDFORM. " MERGE_CELL
    *& Form SET_BORDER
    FORM set_border USING i_row1 i_col1
    i_row2 i_col2
    i_thickness
    i_allborders.
      CALL METHOD OF g_excel 'Cells' = g_cell1
        EXPORTING #1 = i_row1
        #2 = i_col1.
      CALL METHOD OF g_excel 'Cells' = g_cell2
        EXPORTING #1 = i_row2
        #2 = i_col2.
      CALL METHOD OF g_excel 'Range' = g_cellrange
        EXPORTING #1 = g_cell1
        #2 = g_cell2.
      IF i_allborders IS INITIAL.
        CALL METHOD OF g_cellrange 'BorderAround'
        EXPORTING #1 = 1 "Continuous line
        #2 = i_thickness. "Thickness: 1 - Normal, 4 - Thick
      ELSE.
        GET PROPERTY OF g_cellrange 'Borders' = g_borders.
        SET PROPERTY OF g_borders 'LineStyle' = '1'.
        SET PROPERTY OF g_borders 'Weight' = i_thickness.
      ENDIF.
    ENDFORM. " SET_BORDER
    *& Form SET_COLOR
    FORM set_color USING i_row1 i_col1
    i_row2 i_col2
    i_color.
      DATA: l_colorindex TYPE i.
      CASE i_color.
        WHEN 'BK'.
          l_colorindex = 1. "Black
        WHEN 'BR'.
          l_colorindex = 53. "Brown
        WHEN 'OG'.
          l_colorindex = 52. "Olive Green
        WHEN 'DG'.
          l_colorindex = 51. "Dark Green
        WHEN 'DT'.
          l_colorindex = 49. "Dark Teal
        WHEN 'DB'.
          l_colorindex = 11. "Dark Blue
        WHEN 'ID'.
          l_colorindex = 55. "Indigo
        WHEN 'G4'.
          l_colorindex = 56.                                    "Gray 80%
        WHEN 'DR'.
          l_colorindex = 9. "Dark Red
        WHEN 'OR'.
          l_colorindex = 46. "Orange
        WHEN 'DY'.
          l_colorindex = 12. "Dark Yellow
        WHEN 'GR'.
          l_colorindex = 10. "Green
        WHEN 'TL'.
          l_colorindex = 14. "Teal
        WHEN 'BL'.
          l_colorindex = 5. "Blue
        WHEN 'BY'.
          l_colorindex = 47. "Blue Gray
        WHEN 'G3'.
          l_colorindex = 16.                                    "Gray 50%
        WHEN 'RD'.
          l_colorindex = 3. "Red
        WHEN 'LO'.
          l_colorindex = 45. "Light Orange
        WHEN 'LI'.
          l_colorindex = 43. "Lime
        WHEN 'SG'.
          l_colorindex = 50. "Sea Green
        WHEN 'AQ'.
          l_colorindex = 42. "Aqua
        WHEN 'LB'.
          l_colorindex = 41. "Light Blue
        WHEN 'VL'.
          l_colorindex = 13. "Violet
        WHEN 'G2'.
          l_colorindex = 48.                                    "Gray 40%
        WHEN 'PK'.
          l_colorindex = 7. "Pink
        WHEN 'GD'.
          l_colorindex = 44. "Gold
        WHEN 'YL'.
          l_colorindex = 6. "Yellow
        WHEN 'BG'.
          l_colorindex = 4. "Bright Green
        WHEN 'TQ'.
          l_colorindex = 8. "Turquoise
        WHEN 'SB'.
          l_colorindex = 33. "Sky Blue
        WHEN 'PL'.
          l_colorindex = 54. "Plum
        WHEN 'G1'.
          l_colorindex = 15.                                    "Gray 25%
        WHEN 'RS'.
          l_colorindex = 38. "Rose
        WHEN 'TN'.
          l_colorindex = 40. "Tan
        WHEN 'LY'.
          l_colorindex = 36. "Light Yellow
        WHEN 'LG'.
          l_colorindex = 35. "Light Green
        WHEN 'LT'.
          l_colorindex = 34. "Light Turquoise
        WHEN 'PB'.
          l_colorindex = 37. "Pale Blue
        WHEN 'LV'.
          l_colorindex = 39. "Lavender
        WHEN 'WH'.
          l_colorindex = 2. "White
        WHEN OTHERS.
          l_colorindex = 2. "White
      ENDCASE.
      CALL METHOD OF g_excel 'Cells' = g_cell1
        EXPORTING #1 = i_row1
        #2 = i_col1.
      CALL METHOD OF g_excel 'Cells' = g_cell2
        EXPORTING #1 = i_row2
        #2 = i_col2.
      CALL METHOD OF g_excel 'Range' = g_cellrange
        EXPORTING #1 = g_cell1
        #2 = g_cell2.
      GET PROPERTY OF g_cellrange 'Interior' = g_interior.
      SET PROPERTY OF g_interior 'ColorIndex' = l_colorindex.
    ENDFORM. " SET_COLOR
    *& Form COPY_CELL
    FORM copy_cell USING i_crow i_ccol
    i_prow1 i_pcol1
    i_prow2 i_pcol2.
      CALL METHOD OF g_excel 'Cells' = g_cell
        EXPORTING #1 = i_crow
        #2 = i_ccol.
      CALL METHOD OF g_cell 'Copy'.
      CALL METHOD OF g_excel 'Cells' = g_cell1
        EXPORTING #1 = i_prow1
        #2 = i_pcol1.
      CALL METHOD OF g_excel 'Cells' = g_cell2
        EXPORTING #1 = i_prow2
        #2 = i_pcol2.
      CALL METHOD OF g_excel 'Range' = g_cellrange
        EXPORTING #1 = g_cell1
        #2 = g_cell2.
      CALL METHOD OF g_worksheet 'Paste'
        EXPORTING #1 = g_cellrange.
    ENDFORM. " COPY_CELL
    *& Form OPEN_TEMPLATE_FILE
    FORM open_template_file.
      CALL METHOD OF g_workbooks 'Open' = g_tmp_workbook
        EXPORTING #1 = g_pc_template
        #2 = 2
        #3 = 0
        #4 = 1
        #5 = 0
        #6 = 0
        #7 = 1.
      CALL FUNCTION 'FLUSH'
        EXCEPTIONS
          OTHERS = 0.
      GET PROPERTY OF g_tmp_workbook 'Worksheets' = g_tmp_worksheets.
      GET PROPERTY OF g_tmp_worksheets 'Item' = g_tmp_worksheet1
      exporting #1 = 1.
      GET PROPERTY OF g_tmp_worksheets 'Item' = g_tmp_worksheet2
      exporting #1 = 2.
      CALL METHOD OF g_tmp_worksheet1 'Copy'
        EXPORTING #1 = g_worksheet.
      CALL METHOD OF g_tmp_worksheet2 'Copy'
        EXPORTING #1 = g_worksheet.
    call method of g_tmp_workbook 'Close'.
      CALL FUNCTION 'FLUSH'
        EXCEPTIONS
          OTHERS = 0.
    ENDFORM. " OPEN_TEMPLATE_FILE

  • How to create the INBOUND Function Module for INBOUND IDOCs

    Hi Friends,
    Can any Suggest me How to proceed to Create an INBOUND Function Module for Processing the INBOUND IDOCS
    which are recieved from XI Server ?
    I am working in SAP-ISU
    Here i will recieve the INBOUND IDOCs for the Meter Reading Orders.
    We have a Standard INBOUND FUNCTION MODULE
    IDOC_INPUT_ISU_MR_UPLOAD
    which Uploads the Meter Reading Results.
    I copied the Same function Module into ZIDOC_INPUT_
    and working on it.
    Can any one suggest me, whether i am going in correct way or not.
    In IDOC_INPUT_ISU_MR_UPLOAD Inbound fun module,
    BAPI_MTRREADDOC_UPLOAD is used to Update or Insert the Meter Reading Results,
    My requirment is to Insert and Update the Meter Reading Orders which are Inbounded from XI.
    Can I Use the Same BAPI
    BAPI_MTRREADDOC_UPLOAD
    to Update the below fields,
    EABL-SERNR
    EABL-ZWNUMMER
    EABLG-ABLESGR
    EABL-V_ZWSTAND
    EABL-N_ZWSTAND
    EABL-ABLHINW
    EABL-ZSKIPC
    EABL-ADAT
    EABL-ATIMTATS
    EABL-ADATTATS
    EABL-ATIM
    EABL-ZMESSAGE
    EABL-ABLESER(Meter reader number)
    Kindly Suggest me,
    Thanks in Advance,
    Ganesh

    Hello Ganesh
    I think you are going completely astray with you z-function module for IDoc processing.
    If you look at TABLES parameter METERREADINGRESULTS (type BAPIEABLU ) of BAPI_MTRREADDOC_UPLOAD you will find many of the requested fields already:
    EABL-SERNR => BAPIEABLU-SERIALNO
    EABL-ZWNUMMER =>REGISTER
    EABLG-ABLESGR
    EABL-V_ZWSTAND
    EABL-N_ZWSTAND
    EABL-ABLHINW
    EABL-ZSKIPC
    EABL-ADAT
    EABL-ATIMTATS => ACTUALMRTIME
    EABL-ADATTATS => ACTUALMRDATE
    EABL-ATIM
    EABL-ZMESSAGE
    EABL-ABLESER(Meter reader number)
    Field EABL-ZMESSAGE appears to be custom field (at least I cannot find it on ECC 6.0). If this field was added using include CI_EABL then you probably can get these values into the BAPI using the EXTENSIONIN parameter.
    Check routine CHECK_UPLOADRECORDS in the BAPI which allows two extension structures:
    - BAPI_TE_EABL
    - BAPI_TE_EOSB
    Not surprisingly BAPI_TE_EABL contains the include CI_EABL.
    Regards
      Uwe

  • Error in XXL_FULL_API function module for download report to excel

    Hi all,
    I am using XXL_FULL_API function module for download report to excel, In this FM we have to fill a table called sema        = t_gxxlt_s. in this table we have a fields called
    i_sema-col_no  = 19.
      i_sema-col_src = 19.
      i_sema-col_typ = 'STR'.
      i_sema-col_ops = 'DFT'
    here in 'col_typ' if we put STR in excel it will come as a text but i wnat the time field what i have to pass ?
    and for filed 'col_ops' also ??
    Thaks,
    Sridhar

    Hi sridhar joshi,
    Please check this program
    REPORT Excel.
    TABLES:
      sflight.
    * header data................................
    DATA :
      header1 LIKE gxxlt_p-text VALUE 'Suresh',
      header2 LIKE gxxlt_p-text VALUE 'Excel sheet'.
    * Internal table for holding the SFLIGHT data
    DATA BEGIN OF t_sflight OCCURS 0.
            INCLUDE STRUCTURE sflight.
    DATA END   OF t_sflight.
    * Internal table for holding the horizontal key.
    DATA BEGIN OF  t_hkey OCCURS 0.
            INCLUDE STRUCTURE gxxlt_h.
    DATA END   OF t_hkey .
    * Internal table for holding the vertical key.
    DATA BEGIN OF t_vkey OCCURS 0.
            INCLUDE STRUCTURE gxxlt_v.
    DATA END   OF t_vkey .
    * Internal table for holding the online text....
    DATA BEGIN OF t_online OCCURS 0.
            INCLUDE STRUCTURE gxxlt_o.
    DATA END   OF t_online.
    * Internal table to hold print text.............
    DATA BEGIN OF t_print OCCURS 0.
            INCLUDE STRUCTURE gxxlt_p.
    DATA END   OF t_print.
    * Internal table to hold SEMA data..............
    DATA BEGIN OF t_sema OCCURS 0.
            INCLUDE STRUCTURE gxxlt_s.
    DATA END   OF t_sema.
    * Retreiving data from sflight.
    SELECT * FROM sflight
             INTO TABLE t_sflight.
    * Text which will be displayed online is declared here....
    t_online-line_no    = '1'.
    t_online-info_name  = 'Created by'.
    t_online-info_value = 'KODANDARAMI REDDY'.
    APPEND t_online.
    * Text which will be printed out..........................
    t_print-hf     = 'H'.
    t_print-lcr    = 'L'.
    t_print-line_no = '1'.
    t_print-text   = 'This is the header'.
    APPEND t_print.
    t_print-hf     = 'F'.
    t_print-lcr    = 'C'.
    t_print-line_no = '1'.
    t_print-text   = 'This is the footer'.
    APPEND t_print.
    * Defining the vertical key columns.......
    t_vkey-col_no   = '1'.
    t_vkey-col_name = 'MANDT'.
    APPEND t_vkey.
    t_vkey-col_no   = '2'.
    t_vkey-col_name = 'CARRID'.
    APPEND t_vkey.
    t_vkey-col_no   = '3'.
    t_vkey-col_name = 'CONNID'.
    APPEND t_vkey.
    t_vkey-col_no   = '4'.
    t_vkey-col_name = 'FLDATE'.
    APPEND t_vkey.
    * Header text for the data columns................
    t_hkey-row_no = '1'.
    t_hkey-col_no = 1.
    t_hkey-col_name = 'PRICE'.
    APPEND t_hkey.
    t_hkey-col_no = 2.
    t_hkey-col_name = 'CURRENCY'.
    APPEND t_hkey.
    t_hkey-col_no = 3.
    t_hkey-col_name = 'PLANETYPE'.
    APPEND t_hkey.
    t_hkey-col_no = 4.
    t_hkey-col_name = 'SEATSMAX'.
    APPEND t_hkey.
    t_hkey-col_no = 5.
    t_hkey-col_name = 'SEATSOCC'.
    APPEND t_hkey.
    t_hkey-col_no = 6.
    t_hkey-col_name = 'PAYMENTSUM'.
    APPEND t_hkey.
    * populating the SEMA data..........................
    t_sema-col_no  = 1.
    t_sema-col_typ = 'STR'.
    t_sema-col_ops = 'DFT'.
    APPEND t_sema.
    t_sema-col_no = 2.
    APPEND t_sema.
    t_sema-col_no = 3.
    APPEND t_sema.
    t_sema-col_no = 4.
    APPEND t_sema.
    t_sema-col_no = 5.
    APPEND t_sema.
    t_sema-col_no = 6.
    APPEND t_sema.
    t_sema-col_no = 7.
    APPEND t_sema.
    t_sema-col_no = 8.
    APPEND t_sema.
    t_sema-col_no = 9.
    APPEND t_sema.
    t_sema-col_no = 10.
    t_sema-col_typ = 'NUM'.
    t_sema-col_ops = 'ADD'.
    APPEND t_sema.
    CALL FUNCTION 'XXL_FULL_API'
      EXPORTING
    *   DATA_ENDING_AT          = 54
    *   DATA_STARTING_AT        = 5
       filename                = 'TESTFILE'
       header_1                = header1
       header_2                = header2
       no_dialog               = 'X'
       no_start                = ' '
        n_att_cols              = 6
        n_hrz_keys              = 1
        n_vrt_keys              = 4
       sema_type               = 'X'
    *   SO_TITLE                = ' '
      TABLES
        data                    = t_sflight
        hkey                    = t_hkey
        online_text             = t_online
        print_text              = t_print
        sema                    = t_sema
        vkey                    = t_vkey
    EXCEPTIONS
       cancelled_by_user       = 1
       data_too_big            = 2
       dim_mismatch_data       = 3
       dim_mismatch_sema       = 4
       dim_mismatch_vkey       = 5
       error_in_hkey           = 6
       error_in_sema           = 7
       file_open_error         = 8
       file_write_error        = 9
       inv_data_range          = 10
       inv_winsys              = 11
       inv_xxl                 = 12
       OTHERS                  = 13
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    please refer this link
    http://www.thespot4sap.com/Articles/Download_to_excel.asp
    Best regards,
    raam

  • Creation of function module for updating the ztable

    Hi,
    I am sending the requirement for ceation of function module for updating the ztable.
    Requirement----
    Table Updation rule (New record)
    While creating a new record the calling function will export the following to the table handling function.
    Table field     Probable Values
    ZORDERNO------->     Sales Delivery no in case of sales orderShipment no in case of transfer order
    UNAME----
    >     User ID
    ZORDTYPE----
    >     SALEOR in case of sales orderTRANSF in case of transfer order
    ZREFDOCNO----
    >Sales Order no in case of sales orderPurchase Order no in case of transfer order
    ZREFDOCNO1----
    >Delivery no in case of transfer order
    The table handling function will calculate the following fields
    Table field     Probable Values
    ZREQNO----
    >Running serial number (incremented by 1 for each new record)
    ZREQDAT     -
    >System date
    ZREQTIME----
    >     System time
    ZSTATUS----
    >OPEN (for all new records)
    Before inserting a new record the table handling function will always check if a previous record exists for the same order / shipment no. if record exists the function will not insert a new record.
    Table Updation rule (Status Update)
    While updating a record the calling function will export the following to the table handling function.
    Table field     Probable Values
    ZORDERNO----
    >Sales order no in case of sales orderShipment no in case of transfer order
    ZSTATUS----
    >CANCEL if cancellation successfulERROR if cancellation not possible (order already processed)
    The table handling function will calculate the following fields
    Table field     Probable Values
    ZSTATDAT----
    >System date
    ZSTATTIME----
    >     System time

    Do you have to create/update new record in Ztable through Function Module ?
    or you need to write FM only for validation?
    Any how, you need to create a Program with Input values for the fields of Ztable, and for rest of fields the Value can be calculated based on input as per your requirement.
    Let me know clearly what exactly u need ?
    Regards,
    Kiran

  • Bom explosion function module for bypassing phantom materials

    hi,
    function module "cS_BOM_EXPL_MAT_V2" is used to explode the componensts of first level only.
    In my case there are components at first level are phantom assemblies so i want to drill down further to arrive at E or F part which may be at 2nd or 3rd level.
    please suggest any BAPI or function module for the above requirement.
    Thanks.
    Kumar

    Dear Kumar,
    check with following input values for the Functional Module
    FTREL                                                    
    ALEKZ                                                    
    ALTVO                                                    
    AUFSW                                                    
    AUMGB                                                    
    AUMNG                                      0.000         
    AUSKZ                                                    
    AMIND                                                    
    BAGRP                                                    
    BEIKZ                                                    
    BESSL                                                    
    BGIXO                                                    
    BREMS                                                    
    CAPID                           PP01                     
    CHLST                                                    
    COSPR                                                    
    CUOBJ                           000000000000000000       
    CUOVS                                                    
    CUOLS                                                    
    DATUV                           13.05.2008               
    DELNL                                                    
    DRLDT                                                    
    EHNDL                                                    
    EMENG                                      2.000         
    ERSKZ                                                    
    ERSSL                                                    
    FBSTP                                                    
    KNFBA                                                    
    KSBVO                                                    
    MBWLS                           X                        
    MKTLS                           X                        
    MDMPS                                                    
    MEHRS                           X                        
    MKMAT                                                    
    MMAPS                                                    
    SALWW                                                    
    SPLWW                                                    
    MMORY                           1                        
    MTNRV                           S7690339                 
    NLINK                                                    
    POSTP                                                    
    RNDKZ                                                    
    RVREL                                                    
    SANFR                                 
    SANIN                                 
    SANKA                                 
    SANKO                                 
    SANVS                                 
    SCHGT                                 
    STKKZ                                 
    STLAL                           1     
    STLAN                           1     
    STPST                           0     
    SVWVO                           X     
    WERKS                         5501  
    NORVL                                 
    MDNOT                                 
    PANOT                                 
    QVERW                                 
    VERID                                 
    VRSVO                           X     
    I'm using this FM with the above input parameters and I'm getting the necessary details perfectly.
    Please check & revert back.
    Regards
    Mangalraj.S

  • Function module for F4 help download

    HI Experts
    What is the function module for F4 help download.
    Thanks in advance

    Hi,
      Function module is F4IF_FIELD_VALUE_REQUEST.
    Use the Function moduel like this in this i create screen 100 by using se51.
    REPORT zcl_f4_help.
    TYPES: BEGIN OF values,
             carrid TYPE spfli-carrid,
             connid TYPE spfli-connid,
           END OF values.
    DATA: carrier(3) TYPE c,
          connection(4) TYPE c.
    DATA: progname TYPE sy-repid,
          dynnum   TYPE sy-dynnr,
          dynpro_values TYPE TABLE OF dynpread,
          field_value LIKE LINE OF dynpro_values,
          values_tab TYPE TABLE OF values.
    CALL SCREEN 100.
    MODULE init OUTPUT.
      progname = sy-repid.
      dynnum   = sy-dynnr.
      CLEAR: field_value, dynpro_values.
      field_value-fieldname = 'CARRIER'.
      APPEND field_value TO dynpro_values.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE value_carrier INPUT.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
           EXPORTING
                tabname     = 'DEMOF4HELP'
                fieldname   = 'CARRIER1'
                dynpprog    = progname
                dynpnr      = dynnum
                dynprofield = 'CARRIER'.
    ENDMODULE.
    MODULE value_connection INPUT.
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                dyname             = progname
                dynumb             = dynnum
                translate_to_upper = 'X'
           TABLES
                dynpfields         = dynpro_values.
      READ TABLE dynpro_values INDEX 1 INTO field_value.
      SELECT  carrid connid
        FROM  spfli
        INTO  CORRESPONDING FIELDS OF TABLE values_tab
        WHERE carrid = field_value-fieldvalue.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield    = 'CONNID'
                dynpprog    = progname
                dynpnr      = dynnum
                dynprofield = 'CONNECTION'
                value_org   = 'S'
           TABLES
                value_tab   = values_tab.
    ENDMODULE.
    you use this exaple  code.
    Plz Reward if Help,
    Mahi.

  • Function Module for F4 Help

    HI Experts
    What is the function module for F4 help download.
    Thanks in advance

    Hi,
    try these fn modules,
    F4IF_INT_TABLE_VALUE_REQUEST
    its a F4 help that returns the values selected in an internal table.
    F4_IF_FIELD_VALUE_REQUEST
    It uses values from a DDIC table to provide a list of possible values

  • Function module for USD amount to TWD

    Hi,
    Any one send me function module for converting USD currency to TWD.
    Thanks,
    donald

    HI,
    DATA: gd_fcurr TYPE tcurr-fcurr,
          gd_tcurr TYPE tcurr-tcurr,
          gd_date  TYPE sy-datum,
          gd_value TYPE i.
    gd_fcurr = 'USD'.
    gd_tcurr = 'TWD'.
    gd_date  = sy-datum.
    gd_value = 10.
    PERFORM currency_conversion USING gd_fcurr
                                      gd_tcurr
                                      gd_date
                             CHANGING gd_value.
    * Convert value to Currency value
    *&      Form  currency_conversion
    *       text
    *      -->P_GD_FCURR  text
    *      -->P_GD_TCURR  text
    *      -->P_GD_DATE   text
    *      <--P_GD_VALUE  text
    FORM currency_conversion  USING    p_fcurr
                                       p_tcurr
                                       p_date
                              CHANGING p_value.
      DATA: t_er        TYPE tcurr-ukurs,
            t_ff        TYPE tcurr-ffact,
            t_lf        TYPE tcurr-tfact,
            t_vfd       TYPE datum,
            ld_erate(12)   TYPE c.
      CALL FUNCTION 'READ_EXCHANGE_RATE'
        EXPORTING
    *       CLIENT                  = SY-MANDT
          date                    = p_date
          foreign_currency        = p_fcurr
          local_currency          = p_tcurr
          TYPE_OF_RATE            = 'M'
    *       EXACT_DATE              = ' '
       IMPORTING
          exchange_rate           = t_er
          foreign_factor          = t_ff
          local_factor            = t_lf
          valid_from_date         = t_vfd
    *       DERIVED_RATE_TYPE       =
    *       FIXED_RATE              =
    *       OLDEST_RATE_FROM        =
       EXCEPTIONS
         no_rate_found           = 1
         no_factors_found        = 2
         no_spread_found         = 3
         derived_2_times         = 4
         overflow                = 5
         zero_rate               = 6
         OTHERS                  = 7
      IF sy-subrc EQ 0.
        ld_erate = t_er / ( t_ff / t_lf ).
        p_value = p_value * ld_erate.
      ENDIF.
    ENDFORM.                    " currency_conversion
    You can use
    <b>CONVERT_TO_FOREIGN_CURRENCY</b> Convert local currency to foreign
    <b>CONVERT_TO_LOCAL_CURRENCY</b> Convert from foreign currency to local currency currency.

  • Function module for translation

    Hi friends,
               Is there any Function module for translating the unit of currency (WAERS) to other languages. I've a requirement where I need the value EUR or USD to be printed in russian.
    Thanks,
    Sharmila

    Hi
    Please check the FM
    <b>CURRENCY_GETLIST</b>
    It basically takes the values from the table TCURT
    Hope this helps..

Maybe you are looking for

  • My iPhone suddenly turned off by itself and it won't turn back on, what to do?

    So I was just texting with my iPhone (with 35% battery life) earlier and when I check my phone again 5 mins later, it completely turned off. So, I tried holding the sleep/lock botton on top + the Home button (for more than 10 sec) and it won't turn o

  • Ichat 5.0.3 transfer not working

    Hey there! Having a issues with iChat 5.0.3 (745) in Snow Leopard. I can always accept files, but when i send file to people, sometimes they will go through, sometimes it will give me an error message "failed"

  • Pop-Up Menus and Calculations

    Hi all, In my budget spreadsheet I am designing, I want to be able to denote the type of food each line item is in my "food" category. For example, I want to use a pop-up menu to indicate that the McDonald's I spent $5.66 on two days ago is a "Fast F

  • USB drives not working on Macbook Pro

    I have an early 2011 Macbook Pro and both USB drives are currently not working. All storage devices work in my other Mac, just not in this one. They do not show up in disk utility or anything. I've attached a screenshot of the system profiler informa

  • Evaluating an XML expression within from within an XML node

    I would like to pass in an E4X expression from a node and evaluate that expression. For example, let's say the XML looks like this: quote: <section id="a"> <item id="1"> <value>3.1</value> </item> <item id="2"> <value>2.2</value> </item> <item id="3"