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

Invoice based on condition Type

Former Member
0 Likes
477

hello!

I have to make an invoice where the condition type must be shown as header for the particular billno.If the cnty is repeated insted of making new col it should put condition value in the same col (not create a new cnty)

raw data:

000003193 10 ZDQT

000003193 11 ZMAN

000003193 12 Z FRD

000003193 13 ZDQT

000003193 14 ZMN

000003193 15 ZMAN

the DESIRED output should be in following format--

billno ZDQT ZMAN ZFRED ZMN

10 1

11 1

12 1

13 1

14 1

15 1

Regards,

NehaJog

hello!

I have to make an invoice where the condition type must be shown as header for the particular billno.If the cnty is repeated insted of making new col it should put condition value in the same col (not create a new cnty)

raw data:

000003193 10 ZDQT

000003193 11 ZMAN

000003193 12 Z FRD

000003193 13 ZDQT

000003193 14 ZMN

000003193 15 ZMAN

the DESIRED output should be in following format--

billno ZDQT ZMAN ZFRED ZMN

10 1

11 1

12 1

13 1

14 1

15 1

Regards,

NehaJog

2 REPLIES 2
Read only

Former Member
0 Likes
450

Hi

U should use a dynamic internal table in order to have a table with many fields as many condition types.

See the method CREATE_DYNAMIC_TABLE of class CL_ALV_TABLE_CREATE, u can find out many samples in this forum in order how to use that method.

Max

Read only

0 Likes
450

hi max thanks for prev help!!

c rt now i have reached uptil here now wht i want is to put the unique condition type as col header.

SELECT konv~kschl "Condition type

konv~kwert "Condition Value

konv~kposn "Condition item number

konv~knumv "Number of the document condition

FROM konv INTO TABLE kitab

FOR ALL ENTRIES IN itab

WHERE konv~kposn = itab-posnr

AND konv~knumv = itab-knumv.

IF sy-subrc = 0.

itab_kschl[] = kitab[].

SORT itab_kschl BY kschl.

DELETE ADJACENT DUPLICATES FROM itab_kschl COMPARING kschl.

ENDIF.

can u help further