09-19-2008 11:12 AM
hi gurus,
i have a small problem i am developing a alv report and i need subtotla of the field fkimg so i wrote the following code
PERFORM CREATE_FIELDCAT USING: '1' 'KUNRG' 'BILL TO PARTY' ' ',
'2' 'VBELN' 'BILL NO' ' ',
'3' 'FKDAT' 'BILL DATE' ' ',
'4' 'XBLNR' 'YOUR ORDER' ' ',
'5' '' '' ' ',
'6' 'VBELV' 'ORD REF NO' ' ',
'7' 'POSNV' 'ITEM NO' ' ',
'8' 'ARKTX' 'ITEM DESC' ' ',
'9' 'MATNR' 'ITEM CODE' ' ',
'10' '' '' ' ',
'11' 'VRKME' 'UNIT' ' ',
'12' 'FKIMG' 'QUANTITY' 'X',
'13' '' '' ' ',
'14' '' '' ' ',
'15' '' '' ' ',
'16' 'NETWR ' 'AMOUNT' '',
'17' 'WERKS ' 'PLANT' ' ',
'18' 'NAME1 ' 'PLANT NAME' ' '.
W_SORTINFO-FIELDNAME = 'VBELN'.
W_SORTINFO-SUBTOT = 'X'.
APPEND W_SORTINFO TO T_SORTINFO.
CLEAR W_SORTINFO.
but i am not getting the output it is going to short dump directly. itried it with out the sub total then the output is coming so please help me with the problem
09-19-2008 11:25 AM
PERFORM CREATE_FIELDCAT USING: '1' 'KUNRG' 'BILL TO PARTY' ' ',
'2' 'VBELN' 'BILL NO' ' ',
'3' 'FKDAT' 'BILL DATE' ' ',
'4' 'XBLNR' 'YOUR ORDER' ' ',
'5' '' '' ' ', "<----What happened to the fieldname
'6' 'VBELV' 'ORD REF NO' ' ',
'7' 'POSNV' 'ITEM NO' ' ',
'8' 'ARKTX' 'ITEM DESC' ' ',
'9' 'MATNR' 'ITEM CODE' ' ',
'10' '' '' ' ', "<----What happened to the fieldname
'11' 'VRKME' 'UNIT' ' ',
'12' 'FKIMG' 'QUANTITY' 'X',
'13' '' '' ' ', "<----What happened to the fieldname
'14' '' '' ' ', "<----What happened to the fieldname
'15' '' '' ' ', "<----What happened to the fieldname
'16' 'NETWR ' 'AMOUNT' '',
'17' 'WERKS ' 'PLANT' ' ',
'18' 'NAME1 ' 'PLANT NAME' ' '.
if you give like that it will give Dumps. Mention some fieldname.
09-19-2008 11:14 AM
Hi Abhinay,
Give the Sorting order in the fieldcatalog
Cheers,
Kothand
09-19-2008 11:16 AM
i have done that even though the output is not coming any other suggestion
09-19-2008 11:17 AM
09-19-2008 11:18 AM
Hi,
Try this way
W_SORTINFO-FIELDNAME = 'VBELN'.
W_SORTINFO-SUBTOT = 'X'.
W_SORTINFO-SPOS = '1'.
APPEND W_SORTINFO TO T_SORTINFO.
CLEAR W_SORTINFO.
Cheers,
Kothand
09-19-2008 11:19 AM
Hi
Adding subtot information in field catalog for FKIMG is fine.
You don't need to add subtot information in sorting table. just add VBELN insert table and subtotal for FKIMG will appear on ALV.
If this does not solve your problem. Please pase the full code.
Regards
Vijai
09-19-2008 11:22 AM
Mr.vijay thanks for the help but could you please elaborate a little bit what u have said
09-19-2008 11:25 AM
PERFORM CREATE_FIELDCAT USING: '1' 'KUNRG' 'BILL TO PARTY' ' ',
'2' 'VBELN' 'BILL NO' ' ',
'3' 'FKDAT' 'BILL DATE' ' ',
'4' 'XBLNR' 'YOUR ORDER' ' ',
'5' '' '' ' ', "<----What happened to the fieldname
'6' 'VBELV' 'ORD REF NO' ' ',
'7' 'POSNV' 'ITEM NO' ' ',
'8' 'ARKTX' 'ITEM DESC' ' ',
'9' 'MATNR' 'ITEM CODE' ' ',
'10' '' '' ' ', "<----What happened to the fieldname
'11' 'VRKME' 'UNIT' ' ',
'12' 'FKIMG' 'QUANTITY' 'X',
'13' '' '' ' ', "<----What happened to the fieldname
'14' '' '' ' ', "<----What happened to the fieldname
'15' '' '' ' ', "<----What happened to the fieldname
'16' 'NETWR ' 'AMOUNT' '',
'17' 'WERKS ' 'PLANT' ' ',
'18' 'NAME1 ' 'PLANT NAME' ' '.
if you give like that it will give Dumps. Mention some fieldname.
09-19-2008 11:33 AM
09-19-2008 11:31 AM
Hi,
here i am sending some code. u can impliment as per your declaration.
wa_layout-zebra = 'X'.
wa_layout-totals_text = 'TOTAL:'.
wa_layout-subtotals_text = 'SUBTOTALS:'.
wa_sort-fieldname = 'VBELN'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
wa_sort-expa = 'X'.
append wa_sort to it_sort.
thank you.
Ravi