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

dynamic field catalog

Former Member
0 Likes
414

Hi all,

i have a strange problem,

in table WITH_ITEM the field ITT and wt_qbshh , we have different kinds of tax codes and tax amounts.

i was displaying these as two columns in my report.

but my client ask me to display the wt_qbshh field in different columns based on the witht value.

i mean lets say for example there are 2 types of tax codes 1 and 2 in witht.

and let my report will display lik this

tax amnt tax code

100.00 ; 1

150.00 ; 2

130.00 ; 1

120.00 ; 2

the client wants the report like this

tax amnt-type1 tax amnt-type 2

100.00

150.00

130.00 ;

120.00

is there any method for this kind of situation ?

currently i defined all kinds of tax types as fields in my internal tables also in fieldcatalog

and doing thie following

loop at tbl into temp.

case 'witht'.

when '1'.

temp-tax1 = temp-tax.

when '2'.

temp-tax2 = temp-tax.

endcase.

modify tbl from temp.

endloop.

i am asking for better way than this if exists

thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
382

Hey check out this link

http://wiki.sdn.sap.com/wiki/display/ABAP/DYNAMICFIELDCATALOGINALV

May be you can modify your code lil bit.

Hi all,

i have a strange problem,

in table WITH_ITEM the field ITT and wt_qbshh , we have different kinds of tax codes and tax amounts.

i was displaying these as two columns in my report.

but my client ask me to display the wt_qbshh field in different columns based on the witht value.

i mean lets say for example there are 2 types of tax codes 1 and 2 in witht.

and let my report will display lik this

tax amnt tax code

100.00 ; 1

150.00 ; 2

130.00 ; 1

120.00 ; 2

the client wants the report like this

tax amnt-type1 tax amnt-type 2

100.00

150.00

130.00 ;

120.00

is there any method for this kind of situation ?

currently i defined all kinds of tax types as fields in my internal tables also in fieldcatalog

and doing thie following

loop at tbl into temp.

case 'witht'.

when '1'.

temp-tax1 = temp-tax.

when '2'.

temp-tax2 = temp-tax.

endcase.

modify tbl from temp.

endloop.

i am asking for better way than this if exists

thanks in advance.

1 REPLY 1
Read only

Former Member
0 Likes
383

Hey check out this link

http://wiki.sdn.sap.com/wiki/display/ABAP/DYNAMICFIELDCATALOGINALV

May be you can modify your code lil bit.