‎2014 Nov 14 4:23 PM
Hello folks
Is it possible that I create a standard function IDOC_INPUT_ORDERS into a customer function Z_IF_IDOC ...?
I have to do different checks into the customer function so that I will start the standard function into this.
I create the customer function with the same parameter as the standard function. The customer function is
register in the following transactions WE42 and WE57.
Well, the inbound IDoc start the customer function with the following status 50 and 64. After this start
the standard function with the following status 51 and there is a red light in BD87. The second start is successfull.
I have no idea where the problem is.
Example:
FUNCTION z_if_idoc_input... .
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(INPUT_METHOD) LIKE BDWFAP_PAR-INPUTMETHD
*" VALUE(MASS_PROCESSING) LIKE BDWFAP_PAR-MASS_PROC
*" EXPORTING
*" VALUE(WORKFLOW_RESULT) LIKE BDWF_PARAM-RESULT
*" VALUE(APPLICATION_VARIABLE) LIKE BDWF_PARAM-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
*" EXCEPTIONS
*" WRONG_FUNCTION_CALLED
*"----------------------------------------------------------------------
*&----- check same input segments
...
*&----- call api "IDOC_INPUT_ORDERS"
CALL FUNCTION 'IDOC_INPUT_ORDERS'
EXPORTING
input_method = input_method
mass_processing = mass_processing
IMPORTING
workflow_result = lv_workflow_result
application_variable = lv_application_variable
in_update_task = lv_in_update_task
call_transaction_done = lv_call_transaction_done
document_number = lv_document_number
TABLES
idoc_contrl = idoc_contrl[]
idoc_data = idoc_data[]
idoc_status = lt_idoc_status
return_variables = lt_return_variables
serialization_info = serialization_info[]
edi_text = lt_edi_text
edi_text_lines = lt_edi_text_lines.
*&----- wirte the customer protocol with customer information
...
Many thanks in advance for some help or further information!
Bye Ringo
‎2014 Nov 15 4:39 PM
Hi Ringo,
Just copy the contents of the standard function module "IDOC_INPUT_ORDERS" and paste in in your custom function module "z......" instead of calling the function module inside yours.
Do let me know in case you still face any issue.
Thanks.
Regards,
Rachit.
‎2014 Nov 17 10:25 AM
Hello Rachit
Unfortunately , this is not possible but I checked the customer exits and I found the
EXIT_SAPLVEDA_004. I implemented my function in this function module because I need the
current sales document number for further checks and confirmation.
Well, it works.
Many thanks for your help and impluse.
Best regards
Ringo
‎2014 Nov 17 12:21 PM
Hello Ringo,
this should work fine as long as you not modify IDOC_STATUS.
Which code are you using in the block "*&----- wirte the customer protocol with customer information"?
Maybe try to take out all your own code and just leave the call to the standard FM in place. Then comment your code back in section by section to see from where the status 51 is being set.
Regards,
Dominik
‎2014 Nov 17 3:15 PM
Hello Dominik
I checked this idea but it doesnt work. Well, I have only my customer functionmodule as a frame and inside the standard functionmodule. When I test this in transaction WE19 function "Inbound function module" is everything fine but when I test this in function "Standard inbound" creates the system a message into BD87 - VG 223 IDoc & cannot be opened. When I'm looking into SM12 there is an entry with my user and the IDoc number.
In my coding are different enhancements - write a protocol into customer tables with further information for a better monitoring e.g. the real material number or the real vendor.
But this depends on the IDoc data - if everything fine then start the customer confirmation with
the new sales document number and other information or send a confirmation without new sales document and a particular message.
Many thanks for your help and impulse.
Best regards
Ringo