2012 Mar 01 8:10 PM
Hi,
I am using BAPI_MATERIAL_SAVEDATA to save Material Basic text and Sales data text only from a custom developed screen with text editor.. The text is updated correctly, no issues.. However when opened in MM02 the basic data text and sales text whichever are update through the custom program are in display mode. This should be in change mode. Am i missing something??
I am not interested to use create_text, save_text as these doest not gives me a material change logs..
Please throw some light on this..
Thanks.
Hi,
I am using BAPI_MATERIAL_SAVEDATA to save Material Basic text and Sales data text only from a custom developed screen with text editor.. The text is updated correctly, no issues.. However when opened in MM02 the basic data text and sales text whichever are update through the custom program are in display mode. This should be in change mode. Am i missing something??
I am not interested to use create_text, save_text as these doest not gives me a material change logs..
Please throw some light on this..
Thanks.
2012 Mar 01 9:56 PM
2012 Mar 01 10:08 PM
Here is my code. the values passed to BAPI. Text saved good, But showing grayed out in MM02.
CLEAR gs_headdata.
gs_headdata-material = s_matnr-low.
gs_headdata-basic_view = 'X'.
CLEAR: gt_mltx, gv_line.
REFRESH: gt_mltx.
gt_mltx-applobject = 'MATERIAL'.
gt_mltx-text_name = s_matnr-low.
gt_mltx-text_id = 'GRUN'.
gt_mltx-langu = 'E'.
gt_mltx-langu_iso = 'EN'.
gt_mltx-format_col = '*'.
IF NOT gt_text_in[] IS INITIAL.
LOOP AT gt_text_in INTO gv_line.
CLEAR : gt_mltx-text_line.
gt_mltx-text_line = gv_line.
APPEND gt_mltx TO gt_mltx.
ENDLOOP.
* Start of MK01+ "For deleting whole text
ELSE.
gt_mltx-del_flag = 'X'.
APPEND gt_mltx TO gt_mltx.
ENDIF.
* End of MK01+
REFRESH : gt_return1, gt_return. "gt_bapi_matreturn2 .
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = gs_headdata
IMPORTING
return = gt_return1
TABLES
materiallongtext = gt_mltx
returnmessages = gt_return. "gt_bapi_matreturn2.
READ TABLE gt_return WITH KEY type = 'S'.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = gt_return.
gv_chg = 'X'.
ENDIF.Thanks.
Edited by: senthil kumar on Mar 2, 2012 4:27 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |