Application Development 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: 

unable to display new billing no for order no having same item

sandip_sonar
Participant
0 Kudos

Hi, All.

In my report i m displaying billing no. and delivery no. for the order no.

I m able to display all the billing and delivery no. , but i m not able to display records for the order no. which has same item no. but 2 different billing and delivery no.

e.g.

order item billing no

8546 10 90000069

90000070

delivery no

80000186

80000187

I m able to display only first row of this.

so, pls give me proper solution ASAP.

Thanks & Regards,

Sandip Sonar

4 REPLIES 4

Former Member
0 Kudos

Hi

Could you provide the code which you are using to diplay those details?

I feel you are doing that in LOOP...ENDLOOP. Provide the code so that we can suggest the changes.

0 Kudos

SELECT avbeln bposnr aaudat bwerks a~kunnr

FROM vbak AS a INNER JOIN vbap AS b ON avbeln = bvbeln

INTO CORRESPONDING FIELDS OF TABLE itab

WHERE a~vbeln IN s_vbeln

AND a~vkorg IN s_vkorg

AND a~erdat IN s_erdat

AND a~vtweg IN s_vtweg

AND a~spart IN s_spart

AND a~auart IN s_auart

AND b~werks IN s_werks

AND b~matkl IN s_matkl

AND b~matnr IN s_matnr

AND a~kunnr IN s_kunnr

AND a~vbtyp EQ 'C'.

LOOP AT itab.

SELECT SINGLE vbeln FROM lips

INTO itab-dvbeln

WHERE vgbel EQ itab-vbeln

AND vgpos EQ itab-posnr.

SELECT SINGLE bldat FROM likp INTO itab-bldat WHERE vbeln = itab-dvbeln.

SELECT SINGLE vbeln FROM vbrp INTO itab-ivbeln WHERE aubel = itab-vbeln AND aupos = itab-posnr.

.

MODIFY itab.

CLEAR itab.

ENDLOOP.

Former Member
0 Kudos

Have you checked replies in your other thread??? and Stop posting duplicates threads on the same query.

Former Member
0 Kudos

Hi Sandip ,

how are u Threads u will creates on the same issue , as i told u , u need to check the internal tables , based on the data u need to loop.

loop at so_item.

loop at del_item.

loop at invo.

append output --->if SO have Billing .

endloop.

endloop.

endloop.

its 1:N:N relations , so just u need to loop as per it.

regards

Prabhu