‎2010 Mar 12 4:04 PM
Hi all,
Have a situation where I have to create a dictionary structure.
I did try it and need some advice.
Here for some components, the componenttype is recognised and the "dataType" and "ShortDescription" is set automatically.
Component componenttype dataType Length
matnumer matnr CHAR 18 - No problem
SOLDTO land char 3 - automatically set to 3.Want to increase the length field.How to do it..
dlQty lfimg - The delivery quantity from the "LIPS" TABLE.
The reason Iam building this structure is that I have to display it in ALV using "cl_gui_alv_grid" and as far I know(Correct me if Iam wrong),I need to pass a dictionary struct in the parameter "i_structure_name".
CALL METHOD r_alv->set_table_for_first_display
EXPORTING
i_structure_name = 'MyStructure'// The above defined structure.
CHANGING
it_outtab = it_sflight // Table defined from the above dictionary struct.
exceptions
OTHERS = 1.I want to sum the dlQty(Delivery Quantity) column in the dictionary.What datatype it should be it if It has to be summed up in ALV.Can it be of type string?
Thanks
P
‎2010 Mar 12 5:15 PM
hi,
if u want to increase the length try to create data element with the length that you wish.
‎2010 Mar 12 5:15 PM
hi,
if u want to increase the length try to create data element with the length that you wish.
‎2010 Mar 13 9:49 AM
Thanks subhash...
>> want to sum the dlQty(Delivery Quantity) column in the dictionary.What datatype it should be it if It has to be summed up in >>ALV.Can it be of type string?
what about this...
‎2010 Mar 13 10:39 AM
Hi,
Check this Thread.
http://wiki.sdn.sap.com/wiki/display/ABAP/ALVDisplayTotalTextOrSubtotalText
Please refer the Above Thread and for more info if required modify your field catalog as mentioned below
wa_fieldcat-seltext_m = w_reptx-entry. " Your Own Text
wa_fieldcat-seltext_l = w_reptx-entry. " Your Own Text
wa_fieldcat-reptext_ddic = w_reptx-entry. " Your Own Text
modify gt_fieldcat from wa_fieldcat index sy-tabix.Cheerz
Ram
‎2010 Mar 13 8:22 PM
if its a quantity field take the data type as QUAN and the length as you wish,it can be summed up
‎2010 Mar 13 9:57 PM
Thanks guys....
sachin , can an int data type be written to a QUAN FIELD.
‎2010 Mar 14 12:18 AM
Sure there's the normal conversion rules that apply. Note though that a QUAN field must reference a field of type UNIT. This is important, because based on the used unit of measure different formatting rules are applied (e.g. how many decimals).
Check out the help on [Dictionary types|http://help.sap.com/SAPHELP_NW70EHP1/helpdata/EN/cf/21f2e5446011d189700000e8322d00/frameset.htm] and the corresponding mapping to [ABAP types|http://help.sap.com/SAPHELP_NW70EHP1/helpdata/EN/cf/21f2f2446011d189700000e8322d00/frameset.htm]. Or refer to the online ABAP documentation for [Dictionary types|http://help.sap.com/abapdocu_70/en/ABENBUILT_IN_TYPES_DICTIONARY.htm] and [ABAP types|http://help.sap.com/abapdocu_70/en/ABENBUILT_IN_TYPES_COMPLETE.htm].
Cheers, harald
‎2010 Mar 14 7:33 AM
Thanks...Harald you were an angel for me today....
Thanks a lot for the suggestions...