SAP – Coding in S/4 – Data Statements

Home / SAP / ABAP Coding / SAP – Coding in S/4 – Data Statements

I recently had the opportunity to see some code in S/4.  While the old code works, there are certainly some new things that simplify coding life.  One of the fun ones I learned is how you do a smarter data statement.  Here is my first example.  You take in a customer number in the internal format, but you want to convert it to the external format.  Here’s how I do it today:

DATA: lv_kunnr_out TYPE char10.
CALL FUNCTION ‘CONVERSION_EXIT_ALPHA_OUTPUT’
EXPORTING
input = i_kunnr
IMPORTING
output = lv_kunnr_out.

Here’s how you can do it in S/4.

* DATA(lv_kunnr_out) = |{ i_kunnr ALPHA = OUT }|.

Pretty slick.  it’s not gonna change the world, but it nice to make things more readable 🙂

Thanks for reading,

As always, thanks for reading and don't forget to check out our SAP Service Management Products at my other company JaveLLin Solutions,
Mike

Leave a Reply

Your email address will not be published. Required fields are marked *