Set idoc status
Dear experts,
i have an idoc which i work with. My Problem is:
how can i set the idoc status to 51 and mark it as corrupted ?
or how can i let the system mark it like this if it is not possible to do it myself ?
Thanks a lot and best regards
René
Presumably, the 51 status has been triggered by some error condition in your process code. That error condition should have a message associated with it. You should have a table or structure that stores these messages and then at the end of your processing, add those messages to the IDOC_STATUS table. You can also add messages for status 53 (such as the document numbers that you have created), status 68, or any other status value. Look at examples of standard process code and you'll see what I mean but here are a few code snippets:
Conditional error message:
GV_IDOC_ERROR_FLAG = 'X'.
GV_STATUS = C_IDOC_STATUS_51.
MESSAGE E199(ZCORP) WITH GS_DEL-VBELN INTO GV_MESSAGE.
PERFORM F9999_ADD_MESSAGE.
Setting the status, adding the messages to the IDOC in a subroutine at the end of processing:
CLEAR IDOC_STATUS.
LOOP AT GT_MESSAGES INTO GS_MESSAGES.
IDOC_STATUS-DOCNUM = P_DOCNUM.
IDOC_STATUS-STATUS = GV_STATUS.
IDOC_STATUS-MSGTY = GS_MESSAGES-MSGTY.
IDOC_STATUS-MSGID = GS_MESSAGES-MSGID.
IDOC_STATUS-MSGNO = GS_MESSAGES-MSGNO.
IDOC_STATUS-MSGV1 = GS_MESSAGES-MSGV1.
IDOC_STATUS-MSGV2 = GS_MESSAGES-MSGV2.
IDOC_STATUS-MSGV3 = GS_MESSAGES-MSGV3.
IDOC_STATUS-MSGV4 = GS_MESSAGES-MSGV4.
APPEND IDOC_STATUS.
CLEAR IDOC_STATUS.
ENDLOOP.
IF SY-SUBRC NE 0.
IDOC_STATUS-DOCNUM = P_DOCNUM.
IDOC_STATUS-STATUS = GV_STATUS.
APPEND IDOC_STATUS.
CLEAR IDOC_STATUS.
ENDIF.
Similar Messages
-
How to find Correct IDoc Status in SAP
Hi All,
I need some help on IDoc scenario, I have custom program to create Idoc and as well it will send IDoc to XI. I want to know idoc staus in the program to update custom table whether idoc sent successfully or not but idoc giving status as 03 (Data passed to port OK) irrespective of idoc send or not, actually idoc not sent to xi when I check SM58 showing error.
Please advice me how to find correct idoc status inside program itself.
**-----Create IDoc
CALL FUNCTION 'IDOC_OUTBOUND_WRITE_TO_DB'
TABLES
int_edidd = i_edidd
CHANGING
int_edidc = wa_int_edidc
EXCEPTIONS
idoc_not_saved = 1
OTHERS = 2.
COMMIT WORK.
i_edidc = wa_int_edidc.
APPEND i_edidc.
REFRESH i_edidd.
**-----Send Idoc
CLEAR i_edidd.
**-------Send Idoc to XI
CALL FUNCTION 'EDI_OUTPUT_NEW'
EXPORTING
onl_option = 'B'
error_flag = ' '
TABLES
i_edidc = i_edidc
i_edidd = i_edidd.
COMMIT WORK.
READ TABLE i_edidc INDEX 1.
**-----Update Dispatch order status based on Idoc status.
IF sy-subrc = 0 AND i_edidc-status ='03'.
znxi01_update c_03 i_edidc-docnum.
gw_success_record = gw_success_record + 1.
ELSE. " Error in Data Transfer
znxi01_update c_02 i_edidc-docnum.
gw_fail_record = gw_fail_record + 1.
ENDIF.Hi Anil,
for setting IDOC Status you can send back a IDOC of type <i>ALEAUD01</i>.
The function IDOC_INPUT_ALEAUD takes automatically this IDOC and writes the status to the origin IDOC.
Regards Mario -
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 -
How to set the status when Idoc fails
Hai ,
I created Idoc extension & created a segment under that(Delivery related).
My requirement is,
if certain data not found,
Idoc should fail with text"Shipemnt for delivery <del. No> not found.
Could you please help me how to do this?
I checked the table EDIDC table but the above mentioned status is not there.
Thanks & Best Regards,
Bhaskar.you need to set the status using IDOC_STATUS
where ever error occurs populate the status table.
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
IDOC_STATUS-STATUS = '51' ." if it is inbound
IDOC_STATUS-MSGTY = Message-type.
IDOC_STATUS-MSGID = message-id.
IDOC_STATUS-MSGNO = message-MSGNR.
IDOC_STATUS-MSGV1 = message-MSGV1.
IDOC_STATUS-MSGV2 = message-MSGV2.
IDOC_STATUS-MSGV3 = message-MSGV3.
IDOC_STATUS-MSGV4 = message-MSGV4.
* IDOC_STATUS-SEGNUM = ?????????????????
* IDOC_STATUS-SEGFLD = ?????????????????
* IDOC_STATUS-UNAME = ?????????????????
IDOC_STATUS-REPID = SY-REPID
* IDOC_STATUS-ROUTID = ?????????????????
APPEND IDOC_STATUS. -
IDOC status 30 but partner profile is set to send immediately (04)
Hi guys,
I have a problem with idocs not being sent immediately... The outputs, the EDI partner profiles are all set up correctly...
it is configured to send immediately however, it's not doing so... prior to upgrade to ECC 6.0 it's working fine... now its not...
However, in BD87 thru manual release of IDocs, it is working fine...
Is there any changes to ECC 6.0 for this matter? or is there anything that needs to be set up other than those mentioned above in order for it to work in ECC 6.0?
Thanks a lot!Mark, have you looked at the OSS notes? By 'IDOC status 30' it finds 300+ notes, this is really a wide-spread issue.
The most recent one is 150202, which actually recommends collecting the IDocs instead of having "send immediately" because it saves the RFC resources. This is not really an ABAP issue, so you might want to discuss this with your Basis admin.
Also, from my experience, even with "mission critical" processes the users, in fact, never feel any real difference between "immediate" and 5-10 min. Sometimes (due to a technical problem, for example) nothing goes on for 30+ min. and no one even notices. -
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. -
Outbound IDoc status set as 31
Hi Friends,
I am working on the outbound IDoc interface IDOC_OUTPUT_ORDRSP. I modify/add few segments based on the business conditions using the user-exit EXIT_SAPLVEDC_003 (ZXVEDU15). According to the business need, I have to set the IDoc status record as 31. Now IDoc is being created with status record as 30. Is there any way to set the status record with status 31 within the scope of this IDoc interface IDOC_OUTPUT_ORDRSP.
Pls let me know if any user exit for this same purpose. If not possible to set status explain me the reason for that.
Thanks
HariHi,
You can use this standard program RC1_IDOC_SET_STATUS to change IDoc status 30 to another status.
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.
<b>Reward points</b>
Regards
Message was edited by:
skk -
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, Tracking in SAP PI/PO Single Stack
Hi All,
My PO version: 7.4, SP4. I am not sure my questions below are still a limitation in current PI/PO single stack systems, and hence requesting your help for the same.
1) Is there a way we can track outbound idocs in SAP PI/PO single stack similar to PI abap stack IDX5? ( Note:- I couldn't find any option in IDOC monitoring in single stack SAP PO 7.4, SP4)
2) IDOC status is always 0 in SAP PO 7.4 single stack IDOC monitoring. I am not sure if this status is just specific to my PO system. Any setting needs to be applied?
ps: Please post only relevant answers/solutions
Thanks,
Praveen Gujjeti
Message was edited by: Praveen GujjetiHi All,
As per SAP help: Comparison of IDoc Adapter (IE) and IDoc Adapter (AAE) - SAP NetWeaver PI Reference Documentation - SAP Library idoc status and tracking not supported in current PO versions. May be SAP will add this feature in upcoming PO versions
Auditing, Monitoring ,and Tracing Functions
Attribute/Feature
IDoc Adapter (IE)
IDoc Adapter (AAE)
ALE Audit
Supported
Supported
IDoc tracing
Supported (transaction IDX5)
Not supported
IDoc monitoring
Transaction IDX5
Integration with channel monitor and message monitor (as part of Advanced Adapter Engine monitor)
Status tracking -SYSTAT
(analysis and further processing of messages that have not been processed)
Not supported
Not supported
RFC monitoring
Supported
Not supported
Message persistence in the IDoc adapter
Supported
Message correlation information can be stored in IDoc adapter.
Not supported.
Message is persisted in messaging system with correlation data persisted in adapter.
Regards,
Praveen Gujjeti -
Hello!
IDOC status 54 - Error during formal application check...
Has this status any specific meaning and usage?
In which cases it is recommended by SAP to set it?
Should it always be followed by a record with status 51?
Thanks and best regards,
VladNo answer at all...
-
Inbound Processing of iDoc Status Message
Silly me - I thought this would be simple ...
I am currently changing our bank interface from a customized ABAP solution to use more standard SAP utilities (particularly iDocs). I have the configuration set up to use the PAYEXT message type sending PEXR2002 iDocs to a file port. Our bank is receiving these documents and is returning an iDoc status message containing the status of each payment iDoc that they received from us.
My problem is that I can't figure out how to get these status iDocs to update the status of the corresponding PEXR2002 iDoc.
I am trying to execute an RFC interface to apply these status messages to my system using the following OS command:
D:\usr\sap\VPR\SYS\exe\uc\NTAMD64\startrfc.exe -3 -d RT2 -u xxxxxx -p xxxxxx -c 220 -h SPR32K36 -s 00 -F EDI_STATUS_INCOMING -E PORT=ZFI_INT003
The error message that I receive when this is run is:
RFC Call/Exception: SYSTEM_FAILURE
Group Error Group 104
Key RFC_ERROR_SYSTEM_FAILURE
Message Status record 1 is invalid (TABNAM: 'EDI_DC40')
The port (ZFI_INT003) is the file port that is configured for the outbound file. in WE20, this port has the "Status File" tab set to use the logical file name where the status file is being stored on the server. the startrfc command is connecting to the SAP system and opening the status file. I'm not sure where I'm going wrong here.
Can someone please help get me pointed in the right direction? I've obviously missed something here.
Thanks,
GlenHi,
call function modules:
EDI_DOCUMENT_OPEN_FOR_PROCESS
EDI_DOCUMENT_STATUS_SET
EDI_DOCUMENT_CLOSE_PROCESS
kind regards,
HP -
How to create an IDOC Status.
Hi All,
I have a requirement to create an IDOC Status, which should be a copy of existing status.
How to accomplish the same.
Regards,
NehaHi Neha,
You can create the Idoc status, if it is an Inbound Idoc. Copy the Existing process code & add it to u r Inbound Partner Profile. In the process code u can create the status..Check the below code.
if gv_error_status <> 0.
condense gt_msgv-msgv1 no-gaps.
translate gt_msgv-msgv1 to upper case. "#EC TRANSLANG
set extended check on.
read table idoc_contrl index 1.
idoc_status-status = '68'.
idoc_status-uname = sy-uname.
idoc_status-repid = sy-repid.
idoc_status-routid = gv_funcname.
idoc_status-docnum = idoc_contrl-docnum.
idoc_status-msgv1 = gt_msgv-msgv1.
idoc_status-msgv2 = gt_msgv-msgv2.
append idoc_status.
idoc_status-status = '51'.
idoc_status-uname = sy-uname.
idoc_status-repid = sy-repid.
idoc_status-routid = gv_funcname.
idoc_status-docnum = idoc_contrl-docnum.
append idoc_status.
endif.
I hope this help you.
Regards
Rajendra -
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. -
Hi All,
I have created IDOC extension for IDOC Basic type "PROACT01" and have followed all required necessary steps but getting IDOC
Status 26. EDI: Syntax error in IDoc (segment cannot be identified). The exact error is:
Please check Error Details and the details of the steps I followed for Setting up IDOC Extension:
Error Detail :
EDI: Syntax error in IDoc (segment cannot be identified)
Message no. E0078
Diagnosis
The segment ZPROSEG does not occur at the current level of the basic type PROACT01 (extension PROACTEX).
This error can have several reasons:
The segment ZPROSEG is assigned to a group whose header segment does not occur.
The segment ZPROSEG does not exist in the syntax description of the basic type PROACT01 (extension PROACTEX).
The sequence of segments in the group in which the segment appears is incorrect.
Previous errors ('mandatory' segment or group missing) may be due to this error.
Procedure
Please check the IDoc or the syntax description of the basic type PROACT01 (extension PROACTEX).
Can you please look at this problem and suggest what is wrong with IDOC Extension/Custome Segment?
Below is the Details of the Steps which I have followed:
1. Tcode WE31 - Created new custom Segment ZPROSEG with 4 fields. Released segment.
2. TCode WE30 - Created IDOC Extension PROACTEX for Basic Type PROACT01. Released IDOC extension.
Here when I run syntax check warning appears "No predecessors exist". I am not sure if its okay!!
3. TCode WE82 - Added Extension PROACTEX in the Message Type PROACT with BASIC Type PROACT01.
4. TCode WE20 - Added IDOC Extension PROACTEX in the predefined partner profile in WE20 transaction.
5. Added the following code in the Customer Exit EXIT_SAPLWVMI_001 include ZXWVMIU01 .
DATA segnam(27).
READ TABLE dedidd WITH KEY segnam = 'ZPROSEG'.
IF sy-subrc NE 0.
LOOP AT dedidd WHERE segnam = 'E1EDP31'.
CLEAR dedidd.
dedidd-segnam = 'ZPROSEG'.
zproseg-matnr = 'Mat1'.
zproseg-lgort = '001'.
zproseg-gernr = 'SNo1'.
zproseg-labst = 2.
dedidd-sdata = zproseg.
APPEND dedidd.
ENDLOOP.
ENDIF.
Finally ran transaction WVM2 (Transfer of Stock & Sales Data) to generate IDOC, its creating IDOC but when checked IDOC in WE05 its getting Status Error "26".
Looking forward for your reply.
Many thanks in advance.Hello,
Actually you are appending the Z segment instead of inserting into the correct position. So the segment is added at the last, so hierarchy of segments is collapsed.
So get the index of the previous segment E1EDP31 and increase the index by 1 and INSERT the Z segment with that new index as below.
LOOP AT dedidd WHERE segnam = 'E1EDP31'.
lv_index = sy-tabix. " <<--
ADD 1 TO lv_index. " <<--
CLEAR dedidd.
dedidd-segnam = 'ZPROSEG'.
zproseg-matnr = 'Mat1'.
zproseg-lgort = '001'.
zproseg-gernr = 'SNo1'.
zproseg-labst = 2.
dedidd-sdata = zproseg.
*APPEND dedidd.
INSERT dedidd INDEX lv_index. " <<---
ENDLOOP.
Here actually we are insering the record inside the LOOP and it regenerates the index again. It is not actually a good practice.
So the best practice is get the index and generate the segment inside the loop, store them into another internal table, come out the loop and insert the Z segments into DEDIDD by looping the new internal table.
Maybe you are looking for
-
Reset form to null values...except readonly fields.
I need the ability to set all of my checkboxes to a state where they are not Checked...and my dropdowns to a value of zero....and non-readonly text boxes to null string. However, I have several text boxes with information I want to retain. They are s
-
Panda3d 1.6.2-3 binary programs can't find shared libraries
This was a bit of an issue for me, and I wanted to see if this was an issue for anyone else. Initially after installing panda3d 1.6.2-3 I had issues running the binary programs it provided, in particular punzip. punzip would complain about not findin
-
Display fetched value as heading
Hi Experts, Please advice if it is possible to display the fetched value as heading in ALV. Suppose If in dbtab: OBJECT OBJECT DESCRIPTION CLASS VALUE OBJ 1 MACHINE 1 A 20
-
I see that Adobe Pro X came with an Internet Explorer extension that allows you to create PDFs from websites. However, I use Firefox as my primary browser. Is there an equivalent extension from Adobe for Firefox? Thanks.
-
Okay, I have read some of the explanations and know it will take a while to have this happen, but wondered if I should try something else. I am currently trying to burn a 55 min video and I am slowly going through the "Encoding Audio" stage. I starte