cancel
Showing results for 
Search instead for 
Did you mean: 

No Outbound IDoc When All PO Lines Deleted

Former Member
0 Kudos

I need help with the following issue.

When we delete all lines of an open PO, the system does not generate any outbound IDocs.

Does anyone know how to create outbound IDocs when all lines of the PO are deleted? Is there a setting with the output type that we need to set?

We have created a custom partner, port, and output type while using the following values:

Message Type: ORDERS

Basic Type: ORDERS05

Process Code: ME10

Partner Type: LI (Vendor)

Partner Function: VN (Vendor)

When you go into ME23N and click Messages and then Processing Log, you get the following:

- Object 4500598957

- Output Type: Purchase Order

- Processing Log for Program RSNASTED routine EDI_PROCESSING

- No items exist

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor

hi,

did you try with:

Message Type: <b>ORDCHG</b> (order change)

Basic Type: ORDERS05

Process Code: <b>ME11</b> (order change)

Change message flag = <b>X</b> ?

BTW

if you're looking for some one info

on sending IDOCs with configuration

(sending/receiving POs,SOs,invoices)

have a look at this book:

<a href="/people/michal.krawczyk2/blog/2006/10/11/xi-new-book-mastering-idoc-business-scenarios-with-sap-xi"><b>Mastering IDoc Business Scenarios with SAP XI</b></a>

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Answers (7)

Answers (7)

Former Member
0 Kudos

TCS - I tried your suggestion. It didn't work. It appears the function module IDOC_OUTPUT_ORDERS first performs LESEN_BELEG (read PO data) before the call to CUSTOMER-FUNCTION '001'. If you look at the code in form LESEN_BELEG, there is a comment that states "do not print if there are no items". It attempts to read table xekpo and if unsuccessful, the MESSAGE e757 ("No items exist") is envoked while raising "error_message_received" which terminates the code. So, the error appears to be happening BEFORE the first customer exit is called. Any ideas how to get around this situation?

Former Member
0 Kudos

Hi All,

we are also facing the same issue while issuing the output message for a PO which is having all deleted line items. Please provide me the solution on the same.

Thanks in advance.

Former Member
0 Kudos

TCS - We are using ME21N/ME22N for PO creation and change. Is there a similar customer function that can be modified?

Regards, Scott

Former Member
0 Kudos

Hi Scott,

I'd the same problem and I got a very easy solution to this problem. If you are using ME10/ME11 for PO creation and PO change, just go to the user-exit ZXM06U01 and write your code like below:

DATA:t_xekpo LIKE ekpo OCCURS 0 WITH HEADER LINE.

SELECT * FROM ekpo

INTO TABLE t_xekpo

WHERE ebeln = dekko-ebeln.

SORT t_xekpo BY ebeln ebelp.

CLEAR dxekpo.

REFRESH dxekpo.

LOOP AT t_xekpo.

MOVE-CORRESPONDING t_xekpo TO dxekpo.

APPEND dxekpo.

ENDLOOP.

The above line of codes will help sending a PO IDoc with all the line item, even if only a few line items are changed or all the line items are deleted.

In the user-exit, you can write any logic that suits your requirement......

Please award points if helpful.....

Thanks and Regards,

TCS, Mumbai

Former Member
0 Kudos

Thanvi - We have not yet resolved the issue.

Regards, Scott

Former Member
0 Kudos

Scott,

Still not resolved? Oh God! my client is after me to do this.

I am trying like this by creating 3 outbound parameters,

1. ORDERS V1 ZNEU Change 'X'

2. ORDCHG V1 ZNEU CHG Change

3. ORDCHG V1 NEU Change 'X'

With these parameters i will get only deleted line items with ORDCHG with Action '003'.

And when line item changed then it comes under ORDERS but with unchanged line items too.

But my client doesn't want to go for two different output types. In this case i need two.

So i am still trying to get this issue resolved.

Please help me if you find any other solution.

THanks.

Does standard SAP supports

Former Member
0 Kudos

Hi Scott,

I have the same issue when we need to send created, changed and deleted line items in PO. But i created ORDERS with change unchecked and ORDCHG with change checked but it's not showing deleted line items in IDOC.

Please let me know what you did?

Thanks in Advance.

Thanvi.

Former Member
0 Kudos

Dirk - That's correct. Our partner has requested that we send the initial PO and the entire PO on all subsequent changes. I will look into the outbound function module as you have suggested.

Thanks, Scott

Former Member
0 Kudos

Michal - We currently have the partner profile configured for message type ORDERS and message control has two entries: one for process code ME10 with change message off and one for process code ME10 with change message on.

This allows us to capture all PO lines when the PO is created or when the PO is modified. When a PO line is deleted, we capture all <b>remaining</b> PO lines (not including the deleted line).

So, when I try to add message type ORDCHG (with process code ME11 and change message on) to the <b>same</b> partner profile, it will not allow me. I can only add it if I delete message type ORDERS, which then prevents me from capturing PO lines when a PO is created.

Any ideas on how I can capture all PO lines when the PO is created, modified, or deleted (including the deleted lines)?

Former Member
0 Kudos

Hi

Normally you would have entry ORDERS / ME10 ( without the change flag ) and an an entry ORDCHG / ME11 ( with the change flag on ).

With this you agree with your partner that you will send an original PO, and in case of subsequent changes, only the changes.

In your case, did you agree with your partner that you will always send the 'full' PO, also for every subsequent change ?

( and is that the reason why you also want to send an 'empty' IDOC ( i.e. without items ) to your partner, meaning all items were deleted ? )

Then I think you can only copy and change the outbound Function module ( it's checking explicitly for items to be available : see very last statements in form leseg_beleg )

You could setup a another PO output type only for this purpose ( all items deleted )

and set it up with the change flag but then you will send in this case only a different IDOC to your partner : a ORDCHG idoc containing all items that are deleted.

regards

Dirk