Skip to Content
avatar image
Former Member

passing data from internal table in function module

Hi all,

I have data in an internal table in my function module and have to pass it my implementation program in badi. How do i do it?

My problem here is i am not able to declare any internal table in my changing parameters to pass it back.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 31, 2008 at 07:53 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 31, 2008 at 05:08 PM

    Hello Abhinay

    Presumably your problem is that you need to define an itab within your BAdI implementing class. Fortunately ABAP-OO no longer allows itabs having header lines. Thus, itab must be defined using table types.

    An itab having no header line can be used to fill or retrieve data from TABLES parameters (or CHANGING) in function modules, .e.g:

    METHOD if_ex_me_process_po_cust~check.
    
      DATA: lt_dfies    TYPE STANDARD TABLE OF mara.  " no header line. Or use table type:
        "        lt_dfies     TYPE ddfields.  " table type
    
        CALL FUNCTION 'DDIF_FIELDINFO_GET'
          EXPORTING
            tabname              = 'MARA'
    *       FIELDNAME            = ' '
    *       LANGU                = SY-LANGU
    *       LFIELDNAME           = ' '
    *       ALL_TYPES            = ' '
    *       GROUP_NAMES          = ' '
    *       UCLEN                =
    *     IMPORTING
    *       X030L_WA             =
    *       DDOBJTYPE            =
    *       DFIES_WA             =
    *       LINES_DESCR          =
          TABLES
            DFIES_TAB            = lt_dfies   " itab without header line 
    *       FIXED_VALUES         =
          EXCEPTIONS
    *       NOT_FOUND            = 1
    *       INTERNAL_ERROR       = 2
            OTHERS               = 3.
      
    
    ENDMETHOD.
    

    Regards

    Uwe

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Uwe Schieferstein ,

      In ecc 6.0 when i use tables while defining function modules it says tables is obsolete.How do i do it now?

      Regards,

      C.A