2010 Jun 05 9:01 AM
Hi experts.
i m new in abap, i m preparing one purchase register report in which i need to display invoices number and material code against one purchase document number. i m fetching invoice from rseg table n material code from ekpo problem is that against one purchase no there are 10 invoices and only 3 materials and i want to display one purchase order in first column and 10 invoices display in second column and 3 materials in third column. my problem is that first 3 material comin in the loop n repated for next 10 iteration.
Moderator message: please use a more descriptive subject line next time.
Edited by: Thomas Zloch on Jun 6, 2010 12:04 AM
2010 Jun 05 10:50 AM
what do you mean by material code?
if you mean material number only.. then why going to EKPO even? every thing is present in rseg..
>BELNR GJAHR BUZEI EBELN EBELP MATNR
this is the format you can get from RSEG .. right?
so a particular BELNR(Inv) and BUZEI(line item of invoice) is linked with particular EBELN(PO) EBELP(INV)... you have to consider these line item numbers defnitely... same line item same PO can be in two invoices as well..(that is why your 10 invoice will repeat the material numbers any how)...
please let me know if you need any more help on this
2010 Jun 05 9:23 AM
hi,
In loop clear the field after three times wich contains material code append blank material filed in remaning 7 times.
Jitendra
2010 Jun 05 10:24 AM
Hi,
u might be using the read statement for getting the material ... check for sy-subrc eq 0 after the read and then asssing the value of materiial. Or else u can show the logic
2010 Jun 05 10:50 AM
what do you mean by material code?
if you mean material number only.. then why going to EKPO even? every thing is present in rseg..
>BELNR GJAHR BUZEI EBELN EBELP MATNR
this is the format you can get from RSEG .. right?
so a particular BELNR(Inv) and BUZEI(line item of invoice) is linked with particular EBELN(PO) EBELP(INV)... you have to consider these line item numbers defnitely... same line item same PO can be in two invoices as well..(that is why your 10 invoice will repeat the material numbers any how)...
please let me know if you need any more help on this
2010 Jun 05 12:27 PM
Hi
In side the loop it seif use READ keyword with two keys Purchasing Document No & IItem
Sartah P G
2010 Jun 05 1:19 PM