cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Inbound delivery idoc with predetermined item category

lwillnat
Explorer
0 Kudos
454

Dear SAP colleagues,

I have the following business use case : 

- Create an inbound delivery through Idoc
- Automatically create a batch with the supplier's batch number (so external batch number range)8
- Automatically create GR (WS_MONITOR_INB_DEL_GDRC program)

I am testing inbound idoc via WE19 and filling my idoc with a predetermined item category Type (ZGEO) in field E1EDL26-PSTYV but sadly it doesn't get saved in my delivery when posted. I keep getting the standard ELN. I debugged and found out that when segment E1EDL26 it doesn't even retrieve any value from E1EDL26-PSTYV..what's the point of it then ? Later in the debug session I can see that it gets to the standard function module RV_LIPS_PSTYV_DETERMINE to determine PSTYV... 

After that, I will be able to change the settings to create a batch at inbound delivery and if you have any advice to take the supplier's batch number instead of creating an internal one, that would be awesome !

Thanks a lot

Luis

Accepted Solutions (0)

Answers (1)

Answers (1)

Lakshmipathi
SAP Champion
SAP Champion
0 Kudos

The field E1EDL26-PSTYV is intended to pass the item category, but SAP’s standard inbound delivery processing doesn’t always honor it directly. Instead, it calls the function module RV_LIPS_PSTYV_DETERMINE, which recalculates the item category based on:

  • Delivery type
  • Item category group
  • Usage indicator
  • Configuration in VOV7 and VOV5

So even if you pass ZGEO in the IDoc, SAP may override it with ELN if the logic in RV_LIPS_PSTYV_DETERMINE doesn’t recognize or allow your custom category.

What you can do is enhance the IDoc processing logic via user exit or BADI, such as EXIT_SAPLV56K_001 or BADI_LE_DELIVERY.  In the enhancement, intercept the item category determination and force ZGEO if certain conditions are met.  Alternatively, adjust your delivery item category determination config to allow ZGEO for the relevant delivery type.

To use the supplier’s batch number instead of generating an internal one, you’ll need to tweak both batch creation controls and IDoc mapping.

 Configuration Steps

 Activate External Batch Number Assignment

    • Go to: IMG → Logistics General → Batch Management → Batch Number Assignment → Activate External Batch Number Assignment
    • Ensure your material is batch-managed and allows external batch numbers.

Define Batch Creation Controls

    • Path: IMG → Logistics Execution → Shipping → Deliveries → Define Batch Creation Controls in Inbound Deliveries
    • For your item category (e.g., ZGEO), select:
      • Batch installation
      • Classification
      • SLED check (optional)

Pass Batch Number in IDoc

    • Use segment E1EDL44-CHARG to pass the supplier’s batch number.
    • Ensure the batch number is valid and matches the material master setup.