2007 Dec 08 12:24 AM
Hi there,
I'm having a situation with the Idoc ORDERS05, I need to know if there is a way to delete some lines of the Idoc before get processed by SAP, the reason is that I need to validate the material number and only allow those material created in SAP, for the rest of material I should save that data in an intermediate table, to be include in the order confirmation as Items rejected.
I have identified the user exit VEDA0001, but I don't have a function module to manipulate the Idoc.
Thanks in advance
Regards
2007 Dec 08 12:45 AM
Hi Alexis,
You can do your custom code in the EXIT FM EXIT_SAPLVEDA_001.
Instead of deleting the IDOC Segments, you can operate on the interface tables like XVBAP etc.
Regards,
Ravi
2007 Dec 08 12:45 AM
Hi Alexis,
You can do your custom code in the EXIT FM EXIT_SAPLVEDA_001.
Instead of deleting the IDOC Segments, you can operate on the interface tables like XVBAP etc.
Regards,
Ravi
2007 Dec 08 2:01 PM
Hi Ravi, Thanks for your reply!
I understand your point, but I need to create the Sales Order only with the materials that I have in my system. If I have a item that does not exist in my material master data, I need to avoid it and allow the creation of the SO. I'm not sure if in XVBAP I can mark those records for this purpose.
Thanks,
Alexis
2007 Dec 09 9:36 PM
Alexis,
We had a similar requirement in our organisation, but instead of omitting invalid items from the Sales Document, we record them using dummy material codes. We have two such materials, UNDEFINED-MAT for unknown materials, & EXCLUDED-MAT for known but excluded materials. All the logic is done via an include in EXIT_SAPLVEDA_001. As well as recording the dummy material codes, we also record the code the Customer ordered in the Material Text (KTEXT) field. In this way, we can report on any failed items, whilst letting the remainder of the order be processed, and later MASS reject these line items.
You could still remove these items if you wanted to, before raising the sales document, by the same userexit, I believe you would need to clear those entries out of XVBAP. I prefer our method, as it leaves the invalid items in the Sales application, and visible to all standard transactions & reports etc.
Cheers, Paul.
2007 Dec 10 1:29 PM
Hi Paul, Thanks for your reply.
I like the solution that you are proposing to keep the standard process in SAP, I tried to eliminate item in the user exit EXIT_SAPLVEDA_001 and I could not do it because at that moment the table XVBAP is empty.
On the other hand, I'm just wanted to ask you how do you execute the mass reject of those items. Have you developed a special program for that, like a batch input or you have a standard transaction to do it.
Thanks in advance,
Regards
Alexis
2007 Dec 10 8:51 PM
The mass rejection is done via a standard transaction, MASS. The Object Type is BUS2032. MASS is not a particularly intuitive transaction, but you should be able to find some guidelines online somewhere.
Cheers, Paul.
2007 Dec 13 6:53 PM
Hi Paul Thanks for your reply.
I'm implementing the user exit EXIT_SAPLVEDA_001. As you know for the Idoc ORDERS05 for Items you have the segment E1EDP01 where you include the quantity, unit of measure, etc., next segment identified the material E1EDP19 and depends on the Qualifiers the system determine the material in SAP.
I have included a code to validate the material and move the dummy number, however I would like to ask how do you do with the unit of measure and which qualifier did you use in the segment E1EDP19?
Thanks in advance
Alexis
2007 Dec 13 7:33 PM
Alexis,
The UOM is captured in E1EDP01-MENEE. For E1EDP19, we use a mixture of qualifiers 001, 002 & 003, although predominantly our EDI Customers send barcodes, so we use 003.
Cheers, Paul.
2007 Dec 13 8:21 PM
Paul, I have mapped the Idoc in that way. Right now I'm testing the asigment of the dummy material. The issue that I have is the following.
In the user exit EXIT_SAPLVEDA_001 I see the Idoc line by line, so I'm lokking for the segment E1EDP19 to validate the material. If the material does not exist I'm doing the following change.
MOVE dxvbap TO st_vbap.
MOVE c_matnr TO st_vbap-matnr. "''Moving the dummy material number
MOVE st_vbap TO dxvbap.
The sales order is created but the quantities in every item are 0. The other concern that I have is when I can receive a material with a different Unit of measure and at the moment of E1EDP19 I need to move the dummy material number how can I do to change it in E1EDP01.
Thanks in advance
Alexis
2007 Dec 13 10:43 PM
Alexis,
If you send me an email (address in my Profile), I'll send you some of the code we're using.
Cheers, Paul.
2010 Mar 04 12:54 PM
HI,
Can you tell me how you solved this problem?
Even am facing the same issue.
Pls help me.
Thanks in advance