2007 Apr 02 8:16 AM
Hi,
We r using EDI for inbound.
1)In control record they are sending MANDT field with their client . How can i change this to our client number.
2)we recently upraded to ECC6.0.. Should DOCREL field has the value 700..? otherwise it is giving error.
To achieve this i am using user-exit EXIT_SAPLEDI1_001.
Here i am coding like
if CONTROL_IN-MANDT ne SY-MANDT .
CONTROL_in-MANDT = SY-MANDT.
endif.
similarly,
if CONTROL_IN-IDOCTP eq 'GSVERF02' and
CONTROL_IN-MESTYP eq 'GSVERF'.
control_in-DOCREL = '700'.
endif.
Regds,
Vinsa.R
2007 Apr 02 2:43 PM
Hi,
If the user-exit you are talking about triggers while whatever process you are doing for inbound idoc, what you are saying is correct.
Regarding MANDT field, you either keep this field as BLANK or if fill it will the client number of your system ( SY-MANDT )
Regarding field DOCREL, read below.
<b>DOCREL</b>
Contains the SAP Release of the IDoc.
IDOC interface ( Inbound IDOC 😞
If the field was filled by the EDI subsystem, it is checked against the SAP field SY-SAPRL. If the field is blank, it is filled with the contents of SY-SAPRL.
EDI Subsystem (Inbound IDOC):
The EDI subsystem can fill DOCREL. If DOCREL is filled, its contents are checked against the SAP field SY-SAPRL and set to incorrect if the IDocs differ.
So, as per above description, you have to make sure that field DOCREL is either blank or equal to the value of SY-SAPRL.
I hope i clarify your doubt.
Let me know if you have any question.
Regards,
RS
2007 Apr 03 3:54 AM
Hi,
You mean EDI Subsystem can change the Control Record fields..? I could n't understand this point. If so, what should I do to let the subsystem do this .Is there any configuration ..? Please suggest me.
Regds,
Vinsa.R
2007 Apr 03 4:28 AM
Hi,
No, i am not talking about EDI Subsystem. I am talking about the user-exit you have mentioned in your previous post.
If this user-exit is triggering before IDOC is generated in SAP and any error message is appended to IDOC status messages, you can change the values of MANDT, DOCREL here.
Otherwire, you have to read these file in UNIX directory and change the control records before processing these file using program RSEINB00.
Let me know if you have any question.
Regards,
RS
2007 Apr 04 2:33 AM
Hi,
Thanks for yor reply. In EDI Inbound , is this normal approch writing some code to chage control record fields and then process...? Becuase I am feeling I did some thing wrong in customization that's why I need this User Exit.
Regds,
Vinsa.R
2007 Apr 04 3:16 AM
Hi,
Normally in EDI scenario, company uses middleware. Here the data from 'Sender' is remapped to the format accepted by company. Fields which does not comes from 'sender' but need to pass in SAP ( control and data both ) are populated based on some defined rules.
I debug the code again and good new is that you can use the user-exit EXIT_SAPLEDI1_001. ( Enhancement SIDOC001 ). The code you have mentioned before will work fine with this correction.
See this code here. It will definitely work for you.
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
IF control_in-mandt NE sy-mandt.
control_out-mandt = sy-mandt. "use control_out INSTEAD OF control_in
ENDIF.
IF ( control_in-idoctp EQ 'GSVERF02' ) AND
( control_in-mestyp EQ 'GSVERF' ).
control_out-docrel = '0700'. "use control_out INSTEAD OF control_in
ENDIF.
*" For second if condition, you can write like this too
IF control_in-docrel <> '0700'.
control_out-docrel = '0700'.
ENDIF.
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*Let me know if you find difficulty implementing this user-exit. This user-exit should solve your problem.
Regards,
RS
2007 Apr 09 8:01 AM
Hi,
What do you mean by middleware? Is it Third party tool..?
Regds,
Vinsa.R