Skip to Content
author's profile photo Former Member
Former Member

BDC and Rports

hi,

what is the diff between LSMW and Batch input.

which method is mostly used and why.

wht r feild symbols and where do we use them.

can any one plz send me a realtime ALV interactive

report related to SD with some discription.

wht is the function module used for inserting Buttons in

ALV reports

bye

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2006 at 02:14 PM

    hi ,

    Here is hte sample code for ALV Hierarchical List.

    REPORT  ZRICHA_ALV8.
    
    TYPE-POOLS : SLIS.
    
    TABLES : EKKO, EKPO.
    
    SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN.
    
    DATA : BEGIN OF IT_EKKO OCCURS 0,
            EBELN TYPE EBELN,
            BSTYP TYPE BSTYP,
            BSART TYPE BSART,
            STATU TYPE STATU,
           END OF IT_EKKO.
        DATA : BEGIN OF T_EKKO OCCURS 0,
            EBELN TYPE EBELN,
           END OF T_EKKO.
    
    DATA : BEGIN OF IT_EKPO OCCURS 0,
            EBELN TYPE EBELN,
            EBELP TYPE EBELP,
            MATNR TYPE MATNR,
            WERKS TYPE WERKS,
           END OF IT_EKPO.
    DATA : IT_FCAT TYPE SLIS_T_FIELDCAT_ALV,
            V_KEY  TYPE SLIS_KEYINFO_ALV.
    
    START-OF-SELECTION.
    
         PERFORM GETDATA.
         PERFORM POPULATE_FCAT.
    
      V_KEY-HEADER01 = 'EBELN'.
      V_KEY-ITEM01 = 'EBELN'.
    *     V_KEY-HEADER01 = 'EBELN'.
    *     V_KEY-ITEM01   = 'EBELN'.
         PERFORM DISPLAY.
    *&---------------------------------------------------------------------*
    *&      Form  getdata
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    *  -->  p1        text
    *  <--  p2        text
    *----------------------------------------------------------------------*
    FORM GETDATA .
      SELECT EBELN
             BSTYP
             BSART
             STATU
        FROM EKKO
        INTO TABLE IT_EKKO
       WHERE EBELN IN S_EBELN.
       T_EKKO[] = IT_EKKO[].
      IF NOT IT_EKKO[] IS INITIAL.
        SELECT EBELN
               EBELP
               MATNR
               WERKS
          FROM EKPO
          INTO TABLE IT_EKPO
           FOR ALL ENTRIES IN IT_EKKO
         WHERE EBELN = IT_EKKO-EBELN.
      ENDIF.
    ENDFORM.                    " getdata
    *&---------------------------------------------------------------------*
    *&      Form  POPULATE_FCAT
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    *  -->  p1        text
    *  <--  p2        text
    *----------------------------------------------------------------------*
    FORM POPULATE_FCAT .
    
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
     EXPORTING
       I_PROGRAM_NAME               = SY-REPID
       I_INTERNAL_TABNAME           = 'IT_EKKO'
       I_INCLNAME                   = SY-REPID
       I_BYPASSING_BUFFER           = 'X'
       I_BUFFER_ACTIVE              = ' '
      CHANGING
        CT_FIELDCAT                  = IT_FCAT
     EXCEPTIONS
       INCONSISTENT_INTERFACE       = 1
       PROGRAM_ERROR                = 2
       OTHERS                       = 3          .
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
     EXPORTING
       I_PROGRAM_NAME               = SY-REPID
       I_INTERNAL_TABNAME           = 'IT_EKPO'
       I_INCLNAME                   = SY-REPID
       I_BYPASSING_BUFFER           = 'X'
       I_BUFFER_ACTIVE              = ' '
      CHANGING
        CT_FIELDCAT                  = IT_FCAT
     EXCEPTIONS
       INCONSISTENT_INTERFACE       = 1
       PROGRAM_ERROR                = 2
       OTHERS                       = 3          .
    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.                    " POPULATE_FCAT
    *&---------------------------------------------------------------------*
    *&      Form  DISPLAY
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    *  -->  p1        text
    *  <--  p2        text
    *----------------------------------------------------------------------*
    FORM DISPLAY .
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
      EXPORTING
    *   I_INTERFACE_CHECK              = ' '
    *   I_CALLBACK_PROGRAM             = I_CALLBACK_PROGRAM
    *   I_CALLBACK_PF_STATUS_SET       = ' '
    *   I_CALLBACK_USER_COMMAND        = ' '
    *   IS_LAYOUT                      = IS_LAYOUT
       IT_FIELDCAT                    = IT_FCAT
    *   IT_EXCLUDING                   = IT_EXCLUDING
    *   IT_SPECIAL_GROUPS              = IT_SPECIAL_GROUPS
    *   IT_SORT                        = IT_SORT
    *   IT_FILTER                      = IT_FILTER
    *   IS_SEL_HIDE                    = IS_SEL_HIDE
    *   I_SCREEN_START_COLUMN          = 0
    *   I_SCREEN_START_LINE            = 0
    *   I_SCREEN_END_COLUMN            = 0
    *   I_SCREEN_END_LINE              = 0
    *   I_DEFAULT                      = 'X'
    *   I_SAVE                         = ' '
    *   IS_VARIANT                     = IS_VARIANT
    *   IT_EVENTS                      = IT_EVENTS
    *   IT_EVENT_EXIT                  = IT_EVENT_EXIT
        I_TABNAME_HEADER               = 'IT_EKKO'
        I_TABNAME_ITEM                 = 'IT_EKPO'
    *   I_STRUCTURE_NAME_HEADER        = I_STRUCTURE_NAME_HEADER
    *   I_STRUCTURE_NAME_ITEM          = I_STRUCTURE_NAME_ITEM
        IS_KEYINFO                     = V_KEY
    *   IS_PRINT                       = IS_PRINT
    *   IS_REPREP_ID                   = IS_REPREP_ID
       I_BYPASSING_BUFFER             = 'X'
       I_BUFFER_ACTIVE                = ' '
    *   IR_SALV_HIERSEQ_ADAPTER        = IR_SALV_HIERSEQ_ADAPTER
    *   IT_EXCEPT_QINFO                = IT_EXCEPT_QINFO
    *   I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER        = E_EXIT_CAUSED_BY_CALLER
    *   ES_EXIT_CAUSED_BY_USER         = ES_EXIT_CAUSED_BY_USER
      TABLES
        T_OUTTAB_HEADER                = IT_EKKO
        T_OUTTAB_ITEM                  = IT_EKPO
     EXCEPTIONS
       PROGRAM_ERROR                  = 1
       OTHERS                         = 2          .
    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.                    " DISPLAY

    Regards,

    Richa

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2006 at 02:01 PM

    hi,

    1)The <b>LSM Workbench</b> is an <b>R/3-based tool</b> that supports You when transferring data from non-SAP systems ("Legacy Systems") to R/3 once or periodically.

    The tool supports conversion of data of the legacy system in a convenient way. The data can then be imported into the R/3 system via <b>batch input</b>, direct input, BAPIs or IDocs.

    It makes sense to use this tool with respect to the data volume to be transferred. It may be easier to transfer very small data volumes into R/3 manually. In the case of a very large data volume, batch input or IDoc techniques may cause extremely long runtimes. A rough landmark for estimating the required time: 10 000 records per hour where this value may vary considerably depending on the hardware available.

    2)<b>Field-symbols:</b>

    Field-Symbols are place holders for existing fields.

    A Field-Symbol does not physically reserve space for a field but points to a field, which is not known until run time of the program.

    Field-Symbols are like Pointers in Programming language ‘ C ‘.

    Syntax :

    Data : v1(4) value ‘abcd’.

    Field-symbols <fs>.

    Assign v1 to <fs>.

    Write:/ <fs>.

    ex:

    field-symbols  : <fs>.
    data: v_type, v_int type i.
     start-of-selection.
    v_int = '12.34'.
    assign v_int to <fs>.
     describe field <fs> type v_type.
    
     write :/ v_type.
    

    3) For inserting buttons in ALV report, add them to the pf-status.

    Regards,

    Sailaja.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2006 at 02:15 PM

    hi,

    <b>Field Symbols</b>

    Field symbols are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.

    Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol. After successful assignment, there is no difference in ABAP whether you reference the field symbol or the field itself. You must assign a field to a field symbol before you can address it in a program.

    Field symbols are similar to dereferenced pointers in C (that is, pointers to which the content operator * is applied). However, the only real equivalent of pointers in ABAP, that is, variables that contain a memory address (reference) and that can be used without the contents operator, are reference variables in ABAP Objects.

    All operations programmed with field symbols are applied to the field assigned to it. For example, a MOVE statement between two field symbols moves the contents of the field assigned to the first field symbol to the field assigned to the second field symbol. The field symbols themselves point to the same fields after the MOVE statement as they did before.

    You can create field symbols either without or with type specifications. If you do not specify a type, the field symbol inherits all of the technical attributes of the field assigned to it. If you do specify a type, the system checks the compatibility of the field symbol and the field you are assigning to it during the ASSIGN statement.

    Field symbols provide greater flexibility when you address data objects:

    If you want to process sections of fields, you can specify the offset and length of the field dynamically.

    You can assign one field symbol to another, which allows you to address parts of fields.

    Assignments to field symbols may extend beyond field boundaries. This allows you to address regular sequences of fields in memory efficiently.

    You can also force a field symbol to take different technical attributes from those of the field assigned to it.

    Example

      field-symbols <fs1>.
    
      loop at t_dd03l.
        clear v_name.
        concatenate 'abc' t_dd03l-fieldname into  v_name.
        assign (v_name) to <fs1>.
        if rstring is initial .
          rstring = <fs1>." don't need to concatenate the first one
        else.
          concatenate rstring <fs1> into rstring separated by '~'.
        endif.
      endloop.

    Hope this helps.

    Regards,

    Richa

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.