ALV: How to merge two columns and show as single column

Question: Hi SAP team,

I have a requirement to show AMount and currency in a single column in a ALV output. Eg: '1000.00' and 'USD' in a single column '1000.00 USD'.

How I can achieve this ?

Thanks for your help,
Ramya

Answer:
Something like:
LOOP AT itab.
CONCATENATE itab-amount itab-currency INTO itab-combined.
MODIFY itab.
ENDLOOP.You will probably need to embellish just that concat command as all fields will be treated as TYPE C.
Then inhibit the display of the original fields ‘amount’ and ‘currency’ by setting NO_OUT=’X in the fieldcat loop (or other method).
There may be a FM to merge/format amounts and currency but I couldn’t find one on quick search.

Answer:
Hi,

The option 'USING EDIT MASK' from WRITE command is also available in ALV structure IT_FIELDCAT.
I have only used it in write and for simple stuff, but it may have some options for you.
Check '==conv' for output conversion routine...

SOURCE : www.jt77.com

Comments

Popular posts from this blog

ABAP Dialog Programming : Set Filter data of Table Control

Step by step Create SAP LIS Report

SAP Bapi Price Change (MR21)