2006 Oct 12 5:37 PM
Hi ,
I have an user exit coding for Sales order processing.
This code is in the FORM Userexit_save_document_prepare.
I have a READ_TEXT function module in the code. It works fin e in all cases. But when Iam trying to delete the Sales order the READ_TEXT function is not retrieving the value of the particular Object , ID and name.
While debugging i checked the value in another session executing the function module READ_TEXT it gives the value , but it is not picking the value during the delete process. Is there any specific reason why its not reading.
Iam thinking that probably as it is in the process of deleting the order it didn't find the order reference, But how come another session shows the same value.
Regards,
Ajai
Hi,
Can you paste abap code from exit to analyse what's wrong with delete process?
Thanks.
2006 Oct 12 5:40 PM
Hi,
while deleting ,you mean the order number is not getting picked up ,since the reference is deleted?
How are you passing this value ? some internal table or memory field.
Try using get parameter id statement.
Thanks.
Mark points if helpful.
2006 Oct 12 5:52 PM
Rushali,
The code is in Userexit_save_document_prepare, so there is no chance of misssing the order #. I have verified that in the debugging mode too..
Regards,
Ajai
2006 Oct 12 5:54 PM
Hi,
Can you paste abap code from exit to analyse what's wrong with delete process?
Thanks.
2006 Oct 12 7:01 PM
Dude,
The code has been working since an year. Generally we never get a requirement to delete an order. So we never encountered this situation till now.
IF sy-tcode = c_value_va01 OR
sy-tcode = c_value_va02.
v_ttextid = 'Z200'.
v_ttextobject = c_value_vbbk.
v_ttextname = vbak-vbeln.
IF sy-tcode = c_value_va01.
v_ttextname = c_val_xxxxxxxxxx.
ENDIF.
REFRESH : i_tlines,
i_long_text.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = v_ttextid
language = sy-langu
name = v_ttextname
object = v_ttextobject
TABLES
lines = i_long_text
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
OTHERS = 7.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DESCRIBE TABLE i_long_text LINES v_lines.
*--- Customer Depart Number is not Exist.
IF v_lines IS INITIAL.
v_flag = 'X'.
message w003(znsd) with text-m02. "Commented by Anjan
vbak-lifsk = c_value_z9.
else.
ENDIF.
.........
..........
IF v_flag = 'X'.
MESSAGE w003(znsd) WITH text-m02.
vbak-lifsk = c_value_z9.
CLEAR v_flag.
ENDIF.
(***** The above warning message is the Culprit of my error while deleting the order.
Even though the value exists in that text Id Z200 READ_TEXT doesn't returns SY-SUBRC as 0.
Regards,
Ajai
2006 Oct 13 2:50 PM
Hi,
what's the value of sy-subrc in delete process for read_text ?
Thanks.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |