2008 Oct 24 10:04 AM
Hi Gurus,
I am writing some code in an exit to check the netweight values for variable weight within certain interval.this exit is in function module
IDOC_INPUT_DELVRY. So the values to check are coming from an Idoc (Inbound) .Now my requirement is to provide error message of 51 to the Idoc.
Here i have coded as :
IF lv_result NE ' '.
IF lv_var <= lv_result AND lv_result <= lv_var1.
ELSE .
MESSAGE text-001 TYPE 'E'.
where text-001 = "Variable weight not available in interval definition."
But when i see the error in the generated Idoc i get this error:
"Variable weight not available in interval definition Variable weight not"
So basically the error gets repeated.
Can anyone rectify this or is there any other method to send the error.
Hi Gurus,
I am writing some code in an exit to check the netweight values for variable weight within certain interval.this exit is in function module
IDOC_INPUT_DELVRY. So the values to check are coming from an Idoc (Inbound) .Now my requirement is to provide error message of 51 to the Idoc.
Here i have coded as :
IF lv_result NE ' '.
IF lv_var <= lv_result AND lv_result <= lv_var1.
ELSE .
MESSAGE text-001 TYPE 'E'.
where text-001 = "Variable weight not available in interval definition."
But when i see the error in the generated Idoc i get this error:
"Variable weight not available in interval definition Variable weight not"
So basically the error gets repeated.
Can anyone rectify this or is there any other method to send the error.
2008 Oct 24 10:13 AM
HI,
Probably the text-001 is getting assigned twice somehow.
I would recommend you create a message in SE91 instead of using the text-001 or check if the text-001 has any value before assigning the value to it.
regards,
Advait
2008 Oct 24 10:56 AM
But this text comes from the Text Elements.so there is no way we can clear it.
2008 Oct 24 11:09 AM
Hello ,
Could you please populate the messages (May be E,W,I) into Idocs Status records Instead of using MESSAGE statement .So that once Idoc Processed you can see the status ..
Hope it is helpfull ..
Regards,
2008 Oct 24 11:14 AM
I can pass the message type as 51 to the idoc status records but where to pass the message itself. Can u please tell me in which field i can pass these 2 values. May be the table is EDIDC.
Thanks in advance.
2008 Oct 24 11:26 AM
you can use the following code :
IF SY-SUBRC <> 0. " Something failed
CLEAR T_PROT.
T_PROT-VBELN = VBELN_VL. " delivery number
T_PROT-MSGID = SY-MSGID.
T_PROT-MSGTY = SY-MSGTY.
T_PROT-MSGNO = SY-MSGNO.
T_PROT-MSGV1 = SY-MSGV1.
T_PROT-MSGV2 = SY-MSGV2.
T_PROT-MSGV3 = SY-MSGV3.
T_PROT-MSGV4 = SY-MSGV4.
APPEND T_PROT.
ENDIF.
the T_PROT is a table with messages . It refers to the structure prott. Its also passed to the user exit functions as changing parameter called 'PROCESSING_PROTOCOL'.
regards,
Advait
2008 Oct 24 11:44 AM
But PROCESSING_PROTOCOL is in the EXPORTING part. So i cannot use it.
i have IDOC_CONTROL as changing.
2008 Oct 24 12:08 PM
Hello ,
See the below code
Maintain the Mesasge within a Message class and provide the same as below .
idoc_status-docnum = idoc_contrl-docnum.
idoc_status-segnum = tb_segnum.
idoc_status-status = '51'.
idoc_status-msgty = <MESg-type>.
idoc_status-msgid = <Mesgid>.
idoc_status-msgno = <Msgnumber>.
idoc_status-msgv1 = <msgv1>..
idoc_status-msgv2 = <-message_v2>.
idoc_status-msgv3 = <message_v3>.
idoc_status-msgv4 = <-message_v4>.
Hope it is helpful ..
Regards,
2008 Oct 24 12:33 PM
Yes , its not Changing you are right, but you can still append your message to that parameter as it is importing when called and exporting in the function itself. So if you append anything to the T_PROX , it will be imported in the program IDOC_INPUT_DELVRY and later processed in the subroutine PERFORM DGMSD_UPDATE, when it updates the messages to the status records.
regards,
Advait
2008 Oct 27 12:00 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |