Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dictionary Structure

Former Member
0 Likes
1,047

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
991

hi,

if u want to increase the length try to create data element with the length that you wish.

7 REPLIES 7
Read only

Former Member
0 Likes
992

hi,

if u want to increase the length try to create data element with the length that you wish.

Read only

0 Likes
991

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...

Read only

0 Likes
991

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

Read only

0 Likes
991

if its a quantity field take the data type as QUAN and the length as you wish,it can be summed up

Read only

0 Likes
991

Thanks guys....

sachin , can an int data type be written to a QUAN FIELD.

Read only

0 Likes
991

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

Read only

0 Likes
991

Thanks...Harald you were an angel for me today....

Thanks a lot for the suggestions...