Posts

Showing posts with the label SAP ABAP ALV

Field Catalog Options In ALV

Added by Hareesh Menon, last edited by kishan P on Jan 13, 2012  (view change) Field catalog options : FIELDNAME:     You use this field to assign a field name of your output table to a row of the field catalog. All settings that you make in this row refer to the corresponding column of the output table. REF_FIELD: You must fill this field if: • the output table field described by the current entry in the field catalog has a corresponding field in the Data Dictionary and • the field name in the output table is not identical to the field name of the field in the Data Dictionary. If the field names are identical, it is sufficient to specify the DDIC structure or table in field REF_TABLE of the field catalog. REF_TABLE: You must fill this field only if the output table field described by the current entry in the field catalog has a corresponding entry in the Data Dictionary. Using this assignment, the ALV Grid Control can copy the text for the column he...

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

Value Display with Currency/Quantity Unit

Use Certain values of output fields may refer to units (such as kilogram) or currencies (such as Euro). To display these values in the correct unit-specific format (with the correct number of digits after the comma, for example), you must assign these fields to a currency or unit. There are three ways how you can do this in the field catalog: Assign a value field to an associated currency or unit field Explicitly specify a currency or unit for the entire column Format the value field manually (see: Formatting Column Contents ) Reference to a Currency or Unit Field You use fields CFIELDNAME and QFIELDNAME (see below) to assign value fields to a currency or unit field. This ensures that when totals are calculated for this column, these are displayed separately by unit. The field catalog also contains an entry for the unit field. If you do not want to display the unit as a column in the list and do not want to allow users to interactively show it as a column, you can mark ...