Idoc status 51 after 53
Hi,
I have the following scenario, we are getting the file to sap and the file data needs to be updated in to sap. we had custom inbound idoc processing program which will load the data into sap. the problem is idoc should have status for each main segment of the idoc. lets take if we have 10 main segments then 10 status should be there in the idoc status so that user will varify which record in the file failed or errored out. The issue is if 9 records updated successfully and last record in the file failed while updating the idoc should have status like (53,53,53...(9 times) and at the end it should 51) when i debugged i found the same result but after this custom inbound fm standard process is replacing all the status messages with 'Status records with status 51 after status 53'.
In reverse way if i have 9 failed and last one successful then i can see (9)...51s and 10th one as 53) but if last record failed then getting 'Status records with status 51 after status 53'. Could any one faced this kind of situation please let me know.
Thanks in advance.
No matter how many 53's you have, if you have one 51(order doesnt matter) the Final Idoc status will be 51. If you want the idoc to be successfully processed all messages should be 53.
Or you have to develop the reproccessing logic to process only the failed entry and then make it 53.
Similar Messages
-
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 -
IDOC creation after the creation of a purchase order
Hi everybody,
I want some configuration details regardign IDOC creation. The requirement is, once i create a purchase order in one system, the details should automatciaclly transfer to other system through IDOC. could any one suggest any document or detailed procedure to accomplish the task. Thanks in advance,
Santosh.hi santosh kumar,
Creating an IDoc Segment WE31:
The segment defines the structure of the records in an IDoc. They are defined with transaction WE31.
We will define a structure to send a text from the text database.
Transaction WE31 calls the IDoc segment editor. The editor defines the fields of a
single segment structure. The thus defined IDoc segment is then created as a data
dictionary structure. You can view the created structure with SE11 and use it in an
ABAP as any TABLES declaration.
To demonstrate the use of the IDoc segment editor we will set up an example, which
allows you to send a single text from the text pool (tables STXH and STXL) as an
IDoc. These are the texts that you can see with SO10 or edit from within many
applications.
We will show the steps to define an IDoc segment YAXX_THEAD with the DDic
structure of THEAD.
To facilitate our work, we will use the "copy-from-template-tool", which reads the
definition of a DDIC structure and inserts the field and the matching definitions as
rows in the IDoc editor. You could, of course, define the structure completely
manually, but using the template makes it easier.
The tool in release 4.0b lets you use both DDIC structures or another IDoc segment
definition as a template.
The thus created structure can be edited any time. When saving, it will create a data
dictionary structure based on the definition in WE31. The DDIC structure will retain
the same name. You can view the structure as a table definition with SE11 and use it
in an ABAP the same way.
Defining the Message Type (EDMSG)
The message type defines the context under which an IDoc is transferred to its destination. It allows for using the same IDoc file format for several different applications.
Imagine the situation of sending a purchase order to a supplier. When the IDoc with
the purchase order reaches the supplier, it will be interpreted as a sales order
received from a customer, namely you.
Simultaneously you want to send the IDoc data to the supplier's warehouse to inform
it that a purchase order has been issued and is on the way.
Both IDoc receivers will receive the same IDoc format; however, the IDoc will be
tagged with a different message type. While the IDoc to the supplier will be flagged
as a purchase order (in SAP R/3 standard: message type = ORDERS), the same IDoc
sent to the warehouse should be flagged differently, so that the warehouse can
recognize the order as a mere informational copy and process it differently than a
true purchase order.
The message type together with the IDoc type determine the processing function.
The message types are stored in table EDMSG.
Defining the message type can be done from the transaction WEDI
EDMSG: Defining the message type (1)
The entry is only a base entry which tells the system that the message type is
allowed. Other transactions will use that table as a check table to validate the entry.
IT is as shown .
EDMSG: Defining the message type (1):
The entry is only a base entry which tells the system that the message type is
allowed. Other transactions will use that table as a check table to validate the entry.
Sales Orders are being created through inbound IDocs using FM 'EDI_DATA_INCOMING'. Now a Report is required to check the status of these Inbound IDocs along with Sales Orders generated against customer Purchase Orders.
Requirement:
Sales Orders are being created through inbound IDocs using FM 'EDI_DATA_INCOMING'. Now a Report is required to check the status of these Inbound IDocs along with Sales Orders generated against customer Purchase Orders.
Processing:
The report selects, 'ORDERS' IDoc numbers & status, generated between given time range, from table EDIDC. Further, it calls Function Module 'IDOC_READ_COMPLETELY' to get the IDoc details. Then required information is extracted by reading relevant field data of IDoc segments.
sampl code:
REPORT Z_EDI_FILE_LOAD_STATUS_REPORT .
Staus Report for Inbound IDOCs ( Sales Orders )
Program : Z_EDI_FILE_LOAD_STATUS_REPORT
Presented By : www.rmtiwari.com
TABLES : EDIDC.
ALV stuff
TYPE-POOLS: SLIS.
DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
GT_SORT TYPE SLIS_T_SORTINFO_ALV,
GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
DATA : BEGIN OF T_REPORT OCCURS 0,
IDOC_NO TYPE EDI_DOCNUM,
IDOC_DATE TYPE SY-DATUM,
IDOC_TIME TYPE SY-UZEIT,
SORDER_NO TYPE VBELN,
STP_NO TYPE KNA1-KUNNR,
STP_NAME(35) TYPE C,
STP_PHONE(12) TYPE C,
PO_NO(15) TYPE C,
STATUS TYPE C,
S_TEXT(70) TYPE C,
ERROR(70) TYPE C,
END OF T_REPORT.
--PARAMETER--
selection-screen begin of block date with frame title TEXT-S01.
select-options: UDATE for EDIDC-UPDDAT
default SY-datum obligatory, "Changed On
UTIME for EDIDC-UPDTIM . "Changed Time
selection-screen end of block date.
INITIALIZATION.
START-OF-SELECTION.
PERFORM SHOW_STATUS_REPORT.
*& Form alv_grid
text
--> p1 text
< -- p2 text
FORM ALV_GRID.
IF GT_FIELDCAT[] IS INITIAL.
PERFORM FIELDCAT_INIT.
PERFORM LAYOUT_INIT.
PERFORM SORT_INIT.
ENDIF.
PERFORM GRID_DISPLAY.
ENDFORM. "alv_grid
*& Form layout_init
FORM LAYOUT_INIT.
GS_LAYOUT-ZEBRA = 'X'.
GS_LAYOUT-CELL_MERGE = 'X'.
GS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
GS_LAYOUT-NO_VLINE = ' '.
GS_LAYOUT-TOTALS_BEFORE_ITEMS = ' '.
ENDFORM. " layout_init
*& Form fieldcat_init
FORM FIELDCAT_INIT.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'IDOC_NO'.
LS_FIELDCAT-KEY = 'X'.
LS_FIELDCAT-REPTEXT_DDIC = 'IDOC'.
LS_FIELDCAT-OUTPUTLEN = 10.
Fix for ALV print bug, which puts 'N/A' over last digit
Set inttype to 'N' to stop corruption of printed ALV cell.
LS_FIELDCAT-INTTYPE = 'N'.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'IDOC_DATE'.
LS_FIELDCAT-REPTEXT_DDIC = 'Creation Date'.
LS_FIELDCAT-OUTPUTLEN = 10.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'IDOC_TIME'.
LS_FIELDCAT-REPTEXT_DDIC = 'Creation Time'.
LS_FIELDCAT-OUTPUTLEN = 8.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'STATUS'.
LS_FIELDCAT-REPTEXT_DDIC = 'St'.
LS_FIELDCAT-OUTPUTLEN = 2.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'ERROR'.
LS_FIELDCAT-REPTEXT_DDIC = 'Message'.
LS_FIELDCAT-OUTPUTLEN = 70.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'STP_NO'.
LS_FIELDCAT-REPTEXT_DDIC = 'S.T.Party No'.
LS_FIELDCAT-OUTPUTLEN = 10.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'STP_NAME'.
LS_FIELDCAT-REPTEXT_DDIC = 'Sold to Party Name'.
LS_FIELDCAT-OUTPUTLEN = 35.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'PO_NO'.
LS_FIELDCAT-REPTEXT_DDIC = 'Purch Order'.
LS_FIELDCAT-OUTPUTLEN = 15.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'STP_PHONE'.
LS_FIELDCAT-REPTEXT_DDIC = 'S.T.Party Phone'.
LS_FIELDCAT-OUTPUTLEN = 15.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
ENDFORM. "fieldcat_init
*& Form sort_init
FORM SORT_INIT.
DATA: LS_SORT TYPE SLIS_SORTINFO_ALV.
CLEAR LS_SORT.
LS_SORT-FIELDNAME = 'IDOC_DATE'.
LS_SORT-SPOS = 1.
LS_SORT-UP = 'X'.
APPEND LS_SORT TO GT_SORT.
CLEAR LS_SORT.
LS_SORT-FIELDNAME = 'IDOC_TIME'.
LS_SORT-SPOS = 2.
LS_SORT-UP = 'X'.
APPEND LS_SORT TO GT_SORT.
CLEAR LS_SORT.
LS_SORT-FIELDNAME = 'STATUS'.
LS_SORT-SPOS = 3.
LS_SORT-UP = 'X'.
APPEND LS_SORT TO GT_SORT.
CLEAR LS_SORT.
LS_SORT-FIELDNAME = 'IDOC_NO'.
LS_SORT-SPOS = 4.
LS_SORT-UP = 'X'.
APPEND LS_SORT TO GT_SORT.
ENDFORM. "sort_init
*& Form grid_display
FORM GRID_DISPLAY.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = GT_FIELDCAT
IT_SORT = GT_SORT
i_callback_program = SY-REPID
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_DEFAULT = ' '
I_SAVE = 'X'
TABLES
T_OUTTAB = T_REPORT
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM. "grid_display
*& Form COMMENT_BUILD
Processing of listheader
FORM COMMENT_BUILD USING P_FK_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
DATA: LS_LINE TYPE SLIS_LISTHEADER.
REFRESH P_FK_LIST_TOP_OF_PAGE.
List Heading : Typ H
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-INFO = 'Sales Order Interface: Z_EDI_FILE_LOAD'.
APPEND LS_LINE TO P_FK_LIST_TOP_OF_PAGE.
List : Typ S
clear LS_LINE.
LS_LINE-typ = 'S'.
LS_LINE-key = 'Date Range:'.
LS_LINE-info = UDATE-low.
if not UDATE-high is initial.
write ' To ' to LS_LINE-info+30.
LS_LINE-info+36 = UDATE-high.
endif.
APPEND LS_LINE TO P_FK_LIST_TOP_OF_PAGE.
ENDFORM. " COMMENT_BUILD
FORM TOP_OF_PAGE *
Ereigniss TOP_OF_PAGE *
event TOP_OF_PAGE
FORM TOP_OF_PAGE.
PERFORM COMMENT_BUILD USING gt_LIST_TOP_OF_PAGE[].
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
ENDFORM. "TOP_OF_PAGE
*& Form show_status_report
FORM SHOW_STATUS_REPORT .
Report to show status.
DATA: BEGIN OF T_TEDS2 OCCURS 0.
INCLUDE STRUCTURE TEDS2.
DATA: END OF T_TEDS2.
DATA: BEGIN OF T_IDOC_CONTROL_TMP OCCURS 0.
INCLUDE STRUCTURE EDIDC.
DATA: END OF T_IDOC_CONTROL_TMP.
CONSTANTS: C_STATUS_IN_IDOC_POSTED LIKE EDIDC-STATUS VALUE '53'.
DATA : T_EDIDS TYPE STANDARD TABLE OF EDIDS WITH HEADER LINE.
DATA : T_EDIDD TYPE STANDARD TABLE OF EDIDD WITH HEADER LINE.
DATA : GV_PARTNER_SEG TYPE E1EDKA1,
GV_PO_REF_SEG TYPE E2EDK02.
Get text for status values
SELECT * FROM TEDS2 INTO TABLE T_TEDS2 WHERE LANGUA = SY-LANGU.
Read the IDoc's status after processing
SELECT * FROM EDIDC
INTO TABLE T_IDOC_CONTROL_TMP
WHERE UPDDAT IN UDATE
AND UPDTIM IN UTIME
AND MESTYP = 'ORDERS'.
LOOP AT T_IDOC_CONTROL_TMP.
IDoc has been processed, since control record changed.
READ TABLE T_TEDS2 WITH KEY STATUS = T_IDOC_CONTROL_TMP-STATUS.
T_REPORT-IDOC_NO = T_IDOC_CONTROL_TMP-DOCNUM.
T_REPORT-IDOC_DATE = T_IDOC_CONTROL_TMP-CREDAT.
T_REPORT-IDOC_TIME = T_IDOC_CONTROL_TMP-CRETIM.
T_REPORT-S_TEXT = T_TEDS2-DESCRP.
IF T_IDOC_CONTROL_TMP-STATUS = C_STATUS_IN_IDOC_POSTED.
ok status
T_REPORT-STATUS = 'S'.
ELSE.
error status
T_REPORT-STATUS = 'E'.
ENDIF.
Get IDoc details.
CALL FUNCTION 'IDOC_READ_COMPLETELY'
EXPORTING
DOCUMENT_NUMBER = T_REPORT-IDOC_NO
TABLES
INT_EDIDS = T_EDIDS
INT_EDIDD = T_EDIDD
EXCEPTIONS
DOCUMENT_NOT_EXIST = 1
DOCUMENT_NUMBER_INVALID = 2
OTHERS = 3.
Get Error status
READ TABLE T_EDIDS WITH KEY STATUS = T_IDOC_CONTROL_TMP-STATUS.
IF SY-SUBRC EQ 0.
REPLACE FIRST OCCURRENCE OF '&1' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA1.
REPLACE FIRST OCCURRENCE OF '&2' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA2.
REPLACE FIRST OCCURRENCE OF '&3' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA3.
REPLACE FIRST OCCURRENCE OF '&4' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA4.
REPLACE FIRST OCCURRENCE OF '&' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA1.
REPLACE FIRST OCCURRENCE OF '&' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA2.
REPLACE FIRST OCCURRENCE OF '&' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA3.
REPLACE FIRST OCCURRENCE OF '&' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA4.
T_REPORT-ERROR = T_EDIDS-STATXT.
ENDIF.
LOOP AT T_EDIDD.
CASE T_EDIDD-SEGNAM.
WHEN 'E1EDKA1'.
GV_PARTNER_SEG = T_EDIDD-SDATA.
CLEAR : T_REPORT-STP_NAME.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = GV_PARTNER_SEG-PARTN
IMPORTING
OUTPUT = T_REPORT-STP_NO.
SELECT SINGLE NAME1 TELF1
INTO (T_REPORT-STP_NAME,T_REPORT-STP_PHONE)
FROM KNA1
WHERE KUNNR = T_REPORT-STP_NO.
WHEN 'E1EDK02'.
GV_PO_REF_SEG = T_EDIDD-SDATA.
T_REPORT-PO_NO = GV_PO_REF_SEG-BELNR.
ENDCASE.
ENDLOOP.
APPEND T_REPORT.
ENDLOOP .
SORT T_REPORT BY STATUS IDOC_NO.
Show Report
PERFORM ALV_GRID.
ENDFORM. " show_status_report
thanks
karthik
reward me points if usefull. -
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 -
IDOC status 03 but no XML generated
Hi Experts,
I am facing a problem related to idoc i.e. I am getting idoc status 03, still no XML created at the server directory.
Scenario is: A custom idoc is created with a z report which selects data & send idoc as an XML file in the server directory
IDOC (the first \ represents root as it is a unix server, 2nd \ is a saparator nd then IDOC is a folder to save XML files). Folder IDOC is having all permission(777). When i send idoc using the report is fives status 30 & after that when process it through BD87 it gives a status message 03.
I checked the partner profile, port etc. Even in port access test is OK.
I even tried putting directory as //IDOC , /IDOC but then no access possible error came. only work with
IDOC & gives status message 03.
But no idoc is reaching at the other end i.e.
IDOC.
Can anyone tell me how to fix this problem. Is the problem at SAP end of Unix end.
Regards,
NikHi,
Check the Port configuration.In this case mostly problem form port configrations only.
Check Directory,Outbound file paramters in the port configuration.
Thanks,
radha. -
IDOC: Status (Error/Success/information)report to Sender system
How would one send a message(error/success/information) to the sending(external) system to inform them of the statuses of the messages they've sent to our SAP system?
Hi Baumann,
you have an option called Audit reporting in which you can have the status of idoc at sender side.read the following.
Setting Up Audit Reporting
In the default behavior, after an IDoc is dispatched to a destination system, the sender does not know the state of the process on the destination system. You can configure the system, however, for cross-system reporting. You must model the ALEAUD message between the systems.
Two programs enable cross-system reporting.
1)RBDSTATE. This program is scheduled to run periodically on the destination system. It reports the status of incoming IDocs to the sending system, using the ALEAUD message and ALEAUD01 IDoc. This status information is recorded separately from IDoc status information in the audit logs.
2)RBDAUD01. This program is executed on the sending system. It analyzes the audit log and displays the output as a report.
The RBDSTATE program returns the following statuses, from the receiving to the sending system.
RBDSTATE Is Run on the Receiving System
Status of IDoc in receiving system Status reported to sending system via ALEAUD
53 (Application document posted.) 41 (Application document created in receiving system.)
51 (Error: Application document not posted.) Status 39 (IDoc is in the receiving system.) This status is repeated each time RBDSTATE is run, as long as the IDoc remains in status 51.
68 (Error: No further processing.) 40 (Application document not created in receiving system.)
reward points if helpful, -
Any FM/methods to update idoc segments without changing idoc status
Hi All,
My requirement is a reprocessor program which fills up some fields in the idoc segment before posting. So, after updating the segments, the idoc status should remain as before.
Is there any function modules or methods to update idoc fields in segments without changing the idoc status?
I have tried the FMs EDI_DOCUMENT_OPEN_FOR_EDIT, EDI_CHANGE_DATA_SEGMENT and EDI_DOCUMENT_CLOSE_EDIT, but it changes the idoc status.
Thanks,
Arun MohanAs for FM to do this, i don't know if there are any, but i think you can go directly to the tables with the IDOC data and change them without triggering the changes in status like FM do. Still, i am not sure this is completely true, but you could give it a try. Also, i don't know if this is the best way to do it, because of those legal/audit questions mentioned by Thomas.
Here is a sample code of a program we have to change a field in a segment of WPUUMS.
*& Report YRE00021INTPG
REPORT yre00021reppg.
TABLES: edid4 ,
edidc ,
mean .
* Variaveis Auxiliares
DATA: t_edidc TYPE edidc OCCURS 0 WITH HEADER LINE.
DATA: t_edid4 LIKE edid4 OCCURS 0 WITH HEADER LINE .
DATA: BEGIN OF t_docs OCCURS 0,
docnum LIKE edidc-docnum ,
END OF t_docs.
DATA: wa_e1wpu02 LIKE e1wpu02 .
DATA: wa_e1wpu03 LIKE e1wpu03 .
DATA: t_itedidd LIKE edi_dd40 OCCURS 0 WITH HEADER LINE ,
t_itedidc LIKE edi_dc40 OCCURS 0 WITH HEADER LINE ,
fw_itedidc LIKE edi_dc40 ,
fw_itedidd LIKE edi_dc40 .
DATA: l_matnr TYPE mara-matnr,
l_tam TYPE i.
DATA: l_idoc_number TYPE edidc-docnum.
* Ecran de selecção
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_docnum FOR edid4-docnum ,
s_credat FOR edidc-credat DEFAULT sy-datum ,
s_cretim FOR edidc-cretim .
PARAMETER: p_mestyp LIKE edidc-mestyp DEFAULT 'WPUUMS' ,
p_status LIKE edidc-status DEFAULT '51' .
*SELECTION-SCREEN SKIP.
*PARAMETER: p_ean11 TYPE mean-ean11.
SELECTION-SCREEN : END OF BLOCK b1.
AT SELECTION-SCREEN.
IF p_status <> '51'.
MESSAGE e001(yre) WITH 'Apenas pode modificar IDOCS com erro'.
ENDIF.
IF p_mestyp <> 'WPUUMS'.
MESSAGE e001(yre) WITH 'Apenas pode lançar WPUUMS'.
ENDIF.
*AT SELECTION-SCREEN ON p_ean11.
* SELECT SINGLE * FROM mean WHERE
* ean11 = p_ean11.
* IF sy-subrc <> 0.
* MESSAGE e001(yre) WITH 'Ean não existente'.
* ENDIF.
START-OF-SELECTION.
SELECT docnum INTO TABLE t_docs FROM edidc
WHERE status = p_status
AND mestyp = p_mestyp
AND docnum IN s_docnum
AND credat IN s_credat
AND cretim IN s_cretim .
CHECK sy-subrc = 0 .
LOOP AT t_docs.
CLEAR : wa_e1wpu02.
SELECT * FROM edidc INTO TABLE t_edidc
WHERE docnum = t_docs-docnum.
CHECK sy-subrc = 0.
SELECT * FROM edid4 INTO TABLE t_edid4
WHERE docnum = t_docs-docnum AND
segnam = 'E1WPU02'.
CHECK sy-subrc = 0.
SORT t_edid4 BY segnum.
LOOP AT t_edid4 .
wa_e1wpu02 = t_edid4-sdata.
WRITE wa_e1wpu02-artnr TO l_matnr NO-ZERO.
CONDENSE l_matnr.
* l_tam = STRLEN( l_matnr ).
* IF l_tam <= 6.
SELECT SINGLE ean11 INTO wa_e1wpu02-artnr FROM ytre00004 WHERE
codcurto = l_matnr.
IF sy-subrc = 0.
WRITE : /1 'Código ', l_matnr, ' alterado para ', wa_e1wpu02-artnr.
ELSE.
WRITE : /1 'Código ', l_matnr, ' não encontrado na tabela de conversão'.
CONTINUE.
ENDIF.
* CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
* EXPORTING
* input = p_ean11
* IMPORTING
* output = wa_e1wpu02-artnr.
* ENDIF.
UPDATE edid4 SET sdata = wa_e1wpu02
WHERE docnum = t_edid4-docnum
AND counter = t_edid4-counter
AND segnum = t_edid4-segnum .
IF sy-subrc <> 0 .
ROLLBACK WORK .
WRITE: / t_edid4-docnum .
ELSE.
COMMIT WORK.
ENDIF.
ENDLOOP.
ENDLOOP.
END-OF-SELECTION. -
I configured IDoc within 2 clients in same server, when I send IDoc to receiver it is giving 03 (success) but in receiving system IDoc gives error 51 as some data is not maintained, i am using "Z" function module for inbound IDoc
question - how to send that same error message to the senderHi Ankush ,
question - how to send that same error message to the sender?
I have done the same requirement . Please find the below Procedure
-> before ending of the Custom function module check whether Idoc is Success or not .
IF (error)
LOOP AT idoc_status INTO wa_idoc_status
WHERE docnum = idoc_data-docnum . "Loop the Idoc Status table
l_i = 0.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = wa_idoc_status-msgid
lang = '-D'
no = wa_idoc_status-msgno
v1 = wa_idoc_status-msgv1
v2 = wa_idoc_status-msgv2
v3 = wa_idoc_status-msgv3
v4 = wa_idoc_status-msgv4
IMPORTING
msg = l_msg
EXCEPTIONS
not_found = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
l_i = l_i + 1.
CASE l_i .
WHEN c_1.
MOVE l_msg TO wa_zf40-error_msg1.
WHEN c_2.
MOVE l_msg TO wa_zf40-error_msg2.
WHEN c_3.
MOVE l_msg TO wa_zf40-error_msg3.
WHEN c_4.
MOVE l_msg TO wa_zf40-error_msg4.
WHEN c_5.
MOVE l_msg TO wa_zf40-error_msg5.
ENDCASE.
ENDLOOP.
->Now create a Ztable to make the error descrptions.(Matian some Key fields to identify the Idoc .
->After this create a RFC to read the entries .
I hope this helps to you.Please let me know if u have any query.
Rgds
Sree M
Edited by: Sree Merugu on Mar 27, 2008 6:22 PM -
IHC errors :valid clearing partner not found and no header details found while idoc creation after f110
Please let me know where the config is missing for ihc automatic payment program.in we02 status is not 53.
Please helpHi
Please share the error message in the IDOC.
If the error message is IHC204 "No valid clearing partner was found", it may be due to the missing correct configuration in Set Up Creation of Payment Requests for Inbound IDoc in FI, which links the clearing partner, ALE logical system partner type and IHC account number.
Cheers
taro -
Inconsistent IDOC status some partner getting status 30 randomly ?
Hi,
I have developed customize IDOC and distribute to around 100+ receiver partner type KU. There is always idoc with status 30 in between randomly (not always the same KU).
I have implemented below code :
COMMIT WORK.
CALL FUNCTION 'DEQUEUE_ALL'.
Base on note Note 150202 - ALE: IDoc outbound - IDocs remain in status 30
One possible cause of this is a lock that is released too late:
First, you execute the COMMIT WORK and then a DEQUEUE ALL or EDI_DOCUMENT_DEQUEUE_LATER.
However, when you execute the COMMIT, the asynchronous processes are started that must first lock the IDoc again.
Some forum mention using code below:
IDoc status as 30
Used
CALL FUNCTION 'DB_COMMIT'.
CALL FUNCTION 'DEQUEUE_ALL'.
After FM 'MASTER_IDOC_DISTRIBUTE' and before COMMIT WORK.
Please advise ? is that the process is to fast ?
Thank you in advance
FernandHi Vinay parakala
Schedule back ground job to program RSEOUT00 regularly to process the 30 status idoc....
Your program generates the idoc ... and RSEOUT00 will process you idocs which are in 30 status...
i hope above info helps you
Note: enter Message type BOMMAT in program RSEOUT00
Thanks
Ramesh -
HI Experts,
I am processing an inbound idoc for material transfer request,
In WE19 once i click on "Inbound Function module " button to process idoc.
It process it successfully and also creates the Transfer request.
In FM in which i am processing the IDOC , after successfull creation i am updating the status to 53.
But it is not getting reflected,Its showing Status 62 all the time.
Please tell me the solution.
Thanks
NikhilHi Nikil,
62 IDoc passed to application ..
that means there is a Problem with Process code or the Partner profile inbound message type..
check the Process code and message type are correctly maintined in WE20 for he Partner which the idoc is triggering..
the problem might be Process code for the Partner is not properly configured..
see the below sap notes for the possible solution
» SAP Note Number: 160670 Idocs remain in inbound with status 62
» SAP Note Number: 836022 ALE: Link to application log in status 62
» SAP Note Number: 92552 IDocs-Status 62 cannot be processed
Regards,
Prabhudas -
How can i set the IDOC Status to 03 without doing a "COMMIT WORK"
Hello Geeks,
I want to set the status of the Outgoing IDOC to 03 , without doing a "COMMIT WORK" . Actually only after i do a commit work are my IDOCs dispatched. But with a commit work the IDOCs are dispatched immidiately. I do not want to dispatch it immidiately. Instead i want to hol the IDOCs till my LUW finishes , but the IDOC status should be set to "03" instead of "30".
Thanks,
BashirHi,
After collecting all the idocs which are under status 30, run the program RSEOUT00 to change the status from 30 to 03.
If you want to do this process automatically then set the program RSEOUT00 in background.
Regards,
Lokeswari. -
Hi,
While processing inbound idocs, I am encountering <b>status code 64 (IDoc ready to be transferred to application)</b> . Can any one help in avoiding this status code.
<b>Helpful answers will be rewarded.</b>64 - IDoc ready to be passed to application. The IDoc will be passed to the application by program RBDAPP01.
Although the partner profile is defined and the IDoc has been received, the IDoc cannot be transferred to the application.
You trigger transmission of the IDoc using report RBDAPP01. To do this, plan a regular job in background processing for this report.
Check the processing mode for the IDoc in the partner profile:
Processing mode 1: The system transmits the IDoc immediately after receipt in the application.
Output mode 3: The system collects received IDocs.
IDocs are not intended to be transmitted directly to the application.
Status 64 in the IDoc can normally only occur in conjunction with processing mode 3 and output mode 2. -
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 -
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
Maybe you are looking for
-
How to allow for Multi-line selection in a jdbtable
Hello, I have a JDBTABLE connected to qryEmployee. There is another tab le called enrollment. I would like to give the user the ability to select multiple rows in the employee table so I can add it to the enrollment table (dataset). Can this be done?
-
Oracle.jdbc.driver.OracleDriver
Hi, i am new webservice. i had develop the one webservice example. in this example i am retrieving the data from the database and retreive it as string format(all the rows). when i am calling the webseriveclient as passing the parameter query as stri
-
JAVA webservice to ABAP Webservice
Hi, There is a Webservice developed in Java and published. The same webservice we are now develping in ABAP. Though there is no change in the functionality of the webserice, the WSDL generated for ABAP webservice is looking different than the one for
-
Hello there.. i am in msn communities where you can have someone look over your hijack..this and that.. anyways..i had Judy hijack for me..and she said to uninstall Java.. well when i went to add and remove programs..there is no remove button.. She t
-
Hi, I would like to be able to send email through Forms 10g. Here is my problem; the client will select the recipients from the database, as such: Select email from table where etcâ¦. I tried to use mailto, but it hangs when there are multiple addre