CONV#

Description:

A constructor expression using the conversion operator CONV converts the argument to the specified data type and returns the corresponding result.

The following can be specified for type:

  • A non-generic data type like built in types or data elements.
  • The # character.

Syntax:

CONV type( [let_exp] dobj ) ...

Example:

DATA: lv_matnr_str  TYPE string VALUE '000000000012345678',
      lv_plant_str  TYPE string VALUE '1000',
      lv_qty_str    TYPE string VALUE '15',
      ls_order_item TYPE bapisditm.

" Convert input strings to BAPI field types
ls_order_item-material = CONV bapisditm-material( lv_matnr_str ).
ls_order_item-plant    = CONV bapisditm-plant( lv_plant_str ).
ls_order_item-target_qty  = CONV bapisditm-target_qty( lv_qty_str ).

Thanks for visiting!

Sangeeta Singh

Leave a Reply

Discover more from HANAxABAP

Subscribe now to keep reading and get access to the full archive.

Continue reading