Alternative of  Function module NAMETAB_GET

Hi all,
Our equirment is to find the list of all field from a DDIC structure supply as input.
For this we are using NAMETAB_GET.... but the function module seems obsolute....
Can anybody please suggest a Function Module to find the list fileld of a DDIC structure as input.
Anirban

Hi,
You can use FM DDIF_FIELDINFO_GET which gets the table structure with all INCLUDEs (or APPENDs) resolved. It is quite good documented.
Regards, Gerd Rother

Similar Messages

  • Alternative for  Function module 'F4_CHOOSE_MCID' in ECC 5.0?

    Hi,
    Can any one tell me the Alternative for  Function module <b>'F4_CHOOSE_MCID'</b> in ECC 5.0?
    Helpful answers will be rewarded.
    Thanks
    Kiran

    Hi,
    Please use this FM UMC_NOTIF_SEND_EMAIL to send an email in ECC 5.0.
    Regards,
    Ferry Lianto

  • Alternative for  Function module 'IDOC_CONFIGURE_0001'

    Hi,
    Can anyone tell me the alternative for  Function module <b>'IDOC_CONFIGURE_0001'</b>. This is obsolute in ECC 5.0
    Thanks
    Kiran

    Hi Kiran,
    Please try this FM.
    DDIF_FIELDINFO_GET
    Regards,
    Ferry Lianto

  • Replacement of Function module in ECC 6.0

    Hello All,
    The Function module 'NAMETAB_GET' is shown to be obsolete in ECC 6.0 .
    Please suggest which of the function modules among 'DDIF_FIELDINFO_GET'  and 'DDIF_NAMETAB_GET' can be used as a replacement for the same.
    Also ,it would be helpful if the use of these function modules is mentioned.
    Best Regards,
    Lavanya.

    use          'DDIF_NAMETAB_GET'
    Functionality
    This function module reads the runtime information (nametab) of a table or in general of any type of the ABAP Dictionary. However, the runtime information does not contain any text. You should use the function module DDIF_FIELDINFO_GET to read the runtime information including text (or to determine the domain for table fields).
    The types of the ABAP Dictionary are divided into data elements, structured types and table types.
    A structured type consists of a sequence of components that are each identified by a unique name. A type is defined for each of these components. In addition to the types of the ABAP Dictionary, you can also use the built-in types of the R/3 System (CHAR, NUMC,...) to define the types of the components.
    All its components as well as the fields of its structured components are called the fields of a structured type. The name of a field no longer uniquely identifies it within a structured type. For example, a structured type S could have a structured component F, which itself has a component called F. In this case S would have two fields with the name F. For this reason, its long field name is used to identify a field within a structured type. The long field name is the same as the name of the components for the components of the structured type itself. For the fields of a structured component, the long field name is a concatenation of the name of this structured component, the separator '-' and the long field name of the field in the structured component.
    A field whose type is defined by a data element or a built-in type is also called an elementary type. A structured type whose components are all defined as elementary types is called flat. All other structured types are called deep.
    This module gets the runtime information for the type whose name is defined in the IMPORT parameter TABNAME. If there is no such type, the exception NOT_FOUND is triggered.
    Caution: If the IMPORT parameter ALL_TYPES is not set, only flat structured types are taken into consideration. In this case the exception is also triggered if the specified type is a data element, deep structure or a table type.
    If the IMPORT parameter LFIELDNAME is not initial, only structured types having a field with the long name defined by LFIELDNAME are taken into consideration. The exception NOT_FOUND is triggered for all other types.
    The internal representation of the runtime object is returned in parameters X030L_WA and X031L_TAB. Depending on the type category, this information is then edited in the corresponding parameters (see documentation about the parameters).
    Notes
    1. If parameter LFIELDNAME is not initial, X031L_TAB nevertheless contains the description of all fields of the structured type. The decoded form is only determined for the specified field, and the result is copied to DFIES_WA instead of DFIES_TAB. Since decoding for all the fields often takes up most of the runtime for this module, you should set parameter LFIELDNAME if you only need information about one field of the structured type.
    This module gets the runtime information about a type. This means that only the currently active version of the type is taken into consideration. If none exists, the exception NOT_FOUND is triggered.
    The corresponding function module DDIF_<object type>_GET is used to read the actual definition of a type of the ABAP Dictionary.
    Caution: These read modules are much less efficient than the modules for defining the runtime information. You should therefore only use them if the runtime information is not sufficient.
    2. The documentation for IMPORT parameter GROUP_NAMES describes how to handle named includes.

  • BAPI or Function Module to Update the Alternative Payer  (KNZA) of Customer

    Hi Experts,
    My client requirement is to update the Customer Permitted Alternative Payer during creation of BP
    Would you please let me know the any BAPI or Fictional Module available to UPDATE the u201CPermitted Alternative Payer (KNZA)u201D of Customer Master.
    iam trying  SD_CUSTOMER_MAINTAIN_ALL function module, its failed to update the  KNZA tables. please help to close the issue. 
    Thanks in Advance.
    Venkatesh M.

    Hi Ravi,
    Thanks for the quick reply.
    The Function Module, what you are given is BTE. it will not trigger when creating of contract.
    My Requirement is when creating the contract for the particular BP, we need to UPDATE the Alternative Payer of Customer.
    Here i required BAPI or Function Module to change or Update the customer master Alternative Payer (KNZA).   
    Regards,
    Venkatesh M

  • Alternative for STRING_CENTER function module

    Hi,
    Can any one give me the Alternative for STRING_CENTER function module.
    it is there in 4.7 when i am using the same  in ecc 6.0 it is giving as absolute statement .
    Please give the solution for this.

    Hi,
      C147_STRING_SPLIT_AT_POSITION
    STRING_SPLIT
    STRING_SPLIT_AT_POSITION
    check this sample code
    DATA: text(10) TYPE c VALUE '0123456789',
    text1(6) TYPE c,
    text2(6) TYPE c.
    PARAMETERS position TYPE i.
    CALL FUNCTION 'STRING_SPLIT_AT_POSITION'
    EXPORTING
    string = text
    pos = position
    IMPORTING
    string1 = text1
    string2 = text2
    EXCEPTIONS
    string1_too_small = 1
    string2_too_small = 2
    pos_not_valid = 3
    OTHERS = 4.
    Regards

  • Alternative Function module in ECC 6.0

    Hi,
    The function module FI_DOCUMENT_ARCH_JUMP_HEAD_SGL  and FI_DOCUMENT_ARCH_READ_DETAILS  is available in 4.6c but is not available in ECC 6.0.
    I have to import a progam from 4.6 to ECC 6.0.with uses this function module .
    Please let me know alternative function module in ECC 6.0
    Thanks
    Deepa

    That's why it's never recommended to use the FMs that have not been released to the customer... You might be able to copy FMs as Z... objects from 4.6 into ECC 6.0. However, it's possible that underlying functionality has changed a lot and it just won't work.
    Instead of asking for a replacement FM you might want to explain what exactly you're trying to achieve, then someone might be able to provide an alternative (not necessarily an FM).

  • Alternative of FM ADDR_GET as it is an unrealesed function module

    Hi all,
    I am using the function module ADDR_GET for getting the vendor address . But my code did not pass the Peer code review as this FM is an unreleased one .
    Can anyone suggest any alternative for the FM ADDR_GET which has the same functionality.
    Thanks and Regards,
    Syed

    hi,
    try:
    FM: ADDR_GET_COMPLETE
    TYPE-POOLS: szadr.
    DATA adr_kompl TYPE szadr_addr1_complete.
    DATA adr1 TYPE szadr_addr1_line.
    DATA adtel TYPE szadr_adtel_line.
    DATA admail TYPE szadr_adsmtp_line.
    DATA adfax TYPE szadr_adfax_line.
      CALL FUNCTION 'ADDR_GET_COMPLETE'
           EXPORTING
                addrnumber              = AUFK-ADRNRA
           IMPORTING
                addr1_complete          = adr_kompl
           EXCEPTIONS
                parameter_error         = 1
                address_not_exist       = 2
                internal_error          = 3
                wrong_access_to_archive = 4
                OTHERS                  = 5.
    *read Adress
      READ TABLE adr_kompl-addr1_tab INTO adr1
                 WITH KEY data-date_to = '99991231'.

  • Upload data from excel with vba by calling a function module

    Hello all,
    i have a problem with the function module "ALSM_EXCEL_TO_INTERNAL_TABLE". I will call this function module with vba to load data from excel to sap with a Buttonclick. I have copied this function module and set it remotable. But i can´t call it from excel.
    Can you give me some tips how can i
    upload data from excel with vba by click a button.
    The problem seems the function: call method cl_gui_frontend_services=>clipboard_import in the function module, because when i comment this function call the vba-call is true but no results. 
    How can I call the function module correct with vba?
    Thanks a lot for your tips!!!!
    Chris
    Message was edited by:
            Christoph Kirschner

    HI
    Uploading data directly from Excel file format
    * Upload data direct from excel.xls file to SAP
    REPORT ZEXCELUPLOAD.
    PARAMETERS: filename LIKE rlgrap-filename MEMORY ID M01,
                begcol TYPE i DEFAULT 1 NO-DISPLAY,
                begrow TYPE i DEFAULT 1 NO-DISPLAY,
                endcol TYPE i DEFAULT 100 NO-DISPLAY,
                endrow TYPE i DEFAULT 32000 NO-DISPLAY.
    * Tick don't append header
    PARAMETERS: kzheader AS CHECKBOX.
    DATA: BEGIN OF intern OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern.
    DATA: BEGIN OF intern1 OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern1.
    DATA: BEGIN OF t_col OCCURS 0,
           col LIKE alsmex_tabline-col,
           size TYPE i.
    DATA: END OF t_col.
    DATA: zwlen TYPE i,
          zwlines TYPE i.
    DATA: BEGIN OF fieldnames OCCURS 3,
            title(60),
            table(6),
            field(10),
            kz(1),
          END OF fieldnames.
    * No of columns
    DATA: BEGIN OF data_tab OCCURS 0,
           value_0001(50),
           value_0002(50),
           value_0003(50),
           value_0004(50),
           value_0005(50),
           value_0006(50),
           value_0007(50),
           value_0008(50),
           value_0009(50),
           value_0010(50),
           value_0011(50),
           value_0012(50),
           value_0013(50),
           value_0014(50),
           value_0015(50),
           value_0016(50),
           value_0017(50),
           value_0018(50),
           value_0019(50),
           value_0020(50),
           value_0021(50),
           value_0022(50),
           value_0023(50),
           value_0024(50),
           value_0025(50),
           value_0026(50),
           value_0027(50),
           value_0028(50),
           value_0029(50),
           value_0030(50),
           value_0031(50),
           value_0032(50),
           value_0033(50),
           value_0034(50),
           value_0035(50),
           value_0036(50),
           value_0037(50),
           value_0038(50),
           value_0039(50),
           value_0040(50),
           value_0041(50),
           value_0042(50),
           value_0043(50),
           value_0044(50),
           value_0045(50),
           value_0046(50),
           value_0047(50),
           value_0048(50),
           value_0049(50),
           value_0050(50),
           value_0051(50),
           value_0052(50),
           value_0053(50),
           value_0054(50),
           value_0055(50),
           value_0056(50),
           value_0057(50),
           value_0058(50),
           value_0059(50),
           value_0060(50),
           value_0061(50),
           value_0062(50),
           value_0063(50),
           value_0064(50),
           value_0065(50),
           value_0066(50),
           value_0067(50),
           value_0068(50),
           value_0069(50),
           value_0070(50),
           value_0071(50),
           value_0072(50),
           value_0073(50),
           value_0074(50),
           value_0075(50),
           value_0076(50),
           value_0077(50),
           value_0078(50),
           value_0079(50),
           value_0080(50),
           value_0081(50),
           value_0082(50),
           value_0083(50),
           value_0084(50),
           value_0085(50),
           value_0086(50),
           value_0087(50),
           value_0088(50),
           value_0089(50),
           value_0090(50),
           value_0091(50),
           value_0092(50),
           value_0093(50),
           value_0094(50),
           value_0095(50),
           value_0096(50),
           value_0097(50),
           value_0098(50),
           value_0099(50),
           value_0100(50).
    DATA: END OF data_tab.
    DATA: tind(4) TYPE n.
    DATA: zwfeld(19).
    FIELD-SYMBOLS: <fs1>.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                mask      = '*.xls'
                static    = 'X'
           CHANGING
                file_name = filename.
    START-OF-SELECTION.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = filename
                i_begin_col             = begcol
                i_begin_row             = begrow
                i_end_col               = endcol
                i_end_row               = endrow
           TABLES
                intern                  = intern
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
      IF sy-subrc <> 0.
        WRITE:/ 'Upload Error ', SY-SUBRC.
      ENDIF.
    END-OF-SELECTION.
      LOOP AT intern.
        intern1 = intern.
        CLEAR intern1-row.
        APPEND intern1.
      ENDLOOP.
      SORT intern1 BY col.
      LOOP AT intern1.
        AT NEW col.
          t_col-col = intern1-col.
          APPEND t_col.
        ENDAT.
        zwlen = strlen( intern1-value ).
        READ TABLE t_col WITH KEY col = intern1-col.
        IF sy-subrc EQ 0.
          IF zwlen > t_col-size.
            t_col-size = zwlen.
    *                          Internal Table, Current Row Index
            MODIFY t_col INDEX sy-tabix.
          ENDIF.
        ENDIF.
      ENDLOOP.
      DESCRIBE TABLE t_col LINES zwlines.
      SORT intern BY row col.
      IF kzheader = 'X'.
        LOOP AT intern.
          fieldnames-title = intern-value.
          APPEND fieldnames.
          AT END OF row.
            EXIT.
          ENDAT.
        ENDLOOP.
      ELSE.
        DO zwlines TIMES.
          WRITE sy-index TO fieldnames-title.
          APPEND fieldnames.
        ENDDO.
      ENDIF.
      SORT intern BY row col.
      LOOP AT intern.
        IF kzheader = 'X'
        AND intern-row = 1.
          CONTINUE.
        ENDIF.
        tind = intern-col.
        CONCATENATE 'DATA_TAB-VALUE_' tind INTO zwfeld.
        ASSIGN (zwfeld) TO <fs1>.
        <fs1> = intern-value.
        AT END OF row.
          APPEND data_tab.
          CLEAR data_tab.
        ENDAT.
      ENDLOOP.
      CALL FUNCTION 'DISPLAY_BASIC_LIST'
           EXPORTING
                file_name     = filename
           TABLES
                data_tab      = data_tab
                fieldname_tab = fieldnames.
    *-- End of Program
    <b>Excel Upload Alternative - KCD_EXCEL_OLE_TO_INT_CONVERT</b>
    *Title : Excel Uploading
    TYPES:   BEGIN OF t_datatab,
             col1(25)  TYPE c,
             col2(30)  TYPE c,
             col3(30)  TYPE c,
             col4(30)  TYPE c,
             col5(30)  TYPE c,
             col6(30)  TYPE c,
             col7(30) TYPE c,
             col8(30)  TYPE c,
             col9(30)  TYPE c,
             col10(30)  TYPE c,
             col11(30)    TYPE c,
           END OF t_datatab.
    DATA: it_datatab TYPE STANDARD TABLE OF t_datatab INITIAL SIZE 0,
          wa_datatab TYPE t_datatab.
    Data : p_table type t_datatab occurs 0 with header line.
    DATA : gd_scol   TYPE i VALUE '1',
           gd_srow   TYPE i VALUE '1',
           gd_ecol   TYPE i VALUE '256',
           gd_erow   TYPE i VALUE '65536'.
    DATA: it_tab TYPE filetable,
          gd_subrc TYPE i.
    field-symbols : <fs>.
    *Selection screen definition
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:  p_file LIKE rlgrap-filename
                   DEFAULT 'c:test.xls' OBLIGATORY.   " File Name
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      REFRESH: it_tab.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title     = 'Select File'
          default_filename = '*.xls'
          multiselection   = ' '
        CHANGING
          file_table       = it_tab
          rc               = gd_subrc.
      LOOP AT it_tab INTO p_file.
    *    so_fpath-sign = 'I'.
    *    so_fpath-option = 'EQ'.
    *    append so_fpath.
      ENDLOOP.
    START-OF-SELECTION.
      PERFORM upload_excel_file TABLES   it_datatab
                                 USING   p_file
                                         gd_scol
                                         gd_srow
                                         gd_ecol
                                         gd_erow.
    * END-OF-SELECTION.
    END-OF-SELECTION.
      LOOP AT it_datatab INTO wa_datatab.
        WRITE:/ wa_datatab-col1,
                wa_datatab-col2,
                wa_datatab-col3,
                wa_datatab-col4,
                wa_datatab-col5,
                wa_datatab-col6,
                wa_datatab-col7,
                wa_datatab-col8,
                wa_datatab-col9,
                wa_datatab-col10,
                wa_datatab-col11.
      ENDLOOP.
    *&      Form  UPLOAD_EXCEL_FILE
    *       upload excel spreadsheet into internal table
    *      -->P_TABLE    Table to return excel data into
    *      -->P_FILE     file name and path
    *      -->P_SCOL     start column
    *      -->P_SROW     start row
    *      -->P_ECOL     end column
    *      -->P_EROW     end row
    FORM upload_excel_file TABLES   p_table
                           USING    p_file
                                    p_scol
                                    p_srow
                                    p_ecol
                                    p_erow.
      DATA : lt_intern TYPE  kcde_cells OCCURS 0 WITH HEADER LINE.
    * Has the following format:
    *             Row number   | Colum Number   |   Value
    *      i.e.     1                 1             Name1
    *               2                 1             Joe
      DATA : ld_index TYPE i.
    * Note: Alternative function module - 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
        EXPORTING
          filename                = p_file
          i_begin_col             = p_scol
          i_begin_row             = p_srow
          i_end_col               = p_ecol
          i_end_row               = p_erow
        TABLES
          intern                  = LT_INTERN
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE:/ 'Error Uploading file'.
        EXIT.
      ENDIF.
      IF lt_intern[] IS INITIAL.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE:/ 'No Data Uploaded'.
        EXIT.
      ELSE.
        SORT lt_intern BY row col.
        LOOP AT lt_intern.
         MOVE lt_intern-col TO ld_index.
         assign component ld_index of structure
         p_table to <fs>.
    move : lt_intern-value to <fs>.
    *     MOVE lt_intern-value TO p_table.
          AT END OF row.
            APPEND p_table.
            CLEAR p_table.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "UPLOAD_EXCEL_FILE
    Regards
    Pavan

  • IPC Pricing with AP 7.00 Database Access/Call function module user-exit

    Hi experts,
    we are running SAP ECO on SAP ECC 6.0 with IPC Pricing AP 7.00 running in the VMC.
    I'm facing a new requirement. In an user-exit for requirements the access to the ABAP database is needed.
    (I know that the SAP recommendation is, don't have access to database. But we need this functionality)
    In ABAP it looks like:
    select single * from  a590
          into     LH_674_a590
          where    kappl  = 'V'
          and      kschl  = 'ZSPR'
          and      kunnr  = komk-kunnr
          and      matnr  = komp-matnr
          and      datbi  >= komk-prsdt
          and      datab  =< komk-prsdt.
    Is there a possibility to implement the same SELECT in the Java-User-Exit?
    Is there maybe the alternative to call a function module instead?
    The database exits on the same application server on which the VMC runs.
    If there is a possiblity can anyone provide me with sample coding or give an advice where to find samle coding?
    I would prefer to call a functions module.
    Thanks in adcance
    Karl-Wilhelm

    Hi Shanto & Sumit,
    Thanks for the inputs.
    as per my understanding of the log
    java.lang.IncompatibleClassChangeError: com.sap.leasing.pricing.tools.LeasingPricingTools: method getPricingConditionByConditionTypeName(Lcom/sap/spe/pricing/transactiondata/userexit/IPricingItemUserExit;Ljava/lang/String;)Lcom/sap/spe/pricing/transa ctiondata/IPricingCondition; used to be stati
    error is thrown by the SAP standard user exit and because of which execution is failing in customer user exits and surprisingly we have not made any changes in both of them.
    this was working earlier before upload.could this be because of the jar packaging.
    how i can download the standard user exit com.sap.leasing.pricing.tools.LeasingPricingTools from crm
    for further investigation.
    Thanks,
    Siddharth

  • How to debug a remote function module in calling system? Help!

    Hi Experts,
       I have a ABAP report (in System A) from where I am calling a remote function module which exists in a different system B.
    ABAP Program(System A)<----calls--
    RFC(System B)
    Can I debug the RFC funnction module in system A using ABAP debugger? In other words if i put a breakpoint on the "call function" statement then in debug mode I want to see that the control is going to system B and I should be able to process the FM code line by line. Is this possible?
    Is there any special transaction or settings?
    Is there any alternative?
    Please help
    Thanks
    Gopal

    hello,
    Try this method.
    first check whether RFC connection is working b/w 2 systems.
    if connection is working, then do like this.
    In System B , put endless loop in FM before some main select statement.
    like
    DATA : v_a TYPE c VALUE space
    DO  .
       IF v_a = 'X'.
         EXIT.
       ENDIF.
    ENDDO.
    the above code will be endleep loop.
    In system A, when cursor goes to CALL FUNCTION DESTINATION 'XXXXX'.
    u shud be logged in system B. the moment control comes to system B.goto tcode SM50 . check ur username . choose that particular  checkbox then in menu bar --> program/session --> Program --> Debugging.
    i hope it will help u.
    try & let us know.
    Thanks,
    Manjunath MS

  • Function Module not working as required

    Hi,
    I am currently using a function module HR_FBN_GENERATE_SEND_EMAIL which sends mail to external sources from a standard SAP screen.
    The fm seems to be working fine if its run from within a report program, but isnt executing when is run from within a PAI module.(code same in both).
    Could anyone throw some light on a solution to this issue.
    Also,this module doesnt seem to allow sending of mails on a specified date. How can i incorporate that or alternatively is there an existing fn module which will send mails out on a specified date with specified content?
    Will def shell out loads of points to solutions that help...
    Cheers,
    Preethi...

    HI,
    Here is the code to send the mail from ABAP
    *& Report  ZSENDEMAIL                                                  *
    *& Example of sending external email via SAPCONNECT                    *
    REPORT  zsendemail                    .
    PARAMETERS: psubject(40) type c default  'Hello',
                p_email(40)   type c default '[email protected]' .
    data:   it_packing_list like sopcklsti1 occurs 0 with header line,
            it_contents like solisti1 occurs 0 with header line,
            it_receivers like somlreci1 occurs 0 with header line,
            it_attachment like solisti1 occurs 0 with header line,
            gd_cnt type i,
            gd_sent_all(1) type c,
            gd_doc_data like sodocchgi1,
            gd_error type sy-subrc.
    data:   it_message type standard table of SOLISTI1 initial size 0
                    with header line.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    Perform populate_message_table.
    *Send email message, although is not sent from SAP until mail send
    *program has been executed(rsconn01)
    PERFORM send_email_message.
    *Instructs mail send program for SAPCONNECT to send email(rsconn01)
    perform initiate_mail_execute_program.
    *&      Form  POPULATE_MESSAGE_TABLE
    *       Adds text to email text table
    form populate_message_table.
      Append 'Email line 1' to it_message.
      Append 'Email line 2' to it_message.
      Append 'Email line 3' to it_message.
      Append 'Email line 4' to it_message.
    endform.                    " POPULATE_MESSAGE_TABLE
    *&      Form  SEND_EMAIL_MESSAGE
    *       Send email message
    form send_email_message.
    * Fill the document data.
      gd_doc_data-doc_size = 1.
    * Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name  = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject.
      gd_doc_data-sensitivty = 'F'.
    * Describe the body of the message
      clear it_packing_list.
      refresh it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      describe table it_message lines it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      append it_packing_list.
    * Add the recipients email address
      clear it_receivers.
      refresh it_receivers.
      it_receivers-receiver = p_email.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      append it_receivers.
    * Call the FM to post the message to SAPMAIL
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           exporting
                document_data              = gd_doc_data
                put_in_outbox              = 'X'
           importing
                sent_to_all                = gd_sent_all
           tables
                packing_list               = it_packing_list
                contents_txt               = it_message
                receivers                  = it_receivers
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                others                     = 8.
    * Store function module return code
      gd_error = sy-subrc.
    * Get it_receivers return code
      loop at it_receivers.
      endloop.
    endform.                    " SEND_EMAIL_MESSAGE
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
    *       Instructs mail send program for SAPCONNECT to send email.
    form initiate_mail_execute_program.
      wait up to 2 seconds.
      if gd_error eq 0.
          submit rsconn01 with mode = 'INT'
                        with output = 'X'
                        and return.
      endif.
    endform.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    If you look at the function module, you will get the field to pass the date also
    Regards
    Sudheer

  • Function module for GL account open items at a key date

    Is there a function module for "GL account open items at a key date" similar to following for customer and vendor accounts?
    BAPI_AR_ACC_GETOPENITEMS Customer account open items at a key date
    BAPI_AP_ACC_GETOPENITEMS Vendor account open items at a key date
    If not, please suggest any alternatives. I am looking to capture the output of FBL3N (GL account line item display) in a program.
    Thank you in advance.
    Prasanna Pujari

    hi,
    please go through the below link i think it will help u.
    http://sapfunctional.com/FI/GL/Balance.
    Regard
    Abhishek Tripathi

  • How do I read this "standard" table in my Function Module?

    I have a remote-enable Function Module (RFC).  I am receiving two tables as part of the parameters.  Table "A" is header information, and Table "B" is detail information.  So for every 1 "A" header record, I may have 1 to many "B" detail records.  I have a field we'll call "vendor_number" that is the common link between the two tables.
    Here's what I want to do:  I want to loop through table "A", and for each record, I want to do a READ on table "B", using the "ref_doc_no" from "A" as my key, to get the position of the first matching record.  I hold onto the value of the table index and then start looping table "B", adding 1 to the saved table index each time to process all of the detail records.
    Here's the problem:  This worked great as an ABAP program.  I had my "B" table declared with "ref_doc_no" as a non-unique key.  But when I ported my code over to the RFC, it told me that the RFC could only deal with standard tables.  I had to remove the "ref_doc_no" key declaration.  So now when I try to activate, I get an error similar to this:
    The declaration for the key field "another_field" is incomplete; however, "another_field" is contained in the key of table "B" and must be filled.
    I don't understand that.  I've not declared any keys for table "B".  I don't understand why it's thinking I need to populate "another_field" (I don't even know what the value would be).  My code to read the table (i.e. the line getting the error) is this:
    Priming read on table (sets the initial sy-tabix index value)
        READ TABLE it_incoming_invoice_line_item "table 'B'
          WITH TABLE KEY ref_doc_no =
                         wa_incoming_invoice_header-ref_doc_no
                    INTO wa_incoming_invoice_line_item.
    Is it possible for me to do some sort of direct read on a table in an RFC?  The only alternative I can think of would be to have to loop through table "B" until I find the first occurrence of a match.  Is that what I need to do?
    Thanks everyone.  Points, as always, awarded for helpful answers.

    Dave,
    1. You can fire SELECTS in an RFC as well, but in your case the data exists in SYSTEM A and the RFC is in System B, so you can't do that. You can fire SELECTS on tables in the same system.
    2. Quick example of two table loops - EKKO (HEADER) EKPO (ITEM).
    LOOP AT EKKO.
    LOOP AT EKPO WHERE EBELN = EKKO-EBELN.
    ENDLOOP.
    ENDLOOP.
    I hope this is clear now.
    Regards,
    Ravi

  • Function Module to show all jobs in that Org Unit.

    Does any one know is there any Function Module which gives all the jobs that comes under that Org Unit. for example if org unit 10 has 2 Sub Org Units(11 and 12) and 3 jobs(20, 21 and 22) under it. and the Sub Org Unit 11 and 12 has 1 job each( 30 and 40). When you run for org unit 10 it should give all 5 jobs (20, 21, 22, 30 and 40).

    Hi Fayyaz
    Well you use a FM RH_READ_INFTY_1001 to discover the relationships between an ORG Unit and Jobs.
    Alternative, you can write a simple query to extract data from HRP1001 to find the jobs under an Org Unit. Because Jobs are related to an Org Unit and this relationship is stored in Infotype 1001/HRP1001.
    Reward Points, If helpful.
    Regards
    Waz

Maybe you are looking for

  • Apple cheating on non-us customers: e-cupon not valid

    I really can't help myself: this really *****! Nice done apple, first you release an overpriced and unstable 1.0 release, then you realize that this was maybe not the smartest move and try to ease the pain of all the early adopters by creating a 200$

  • [SOLVED] apache daemon fails to start on boot, but rc.d restart works?

    I installed apache from the official repos and followed the instructions in the wiki for configuring it. I checked to make sure the http user exists, and I /etc/hosts looks good (to me). Upon boot, the daemon fails to start and I can't load local web

  • How to keep using old Time Machine

    Recently, I've reinstalled Mountain Lion because the boot volume suddenly and mysteriously corrupted itself. I initialized and restored the boot volume from a SuperDuper! backup. I had to reinitialize the Time Machine volume because once restored, it

  • Notification in 9.0.2

    Hi all, Has any of you configuration fine the new Notification system in iASWE 9.0.2? I read the docs but it's not enough. Thanks in advance. Regards.

  • Purchased music but can't find it

    I purchased music and i'm not sure it downloaded. the song won't appear in the purchased playlist or in my library and itunes says there is an error when i try to check purchasing history. how do i fnd the song?