cancel
Showing results for 
Search instead for 
Did you mean: 

STO with return indicator and subsequent delivery for compliance check

Former Member
0 Kudos

Hi Everyone,

I am trying to prototype a STO return scenario in standard SAP for Compliance screening. I had been using an old version of feeder system in the past which didn't support screening of STO with return items. So, we had a custom development in place.

Now, on checking in ECC- I do find a standard logic provided by SAP to interchange the partners when there is a STO item with return indicator set- Which is great.  Now when i create a subsequent delivery for this return STO- This is being considered for application level MM0B.

I do see a check in FV50XF0B_SLL_DOCUMENT_TRANSFER, where the system checks for the document type of the return delivery and also the previous document type to decide whether to call MM0B or SD0B.

In my case, it's a return STO- So, VBTYP( Document category "T"- Returns for order) and VGTYP(V- Purchase order). And the logic is always passing this on to MM0B application level.

Though the logic for VGTYP is passed for purchase order category- System checks if there is a supplying plant involved. If yes, then the application level MM0B is considered. Does this mean we can't use a Return STO/Delivery for SD0B application level?

---- Return deliveries

     when vbtyp_lire.

       read table it_xlips into ls_xlips index 1

                     transporting vgbel vgpos vgtyp.

       if ls_xlips-vgtyp = vbtyp_bestell.--->My case for STO

         select single retpo into lv_retpo

                from ekpo

                where ebeln = ls_xlips-vgbel

                  and ebelp = ls_xlips-vgpos.

         if lv_retpo = gc_true.

           select single reswk into lv_reswk

                from ekko

                where ebeln = ls_xlips-vgbel.

           if not lv_reswk is initial.

             lv_mm0b_call = gc_true.

           else.

             lv_sd0b_call = gc_true.

           endif.

         else.

           lv_mm0b_call = gc_true.

         endif.

Do we have some correction notes specifically to make sure a Returns delivery with Document category T and Previous Doc type V pass on to SD0B appln.

Just like we have the partners exchanged at STO level for return items. I am wondering why there isn't a standard deliverable for the subsequent delivery as well. It doesn't make sense to transfer the return delivery with the  incorrect partners for screening in GTS. Though this is possible with the custom BADIs, just wanted to make sure there is something that is provided in standard SAP which i am not aware of it.

I had already checked some of those notes and corrections for transfer of return deliveries.

Thanks for your inputs in advance.

Regards

Dhilipan

Accepted Solutions (1)

Accepted Solutions (1)

former_member215181
Active Contributor
0 Kudos

Hi Dhilipan,

Just to clarify the issue before getting too far into the detail, if you don't mind?...

I'm initially puzzled as to why you would want application 'SD0B' for a Returns Delivery.  I assume that the situation is that Supplying Plant A has delivered to Receiving Plant B, but something is wrong and therefore the goods have to be returned.  In that case, the Returns Delivery (cat. T) takes care of the last leg, with the Goods Receipt posting the stock back into Plant A.  Is that correct, or am I confused?

If I'm right, then surely 'MM0B' is the correct Application, since the transaction is essentially an Inbound Delivery with a Vendor and Goods Supplier?  Please confirm - or more likely, put me right.

Thanks & regards,

Dave

Former Member
0 Kudos

Hi Dave,


Thanks for your quick response as always.

We are trying to perform export check for the Receiving Plant B when it is trying to return the goods from Plant B to A.

Your assumption is right. We have a Stock Transport order with return item.  When i save the STO, there is a logic in /SAPSLL/LCD_MAP_R3F04 to interchange the partners automatically. Which picks up the vendor of the receiving plant and makes it LF and goods supplier while transferring the documents to GTS- This is good and helpful for us.

Now we need Export check in the next document level- Return Delivery(NLR) level. For this, I need the document to be available in SD0B application level and the partners to be interchanged just like it worked in the PO level.  We will need the Plant and Ship to to be altered. So, export checks can happen with respect to Receiving Plant B legal regulation(Which is actually returning the goods to Plant A).

In the older version of feeder system 4.6C, we had used the BADI for interchanging the partners for return deliveries. Now in ECC, when this interchange logic is there in MM0A level. I was expecting the same in delivery level so i can rule out a technical development for this.

And regarding consideration of Return deliveries for MM0B. This had started after Correction delivered under Note# 1818490 - Returns delivery not transferred to SAP GTS IV


You can see in the correction instruction. Before this note was delivered, Return deliveries are transferred in SD0B level. Once the above mentioned note was delivered, there was a check added to ensure call SD0B only if there is no Supplying plant involved. I didn't really get the logic behind this. I assume this was for customs purpose?

So, I have 2 issues here.

1) Transfer of this return delivery in SD0B for my Export check

2) Partners not being interchanged just like it is working in the STO level transfer.

Please do correct me if I am trying something wrong. If I don't have any other way, I think the only way could be to perform Export check at STO level. But for that I would still need an implementation in the user exit level to alter the application level to SD0A. I think there is a note available for older version. I didn't find a note for ECC.

Our current Release version:

SLL_PI900_604
SAP_APPL

617

Regards

Dhilipan

former_member215181
Active Contributor
0 Kudos

Hi Dhilipan,

Thanks for that further explanation.  I'm still struggling with the ERP situation.  Surely the 'NLR' Delivery models the final step - the receipt back into Plant A (which would be an Import).  The outbound step from Plant B is modelled by the 'RLL' Delivery Type, which has Category 'J'.

Don't you agree?  And if so, does that help?

The traditional STO only has an Outbound Delivery (from Plant A), and the GR is performed directly against the P.O - there's no Inbound Delivery.  Logistics colleagues tell me that more recent ECC versions have closed that "gap" by introducing the ability to transform the OBD into an IBD, allowing inter-plant receipts to be handled in the same way as receipts from external vendors.

Let me know if I'm talking nonsense here!

Regards,

Dave

Former Member
0 Kudos

Hi Dave,

Thanks for your helpful thoughts as always.

As per my understanding for a Plant to Plant returns

1) STO(NB or UB) created with Return items

2) Supplying plant will create a Return delivery of type NLR.

3) Receiving plant will post a negative GR using mov. 161 with reference to STO.

4) PGR done on the Return delivery as well.

GR at receiving plant is done only for 2 step case.

Delivery type RLL is used in case of returns to external vendor. So, we use NLR delivery for Plant to Plant returns. I am trying to check the code, but nothing seems to give me a clear cut idea why this wasn't considered.

There are 2 major concerns.

1) When SAP had introduced a logic to interchange the partners at STO level. Why not at the return delivery level.

2) Why not transfer return deliveries under SD0B. Correction that was introduced for 1818490 - Returns delivery not transferred to SAP GTS IV

Before:

select single retpo into lv_retpo

  from ekpo

  where ebeln = ls_xlips-vgbel

  and ebelp = ls_xlips-vgpos.

  if lv_retpo = gc_true.

  lv_sd0b_call = gc_true.

After note implementation.

select single retpo into lv_retpo

  from ekpo

  where ebeln = ls_xlips-vgbel

  and ebelp = ls_xlips-vgpos.

  if lv_retpo = gc_true.

select single reswk into lv_reswk

  from ekko

  where ebeln = ls_xlips-vgbel.

  if not lv_reswk is initial.

  lv_mm0b_call = gc_true.

  else.

  lv_sd0b_call = gc_true.

  endif.

And the reason for this correction seems to be


A returns delivery with reference to a returns stock transport order is not transferred to SAP GTS even though this contains a previous document number and type of previous document to create a customs shipment.


I don't really understand the relation between the correction and the requirement

Do you think this is worth for OSS message?

Please let me know if you feel I am going in a wrong direction. If there isn't any standard correction, I will have to proceed with the BADI.

Regards

Dhilipan

former_member215181
Active Contributor
0 Kudos

Hi Dhilipan,

What you describe (in steps 1 - 4) is the classic STO process where, as I mentioned above, the goods movements at Plant B are transacted directly against the P.O.  The Delivery processes - outbound and inbound (for returns) are only relevant to Plant A.

So the NLR Delivery models the return into Plant A, not the despatch from Plant B.

Getting down to the code level, which I know is what you want to discuss; for your concern #2, I think I would have written the same code as introduced in Note 1818490.  If there is a Receiving Plant involved, then we're dealing with an STO return, so the Delivery process is inbound.  Otherwise, we're returning goods to an external vendor (RLL, as you say) so the Delivery process is outbound.  It makes sense to me.

Actually it's unlikely that you would encounter an STO in Import/Export processing, since the STO is for Plant-to-Plant movements.  If different countries are involved, then it's 99% sure that different Company Codes are in place, so the transaction would be an inter-company P.O. (NLCC, etc.)  In that case you might find it easier to use both outbound and inbound Deliveries for each movement, with no problem in GTS.  The standard technique is to use ALE (iDoc) linking so that the P.O. created in Plant B automatically creates a matching Sales Order in Company A that is then delivered from Plant A through SD processes.  The Delivery Note output from Plant A is similary linked to create an Inbound Delivery in Plant B - very slick.

Regarding your concern #1; in the supply leg, the P.O. is (as usual) an inbound transaction whereas the associated Delivery is outbound - hence the need to switch the partners.  In the return leg, the Delivery and the P.O. are inbound transactions, so the partners are the same.

In the last project I did that used inter-company transfers, the ERP guys had correctly set up the ECC6 system to create inbound Deliveries from Outbound (with standard functionality) and nothing special was needed for GTS.  I understand that in your case you'd like to use the Returns Delivery for both the Export and Import, and I think a BAdI solution will be best for that.

You could try creating an OSS incident, but I think SAP would demur (even if Eoin doesn't happen to read this post!).

Regards,

Dave

Former Member
0 Kudos

Hi Dave,

Thanks a lot . It makes sense to me now. I'll talk to my team in ERP and will check if we can model the return process as you described. If not, I'll proceed with the BADI approach.

Appreciate your patience.

Regards

Dhilipan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi folks, I was searching for intercompany return process and fortunatelly I saw you have been working on it.

My issue is the process in place for intercompany return for Brazil in OK for material management but is not for financial and actual costing.

What is in place:

1) Change the original STO and create a new line

2) Use movement 161 with PO referente => here my issue the MPV and the Markup condition does not post the same amounts.

3) Create a return delivery and post goods issue mov 673. => here my issue about actual cost (Brazil) this mov creates a new entry in inventory instead of reverse the goods issue.

4) Besides it instead of having a MIRO/credit memo and invoice, it was suggested FB65,FB75 and MR11...very painfull...and there is an additional requirement in Brazil called Nota Fiscal that

I´m not Supply consultant, but my financial and costing users are complaining a lot about this process.

I saw note 489543 Consulting: Return delivery for stock transport order.

You mentioned a flag "Return Item", this flag is not enabled to be changed when the new line item is created in PO.

Coul you advice me what would be a corrected process to be followed ?