Force an IDoc status from a conversion exit
Hi,
I have created a conversion exit (FM CONVERSION_EXIT_*_INPUT / tcode BD79) for outbound IDoc FIDCC2. It converts in-values into other out-values by using a z-table. If the in-value is not found in the z-table, the IDoc should not go into status 03 (Data passed to port OK) but remain in error status instead. How/where can this error status be forced?
Regards, Jan
I got you.
From the report, I'll go to IDoc(AAAA) display and will change it. Once I saved he IDoc, I'll have a new number xxxx with status 70. I cannot process it. But the status of original IDoc will turn from 51 to 69(Yellow - Can be processed). I have to process this IDoc from here.
But As soon as i save the IDoc, it's kicking me out of the IDoc and report.
From the program, I am not sure where I'll be in the program at this point.
Any inputs aRs.
Thanks,
Matt
Edited by: Creasy Matthew on Sep 16, 2009 11:13 PM
Similar Messages
-
How to change the IDOC Status from 30 to 03
Hi Friends,
In the Partner Profiles Collect IDOCS option is Selected and the Output mode is 4.
In my Custom Program i am Using the Function Module MASTER_IDOC_DISTRIBUTE to generate the IDOCs
I am getting the IDOCs of Status 30.
then in my Custom Program, I am Submitting the IDOCs to RSEOUT00 program.
to change the IDOC status from 30 to 03.
SUBMIT rseout00 USING SELECTION-SCREEN '1000'
WITH docnum IN gt_range_idocs
WITH p_compl EQ 'Y'
AND RETURN.
but still i am not getting the IDOCs of changed status.
I need to get the Changed IDOC status and if the IDOC status is not changed then I need to generate an Error file for the IDOCs data and send that data to customers as a mail.
so my requirment is to call the RSEOUT00 in the Custom Program and Change the IDOCs Status to 03.
When i am Executing the RSEOUT00 Indidually by giving the IDOCs numbers, then the IDOCs Status is going to change to 03 from 30.
Kindly Guide me how to proceed furthur
Thanks in Advance,
GaneshThanks Shrishit,
RC1_IDOC_SET_STATUS changing the Status from 30 to 03.
Its fine, But my Question is will IDOC Data will be reached to XI Server or not.??
means is the functionality of this Program is same as the RSEOUT00.
MY job is to change Status from 30 to 03 only
and then Check the Status of those IDOCs, and if the IDOC is not sended to XI i.e.;03 status, then I need to send the Details of IDOC (i.e.; data in filed IDOC) to Customer Mail ID through an Attachement.
I hope you Understood my AIM, why I need to change the Status in my Custom Program only, by submitting IDOCs to this report .
Kindly waiting for your reply,
Thanks in Advance,
Ganesh -
Hi,
We have to change the status of the Idoc from 60 to 68 without deleting the Idoc. Immediate help is appreciable.
Thanks.
S.SThis adds status to the existing Idoc, however, I doubt you can change the status of an Idoc No.
data:idoc_data type table of edidd.
data:idoc_control type edidc.
data:idoc_status type edi_ds.
data: v_docnum type EDIDC-DOCNUM value '0000000000378029'.
CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_PROCESS'
EXPORTING
* DB_READ_OPTION = DB_READ
document_number = v_docnum
* ENQUEUE_OPTION = SYNCHRONOUS
* IMPORTING
* IDOC_CONTROL =
EXCEPTIONS
DOCUMENT_FOREIGN_LOCK = 1
DOCUMENT_NOT_EXIST = 2
DOCUMENT_NUMBER_INVALID = 3
DOCUMENT_IS_ALREADY_OPEN = 4
OTHERS = 5
IF sy-subrc <> 0.
ENDIF.
*CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_EDIT'
* EXPORTING
* document_number = v_docnum
** ALREADY_OPEN = 'N'
* IMPORTING
* IDOC_CONTROL = idoc_control
* tables
* idoc_data = idoc_data
* EXCEPTIONS
* DOCUMENT_FOREIGN_LOCK = 1
* DOCUMENT_NOT_EXIST = 2
* DOCUMENT_NOT_OPEN = 3
* STATUS_IS_UNABLE_FOR_CHANGING = 4
* OTHERS = 5
*IF sy-subrc <> 0.
*ENDIF.
idoc_status-docnum = v_docnum.
idoc_status-status = '68'.
idoc_status-logdat = '20030804'.
CALL FUNCTION 'EDI_DOCUMENT_STATUS_SET'
EXPORTING
document_number = v_docnum
idoc_status = idoc_status
* IMPORTING
* IDOC_CONTROL =
EXCEPTIONS
DOCUMENT_NUMBER_INVALID = 1
OTHER_FIELDS_INVALID = 2
STATUS_INVALID = 3
OTHERS = 4
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'EDI_DOCUMENT_CLOSE_PROCESS'
EXPORTING
document_number = v_docnum
* BACKGROUND = NO_BACKGROUND
* NO_DEQUEUE = ' '
* IMPORTING
* IDOC_CONTROL =
* EXCEPTIONS
* DOCUMENT_NOT_OPEN = 1
* FAILURE_IN_DB_WRITE = 2
* PARAMETER_ERROR = 3
* STATUS_SET_MISSING = 4
* OTHERS = 5
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Subramanian V. -
How to get IDoc Status from WCF Service Adapter?
I have successfully transfered a strong typed Idoc to SAP using a BizTalk WCF Service Adapter. I did so based on this example: [http://msdn.microsoft.com/en-US/library/cc185231(v=BTS.10).aspx]. We are using the IDoc to create a purchase order. The IDocClient.Send(idoc, ref guid); method returns only a guid. I can translate that using the SapAdpaterUtilities to a transaction ID. When I look at the Idoc in WE02, I can see that it has status information which includes the purchase order number. Is there any way for me to capture this status information in my .Net application when I send the IDoc? Can I query the transaction ID? Or do I just need to get the last PO Number through an RFC?
ScottI ended up using the SAP .Net Data Provider in the Biztalk Adapter Pack to retrieve the PO Number. Essentially when you pass the IDoc you won't get anything in return unless the file transfer fails.
Scott -
Hi all,
Customer request is change idoc status from 29 to 68.
68 = no further processing inbound side
31 = no further processing outbound side
if i change status of idoc from 29 to 68 using Fn module IDOC_STATUS_WRITE_TO_DATABASE
Data of idoc is vanishing.
I observed that if i change status of idoc from 29 to 31 then there is no data loss in idoc with same Fn module.
Is there any way to change idoc status from 29 to 68 without losing the Idoc data.
anyway for both 68 & 31 meanings are same , but customer requires 29 to 68.
if u have any idea please suggest me.Hi Suneel,
If the program does't exits then try this ...
DATA: L_EDIDC_TAB LIKE EDIDC OCCURS 1 WITH HEADER LINE,
L_IDOC_STATUS_TAB LIKE BDIDOCSTAT OCCURS 1 WITH HEADERLINE,
L_IDOC_CONTROL LIKE EDIDC.
L_IDOC_STATUS_TAB-DOCNUM = <your IDoc number>.
L_IDOC_STATUS_TAB-STATUS = '68'.
APPEND L_IDOC_STATUS_TAB.
CALL FUNCTION 'IDOC_STATUS_WRITE_TO_DATABASE'
EXPORTING
IDOC_NUMBER = L_EDIDC_TAB-DOCNUM
IMPORTING
IDOC_CONTROL = L_IDOC_CONTROL
TABLES
IDOC_STATUS = L_IDOC_STATUS_TAB
EXCEPTIONS
IDOC_FOREIGN_LOCK = 1
IDOC_NOT_FOUND = 2
IDOC_STATUS_RECORDS_EMPTY = 3
IDOC_STATUS_INVALID = 4
DB_ERROR = 5
OTHERS = 6.
Regards,
Ferry Lianto -
IDOC status at 30, but in we05 it is 03
Hello Gurus!!
My program generates an IDOC and as soon as the idoc is generated it the status is 03 then i have todo something else.
Within the program when i am cheking the status is 30 but actually in transaction we05 the status is 03.
I have cheked the partner profiles and transfer_idocs_immeadiately has already been selected.
I have already gone thru the forum but no valid solution was given,
There is no need to change any ALE configurations / port configurations because everything just work fine. It is only that within the program i am not able to catch the status 03. the proram is not waiting untill the idoc status is 03. it is capturing only the status 30.
Is there any thing that i can do within the program? should i capture the idoc number and then check the idoc status from EDID4?
Please answer o this questions ASAP.
Regards.Initially when you create the outbound idocs then status is 30. then you have to run the program RSEOUT00 to process the idoc then after the processing the status changes to 03.
But the Program RSEOUT00 is optional. In the partner profile (WE20) If you select the option 'Collect Idocs', then you have to schedule the program RSEOUT00 to process the Idocs otherwise if you have choose the option 'Transfer idoc immediately', you don't need to do anything.
Thanks,
Srinivas -
Steps For Updating the IDOC Status using ALEAUD
Hi all,
My Scenario is : R/3(IDOC)--> Legacy System(File).After the IDOC is received successfully on the Receiver System.I should Update the Status of IDOC on the Sender System.
Can anyone help me out :
What all the Steps & Configurations involved for Sending an Acknowledgement & Updating the IDOC status from the Legacy System.
Thanks in Advance,
Dattatreya.Hi,
You may need to set up another flow (a reverse one), where the Legacy sends a msg to XI with the Idoc number of the initial idoc you sent (onward flow).
now, you can map the idoc number in E1ADHDR/E1STATE/DOCNUM and other statuses as required (in various tags) and also other information as per your environment. Pls see the below links
Re: Acknowledgements ever switch to Status 39
Re: Asyncronous acknowledge from file adapter
Re: R3<->XI<->Auto-ID:How to check result of Idocs sending out from R3 in aii ?
Regards
Vishnu -
How to check idoc status through code
Hi All,
Can we check idoc status from within the code? My requirement is that once the idoc is transmitted correctly(status 12) to the system (outbound),I need to update a few fields in my custom table.
Please share some information if available on this.
Thanks and Regards,
Ameya KulkarniHi
The table EDIDC will contain the necessary information. Please check. -
IDoc status 53 in employee replication from SAP HR
Hi experts,
We are having some problems in CRM BP creation with role employee.
We are using CRM 5.0 and SAP ECC 6.0 and we are trying to replicate employees information to CRM from HR.
After read the notes 934372, 615896, 550055, 363187, 312090 we made the next configuration steps in our systems:
R/3:
- Creation of connection port (trans. WE21)
- Creation of logical system (trans. WE20) and assignment of outbound message HRMD_ABA
- Creation of distribution model (trans. BD64) with all filters indicated in note 312090
CRM
- Creation of logical system (trans. WE20) and assignment of inbound message HRMD_ABA
- Creation of conversion between basic types HRMD_A05 and HRMD_ABA01 (trans. WE70) as described in note 312090
- Creation of conversion between message types HRMD_A and HRMD_ABA (trans. WE73) as described in note 312090
- Creation of external number range ZE from HR01200001 to HR01299999 (using PA04 in R3 we found the number range between 01200001 and 01299999)
- Creation of BP Grouping with the same name of number range (ZE) checked to be external too
- Update of table T77S0 (using SM30):
HRALX HRAC X
HRALX PBPON OFF
HRALX PBPHR ON
HRALX PBPON ON
HRALX PNUMB 3
HRALX PPROL BUP003
HRALX PSUBG ZE
PLOGI PLOGI MV
We know we should have the same value in R3 and CRM for PLOGI/PLOGI, so we created in CRM MV because that is the plan version used in R3. To create it, we just manually add a new row in table T778P and then selected it in table T77S0. Is this the correct way to create a plan version?
After these steps, in R3 we execute program RHALEINI with parameters:
- Plan version = MV
- Object type = P
- Object ID = an active employee
- Reporting period = all
- Transfer mode = Insert
- Receiving system:
Receiving partner No = DCRCLNT300 (logical system created in WE20)
Message type = HRMD_ABA
And everything looks fine in R3.
In CRM, using trans. WE05, we can see that the iDoc is created, apparently without problems with status 53 - "Applicaton document posted" but the business partner is never created.
Did we miss some configuration steps?
Should we do something more after see the iDoc in CRM to create BP?
Thanks in advance.
Aldahi pratk bhai,
ya i have done the same setting what Ada has mentioned eariler,
and as of your suggestion to maintatin the mandatory infotype, i have even done tht,
after running RHALEINI in R3, the status is all green here.
when i run the tcode BD87 to check the Idoc status its showing fine (Error free).
now, through tcode se38 the report CRMHRALE_CENTRAL_PERSON shows all the employees as status green,,
but the partner number is not getting generated. ( i have used HRALX-PNUMB= 3 (Prefeexing the number range coming from R3)).
kindly advice me what should be done in order to generate a BP number for the replicated HR Employee.
best regards,
Madhup -
Hello all!
I'm trying to send a message with the status of an IDoc that has been processed, but I can't find an exit right after the status of the IDoc has been set, do you have any idea on what can I do for this?
Regards!This is the exit where we have the control of setting idoc status. If there no scope of this idoc status.
Then try to find out an exit which will be triggered before this exit with idoc status ( with value ). Then export this to memory and get back the same from memory in Vijay's suggested exit.
Also if you could able to find the exit after THIS exit you won't have option to set custom idoc status.
Regds
Manohar -
Idocs are unable to transfer from R3 to PI system, IDOC status is 03
Hello Gurus,
Idocs are unable to transfer from R3 to PI system, IDOC status is 03
in sm58 getting below error
RFC are working fine
"EDISDEF: Port SAPCEP segment defn Z2SH_DESCR000 in IDoc type MATMAS03 CIM"
Regrds
vamsiHi,
I am also facing same problem, Can any one suggest me what is the issue.. -
CONVERSION EXIT to remove thousand separator from quantity field
HI
NEED HELP
do u know any FM or CONVERSION EXIT which remove thousand separator from quantity field.
Eg. 1,234,567.11 SHOULD be displayed as 1234567.11Hi Chetanpatil.
Try this:
If your quantity has thousand separator as comma:
translate lv_quantity using ', '.
condense lv_quantity.
If your quantity has thousand separation as dot:
translate lv_quantity using '. '.
translate lv_quantity using ',.'.
condense lv_quantity.
You'll need to check for the user thousand separator configuration in table USR01 field DCPFM or by calling BAPI_USER_GET_DETAIL and act accordingly.
Regards,
Andres. -
IDoc Status "& & & &" in IDoc posting in BD87 - ALE
hi,
I am integrating two R3 servers and posting the datas from HR to cProjects server.
In Outbound I can send the IDocs and In Inbound IDocs are getting into destinations (cProjects) servers along with status "& & & &" in BD87.
Can anyone help me to know..Where the cause of problem..
Thanks in advance
Regards,
Srinivasan.RHi.,
In we02 its OK..
Its showing ...
Status Message for Selected IDoc
Status Text: IDoc: 0000000000036306 Status: IDoc ready to be transferred to application
T100 Text: No filters , No conversion , No version change .
But., in place of BD87 I am getting status only "& &, &, &".
Regards,
Srinivasan.R -
IDOC status 62 - IDOC passed to application
Hello Experts,
Am posting a inbound sales order custom/extended IDOC into the system from WE19, but, when I saw it in WE02/05, its showing status 62 - IDOC passed to application, i checked ST22 run time error. there is no error and also checked triggering timings, its trigger IMMEDIATELY in WE20 fo rthat partner!!
Pls. let me kniow the reasona and fixing idea.
Thank youI think you're going to want to debug through the process code (set a breakpoint in that function) and determine if you get a clean exit from there. If so, you should see a new status in your control record and in your status table as you exit the function call. It sounds like you've got an abnormal termination/exit from the process code, in which case the IDOC status is falling back to the last recorded status. If this is not the case, then perhaps you've got a commit handling issue where an explicit commit is expected to finish the process but never happens.
-
I have created some outbound IDOCs for a PO. Is there an easier way to programatically find the IDOC numbers corresponding to the PO ? (Other than querying on EDID4 table and scanning the SDATA field ).
THanks.Hi Shareen,
To get IDOC no from a PO no you will have to write a custome function module to do this,
you can use the follwing code for custome function module, which will take PO number, IDOC message type and Idoc type(basic type) as an input parameter and provide details of the IDOCs.
FUNCTION ZSTEST.
""Local interface:
*" IMPORTING
*" REFERENCE(PONUMBER) LIKE EKKO-EBELN
*" REFERENCE(MESTYP) LIKE EDIDC-MESTYP
*" REFERENCE(IDOCTYPE) LIKE EDIDC-IDOCTP
*" TABLES
*" IDOCINFO STRUCTURE EDIDC
DATA: int_edidc TYPE edidc OCCURS 100 WITH HEADER LINE.
DATA: int_edidc1 TYPE edidc OCCURS 100 WITH HEADER LINE.
DATA: int_edidd TYPE edidd OCCURS 100 WITH HEADER LINE.
DATA: time_0 LIKE edidc-updtim VALUE '000000',
time_24 LIKE edidc-updtim VALUE '240000'.
DATA: value1_2 TYPE edipar0002-edi_value.
DATA: SEGMENT1 LIKE EDISYN-SEGTYP value 'E1EDK01'.
DATA: found1_1 TYPE c, found_1 TYPE c.
DATA: offset1_1 TYPE i value '84', end1_1 TYPE i value '118'.
RANGES : CRETIM FOR EDIDC-CRETIM,
CREDAT FOR EDIDC-CREDAT,
UPDTIM FOR EDIDC-UPDTIM,
upddat FOR EDIDC-upddat,
direct FOR EDIDC-direct,
docnum FOR EDIDC-docnum,
status FOR EDIDC-status,
IDOCTP FOR EDIDC-IDOCTP,
cimtyp FOR EDIDC-cimtyp,
mestyp1 FOR edidc-mestyp,
sndpor FOR EDIDC-sndpor,
sndprt FOR EDIDC-sndprt,
sndprn FOR EDIDC-sndprn,
rcvpor FOR EDIDC-rcvpor,
rcvprt FOR EDIDC-rcvprt,
rcvprn FOR EDIDC-rcvprn.
CRETIM-SIGN = 'I'.
CRETIM-OPTION = 'BT'.
CRETIM-LOW = time_0.
CRETIM-HIGH = time_24.
APPEND CRETIM TO CRETIM.
CREDAT-SIGN = 'I'.
CREDAT-OPTION = 'BT'.
CREDAT-HIGH = SY-DATUM.
APPEND CREDAT TO CREDAT.
UPDTIM-SIGN = 'I'.
UPDTIM-OPTION = 'BT'.
UPDTIM-HIGH = time_24.
APPEND UPDTIM TO UPDTIM.
IDOCTP-SIGN = 'I'.
IDOCTP-OPTION = 'EQ'.
IDOCTP-LOW = IDOCTYPE.
APPEND IDOCTP TO IDOCTP.
mestyp1-SIGN = 'I'.
mestyp1-OPTION = 'EQ'.
mestyp1-low = mestyp.
APPEND mestyp1 TO mestyp1.
found1_1 = ' '.
found_1 = ' '.
SELECT * FROM edidc INTO TABLE int_edidc
WHERE upddat >= credat-low
AND cretim IN cretim
AND credat IN credat
AND updtim IN updtim
AND upddat IN upddat
AND direct IN direct
AND docnum IN docnum
AND status IN status
AND idoctp IN idoctp
AND cimtyp IN cimtyp
AND mestyp IN mestyp1
AND sndpor IN sndpor
AND sndprt IN sndprt
AND sndprn IN sndprn
AND rcvpor IN rcvpor
AND rcvprt IN rcvprt
AND rcvprn IN rcvprn
ORDER BY PRIMARY KEY.
LOOP AT INT_EDIDC.
IF NOT PONUMBER IS INITIAL.
CLEAR INT_EDIDD.
REFRESH INT_EDIDD.
CALL FUNCTION 'IDOC_READ_COMPLETELY'
EXPORTING
document_number = int_edidc-docnum
IMPORTING
IDOC_CONTROL =
NUMBER_OF_DATA_RECORDS =
NUMBER_OF_STATUS_RECORDS =
TABLES
int_edids =
int_edidd = int_edidd
EXCEPTIONS
document_not_exist = 1
document_number_invalid = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
IF NOT segment1 IS INITIAL.
LOOP AT int_edidd WHERE segnam = segment1.
found1_1 = ' '.
SEARCH int_edidd-sdata FOR PONUMBER STARTING AT offset1_1
ENDING AT end1_1.
IF sy-subrc = 0.
found1_1 = 'X'.
ENDIF.
IF found1_1 = 'X'.
MOVE-CORRESPONDING int_edidc TO int_edidc1.
APPEND int_edidc1.
CLEAR int_edidd-sdata.
found_1 = 'X'.
EXIT.
ENDIF.
ENDLOOP.
IF found_1 = 'X'.
IDOCINFO[] = int_edidc1[].
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDFUNCTION.
Maybe you are looking for
-
Error while saving Excise Invoice- 'Balance in transaction currency'
Hi to all. I am using TAXINN taxing procedure.Recently I applied notes for S&H cess legal changes. Everything working fine. But when I try to save excise Invoice system throws the following error. Amount Rs.53 is S&H Cess. If i removed conditio
-
Source of xslt mapping and XSD/ XMT target structures for standard Idocs
Hi, I am working on R/3 - XI - ICH scenario. I need xslt mapping and XSD/ XML target structures for standard IDoc like PROACT01,DELFOR01, DELVRY03. I tried to search it on marketplace but couldn't find it there. As per configuration document, these t
-
Deffer tax transfer (New) problem
Hi, Kindly help me, This is Ramu . I have a one problem at deffer tax transfer new ( tc se38 Programe name is RFUMSV50). When we execute above transaction code and programe the given entry is display at quality level : Service tax receivable a/c DR
-
Recover Accidentally Deleted Commands in Terminal
I'm trying to do a certain set up on my Nintendo 3ds system using wifi on my Mac OS X desktop and in order to do it I'm suppose to put in certain commands in the terminal, but I made a mistake and pressed backspace and accidentally deleted my command
-
public static void main(String[] args) throws FileNotFoundException, IOException String str="Abcdef University"; RandomAccessFile raf = new RandomAccessFile("C:/dos.txt","rw"); raf.seek(raf.length()); raf.writeBytes(st