Difference between revisions of "SAP ABAP 740"

From SapWiki
Line 1: Line 1:
 
==Ejemplos==
 
==Ejemplos==
  
 +
===1===
 
  types ty_ra type RANGE OF vbak-auart.
 
  types ty_ra type RANGE OF vbak-auart.
 
  data(ra_auart) = VALUE ty_ra(
 
  data(ra_auart) = VALUE ty_ra(
Line 7: Line 8:
 
                             ).
 
                             ).
 
   select vbeln into table @data(LT_vbeln) from vbak where auart in @ra_auart.
 
   select vbeln into table @data(LT_vbeln) from vbak where auart in @ra_auart.
 +
 +
DATA itab TYPE RANGE OF i.
 +
itab = VALUE #( sign = 'I'  option = 'BT' ( low = 1  high = 10 )
 +
                                          ( low = 21 high = 30 )
 +
                                          ( low = 41 high = 50 )
 +
                            option = 'GE' ( low = 61 )  ).
 +
 +
data ra_ktart TYPE RANGE OF p2006-ktart.
 +
CASE lw_solicitudes-subty.
 +
  WHEN '0100'.
 +
    ra_ktart = VALUE #( ( low = '01' sign = 'I' option = 'EQ' )
 +
                            ( low = '02' sign = 'I' option = 'EQ' )                    ).
 +
  WHEN '0300' OR '0301' OR '0309'.
 +
    ra_ktart = VALUE #( ( low = '17' sign = 'I' option = 'EQ' ) ).
 +
    WHEN '0901'.
 +
      ra_ktart = VALUE #( ( low = '10' sign = 'I' option = 'EQ' ) ).
 +
ENDCASE.
 +
 +
===2===

Revision as of 12:45, 26 March 2020

Ejemplos

1

types ty_ra type RANGE OF vbak-auart.
data(ra_auart) = VALUE ty_ra(
                              ( low = 'Z1' sign = 'I' option = 'EQ' )
                              ( low = 'Z2' sign = 'I' option = 'EQ' )
                            ).
 select vbeln into table @data(LT_vbeln) from vbak where auart in @ra_auart.
DATA itab TYPE RANGE OF i. 
itab = VALUE #( sign = 'I'  option = 'BT' ( low = 1  high = 10 ) 
                                         ( low = 21 high = 30 ) 
                                         ( low = 41 high = 50 ) 
                           option = 'GE' ( low = 61 )  ).
data ra_ktart TYPE RANGE OF p2006-ktart.
CASE lw_solicitudes-subty.
  WHEN '0100'.
    ra_ktart = VALUE #( ( low = '01' sign = 'I' option = 'EQ' )
                           ( low = '02' sign = 'I' option = 'EQ' )                     ).
  WHEN '0300' OR '0301' OR '0309'.
    ra_ktart = VALUE #( ( low = '17' sign = 'I' option = 'EQ' ) ).
   WHEN '0901'.
     ra_ktart = VALUE #( ( low = '10' sign = 'I' option = 'EQ' ) ).
ENDCASE.

2