2011 Jun 22 11:45 AM
Hi All,
Data: o_Ref_Grid Type Ref to cl_Gui_Alv_Grid.
*
Update the main ALV table with any changes made to the grid (ie check boxes)
*
Call Function 'GET_GLOBALS_FROM_SLVC_FULLSCR'
Importing
E_Grid = O_Ref_Grid.
Call Method O_Ref_Grid->Check_Changed_Data.
Am using the above code to get the values changed at ALV at runtime.
All changes values are reflecting except the quantity field.
Say I enter 6,000 in quantity (the fdata element in ALV structure is KWMENG) after the call method its becoming 0.006.
Pls suggest solution to solve this.
Thanks,
Kausthub
Hi All,
Data: o_Ref_Grid Type Ref to cl_Gui_Alv_Grid.
*
Update the main ALV table with any changes made to the grid (ie check boxes)
*
Call Function 'GET_GLOBALS_FROM_SLVC_FULLSCR'
Importing
E_Grid = O_Ref_Grid.
Call Method O_Ref_Grid->Check_Changed_Data.
Am using the above code to get the values changed at ALV at runtime.
All changes values are reflecting except the quantity field.
Say I enter 6,000 in quantity (the fdata element in ALV structure is KWMENG) after the call method its becoming 0.006.
Pls suggest solution to solve this.
Thanks,
Kausthub
2011 Jun 22 11:56 AM
hello,
how did you define fieldcatalog? manually or u used FM LVC_FIELDCATALOG_MERGE. it is better to use this FM instead of manual fields assignment. i think this problem occurs there, but i am not sure, because i can't see whole view.
best regards,
dez_
2011 Jun 22 12:02 PM
Hi.,
Instead of 6,000 enter 6 only.. It will take the 3 decimal places automatically., If you dont want to display 6.000 at field catalog level change the type to DEC.
ls_fieldcat-datatype = 'DEC'.
ls_fieldcat-decimals_out = 0.
hope this helps u.,
Thanks & Regards,
Kiran
2011 Jun 22 12:20 PM
Hi Kiran/Dez,
Thanks for your response.
Actually the quantity is entered in VA01. Assume its entered as 6,25. (Depending on the user notaion, VA01 is taking the quantity entered). Am trying to give the same functionality here. So decimals cant be ignored in my case. I hope you have some visualization about what i am trying to do in that screen now. But after that call method its getting changed. ALV field catlog is manual. I tried entering the number of decimals in fieldcatlog. Still the issue prevails.
Thanks
Kausthub
2011 Jun 22 12:29 PM
Hi Kausthub Krish,
In SAP ABAP, currency fields are conneted to a CUKY currency ke field and quantity fields are connected to a UNIT field. This is enforced when creating a structure in data dictionary. If field catalog is created by REUSE_ALV_FIELDCATALOG_MERGE this relationship is transferred to ALV object and handled accordingly.
It is possible to create the relation of quantity to a unit in ALV, it is better to have both in the DDIC structure for the ALV display table.
Regards,
Clemens
2011 Jun 22 12:34 PM
i am not sure, but it could be related with unit field and reference which you have to define in quantity field. For example if u r trying to display amount without currency value you will get empty field instead of 0,00. if it did not help you then could you post your code where you are defining ALV grid object, filling fieldcatalog and calling the grid for the first time.
best regards,
dez_
2012 Oct 23 3:23 PM
You could try to inform REF_FIELD and REF_TABLE on field catalog and also create another entry on the field catalog for the unit also making reference for the table and the field.
On the field catalog, you have the fields QUANTITY and QFIELDNAME and DECIMALS, I think that would solve your problem. It's just a shame my answer came so late.
Regards.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |