User Tools

Site Tools


abap:toolbox
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


abap:toolbox [2014/12/05 17:08] (current) – created ginko
Line 1: Line 1:
 +====== ABAP Toolbox ======
 +====== Création dynamique de range ======
 +<code abap>FUNCTION zcreate_range.
 +*"----------------------------------------------------------------------
 +*"*"Local Interface:
 +*"  IMPORTING
 +*"     REFERENCE(I_FIELDNAME) TYPE  CHAR30
 +*"  TABLES
 +*"      IT_TABLE
 +*"      ET_RANGE
 +*"----------------------------------------------------------------------
 +************************************************************************
 +* Description : A module function capable of building a range from     *
 +* any table !!!                                                        *
 +************************************************************************
 +*                      Modification  history                           *
 +*----------------------------------------------------------------------*
 +* modif id   Author       Date     Modification description            *
 +* M001                                                                 *
 +*----------------------------------------------------------------------*
 +************************************************************************
  
 +  FIELD-SYMBOLS : <ls_value> TYPE any,
 +                  <fieldname> TYPE any,
 +                  <ls_range> TYPE any,
 +                  <lit_range> TYPE STANDARD TABLE.
 +
 +ASSIGN i_fieldname TO <fieldname>.
 +ASSIGN et_range[] TO <lit_range>[].
 +
 +LOOP AT it_table ASSIGNING FIELD-SYMBOL(<ls_table>).
 +  ASSIGN COMPONENT <fieldname> OF STRUCTURE <ls_table> TO <ls_value>.
 +  CONCATENATE 'IEQ' <ls_value> INTO <ls_value>.
 +  APPEND <ls_value> TO  <lit_range>.
 +ENDLOOP.
 +
 +ENDFUNCTION.</code>
abap/toolbox.txt · Last modified: 2014/12/05 17:08 by ginko