‎2005 Dec 15 9:50 AM
Hi,
I have a requirement where the idoc for invoice is received from external system.( Inbound process ).While it is processed in the sap system the data has to be validated. And if the data is invalid then this detail has to be maintained in the ztable with the idoc status "Incorrect" and message "reasoning the error" and related data.
And in the program the details of the idoc whose status is incorrect(that is maintained in the ztable) has to be displayed so that the user changes( corrects ) the idoc data and "SAVE"s it. When it is saved the modified data has to be updated in the idoc and a ztable.
The data that is displayed can be header or item data or both.. Therefore both kind of data has to be updated for a particular idoc..
Can anyone help me in giving information as how to update the idoc in this scenario?
Thanks & Regards,
Lakshmi
‎2005 Dec 16 7:17 AM
Solution: Copy the Standard idoc to the Z_idoc name and then this has to confrigured by the Function cons. once it done then goto the FM module Copy one and write the code what u want to u please tell me know if u want any help is need from my side.....i have done this scenario..
‎2005 Dec 15 10:05 AM
Hi Lakshmi,
I have done the same req with HR IDOCs.
You have to change the Inbound Function module as per your req by copying the standard function module.
It should be the remote FM where u can put a piece of code for validation before updating the data. AT the same time u can trace the errors and update it in the ZTABLE.
Dont forget to assign this custom FM for the message type in WE57 after everything over.
Thanks
Eswar
‎2005 Dec 15 10:16 AM
Hi Eswar,
Thanks for your instant reply. But i would like to know as which function module does this. My invoices are both FI and MM.
Regards,
Lakshmi
‎2005 Dec 15 10:27 AM
hi,
FI invoice document will be created by IDOC_INPUT_INVOIC_FI and MM inovice document is created by IDOC_INPUT_INVOIC_MM. so you need to copy these two FM and add your code.
rajkumar abbu
‎2005 Dec 15 10:37 AM
Hi Lakshmi,
Modify the below FModules
IDOC_INPUT_INVOIC_FI Invoice Receipt (INVOICE)
IDOC_INPUT_INVOIC_MM Invoice Receipt (INVOICE)
Thanks
Eswar
‎2005 Dec 16 7:17 AM
Solution: Copy the Standard idoc to the Z_idoc name and then this has to confrigured by the Function cons. once it done then goto the FM module Copy one and write the code what u want to u please tell me know if u want any help is need from my side.....i have done this scenario..
‎2005 Dec 16 7:20 AM
Hi,
Please go throught his code it will help u lot ..... what i am doing is that i am copy the status into aninternal ... and what u have do same if i am right please tell me know once it done
FUNCTION z_idoc_status_zinfinfo_gc3.
*"----
""Local interface:
*" IMPORTING
*" REFERENCE(RCVPRN) TYPE EDI_RCVPRN
*" REFERENCE(RCVPOR) TYPE EDI_RCVPOR
*" REFERENCE(RCVPRT) TYPE EDI_RCVPRT
*" REFERENCE(MESCOD) TYPE EDI_MESCOD
*" REFERENCE(MESTYP) TYPE EDI_MESTYP
*"----
DATA: w_e1stats LIKE e1stats.
DATA: t_idoc_data LIKE TABLE OF edidd WITH HEADER LINE.
DATA : w_docnum TYPE edi_docnuc,
w_logdat TYPE edi_logdat,
w_logtim TYPE edi_logtim.
CONSTANTS: c_status TYPE edi_status VALUE '53',
c_statyp TYPE edi_symsty VALUE 'S'.
idoc_control-mestyp = c_mestyp_status.
idoc_control-idoctp = c_idoctp_stat01.
idoc_control-rcvprt = rcvprt.
idoc_control-rcvprn = rcvprn.
‎2005 Dec 16 7:28 AM
Hi,
i posted only a OFF code above if want every thing can u please mail me vishu_sai9@yahoo.com and i will send the completed code to u
‎2005 Dec 17 6:50 AM
Hi,
i have done same thing in my project please tell me if i can help out if u an issue thank u
‎2005 Dec 17 6:51 AM
Hi,
i have done same thing in my project please tell me if i can help out if u an issue thank u
‎2005 Dec 19 1:02 PM
Hi,
I got the solution as how to modify the idoc data. The FMs used for this application are:
EDI_DOCUMENT_OPEN_FOR_EDIT - To get the idoc data
EDI_CHANGE_DATA_SEGMENTS - To change the idoc data
EDI_DOCUMENT_CLOSE_EDIT - To close
Regards,
Lakshmi
‎2005 Dec 19 1:10 PM
Hi lakshmi,
U did in a different point of view that's great thank u friend ......
‎2005 Dec 19 1:12 PM
Hi Lakshmi,
Thanks for update.
Can u please close this thread by giving some points for helpful answers.
Thanks
Eswar
‎2005 Dec 19 1:15 PM
Hi lakshmi,
I have few doubts about the Idoc modification can u please clarify my doubt, if it great for me if u provided me an email id to me and i am waiting for u reply
thank u
kiranprasad