‎2015 May 06 8:42 AM
Hi all,
I am trying to make an alv report where I have to put the matnr maktx menge according to the po.no.
but when the output is generated I got some columns in menge as 0.000
when I examined it I could see the quantity for which matnr does not exist the fields meins goes blank and menge becomes 0.00
EBELN exists for those quantity but no material number has been assigned to it but has got a material description.
So my question is how to show the maktx meins menge of the thing which does not have a matnr .
EBELN MBLNR BUDAT LIFNR NAME1 BLDAT DMBTR MATNR MAKTX MEINS MENGE
0001 0012 4.05.2015 0123 ABC 3.05.2015 50.00 1234 ABD NOS 50.000
0002 0013 5.05.2015 0124 AB 2.05.2015 50.00 12345 0.000
This is the output generated
Regards
Navratan
‎2015 May 06 9:22 AM
Hi Navratan,
Purchase Order does not exist without a Material. Please check your code may be some where you are missing in populating the material.
Regards
Pallavi
‎2015 May 06 9:11 AM
Hi,
Pls question yourself for the below before changing code.
How can a PO created without Material?
A: PO is a list of order details of several materials, PO will be created to purchase a material from vendor.
how can you assign description (maktx), Menge, meins(quantity), (base UOM) for a Material that does not exist?
A:It is not possible in SAP.this does not make any sense.
So if your report is coming fine for the PO which is having Material assigned to it , Your report is absolutely perfect.
have a nice day.
Regards.
uday.
‎2015 May 06 9:31 AM
Hi Uday,
Thanks for your reply.I too thought the same thing as explained by you.But the thing is that this po is generated for the assets like services provided and all it does not have a material number so for that maktx meins and menge exists but does no material code.
Regards
Navratan
‎2015 May 06 9:22 AM
Hi Navratan,
Purchase Order does not exist without a Material. Please check your code may be some where you are missing in populating the material.
Regards
Pallavi
‎2015 May 06 9:34 AM
Hi Pallavi,
Thanks for your reply.The po genrated is for the assets like services provided which does not have a matnr but has maktx meins and menge.
Regards
Navratan
‎2015 May 06 9:45 AM
Hi Navratan..
Greetings..!!
plz find ur solution below..
" Get Service Items
SELECT * FROM esll
INTO TABLE lt_package
FOR ALL ENTRIES IN gt_ekpo
WHERE packno = gt_ekpo-packno.
IF sy-subrc = 0.
SELECT * FROM esll
INTO TABLE lt_subpack
FOR ALL ENTRIES IN lt_package
WHERE packno = lt_package-sub_packno.
ENDIF.
LOOP AT gt_ekpo INTO ls_ekpo.
gs_header-ebelp = ls_ekpo-ebelp.
gs_header-packno = ls_ekpo-packno.
READ TABLE lt_package INTO ls_esll
WITH KEY packno = ls_ekpo-packno.
IF sy-subrc = 0.
gs_header-sub_packno = ls_esll-sub_packno.
APPEND gs_header TO gt_header.
CLEAR gs_header.
LOOP AT lt_subpack INTO ls_esll
WHERE packno = ls_esll-sub_packno.
gs_serwork-srno = sy-tabix.
gs_serwork-packno = ls_esll-packno.
gs_serwork-txz01 = ls_esll-ktext1. " text
gs_serwork-menge = ls_esll-menge. " ur menge
gs_serwork-meins = ls_esll-meins. " meins
APPEND gs_serwork TO gt_serwork.
CLEAR: gs_serwork, ls_esll.
ENDLOOP.
ENDIF.
"fill final table for alv
ENDLOOP.
With Best Regards,
P.Ravi.
‎2015 May 06 1:21 PM
I agree with you for a PO without Material.
PO for scenarios like Service Order, Work Order, Job Order are like this only i.e. without Material.
So for these scenarios you need to fetch the Description( in case of normal PO it is automatically fetched from the Material entered ) maintained by End User while maintaining a PO. Field for the same is TXZ01 of EKPO.
So TXZ01 will serve the MAKTX in this scenario.
Now,
meins mengeMEINS is Unit of Material , since No material is there so no scope of Unit of Material as well, so it should be blank for these scenarios.
MENGE am not sure which Quantity you are talking about ?
‎2015 May 07 11:27 AM
Hi,
Thanks everyone for your reply as suggested by Ravi and Sijin I got the description of material from txz01 of ekpo table .Quantity from erfmg(qty in une) in ekpo table and unit from erfme(unit of entry) in ekpo table.Once again let me make a confirmation to you that there exist some materials here which does not have a material code but has got erfmg and erfme.For example as mentioned in the report service charge is given as description and qty in une as 1 and unit of entry as nos.
Thanks all.
Regards
Navratan