sapdev logo background
sapdev logo sapdev logo
Comments

ABAP STRLEN command to get the value length of a SAP field



If you need to capture the length of a fields value, you can the use the ABAP command STRLEN to get this. Below is example ABAP code demonstrating how to do this. Note the space either side of the variable ld_datein within the brackets '( ld_datein )', without these the command will not work.


data: ld_length type i,
      ld_datein type datum value '20001211'.


  ld_length = strlen( ld_datein ). "ld_length would return the value 8





comments powered by Disqus


Can't find something on ERPWorkbench? A quick search should fix that: