Q
Problem solve Get help with specific problems with your technologies, process and projects.

Data entry validations for IDocs

Inbound IDocs don't check the amount of units before it executes the picking, so it is possible to execute the picking for a quantity greater than the maximun of the amount in the document position. How can this be resolved?

We are sending inbound IDocs type SDPIID01. Our problem is that it doesn't check the amount of units before it executes the picking, so it is possible to execute the picking for a quantity greater than the maximun of the amount in the document position. I'm trying to find a note or something but I don't see anything. I suppose we have to implement some code. Thanks -- two years ago you helped me a lot with IDocs.
My general recommendation for doing data entry validations for IDoc is to "overload" the processing function with an own one. Assume you use FUNCTION SD_IDOC_INPUT_PICKING for the given Inbound IDoc you can create an own ZSD_IDOC_INPUT_PICKING that checks the data and if no error it shall call the standard routine for the processing. So it will be something like:

FUNCTION ZSD_IDOC_INPUT_PICKING.
*"----------------------------------------------------------------------
*"*"Globale Schnittstelle:
*"  IMPORTING
*"     VALUE(INPUT_METHOD) LIKE  BDWFAP_PAR-INPUTMETHD
*"     VALUE(MASS_PROCESSING) LIKE  BDWFAP_PAR-MASS_PROC
*"  EXPORTING
*"     VALUE(WORKFLOW_RESULT) LIKE  BDWFAP_PAR-RESULT
*"     VALUE(APPLICATION_VARIABLE) LIKE  BDWFAP_PAR-APPL_VAR
*"     VALUE(IN_UPDATE_TASK) LIKE  BDWFAP_PAR-UPDATETASK
*"     VALUE(CALL_TRANSACTION_DONE) LIKE  BDWFAP_PAR-CALLTRANS
*"  TABLES
*"      IDOC_CONTRL STRUCTURE  EDIDC
*"      IDOC_DATA STRUCTURE  EDIDD
*"      IDOC_STATUS STRUCTURE  BDIDOCSTAT
*"      RETURN_VARIABLES STRUCTURE  BDWFRETVAR
*"      SERIALIZATION_INFO STRUCTURE  BDI_SER OPTIONAL
*"  EXCEPTIONS
*"      WRONG_FUNCTION_CALLED
*"      OTHERS
*"----------------------------------------------------------------------
Data: myerror.
Clear myerror.
Loop at idoc_data.
        **** verify the segments
  if not OK.
    Myerror = 'X'.
..    Fill IDOC_status with the error message and set IDOC_STATUS-STATUS =
51 !
    Exit.
  Endif.
Endloop.

If myerror eq space.
CALL FUNCTION 'ZSD_IDOC_INPUT_PICKING'
  IMPORTING
     INPUT_METHOD = INPUT_METHOD
     MASS_PROCESSING = MASS_PROCESSING
           .......
..
Endif.

Endfunction.

****

In order to use it with standard inbound processing you need to execute:

BD51 and add the function to the list of allowed inbound functions
WE42 create a new processing code for inbound to use in partner profiles
WE20

This was last published in March 2005

Dig Deeper on SAP interface technologies

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close